diff --git a/docs/layouts/partials/templates/dashboard-tabs.html b/docs/layouts/partials/templates/dashboard-tabs.html index 6b4f2ee31..01bae7fdb 100644 --- a/docs/layouts/partials/templates/dashboard-tabs.html +++ b/docs/layouts/partials/templates/dashboard-tabs.html @@ -1,3 +1,6 @@ +{{ $types := slice "Log" "Metric" }} +{{ $alerts := where .alerts "visible" true }} +{{ $alerts := where $alerts "type" "in" $types }}
- {{ highlight (partial "templates/grafana/dashboard.html" (dict "type" .type "alerts" .alerts "devMode" .devMode)) "json" }} + {{ highlight (partial "templates/grafana/dashboard.html" (dict "type" .type "alerts" $alerts)) "json" }}
diff --git a/docs/layouts/partials/templates/grafana/dashboard.html b/docs/layouts/partials/templates/grafana/dashboard.html index 3813aad36..a0af04fee 100644 --- a/docs/layouts/partials/templates/grafana/dashboard.html +++ b/docs/layouts/partials/templates/grafana/dashboard.html @@ -1,6 +1,3 @@ -{{ $types := slice "Log" "Metric" }} -{{ $alerts := where .alerts "visible" true }} -{{ $alerts := where $alerts "type" "in" $types }} { "__inputs": [], "__elements": {}, @@ -29,7 +26,7 @@ "links": [], "liveNow": false, "panels": [ - {{ range $idx, $value := sort $alerts "name" "asc" }}{{ if ne $idx 0}}, + {{ range $idx, $value := sort .alerts "name" "asc" }}{{ if ne $idx 0}}, {{ end }} { "title": "{{ $value.name }}", "datasource": { diff --git a/docs/layouts/shortcodes/alertList.html b/docs/layouts/shortcodes/alertList.html index 1fe124fe9..26a86ab7e 100644 --- a/docs/layouts/shortcodes/alertList.html +++ b/docs/layouts/shortcodes/alertList.html @@ -34,7 +34,7 @@

Dashboards:

- {{ partial "templates/dashboard-tabs.html" (dict "type" $type "alerts" .alerts "devMode" $.Site.Params.ambaDevMode) }} + {{ partial "templates/dashboard-tabs.html" (dict "type" $type "alerts" .alerts) }} {{ range sort .alerts "name" "asc" }}