Skip to content

Commit

Permalink
Update stable/kommander/templates/grafana/hooks-home-dashboard.yaml
Browse files Browse the repository at this point in the history
Co-Authored-By: Grace Do <[email protected]>
  • Loading branch information
samvantran and gracedo authored Mar 6, 2020
1 parent 29df202 commit 784a6d1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
set -o errexit
set -o pipefail
CURL="curl --verbose --fail --max-time 30 --retry 20 --retry-connrefused"
DASHBOARD_ID=$($CURL -H "X-Forwarded-User: $X_FORWARDED_USER" {{ .Values.grafana.hooks.serviceURL }}/api/dashboards/uid/{{ .Values.grafana.hooks.homeDashboardUID }} | jq '.dashboard.id')
DASHBOARD_ID=$($CURL -H "X-Forwarded-User: $X_FORWARDED_USER" {{ .Values.grafana.hooks.serviceURL }}/api/search/?query={{ .Values.grafana.hooks.dashboardName | urlquery }} | jq '.[0].id')
echo "setting home dashboard to ID" $DASHBOARD_ID
$CURL -X PUT -H "Content-Type: application/json" -H "X-Forwarded-User: $X_FORWARDED_USER" -d '{"homeDashboardId":'"$DASHBOARD_ID"'}' {{ .Values.grafana.hooks.serviceURL }}/api/org/preferences
EOF
Expand Down

0 comments on commit 784a6d1

Please sign in to comment.