app.html 851 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{% extends 'layout.html' %}

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

{% block content %}

<div class="row">
	<div class="col-md-6 col-md-offset-3">
		<p>Name: {{ app[0] }} </p>
		<p>Description : {{ app[3] }} </p>
		<p>app-key: {{ app[1] }} </p>

		<p>Devices:</p>
		{% if devs %}
		<ol>
			{% for dev in devs %}
Vladislav Rykov's avatar
Vladislav Rykov committed
17
			<li><a href="/dev?dev_id={{ dev[1] }}"> {{ dev[0] }} </a></li>
18
19
20
21
22
23
			{% endfor %}
		</ol>
		{% else %}
		<p> No registed devices </p>
		{% endif %}

Vladislav Rykov's avatar
Vladislav Rykov committed
24
		<a href="/add-dev"><button type="submit" class="btn btn-primary">Add Device</button></a>
25
26
27
28
29
30
31
32
33
34
35
36
		<a href="/delete-app"><button type="submit" class="btn btn-danger" onclick="return conf();">Delete Application</button></a>
	</div>
</div>

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

{% endblock %}