app.html 1.27 KB
Newer Older
1
2
3
4
5
6
7
8
{% extends 'layout.html' %}

{% block title %} Application: {% endblock %}

{% block content %}

<div class="row">
	<div class="col-md-6 col-md-offset-3">
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
		<div class="panel panel-primary">
			<div class="panel-heading">
				<h2><center> {{ app[0] }} </center></h2>
			</div>
			<div class="panel-body">
				<table class="table table-hover">
					<tbody>
						<tr>
							<th>Description</th> 
							<th> {{ app[3] }} </th>
						</tr>
						<tr>
							<th>app-key</th>
							<th> {{ app[1] }} </th>
						</tr>
					</tbody>
				</table>
			</div>

			{% if devs %}
			<h3><center>Devices:</center></h3>
			<ol class="list-group">
				{% for dev in devs %}
				<a href="/dev?id={{ dev[1] }}"><li class="list-group-item"><strong> {{ dev[0] }} <strong></li></a>
				{% endfor %}
			</ol>
			{% else %}
			<h3> No registed devices </h3>
			{% endif %}

			<br><br>
			
			<center>	
			<a href="/add-dev"><button type="submit" class="btn btn-primary">Add Device</button></a>
			<a href="/delete-app"><button type="submit" class="btn btn-danger" onclick="return conf();">Delete Application</button></a>
			</center>
			<br>
		</div>	
47
48
49
50
51
52
53
54
55
56
57
	</div>
</div>

<script type="text/javascrypt">
function conf() {
	return confirm("Are you sure? It will remove all devices and data.")
}
</script>

{% endblock %}