Commit 3e68b4d8 authored by Kristian Tan's avatar Kristian Tan

Display device wattage

parent ef2bdf77
...@@ -25,10 +25,6 @@ body { ...@@ -25,10 +25,6 @@ body {
text-decoration: underline; text-decoration: underline;
} }
.add_device {
margin-left: 15%;
}
.smart_meter { .smart_meter {
width: 65%; width: 65%;
margin-right: 5%; margin-right: 5%;
...@@ -55,3 +51,7 @@ body { ...@@ -55,3 +51,7 @@ body {
text-decoration: underline; text-decoration: underline;
text-align: center; text-align: center;
} }
.add_new_device_form {
margin-top: 10%;
}
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
{% for pin in pins %} {% for pin in pins %}
{% if pins[pin].name != None %} {% if pins[pin].name != None %}
<p> <p>
{{ pins[pin].name }} : {{ pins[pin].name }} ({{ pins[pin].wattage }}W):
{% if pins[pin].state == true %} {% if pins[pin].state == true %}
(<a href="/toggle/{{pin}}">turn off</a>) (<a href="/toggle/{{pin}}">turn off</a>)
(<a href="/remove/{{pin}}">remove</a>) (<a href="/remove/{{pin}}">remove</a>)
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<p class="add_device"><a href="/devices/add_device">Add device</a></p> <p><a href="/devices/add_device">Add device</a></p>
{% if display_change_kWh == True %} {% if display_change_kWh == True %}
<form action="{{ url_for('handle_change_kWh') }}" method="post"> <form action="{{ url_for('handle_change_kWh') }}" method="post">
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
{% endif %} {% endif %}
{% if display_new_device_form == True %} {% if display_new_device_form == True %}
<div class=".add_new_device_form"> <div class="add_new_device_form">
<form action="{{ url_for('handle_new_device') }}" method="post"> <form action="{{ url_for('handle_new_device') }}" method="post">
New device name: <input type="text" name="new_device_name" required> <br> New device name: <input type="text" name="new_device_name" required> <br>
New device wattage: <input type="number" name="new_device_wattage" required> <br> New device wattage: <input type="number" name="new_device_wattage" required> <br>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment