-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
83 lines (67 loc) · 1.65 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!doctype html>
<html>
<head>
<title>CNIT581 IoT Project</title>
<link rel="stylesheet" href='../static/style.css'/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style>
body {
text-align: center;
}
#g1,
#g2 {
width: 200px;
height: 160px;
display: inline-block;
margin: 1em;
}
</style>
</head>
<body>
<h1>CIT581 IoT Final Project</h1>
<div id="g1"></div>
<div id="g2"></div>
<hr>
<h3> Agriculture Sensors Reading: {{ time }} ==> <a href="/"class="button">REFRESH</a></h3>
<hr>
<h3> Ochard Farm Live Streaming ==> <a href="/camera" class="button">LIVE</a></h3>
<hr>
<h3> HISTORICAL DATA </h3>
<p> Enter range of time to be retrieved in minutes (Sample Frequency: {{ freq }} minutes)
<form method="POST">
<input name="rangeTime" value= {{rangeTime}}>
<input type="submit">
</form></p>
<hr>
<img src="/plot/temp" alt="Image Placeholder" width="49%">
<img src="/plot/hum" alt="Image Placeholder" width="49%">
<p> 2019Fall CNIT581 IoT</p>
<script src="../static/raphael-2.1.4.min.js"></script>
<script src="../static/justgage.js"></script>
<script>
var g1, g2;
document.addEventListener("DOMContentLoaded", function(event) {
g1 = new JustGage({
id: "g1",
value: {{temp}},
valueFontColor: "yellow",
titleFontColor: "yellow",
min: -10,
max: 50,
title: "Temperature",
label: "Celcius"
});
g2 = new JustGage({
id: "g2",
value: {{hum}},
valueFontColor: "yellow",
titleFontColor: "yellow",
min: 0,
max: 100,
title: "Humidity",
label: "%"
});
});
</script>
</body>
</html>