-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.inc.html
54 lines (53 loc) · 2.19 KB
/
functions.inc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<div class="container" data-ng-controller="DeviceListCtrl" data-ng-init="loadData()">
<div class="starter-template">
<div>
<table data-ng-table="devicesTable" class="table table-striped">
<thead>
<tr>
<th class="ng-hide">ID</th>
<th>Name</th>
<th>Last CMD</th>
<th colspan="2" class="center">Commands</th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="x in devices">
<td class="ng-hide">{{x.id}}</td>
<td>{{x.name}}</td>
<td>{{x.lastcommand}}</td>
<td><button class="btn btn-success" data-ng-click="tdaction(x.id,'on')">ON</button></td>
<td><button class="btn btn-danger" data-ng-click="tdaction(x.id,'off')">OFF</button></td>
</tr>
</tbody>
</table>
<!-- todo: turn off all button -->
<button type="button" class="btn btn-primary btn-danger" data-ng-click="allOff()">All OFF</button>
<span class="">{{status}}</span>
</div>
<div>
<table data-ng-table="sensorsTable" class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th class="ng-hide">Type</th>
<th>Temperature</th>
<th>Humidity</th>
<th>Time</th>
<th>Age</th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="sensor in sensors">
<td>{{sensor.id}}</td>
<td class="ng-hide">{{sensor.type}}</td>
<td>{{sensor.temperature | degree}}</td>
<td>{{sensor.humidity | percentage}}</td>
<td>{{sensor.time}}</td>
<td>{{sensor.age}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
hhh