Compare commits
No commits in common. "19edece5b44a11e30de2ce2a213a441084110a5e" and "166d7f1d6fbc7701c340c36b1382ccdcb8a28115" have entirely different histories.
19edece5b4
...
166d7f1d6f
6
juice.py
6
juice.py
|
@ -23,7 +23,7 @@ class RelayDevice:
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.id = ""
|
self.id = ""
|
||||||
self.type = "RelayDevice"
|
self.type = ""
|
||||||
self.description = ""
|
self.description = ""
|
||||||
self.location = ""
|
self.location = ""
|
||||||
self.ip_address = ""
|
self.ip_address = ""
|
||||||
|
@ -31,8 +31,10 @@ class RelayDevice:
|
||||||
self.sub_devices.append(RelayOutlet())
|
self.sub_devices.append(RelayOutlet())
|
||||||
self.sub_devices.append(RelayOutlet())
|
self.sub_devices.append(RelayOutlet())
|
||||||
self.sub_devices[0].id = 'GPIO0'
|
self.sub_devices[0].id = 'GPIO0'
|
||||||
|
self.sub_devices[0].type = 'RelayOutlet'
|
||||||
self.sub_devices[0].gpio = '0'
|
self.sub_devices[0].gpio = '0'
|
||||||
self.sub_devices[1].id = 'GPIO2'
|
self.sub_devices[1].id = 'GPIO2'
|
||||||
|
self.sub_devices[1].type = 'RelayOutlet'
|
||||||
self.sub_devices[1].gpio = '2'
|
self.sub_devices[1].gpio = '2'
|
||||||
|
|
||||||
self.update()
|
self.update()
|
||||||
|
@ -94,7 +96,7 @@ class RelayOutlet:
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.id = ""
|
self.id = ""
|
||||||
self.type = "RelayOutlet"
|
self.type = ""
|
||||||
self.description = ""
|
self.description = ""
|
||||||
self.gpio = ""
|
self.gpio = ""
|
||||||
self.state = False
|
self.state = False
|
||||||
|
|
|
@ -6,7 +6,6 @@ body {
|
||||||
|
|
||||||
.font-awesome {
|
.font-awesome {
|
||||||
font-family: FontAwesome;
|
font-family: FontAwesome;
|
||||||
font-style: normal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
|
@ -49,7 +48,6 @@ nav span:hover {
|
||||||
|
|
||||||
.ip_address {
|
.ip_address {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
font-style: italic;
|
|
||||||
color: darkgray;
|
color: darkgray;
|
||||||
margin: 0.2em;
|
margin: 0.2em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<div class="id">{{ device.id }}</div>
|
<div class="id">{{ device.id }}</div>
|
||||||
<div class="description"><span class="field_value">{{ device.description }}</span> <span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
<div class="description"><span class="field_value">{{ device.description }}</span> <span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
||||||
<div class="location"><span class="field_value">{{ device.location }}</span> <span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
<div class="location"><span class="field_value">{{ device.location }}</span> <span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
||||||
<div class="ip_address"><span class="field_value"><i>{{ device.ip_address }}</i></span> <span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
<div class="ip_address"><i>{{ device.ip_address }}</i></div>
|
||||||
<div class="sub_devices">
|
<div class="sub_devices">
|
||||||
{% for sub_dev in device.sub_devices %}
|
{% for sub_dev in device.sub_devices %}
|
||||||
<div class="sub_device {{ sub_dev.type }}" id="{{ sub_dev.id }}">
|
<div class="sub_device {{ sub_dev.type }}" id="{{ sub_dev.id }}">
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<div class="id"></div>
|
<div class="id"></div>
|
||||||
<div class="description"><span class="field_value"></span> <span class="edit font-awesome" onclick="edit_field(this.parentElement)"></span></div>
|
<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="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>
|
<div class="ip_address"><i></i></div>
|
||||||
<div class="sub_devices">
|
<div class="sub_devices">
|
||||||
<div class="sub_device RelayOutlet" id="">
|
<div class="sub_device RelayOutlet" id="">
|
||||||
<div class="id"></div>
|
<div class="id"></div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user