Skip to content

Commit

Permalink
removed dimension column when not set
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyBarnes committed Sep 27, 2023
1 parent 85de648 commit 0e850b1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
20 changes: 12 additions & 8 deletions docs/layouts/partials/logAlertProperties.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

<div><table>
<tr>
<th>Dimensions</th>
{{ if isset . "dimensions" }}
<th>Dimensions</th>
{{ end }}
<th>Failing Periods</th>
<th>Aggregation</th>
<th>Operator</th>
Expand All @@ -14,13 +16,15 @@
</tr>

<tr>
<td>
{{ if or (reflect.IsMap .dimensions) (reflect.IsSlice .dimensions) }}
{{ transform.Highlight (encoding.Jsonify (dict "indent" " ") .dimensions) "json" }}
{{ else }}
{{ .dimensions }}
{{ end }}
</td>
{{ if isset . "dimensions" }}
<td>
{{ if or (reflect.IsMap .dimensions) (reflect.IsSlice .dimensions) }}
{{ transform.Highlight (encoding.Jsonify (dict "indent" " ") .dimensions) "json" }}
{{ else }}
{{ .dimensions }}
{{ end }}
</td>
{{ end }}
<td>
{{ if or (reflect.IsMap .failingPeriods) (reflect.IsSlice .failingPeriods) }}
{{ transform.Highlight (encoding.Jsonify (dict "indent" " ") .failingPeriods) "json" }}
Expand Down
20 changes: 12 additions & 8 deletions docs/layouts/partials/metricAlertProperties.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<div><table>
<tr>
<th>Criterion Type</th>
<th>Dimensions</th>
{{ if isset . "dimensions" }}
<th>Dimensions</th>
{{ end }}
{{ if eq .criterionType "DynamicThresholdCriterion" }}
<th>Alert Sensitivity</th>
<th>Failing Periods</th>
Expand All @@ -17,13 +19,15 @@

<tr>
<td>{{ .criterionType }}</td>
<td>
{{ if or (reflect.IsMap .dimensions) (reflect.IsSlice .dimensions) }}
{{ transform.Highlight (encoding.Jsonify (dict "indent" " ") .dimensions) "json" }}
{{ else }}
{{ .dimensions }}
{{ end }}
</td>
{{ if isset . "dimensions" }}
<td>
{{ if or (reflect.IsMap .dimensions) (reflect.IsSlice .dimensions) }}
{{ transform.Highlight (encoding.Jsonify (dict "indent" " ") .dimensions) "json" }}
{{ else }}
{{ .dimensions }}
{{ end }}
</td>
{{ end }}
{{ if eq .criterionType "DynamicThresholdCriterion" }}
<td>{{ .alertSensitivity }}</td>
<td>
Expand Down

0 comments on commit 0e850b1

Please sign in to comment.