37 lines
1.4 KiB
HTML
37 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Juice</title>
|
|
<link rel="stylesheet" type="text/css" href="/static/juice.css">
|
|
<script type="text/javascript" src="/static/juice.js"></script>
|
|
</head>
|
|
<body>
|
|
{% for dev_type, devices in network.items() %}
|
|
{% for device in devices %}
|
|
<div class="device {{ dev_type }}" id="{{ device.id }}">
|
|
<div class="id">{{ device.id }}</div>
|
|
<div class="description">{{ device.description }}</div>
|
|
<div class="location">{{ device.location }}</div>
|
|
<div class="ip_address">{{ device.ip_address }}</div>
|
|
<div class="sub_devices">
|
|
{% for sub_dev_type, sub_devs in device.sub_devices.items() %}
|
|
{% for sub_dev in sub_devs %}
|
|
<div class="sub_device {{ sub_dev_type }}" id="{{ sub_dev.id }}">
|
|
<div class="id">{{ sub_dev.id }}</div>
|
|
<svg class="outlet_image {% if sub_dev.state %}on{% else %}off{% endif %}" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
|
<rect x="29" y="30" width="6" height="21" fill="none" />
|
|
<rect x="65" y="30" width="6" height="21" fill="none" />
|
|
<path fill="none" d="M 43, 75 A 1 1 0 0 1 57,75 L 57,84 L 43,84 Z" />
|
|
<path fill="white" fill-opacity="0.0" d="M 23,10 L 77,10 A 50 49 0 0 1 77,91 L 23,91 A 50 49 0 0 1 23,10 Z" onclick="toggle_outlet(this.parentElement)" />
|
|
</svg>
|
|
<div class="description">{{ sub_dev.description }}</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</body>
|
|
</html>
|