Added enum configuration to Oregon and updated configuration pages to show new device structure correctly
This commit is contained in:
parent
95240dd392
commit
c50e50305f
5 changed files with 84 additions and 20 deletions
|
|
@ -24,7 +24,7 @@
|
|||
<td>{{.getName()}}</td>
|
||||
<td>{{.getType()}}</td>
|
||||
<td>{{.isSynced()}}</td>
|
||||
<td>{{.getDeviceData()}}</td>
|
||||
<td>{{.getDeviceConfig()}}</td>
|
||||
<td>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="action" value="remove_local_sensor">
|
||||
|
|
@ -60,13 +60,15 @@
|
|||
<thead>
|
||||
<th>Type</th>
|
||||
<th>Date</th>
|
||||
<th>Data</th>
|
||||
<th>Configuration</th>
|
||||
</thead>
|
||||
{{#detectedSensors}}
|
||||
<tr>
|
||||
<td>{{.getType()}}</td>
|
||||
<td><span class="timestamp">{{.getDeviceData().getTimestamp()}}</span></td>
|
||||
<td>{{.getDeviceData()}}</td>
|
||||
<td>{{.getDeviceData()}}</span></td>
|
||||
<td>{{.getDeviceConfig()}}</td>
|
||||
<td>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<button type="button" class="btn btn-default btn-xs" data-toggle="modal"
|
||||
|
|
@ -156,7 +158,7 @@
|
|||
<tr>
|
||||
<td>{{.getName()}}</td>
|
||||
<td>{{.getType()}}</td>
|
||||
<td>{{.getDeviceData()}}</td>
|
||||
<td>{{.getDeviceConfig()}}</td>
|
||||
<td>
|
||||
<form method="POST">
|
||||
<div class="btn-toolbar pull-right">
|
||||
|
|
@ -299,7 +301,14 @@
|
|||
{{#.params}}
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{.getNiceName()}}:</label>
|
||||
<input type="text" class="form-control" name="{{.getName()}}">
|
||||
{{#.isTypeString()}}<input type="text" class="form-control" name="{{.getName()}}">{{/#.isTypeString()}}
|
||||
{{#.isTypeInt()}}<input type="number" class="form-control" name="{{.getName()}}">{{/#.isTypeInt()}}
|
||||
{{#.isTypeBoolean()}}<input type="checkbox" name="{{.getName()}}">{{/#.isTypeBoolean()}}
|
||||
{{#.isTypeEnum()}}
|
||||
<select class="form-control" name="{{.getName()}}">
|
||||
{{#.getPossibleValues()}}<option>{{.}}</option>{{/.getPossibleValues()}}
|
||||
</select>
|
||||
{{/#.isTypeEnum()}}
|
||||
</div>
|
||||
{{/.params}}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue