Skip to content

Commit

Permalink
Fixes and new feature (#40)
Browse files Browse the repository at this point in the history
* 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 <edro15@users.noreply.github.com>
  • Loading branch information
edro15 and edro15 committed Jan 16, 2024
1 parent 70cdf56 commit a22fc9f
Show file tree
Hide file tree
Showing 21 changed files with 973 additions and 19,587 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
app_id: ${{ steps.appinfo.outputs.app_id }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Fetch and set app info
id: appinfo
run: |
APP_ID=$(cat app.manifest | jq -r '.info.id.name')
echo "::set-output name=app_id::${APP_ID}"
echo "app_id=${APP_ID}" >> $GITHUB_OUTPUT
APP_NAME=$(echo "$APP_ID" | tr _ - )
echo "::set-output name=app_name::${APP_NAME}"
echo "app_name=${APP_NAME}" >> $GITHUB_OUTPUT
- name: Excluding images from README
run: |
Expand All @@ -34,7 +34,7 @@ jobs:
tar -zcvf dist/${{ steps.appinfo.outputs.app_name }}.tgz --exclude='.[^/]*' --exclude=./dist .
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: app_tgz
path: dist/${{ steps.appinfo.outputs.app_name }}.tgz
Expand All @@ -45,12 +45,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: app_tgz

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7

Expand All @@ -73,7 +73,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: app_tgz

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

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
if: contains(['major', 'minor', 'patch'], ${{ github.event.inputs.bumpPart }})
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get app info
id: appinfo
run: |
APP_NAME=$(cat app.manifest | jq -r '.info.id.name' | tr _ - )
echo "::set-output name=app_name::${APP_NAME}"
echo "app_name=${APP_NAME}" >> $GITHUB_OUTPUT
- name: Bump version and push tag
id: bumpversion
Expand All @@ -50,15 +50,15 @@ jobs:
id: sha
run: |
sha_new=$(git rev-parse HEAD)
echo "::set-output name=sha::$sha_new"
echo "sha=${sha_new}" >> $GITHUB_OUTPUT
build:
name: Generate App Bundle
needs: tag-version
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ needs.tag-version.outputs.new_sha }}
fetch-depth: 0
Expand All @@ -73,7 +73,7 @@ jobs:
tar -zcvf dist/${{ needs.tag-version.outputs.app_name }}_v${{ needs.tag-version.outputs.version }}.tgz --exclude='.[^/]*' --exclude=./dist .
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: app_tgz
path: dist/${{ needs.tag-version.outputs.app_name }}_v${{ needs.tag-version.outputs.version }}.tgz
Expand All @@ -86,7 +86,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Fetch all tags
run: |
Expand All @@ -104,7 +104,7 @@ jobs:
else
content="Initial release"
fi
echo "::set-output name=message::${content}"
echo "message=${content}" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
Expand All @@ -123,15 +123,15 @@ jobs:
prerelease: false

- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: app_tgz

- name: Get artifact name
id: app-name
run: |
app_package=$(ls -1 *gz | xargs basename)
echo "::set-output name=package::${app_package}"
echo "package=${app_package}" >> $GITHUB_OUTPUT
- name: Upload Release Asset
id: upload-release-asset
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node-modules/
**/node_modules/
.vscode
*.pyc
local.meta
fiddle/
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ Besides:
* Field names **must** correspond to the ones specified above to be properly handled by the visualization
* Any `edge_weight` value higher than `18` will be normalised to `18`

### Drilldown
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`.

<option name="drilldown">all</option>
<drilldown>
<set token="tok">$row.src$</set>
</drilldown>

This token can then be used within your dashboard in another panel or visualisation.

## Examples
![alt text](.images/splunk-3D-graph-network-topology-viz-screen-3.png "Screenshot")

Expand Down
1 change: 1 addition & 0 deletions README/savedsearches.conf.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[<stanza name>]
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.enable3D = <float>
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.showAnimationBar = <float>
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.showNodeLabels = <float>
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.showLinkArrows = <float>
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.dagMode = <string>
display.visualizations.custom.3d_graph_network_topology_viz.3d_graph_network_topology_viz.cameraController = <string>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
<option value="0">No</option>
</splunk-radio-input>
</splunk-control-group>
<splunk-control-group label="Show Labels" help=" ">
<splunk-radio-input name="{{VIZ_NAMESPACE}}.showNodeLabels" value="0">
<option value="1">Yes</option>
<option value="0">No</option>
</splunk-radio-input>
</splunk-control-group>
<splunk-control-group label="Background Color" help=" ">
<splunk-color-picker name="{{VIZ_NAMESPACE}}.bgColor" value="#000011">
</splunk-color-picker>
Expand Down
Loading

0 comments on commit a22fc9f

Please sign in to comment.