Added Event overview page. issue 5

Former-commit-id: 6ee75491189dc68b53b928436ef5d06a81b81568
This commit is contained in:
Ziver Koc 2016-01-22 10:52:28 +01:00
parent 4602d0bfc7
commit 87913dfd28
4 changed files with 146 additions and 0 deletions

22
web-resource/event_detail.tmpl Executable file
View file

@ -0,0 +1,22 @@
<h1 class="page-header">Details for <a href="#">{{event.getName()}}</a></h1>
<div class="col-md-12">
<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>{{.timestamp}}</a></td>
<td>{{.data()}}</td>
</tr>
{{/history}}
</table>
</div>
</div>
</div>

View file

@ -0,0 +1,37 @@
<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>
<th class="col-md-5">Name</th>
<th class="col-md-3">Data</th>
<th class="col-md-3">Last Update</th>
<th class="col-md-1">Actions</th>
</thead>
{{#events}}
<tr>
<td><a href="?id={{.getId()}}">{{.getName()}}</a></td>
<td>{{.getData()}}</td>
<td>updated 1 min ago</td>
<td>
<form method="POST">
<input type="hidden" name="action" value="-">
<input type="hidden" name="id" value="{{.getId()}}">
<div class="btn-toolbar pull-right">
<button type="submit" class="btn btn-danger btn-xs">
<span class="glyphicon glyphicon-trash"></span>
</button>
</div>
</form>
</td>
</tr>
{{/events}}
</table>
</div>
</div>
</div>