From 0198df28053d31e65268818380bb3d88a710df3f Mon Sep 17 00:00:00 2001 From: Joseph Barnes Date: Tue, 17 Oct 2023 18:33:23 -0500 Subject: [PATCH] updated spacing issue in grafana template --- docs/layouts/partials/templates/dashboard-tabs.html | 5 ++++- docs/layouts/partials/templates/grafana/dashboard.html | 5 +---- docs/layouts/shortcodes/alertList.html | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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" }}