Removed unnecessary extra layer in resource folder structure.
This commit is contained in:
parent
94485b5633
commit
d8a1b66738
190 changed files with 11 additions and 11 deletions
79
hal-core/resources/web/event_detail.tmpl
Normal file
79
hal-core/resources/web/event_detail.tmpl
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
<h1 class="page-header">Details for <a href="?id={{event.getId()}}">{{event.getName()}}</a></h1>
|
||||
|
||||
<div class="col-md-5">
|
||||
<div class="panel panel-default drop-shadow">
|
||||
<div class="panel-heading">Configuration</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-hover table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-right">Event ID:</th>
|
||||
<th>{{event.getId()}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-right">Name:</th>
|
||||
<th>{{event.getName()}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<th class="text-right">Type:</th>
|
||||
<td>{{event.getDeviceConfig().getClass().getSimpleName()}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-right">Owner:</th>
|
||||
<td>{{event.getUser().getUsername()}} <p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-right">State:</th>
|
||||
<td>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="action" value="modify">
|
||||
<input type="hidden" name="action_id" value="{{event.getId()}}">
|
||||
|
||||
<div class="btn-toolbar pull-left">
|
||||
<input class="toggle-switch" type="checkbox" name="enabled"
|
||||
data-on-color="danger"
|
||||
{{#event.getDeviceData().getData()}}checked{{/event.getDeviceData().getData()}} >
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{#event.getDeviceConfigurator().getConfiguration()}}
|
||||
<tr>
|
||||
<th class="text-right">{{.getNiceName()}}:</th>
|
||||
<td>{{.getString()}}</td>
|
||||
</tr>
|
||||
{{/event.getDeviceConfigurator().getConfiguration()}}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7">
|
||||
<div class="panel panel-default drop-shadow">
|
||||
<div class="panel-heading">History data</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<table class="table table-hover table-condensed">
|
||||
<thead>
|
||||
<th class="col-md-6">Timestamp</th>
|
||||
<th class="col-md-2">Data</th>
|
||||
</thead>
|
||||
{{#history}}
|
||||
<tr>
|
||||
<td><span class="timestamp">{{.timestamp}}</span></td>
|
||||
<td>{{.data}}</td>
|
||||
</tr>
|
||||
{{/history}}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function (){
|
||||
$(".toggle-switch").on("switchChange.bootstrapSwitch", function (event, state) {
|
||||
$(this).closest('form').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue