app.html 1.29 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
		<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>
Vladislav Rykov's avatar
Vladislav Rykov committed
30
			<ol class="list-group">
31
				{% for dev in devs %}
Vladislav Rykov's avatar
Vladislav Rykov committed
32
				<a href="/dev?id={{ dev[1] }}"><li class="list-group-item"><strong> {{ dev[0] }} </strong></li></a>
33
34
35
				{% endfor %}
			</ol>
			{% else %}
Vladislav Rykov's avatar
Vladislav Rykov committed
36
			<h3><center> No registed devices </center></h3>
37
38
39
40
41
42
43
44
45
46
			{% 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 %}