Skip to content

Commit

Permalink
Merge pull request #39 from JoeyBarnes/main
Browse files Browse the repository at this point in the history
updated spacing issue in grafana template
  • Loading branch information
JoeyBarnes authored Oct 17, 2023
2 parents 3addd67 + 0198df2 commit ffe8518
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 4 additions & 1 deletion docs/layouts/partials/templates/dashboard-tabs.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{{ $types := slice "Log" "Metric" }}
{{ $alerts := where .alerts "visible" true }}
{{ $alerts := where $alerts "type" "in" $types }}
<div class="gdoc-tabs">
<input
type="radio"
Expand All @@ -20,6 +23,6 @@
Grafana
</label>
<div class="gdoc-markdown--nested gdoc-tabs__content">
{{ 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" }}
</div>
</div>
5 changes: 1 addition & 4 deletions docs/layouts/partials/templates/grafana/dashboard.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{{ $types := slice "Log" "Metric" }}
{{ $alerts := where .alerts "visible" true }}
{{ $alerts := where $alerts "type" "in" $types }}
{
"__inputs": [],
"__elements": {},
Expand Down Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/shortcodes/alertList.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<br>

<h4>Dashboards:</h4>
{{ partial "templates/dashboard-tabs.html" (dict "type" $type "alerts" .alerts "devMode" $.Site.Params.ambaDevMode) }}
{{ partial "templates/dashboard-tabs.html" (dict "type" $type "alerts" .alerts) }}

<!-- Create a detail entry for each alert under category/type -->
{{ range sort .alerts "name" "asc" }}
Expand Down

0 comments on commit ffe8518

Please sign in to comment.