2016-01-22 10:52:28 +01:00
|
|
|
<h1 class="page-header">Event Overview</h1>
|
|
|
|
|
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<div class="panel panel-default drop-shadow">
|
|
|
|
|
<div class="panel-heading">Local Events</div>
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
|
|
<table class="table table-hover table-condensed">
|
|
|
|
|
<thead>
|
2016-01-22 16:38:17 +01:00
|
|
|
<th class="col-md-4">Name</th>
|
|
|
|
|
<th class="col-md-3">Type</th>
|
|
|
|
|
<th class="col-md-2">Data</th>
|
|
|
|
|
<th class="col-md-2">Last Update</th>
|
|
|
|
|
<th class="col-md-1 text-right">Actions</th>
|
2016-01-22 10:52:28 +01:00
|
|
|
</thead>
|
|
|
|
|
{{#events}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td><a href="?id={{.getId()}}">{{.getName()}}</a></td>
|
2016-01-22 16:38:17 +01:00
|
|
|
<td>{{.getDeviceData().getClass().getSimpleName()}}</td>
|
|
|
|
|
<td>{{.getDeviceData().getData()}}</td>
|
2016-01-24 17:37:32 +01:00
|
|
|
<td><span class="timestamp">{{.getDeviceData().getTimestamp()}}</span></td>
|
2016-01-22 10:52:28 +01:00
|
|
|
<td>
|
|
|
|
|
<form method="POST">
|
|
|
|
|
<input type="hidden" name="action" value="-">
|
|
|
|
|
<input type="hidden" name="id" value="{{.getId()}}">
|
|
|
|
|
|
|
|
|
|
<div class="btn-toolbar pull-right">
|
2016-01-22 15:46:09 +01:00
|
|
|
<input class="toggle-switch" type="checkbox" name="data"
|
|
|
|
|
data-size="mini" data-on-color="danger"
|
2016-01-24 17:40:01 +01:00
|
|
|
{{#.getDeviceData().getData()}}checked{{/.getDeviceData().getData()}} >
|
2016-01-22 10:52:28 +01:00
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{/events}}
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-01-22 15:46:09 +01:00
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
$(function (){
|
|
|
|
|
$(".toggle-switch").on("switchChange.bootstrapSwitch", function (event, state) {
|
|
|
|
|
$(this).closest('form').submit();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|