mirror of
https://github.com/grafana/grafana.git
synced 2024-12-28 18:01:40 -06:00
354c1e992e
* user essentials mob! 🔱 * user essentials mob! 🔱 lastFile:devenv/bulk-folders/bulk-folders.sh * user essentials mob! 🔱 lastFile:devenv/setup.sh * user essentials mob! 🔱 lastFile:devenv/setup.sh * user essentials mob! 🔱 * user essentials mob! 🔱 * user essentials mob! 🔱 * codeowners --------- Co-authored-by: eledobleefe <laura.fernandez@grafana.com> Co-authored-by: Laura Benz <laura.benz@grafana.com> Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
18 lines
641 B
Bash
Executable File
18 lines
641 B
Bash
Executable File
#!/bin/bash
|
|
|
|
numberOfFolders=${1:-200}
|
|
numberOfDashboardsPerFolder=${2:-3}
|
|
|
|
for (( folderCounter=1; folderCounter<="$numberOfFolders"; folderCounter++ ))
|
|
do
|
|
echo "Creating folder $folderCounter"
|
|
folderPath="bulk-folders/Bulk Folder ${folderCounter}"
|
|
|
|
mkdir -p "$folderPath"
|
|
|
|
for (( dashCounter=1; dashCounter<="$numberOfDashboardsPerFolder"; dashCounter++ ))
|
|
do
|
|
jsonnet -o "$folderPath/dashboard${dashCounter}.json" -e "local bulkDash = import 'bulk-dashboards/bulkdash.jsonnet'; bulkDash + { uid: 'bulk-folder-${folderCounter}-${dashCounter}', title: 'Bulk Folder ${folderCounter} Dashboard ${dashCounter}' }"
|
|
done
|
|
done
|