Added datavalue filtering on date
This commit is contained in:
parent
b6e1139e8a
commit
43d8938459
6 changed files with 69 additions and 5 deletions
|
|
@ -1,11 +1,26 @@
|
|||
{{ define "page" }}
|
||||
{{ $version := .VERSION }}
|
||||
{{ $graph := and (eq .Data.Display "graph") (eq .Data.Datapoint.Datatype "INT") }}
|
||||
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/{{ .CONFIG.THEME }}/datapoints.css">
|
||||
<script src="/js/{{ .VERSION }}/lib/plotly-2.32.0.min.js" charset="utf-8"></script>
|
||||
|
||||
{{ block "page_label" . }}{{end}}
|
||||
|
||||
{{ if and (eq .Data.Display "graph") (eq .Data.Datapoint.Datatype "INT") }}
|
||||
<form action="/datapoint/values/{{ .Data.Datapoint.ID }}" method="get">
|
||||
{{ if eq .Data.Datapoint.Datatype "INT" }}
|
||||
<div>
|
||||
<input name="display" value="graph" type="radio" id="display-graph" {{ if $graph }} checked {{ end}}> <label for="display-graph">Graph</label>
|
||||
<input name="display" value="list" type="radio" id="display-list" {{ if not $graph }} checked {{ end }}> <label for="display-list">List</label>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<input name="f" type="datetime-local" value="{{ .Data.TimeFrom }}">
|
||||
<input name="t" type="datetime-local" value="{{ .Data.TimeTo }}">
|
||||
<button>OK</button>
|
||||
</form>
|
||||
<br><br>
|
||||
|
||||
{{ if $graph }}
|
||||
<div class="graph" id="tester"></div>
|
||||
<script type="text/javascript">
|
||||
const tester = document.getElementById('tester');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue