Skip to content

Commit a22fc9f

Browse files
authored
Fixes and new feature (#40)
* Fixed gitignore * Security fixes for dependabot alerts * Added id stanza for app.conf * Updated CI/CD to fix warnings * Last fix for CI/CD * Updated manual-release ci/cd * Updated .gitignore * Updated README * Updated dependencies * Fix #32 * Webpack: modified mode and fixed warning * Fixed viz when swapping 3D/2D * Added feature to show nodes label * Fixed bug when colors where not specified in spl --------- Co-authored-by: Erica Pescio <[email protected]>
1 parent 70cdf56 commit a22fc9f

21 files changed

+973
-19587
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
app_id: ${{ steps.appinfo.outputs.app_id }}
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1818

1919
- name: Fetch and set app info
2020
id: appinfo
2121
run: |
2222
APP_ID=$(cat app.manifest | jq -r '.info.id.name')
23-
echo "::set-output name=app_id::${APP_ID}"
23+
echo "app_id=${APP_ID}" >> $GITHUB_OUTPUT
2424
APP_NAME=$(echo "$APP_ID" | tr _ - )
25-
echo "::set-output name=app_name::${APP_NAME}"
25+
echo "app_name=${APP_NAME}" >> $GITHUB_OUTPUT
2626
2727
- name: Excluding images from README
2828
run: |
@@ -34,7 +34,7 @@ jobs:
3434
tar -zcvf dist/${{ steps.appinfo.outputs.app_name }}.tgz --exclude='.[^/]*' --exclude=./dist .
3535
3636
- name: Upload artifact
37-
uses: actions/upload-artifact@v2
37+
uses: actions/upload-artifact@v3
3838
with:
3939
name: app_tgz
4040
path: dist/${{ steps.appinfo.outputs.app_name }}.tgz
@@ -45,12 +45,12 @@ jobs:
4545
runs-on: ubuntu-latest
4646
steps:
4747
- name: Download artifact
48-
uses: actions/download-artifact@v2
48+
uses: actions/download-artifact@v3
4949
with:
5050
name: app_tgz
5151

5252
- name: Set up Python
53-
uses: actions/setup-python@v2
53+
uses: actions/setup-python@v4
5454
with:
5555
python-version: 3.7
5656

@@ -73,7 +73,7 @@ jobs:
7373
runs-on: ubuntu-latest
7474
steps:
7575
- name: Download artifact
76-
uses: actions/download-artifact@v2
76+
uses: actions/download-artifact@v3
7777
with:
7878
name: app_tgz
7979

@@ -83,7 +83,7 @@ jobs:
8383
tar -xf ${{ needs.bundle-app.outputs.app_name }}.tgz -C build/${{ needs.bundle-app.outputs.app_id }}
8484
8585
- name: Setup Python
86-
uses: actions/setup-python@v2
86+
uses: actions/setup-python@v4
8787
with:
8888
python-version: 3.7
8989

.github/workflows/manual-release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
if: contains(['major', 'minor', 'patch'], ${{ github.event.inputs.bumpPart }})
2727
steps:
2828
- name: Checkout source
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
3030

3131
- name: Get app info
3232
id: appinfo
3333
run: |
3434
APP_NAME=$(cat app.manifest | jq -r '.info.id.name' | tr _ - )
35-
echo "::set-output name=app_name::${APP_NAME}"
35+
echo "app_name=${APP_NAME}" >> $GITHUB_OUTPUT
3636
3737
- name: Bump version and push tag
3838
id: bumpversion
@@ -50,15 +50,15 @@ jobs:
5050
id: sha
5151
run: |
5252
sha_new=$(git rev-parse HEAD)
53-
echo "::set-output name=sha::$sha_new"
53+
echo "sha=${sha_new}" >> $GITHUB_OUTPUT
5454
5555
build:
5656
name: Generate App Bundle
5757
needs: tag-version
5858
runs-on: ubuntu-latest
5959
steps:
6060
- name: Checkout code
61-
uses: actions/checkout@v2
61+
uses: actions/checkout@v3
6262
with:
6363
ref: ${{ needs.tag-version.outputs.new_sha }}
6464
fetch-depth: 0
@@ -73,7 +73,7 @@ jobs:
7373
tar -zcvf dist/${{ needs.tag-version.outputs.app_name }}_v${{ needs.tag-version.outputs.version }}.tgz --exclude='.[^/]*' --exclude=./dist .
7474
7575
- name: Upload artifact
76-
uses: actions/upload-artifact@v2
76+
uses: actions/upload-artifact@v3
7777
with:
7878
name: app_tgz
7979
path: dist/${{ needs.tag-version.outputs.app_name }}_v${{ needs.tag-version.outputs.version }}.tgz
@@ -86,7 +86,7 @@ jobs:
8686
runs-on: ubuntu-latest
8787
steps:
8888
- name: Checkout code
89-
uses: actions/checkout@v2
89+
uses: actions/checkout@v3
9090

9191
- name: Fetch all tags
9292
run: |
@@ -104,7 +104,7 @@ jobs:
104104
else
105105
content="Initial release"
106106
fi
107-
echo "::set-output name=message::${content}"
107+
echo "message=${content}" >> $GITHUB_OUTPUT
108108
109109
- name: Create Release
110110
id: create_release
@@ -123,15 +123,15 @@ jobs:
123123
prerelease: false
124124

125125
- name: Download artifact
126-
uses: actions/download-artifact@v2
126+
uses: actions/download-artifact@v3
127127
with:
128128
name: app_tgz
129129

130130
- name: Get artifact name
131131
id: app-name
132132
run: |
133133
app_package=$(ls -1 *gz | xargs basename)
134-
echo "::set-output name=package::${app_package}"
134+
echo "package=${app_package}" >> $GITHUB_OUTPUT
135135
136136
- name: Upload Release Asset
137137
id: upload-release-asset

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
node-modules/
1+
**/node_modules/
22
.vscode
33
*.pyc
44
local.meta
5+
fiddle/

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ Besides:
3737
* Field names **must** correspond to the ones specified above to be properly handled by the visualization
3838
* Any `edge_weight` value higher than `18` will be normalised to `18`
3939

40+
### Drilldown
41+
To enrich your dashboards with some interactivity, [enable drilldown in your dashboard panel](https://docs.splunk.com/Documentation/Splunk/latest/Viz/DrilldownIntro#Access_the_drilldown_editor). For example, assuming the configuration below, by clicking on a node in your graph it should populate a token with the value from a field named `src`.
42+
43+
<option name="drilldown">all</option>
44+
<drilldown>
45+
<set token="tok">$row.src$</set>
46+
</drilldown>
47+
48+
This token can then be used within your dashboard in another panel or visualisation.
49+
4050
## Examples
4151
![alt text](.images/splunk-3D-graph-network-topology-viz-screen-3.png "Screenshot")
4252

README/savedsearches.conf.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[<stanza name>]
22
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.enable3D = <float>
33
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.showAnimationBar = <float>
4+
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.showNodeLabels = <float>
45
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.showLinkArrows = <float>
56
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.dagMode = <string>
67
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.cameraController = <string>

appserver/static/visualizations/3d_graph_network_topology_viz/formatter.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
<option value="0">No</option>
66
</splunk-radio-input>
77
</splunk-control-group>
8+
<splunk-control-group label="Show Labels" help=" ">
9+
<splunk-radio-input name="{{VIZ_NAMESPACE}}.showNodeLabels" value="0">
10+
<option value="1">Yes</option>
11+
<option value="0">No</option>
12+
</splunk-radio-input>
13+
</splunk-control-group>
814
<splunk-control-group label="Background Color" help=" ">
915
<splunk-color-picker name="{{VIZ_NAMESPACE}}.bgColor" value="#000011">
1016
</splunk-color-picker>

0 commit comments

Comments
 (0)