Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IoTSmartMeter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kristian.tan
IoTSmartMeter
Commits
28ccd452
Commit
28ccd452
authored
Nov 13, 2019
by
Kristian Tan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added input section
parent
ac01727c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
41 deletions
+42
-41
main.css
static/css/main.css
+7
-7
main.html
templates/main.html
+35
-34
No files found.
static/css/main.css
View file @
28ccd452
...
@@ -9,18 +9,18 @@ body {
...
@@ -9,18 +9,18 @@ body {
/*background-color: aqua;*/
/*background-color: aqua;*/
}
}
.
containerRow
s
{
.
input
s
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
background-color
:
darkkhaki
;
background-color
:
green
;
height
:
9
0%
;
height
:
1
0%
;
}
}
.container
Col
s
{
.container
Row
s
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
row
;
height
:
10%
;
background-color
:
darkkhaki
;
background-color
:
green
;
height
:
90%
;
}
}
.device_list
{
.device_list
{
...
...
templates/main.html
View file @
28ccd452
...
@@ -9,43 +9,44 @@
...
@@ -9,43 +9,44 @@
</div>
</div>
<body>
<body>
<div
class=
"containerCols"
>
<div
class=
"inputs"
>
<div
class=
"containerRows"
>
<form
action=
"{{ url_for('handle_data') }}"
method=
"post"
>
<input
type=
"text"
name=
"kWhprice"
>
<input
type=
"submit"
>
</form>
<div
class=
"device_list"
>
<h3
class=
"device_list_title"
>
Device Listing and Status
</h3>
{% for pin in pins %}
<p>
{{ pins[pin].name }} :
{% if pins[pin].state == true %}
(
<a
href=
"/toggle/{{pin}}"
>
turn off
</a>
)
{% else %}
(
<a
href=
"/toggle/{{pin}}"
>
turn on
</a>
)
{% endif %}
</p>
{% endfor %}
</div>
<div
class=
"containerRows"
>
<form
action=
"{{ url_for('handle_data') }}"
method=
"post"
>
<input
type=
"text"
name=
"kWhprice"
>
<input
type=
"submit"
>
</form>
<div
class=
"device_list"
>
<h3
class=
"device_list_title"
>
Device Listing and Status
</h3>
{% for pin in pins %}
<p>
{{ pins[pin].name }} :
{% if pins[pin].state == true %}
(
<a
href=
"/toggle/{{pin}}"
>
turn off
</a>
)
{% else %}
(
<a
href=
"/toggle/{{pin}}"
>
turn on
</a>
)
{% endif %}
</p>
{% endfor %}
</div>
<div
class=
"smart_meter"
>
</div>
<div
class=
"smart_meter_info"
>
<p>
Devices currently in use:
</p>
<div
class=
"smart_meter"
>
<ul>
<div
class=
"smart_meter_info"
>
{% for pin in pins %}
<p>
Devices currently in use:
</p>
{% if pins[pin].state == true %}
<ul>
<li>
{{ pins[pin].name }}
</li>
{% for pin in pins %}
{% endif %}
{% if pins[pin].state == true %}
{% endfor %}
<li>
{{ pins[pin].name }}
</li>
</ul>
{% endif %}
{# Implement some way to display "No devices" message if none are in use#}
{% endfor %}
</ul>
<p>
Total energy used today: {{ daily_total }} kWh.
</p>
{# Implement some way to display "No devices" message if none are in use#}
<p>
Total cost of today's energy usage: £{{ todays_cost }}
</p>
</div>
<p>
Total energy used today: {{ daily_total }} kWh.
</p>
<p>
Total cost of today's energy usage: £{{ todays_cost }}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment