You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This script is dynamically triggered by "VisualizationReports.sh" when report "All" or "Visualization" is enabled.
4
+
# It is designed as an entry point and delegates the execution to the dedicated "anomalyDetectionGraphVisualization.sh" script that does the "heavy lifting".
5
+
6
+
# Note that "scripts/prepareAnalysis.sh" is required to run prior to this script.
7
+
8
+
# Requires anomalyDetectionGraphVisualization.sh
9
+
10
+
# Fail on any error ("-e" = exit on first error, "-o pipefail" exist on errors within piped commands)
11
+
set -o errexit -o pipefail
12
+
13
+
# Overrideable Constants (defaults also defined in sub scripts)
14
+
REPORTS_DIRECTORY=${REPORTS_DIRECTORY:-"reports"}
15
+
16
+
## Get this "scripts/reports" directory if not already set
17
+
# Even if $BASH_SOURCE is made for Bourne-like shells it is also supported by others and therefore here the preferred solution.
18
+
# CDPATH reduces the scope of the cd command to potentially prevent unintended directory changes.
19
+
# This way non-standard tools like readlink aren't needed.
20
+
ANOMALY_DETECTION_SCRIPT_DIR=${ANOMALY_DETECTION_SCRIPT_DIR:-$(CDPATH=. cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)}
# Get the "summary" directory by taking the path of this script and selecting "summary".
24
+
ANOMALY_DETECTION_GRAPHS_DIR=${ANOMALY_DETECTION_GRAPHS_DIR:-"${ANOMALY_DETECTION_SCRIPT_DIR}/graphs"}# Contains everything (scripts, queries, templates) to create the Markdown summary report for anomaly detection
25
+
26
+
# Delegate the execution to the responsible script.
VISUALIZATION_SCRIPTS_DIR=${VISUALIZATION_SCRIPTS_DIR:-"${SCRIPTS_DIR}/visualization"}# Repository directory containing the shell scripts for visualization
ANOMALY_DETECTION_TOP_N_GRAPHS=${ANOMALY_DETECTION_TOP_N_GRAPHS:-5}# Number of top ranked graphs to visualize per query for anomaly detection.
33
+
34
+
# Define functions to execute cypher queries from within a given file
35
+
source"${SCRIPTS_DIR}/executeQueryFunctions.sh"
36
+
37
+
# Runs a parametrized query, converts their results in GraphViz format and creates a Graph visualization.
38
+
# Outputs (at most) 10 indexed files (for report_name="TopHub" then TopHub1, TopHub2,...) with a focused visualization of one selected node and its surroundings.
39
+
#
40
+
# Required Parameters:
41
+
# - report_name=...
42
+
# Name of the query and then also the resulting visualization file.
43
+
# - template_name=...
44
+
# Name of the GraphViz template gv file.
45
+
# - projection_language=...
46
+
# Name of the associated programming language. Examples: "Java", "Typescript"
47
+
# - projection_node_label=...
48
+
# Label of the nodes that will be used for the projection. Example: "Package"
0 commit comments