2024-04-30 08:04:16 +02:00
|
|
|
{{ define "page" }}
|
|
|
|
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/datapoints.css">
|
|
|
|
|
|
|
|
<script type="module" defer>
|
|
|
|
import {UI} from "/js/{{ .VERSION }}/datapoint_edit.mjs"
|
|
|
|
window._ui = new UI()
|
|
|
|
</script>
|
|
|
|
|
|
|
|
{{ block "page_label" . }}{{end}}
|
|
|
|
|
|
|
|
<form id="form-trigger" action="/datapoint/update/{{ .Data.Datapoint.ID }}" method="post">
|
|
|
|
<div id="widgets" class="widgets">
|
2024-05-20 19:40:19 +02:00
|
|
|
<div class="label">Group</div>
|
|
|
|
<div><input type="text" name="group" value="{{ .Data.Datapoint.Group }}"></div>
|
|
|
|
|
2024-04-30 08:04:16 +02:00
|
|
|
<div class="label">Name</div>
|
|
|
|
<div><input type="text" name="name" value="{{ .Data.Datapoint.Name }}"></div>
|
|
|
|
|
|
|
|
<div class="label">Datatype</div>
|
|
|
|
<div>
|
|
|
|
<select name="datatype">
|
|
|
|
<option {{ if eq .Data.Datapoint.Datatype "INT" }}selected{{end}}>INT</option>
|
|
|
|
<option {{ if eq .Data.Datapoint.Datatype "STRING" }}selected{{end}}>STRING</option>
|
|
|
|
<option {{ if eq .Data.Datapoint.Datatype "DATETIME" }}selected{{end}}>DATETIME</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
2024-05-25 09:40:40 +02:00
|
|
|
<div class="label">No data<br>problem time<br>(seconds)</div>
|
|
|
|
<div>
|
|
|
|
<input type="text" name="nodata_seconds" value="{{ .Data.Datapoint.NodataProblemSeconds }}">
|
|
|
|
<div class="description">A problem is raised and notified if an entry isn't made within this time.</div>
|
|
|
|
<div class="description">Set to 0 to disable.</div>
|
|
|
|
</div>
|
|
|
|
|
2024-04-30 08:04:16 +02:00
|
|
|
<div></div>
|
|
|
|
<div class="action">
|
|
|
|
{{ if eq .Data.Datapoint.ID 0 }}
|
|
|
|
<button id="button-update">Create</button>
|
|
|
|
{{ else }}
|
|
|
|
<button id="button-update">Update</button>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{{ end }}
|