Implemented basic functions
This commit is contained in:
parent
89f483171a
commit
965e2daeb3
22 changed files with 711 additions and 58 deletions
26
views/pages/datapoints.gotmpl
Normal file
26
views/pages/datapoints.gotmpl
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{{ define "page" }}
|
||||
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/datapoints.css">
|
||||
|
||||
{{ block "page_label" . }}{{end}}
|
||||
|
||||
<a href="/datapoint/edit/0">Create</a>
|
||||
|
||||
<div id="datapoints">
|
||||
<div class="header">Name</div>
|
||||
<div class="header">Datatype</div>
|
||||
<div class="header">Last value</div>
|
||||
<div class="header">Value</div>
|
||||
|
||||
{{ range .Data.Datapoints }}
|
||||
<div class="name"><a href="/datapoint/edit/{{ .ID }}">{{ .Name }}</a></div>
|
||||
<div class="datatype">{{ .Datatype }}</div>
|
||||
<div class="last-value">{{ format_time .LastValue }}</div>
|
||||
{{ if eq .Datatype "DATETIME" }}
|
||||
<div class="value">{{ if .LastDatapointValue.ValueDateTime.Valid }}{{ format_time .LastDatapointValue.Value }}{{ end }}</div>
|
||||
{{ else }}
|
||||
<div class="value">{{ .LastDatapointValue.Value }}</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue