mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 10:20:29 -06:00
4d4cfaefce
* Change devenv provision updateinterval to one hour * Update bulk-dashboards and bulk-folders * Clear bulk-folders before creating new ones * Update devenv/bulk-folders/bulk-folders.sh
21 lines
750 B
Bash
Executable File
21 lines
750 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Deleting previous bulk folders"
|
|
find ./bulk-folders -type d -name "Bulk Folder*" -exec rm -rf "{}" \;
|
|
|
|
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
|