2019-06-05 13:32:10 -04:00
|
|
|
<!DOCTYPE html>
|
2019-06-24 09:06:41 -04:00
|
|
|
<html lang="en">
|
2019-06-18 12:49:01 -04:00
|
|
|
<head>
|
|
|
|
<title>Juice</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/static/juice.css">
|
2019-11-15 10:35:56 -05:00
|
|
|
<script>
|
|
|
|
const init_state = {{ init_state|tojson|safe }};
|
2019-11-17 19:46:57 -05:00
|
|
|
const ws_uri = "{{ url('ws') }}";
|
2019-11-15 10:35:56 -05:00
|
|
|
</script>
|
2019-06-18 12:49:01 -04:00
|
|
|
<script type="text/javascript" src="/static/juice.js"></script>
|
2019-06-19 10:15:08 -04:00
|
|
|
<script>window.onload = load;</script>
|
2019-07-02 08:47:34 -04:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=0.8">
|
2019-06-24 09:06:41 -04:00
|
|
|
<meta name="description" content="An IOT hub.">
|
2019-07-02 08:47:34 -04:00
|
|
|
<meta name="theme-color" content="lightblue">
|
|
|
|
<link rel="manifest" href="/static/juice-manifest.webmanifest">
|
|
|
|
<link rel="icon" href="/static/orange-juice.svg">
|
|
|
|
<link rel="icon" href="/static/orange-juice-144p.png">
|
2019-06-18 12:49:01 -04:00
|
|
|
</head>
|
|
|
|
<body>
|
2019-06-20 07:48:11 -04:00
|
|
|
<header>
|
2019-07-02 08:47:34 -04:00
|
|
|
<div id="logo-line">
|
|
|
|
<object id="logo" aria-label="Juice: An IOT hub" data="/static/orange-juice.svg"></object>
|
|
|
|
<h1>Juice</h1>
|
|
|
|
<h3>An IOT hub</h3>
|
|
|
|
</div>
|
2019-06-20 07:48:11 -04:00
|
|
|
<nav>
|
2019-07-02 08:47:34 -04:00
|
|
|
<span class="font-awesome" title="Home"><a href="./"></a></span>
|
|
|
|
<span class="font-awesome" title="Add new device" onclick="new_device()"></span>
|
2019-06-20 07:48:11 -04:00
|
|
|
</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 %}
|
2019-11-18 13:05:37 -05:00
|
|
|
{% if device.type == 'RelayDevice' %}
|
2020-11-30 08:40:09 -05:00
|
|
|
{% include 'RelayDevice.html' %}
|
2019-11-18 13:05:37 -05:00
|
|
|
{% elif device.type == 'LightStrip' %}
|
2020-11-30 08:40:09 -05:00
|
|
|
{% include 'LightStrip.html' %}
|
2019-11-25 08:39:42 -05:00
|
|
|
{% elif device.type == 'LixieClock' %}
|
2020-11-30 08:40:09 -05:00
|
|
|
{% include 'LixieClock.html' %}
|
2019-11-18 13:05:37 -05:00
|
|
|
{% endif %}
|
2020-11-30 08:40:09 -05: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="">
|
2019-06-20 14:51:00 -04:00
|
|
|
<div class="id editable"><span class="field_value"></span><span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span><span class="delete font-awesome" onclick="delete_device(this.parentElement.parentElement)"></span><span class="lock font-awesome" onclick="lock_device(this.parentElement.parentElement)"></span></div>
|
|
|
|
<div class="description editable"><span class="field_value"></span><span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
|
|
|
<div class="location editable"><span class="field_value"></span><span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
|
|
|
<div class="ip_address editable"><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-24 09:06:41 -04:00
|
|
|
<div class="sub_device RelayOutlet OUT0">
|
2019-06-20 10:09:40 -04:00
|
|
|
<div class="id">OUT0</div>
|
2019-06-24 09:06:41 -04:00
|
|
|
<object class="outlet_image" alt="Outlet Image" data="/static/outlet.svg"></object>
|
2019-06-20 14:51:00 -04:00
|
|
|
<div class="description editable"><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-24 09:06:41 -04:00
|
|
|
<div class="sub_device RelayOutlet OUT2">
|
2019-06-20 10:09:40 -04:00
|
|
|
<div class="id">OUT2</div>
|
2019-06-24 09:06:41 -04:00
|
|
|
<object class="outlet_image" alt="Outlet Image" data="/static/outlet.svg"></object>
|
2019-06-20 14:51:00 -04:00
|
|
|
<div class="description editable"><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>
|