2019-06-05 13:32:10 -04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2019-06-18 12:49:01 -04:00
|
|
|
<head>
|
|
|
|
<title>Juice</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/static/juice.css">
|
|
|
|
<script type="text/javascript" src="/static/juice.js"></script>
|
2019-06-19 10:15:08 -04:00
|
|
|
<script>var init_state = {{ init_state|tojson|safe }};</script>
|
|
|
|
<script>window.onload = load;</script>
|
2019-06-18 12:49:01 -04:00
|
|
|
</head>
|
|
|
|
<body>
|
2019-06-20 07:48:11 -04:00
|
|
|
<header>
|
|
|
|
<nav>
|
|
|
|
<span onclick="new_device()" title="Add new device"><span class="font-awesome"></span></span>
|
|
|
|
<span title="Register a new authenticator">Register</span>
|
|
|
|
</nav>
|
|
|
|
</header>
|
2019-06-18 12:49:01 -04:00
|
|
|
<main>
|
|
|
|
<div id="devices">
|
2019-06-18 13:44:35 -04:00
|
|
|
{% for device in network %}
|
|
|
|
<div class="device {{ device.type }}" id="{{ device.id }}">
|
2019-06-20 12:36:19 -04:00
|
|
|
<div class="id editable"><span class="field_value">{{ device.id }}</span>{% if not device.locked %}<span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span><span class="lock font-awesome" onclick="lock_device(this.parentElement.parentElement)"></span>{% else %}<span class="unlock font-awesome" onclick="unlock_device(this.parentElement.parentElement)"></span>{% endif %}</div>
|
|
|
|
<div class="description editable"><span class="field_value">{{ device.description }}</span>{% if not device.locked %}<span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span>{% endif %}</div>
|
|
|
|
<div class="location editable"><span class="field_value">{{ device.location }}</span>{% if not device.locked %}<span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span>{% endif %}</div>
|
|
|
|
<div class="ip_address editable"><span class="field_value">{{ device.ip_address }}</span>{% if not device.locked %}<span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span>{% endif %}</div>
|
2019-06-18 12:49:01 -04:00
|
|
|
<div class="sub_devices">
|
2019-06-18 13:44:35 -04:00
|
|
|
{% for sub_dev in device.sub_devices %}
|
|
|
|
<div class="sub_device {{ sub_dev.type }}" id="{{ sub_dev.id }}">
|
2019-06-18 12:49:01 -04:00
|
|
|
<div class="id">{{ sub_dev.id }}</div>
|
|
|
|
<object class="outlet_image" data="/static/outlet.svg"></object>
|
2019-06-20 12:36:19 -04:00
|
|
|
<div class="description editable"><span class="field_value">{{ sub_dev.description }}</span>{% if not device.locked %}<span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span>{% endif %}</div>
|
2019-06-18 12:49:01 -04:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2019-06-16 18:22:47 -04:00
|
|
|
</div>
|
2019-06-18 12:49:01 -04:00
|
|
|
{% endfor %}
|
2019-06-05 13:32:10 -04:00
|
|
|
</div>
|
2019-06-18 12:49:01 -04:00
|
|
|
</main>
|
2019-06-20 08:38:56 -04:00
|
|
|
<template id="RelayDevice_template">
|
2019-06-19 10:15:08 -04:00
|
|
|
<div class="device RelayDevice" id="">
|
|
|
|
<div class="id"></div>
|
2019-06-20 11:59:37 -04:00
|
|
|
<div class="description"><span class="field_value"></span><span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
|
|
|
<div class="location"><span class="field_value"></span><span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
|
|
|
<div class="ip_address"><span class="field_value"></span><span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
2019-06-19 10:15:08 -04:00
|
|
|
<div class="sub_devices">
|
2019-06-20 10:09:40 -04:00
|
|
|
<div class="sub_device RelayOutlet" id="OUT0">
|
|
|
|
<div class="id">OUT0</div>
|
2019-06-19 10:15:08 -04:00
|
|
|
<object class="outlet_image" data="/static/outlet.svg"></object>
|
2019-06-20 11:59:37 -04:00
|
|
|
<div class="description"><span class="field_value"></span><span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
2019-06-19 10:15:08 -04:00
|
|
|
</div>
|
2019-06-20 10:09:40 -04:00
|
|
|
<div class="sub_device RelayOutlet" id="OUT2">
|
|
|
|
<div class="id">OUT2</div>
|
2019-06-19 10:15:08 -04:00
|
|
|
<object class="outlet_image" data="/static/outlet.svg"></object>
|
2019-06-20 11:59:37 -04:00
|
|
|
<div class="description"><span class="field_value"></span><span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
2019-06-19 10:15:08 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
2019-06-18 12:49:01 -04:00
|
|
|
</body>
|
2019-06-05 13:32:10 -04:00
|
|
|
</html>
|