mirror of
https://github.com/grafana/grafana.git
synced 2025-01-24 15:27:01 -06:00
devenv: scripts for generating many unique dashboards
This commit is contained in:
parent
e6f2811b21
commit
6a82098ddf
2
.gitignore
vendored
2
.gitignore
vendored
@ -66,3 +66,5 @@ debug.test
|
||||
/vendor/**/.editorconfig
|
||||
/vendor/**/appengine*
|
||||
*.orig
|
||||
|
||||
/devenv/dashboards/bulk-testing/*.json
|
||||
|
1140
devenv/dashboards/bulk-testing/bulkdash.jsonnet
Normal file
1140
devenv/dashboards/bulk-testing/bulkdash.jsonnet
Normal file
File diff suppressed because it is too large
Load Diff
15
devenv/dashboards/generate-bulk-dashboards.sh
Executable file
15
devenv/dashboards/generate-bulk-dashboards.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#/bin/bash
|
||||
|
||||
if ! type "jsonnet" > /dev/null; then
|
||||
echo "you need you install jsonnet to run this script"
|
||||
echo "follow the instructions on https://github.com/google/jsonnet"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COUNTER=0
|
||||
MAX=400
|
||||
while [ $COUNTER -lt $MAX ]; do
|
||||
jsonnet -o "bulk-testing/dashboard${COUNTER}.json" -e "local bulkDash = import 'bulk-testing/bulkdash.jsonnet'; bulkDash + { uid: 'uid-${COUNTER}', title: 'title-${COUNTER}' }"
|
||||
let COUNTER=COUNTER+1
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user