Only show graphs on INT datatype

This commit is contained in:
Magnus Åhall 2024-06-26 12:01:47 +02:00
parent f0a6ce7b95
commit b6e1139e8a

View File

@ -5,14 +5,7 @@
{{ block "page_label" . }}{{end}}
{{ if eq .Data.Display "list" }}
<div id="values">
{{ range .Data.Values }}
<div class="value">{{ format_time .Ts }}</div>
<div class="value">{{ .Value }}</div>
{{ end }}
</div>
{{ else }}
{{ if and (eq .Data.Display "graph") (eq .Data.Datapoint.Datatype "INT") }}
<div class="graph" id="tester"></div>
<script type="text/javascript">
const tester = document.getElementById('tester');
@ -31,5 +24,12 @@
}
);
</script>
{{ else }}
<div id="values">
{{ range .Data.Values }}
<div class="value">{{ format_time .Ts }}</div>
<div class="value">{{ .Value }}</div>
{{ end }}
</div>
{{ end }}
{{ end }}