-
Notifications
You must be signed in to change notification settings - Fork 2
/
useraccount.html
413 lines (304 loc) · 14.7 KB
/
useraccount.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="assets/css/main.css" />
<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
<style>
/*moves sideNav to ideal position but need to reposition "main" text"*/
.moveSideNav{
position: relative;
right: 0;
bottom: 45px;
}
/* The side navigation menu */
.sidenav {
height: 100%; /* 100% Full-height */
width: 0; /* 0 width - change this with JavaScript */
position: fixed; /* Stay in place */
z-index: 1; /* Stay on top */
top: 0;
left: 0;
background-color: #111; /* Black*/
overflow-x: hidden; /* Disable horizontal scroll */
padding-top: 60px; /* Place content 60px from the top */
transition: 0.5s; /* 0.5 second transition effect to slide in the sidenav */
}
/* The navigation menu links */
.sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s
}
/* When you mouse over the navigation links, change their color */
.sidenav a:hover, .offcanvas a:focus{
color: #f1f1f1;
}
/* Position and style the close button (top right corner) */
.sidenav .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
}
/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
transition: margin-left .5s;
padding: 20px;
}
/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}
ul.NavBarstyle {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
text-align: center;
padding: 22px 26px;
color : white;
text-decoration: none;
}
li.icons a {
color:black;
}
/* Change the link color to #111 (black) on hover */
/*drop down bar*/
li a :hover {
background-color: #111;
}
.active {
background-color: #4CAF50;
}
nav select {
display:none;
}
@media (max-width: 700px) {
nav ul {display: none;}
nav select {display: inline-block;}
}
</style>
</head>
<!-- NavBar new -->
<div class="w3-top topNavBar">
<div class="w3-bar w3-black" id="myNavbar">
<a class="w3-bar-item w3-button w3-hover-black w3-hide-large w3-left" href="javascript:void(0);" onclick="toggleFunction()" title="Toggle Navigation Menu">
<i class="fa fa-bars"></i>
</a>
<a href="index.html" class="w3-bar-item w3-button w3-hide-small w3-hide-medium navbar w3-padding-large myTab ">Home</a>
<a href="tables.html" class="w3-bar-item w3-button w3-hide-small w3-hide-medium navbar w3-padding-large myTab"> Data</a>
<a href="contact.html" class="w3-bar-item w3-button w3-hide-small w3-hide-medium navbar myTab w3-padding-large" > Contact</a>
<a href="about.html" class="w3-bar-item w3-button w3-hide-small w3-hide-medium w3-padding-large navbar myTab"> About</a>
<a href="login.html" class = "w3-bar-item w3-button w3-hide-small w3-hide-medium w3-padding-large navbar myTab "> Log In </a>
<a href="useraccount.html" class = "w3-bar-item w3-button w3-hide-small w3-hide-medium w3-padding-large navbar myTab active "> Your Account </a>
</div>
<!-- Navbar on small screens -->
<div id="navDemo" class="w3-bar-block w3-mobile w3-black w3-hide w3-hide-large">
<a href="index.html" class="w3-bar-item w3-button" onclick="toggleFunction()">Home</a>
<a href="tables.html" class="w3-bar-item w3-button" onclick="toggleFunction()">Data</a>
<a href="contact.html" class="w3-bar-item w3-button" onclick="toggleFunction()">Contact</a>
<a href="about.html" class="w3-bar-item w3-button" onclick="toggleFunction()">About</a>
<a href="login.html" class="w3-bar-item w3-button" onclick="toggleFunction()">Log In</a>
<a href="useraccount.html" class="w3-bar-item w3-button" onclick="toggleFunction()">Your Account</a>
</div>
</div>
<section class="wrapper style1 align-center">
<div class="w3-row w3-padding-64 ">
<div class="w3-col w3-padding-32" style="width:150px">
<div id="mySidenav" class="sidenav">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<a href="#">-Your iPlant-</a>
<a href="useraccount.html">Home</a>
<a href="history.html">History</a>
<a href="#">-Manage account-</a>
<a href="addiplant.html">Add an iPlant</a>
<a href="settings.html">Account Settings</a>
<a href="#">-Support-</a>
<a href="email.html">Contact Us</a>
<a href="faq.html">FAQ</a>
</div>
<!-- Use any element to open the sidenav -->
<span onclick="openNav()" class="moveSideNav">→ Account Menu</span>
</div>
<!-- Add all page content inside this div if you want the side nav to push page content to the right (not used if you only want the sidenav to sit on top of the page -->
<div id="main">
<div class="w3-rest w3-padding-32">
<h1>Your iPlant Account</h1>
<h3>Welcome [content: username]</h3>
<p>Welcome to your iPlant account. Here you can manage your personal details, see your plant status, manage your plant's environment, and much more. Please choose an option from the menu on the left. </p>
<!-- Five -->
<div class="movediv2 inner align-center">
<h2 class="header2">Your Garden</h2>
<p style=color:black >All your plant data. All in one place.</p>
<h3 class="header3data">Cloud Status: <span id="cloud_status" class="disconnected">Disconnected</span></h3>
<h3 class="header3data">Data Status: <span id="data_status" class="disconnected">Disconnected</span></h3>
<div style="overflow-x: scroll">
<TABLE Align="center" Border="2" Width="600" Class = "TableFont">
<tr>
<th>Light(cd)</th>
<th>Temperature (°C)</th>
<th>Humidity(%)</th>
<th>CO2(ppm)</th>
</tr>
<tr>
<th id = "light_value">no data available</th>
<th id= "temp_value">no data available</th>
<th id= "humid_value" >no data available</th>
<th id= "CO2_value">no data available</th>
</tr>
</TABLE>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="wrapper style1 align-center">
<div class="inner">
<ul class="icons" style = "display: inline-block;">
<li class = "icons"><a href="https://twitter.com/iPlantTeam" class="icon style2 fa-twitter"><span class="label">Twitter</span></a></li>
<li class = "icons"><a href="https://www.facebook.com/Plant-Team-1770541762960314/" class="icon style2 fa-facebook"><span class="label">Facebook</span></a></li>
<li class = "icons"><a href="https://www.instagram.com/iplantteam/" class="icon style2 fa-instagram"><span class="label">Instagram</span></a></li>
<li class = "icons"><a href="https://www.linkedin.com/in/iplant-team-722687147/" class="icon style2 fa-linkedin"><span class="label">LinkedIn</span></a></li>
<li class = "icons"><a href="email.html" class="icon style2 fa-envelope"><span class="label">Email</span></a></li>
</ul>
<p>© iPlant 2017. Design: <a href="https://html5up.net">HTML5 UP</a>.</p>
</div>
</footer>
<!--- Sripts --->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.scrollex.min.js"></script>
<script src="assets/js/jquery.scrolly.min.js"></script>
<script src="assets/js/skel.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
<script src="assets/js/main.js"></script>
<script type="text/javascript" src="SimbleeCloud.js"></script>
<script>
function toggleFunction() {
var x = document.getElementById("navDemo");
if (x.className.indexOf("w3-show") == -1) {
x.className += " w3-show";
} else {
x.className = x.className.replace(" w3-show", "");
}
}
</script>
<script>
/* Set the width of the side navigation to 250px and the left margin of the page content to 250px and add a black background color to body */
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
document.getElementById("main").style.marginLeft = "250px";
document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
}
/* Set the width of the side navigation to 0 and the left margin of the page content to 0, and the background color of body to white */
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
document.getElementById("main").style.marginLeft = "0";
document.body.style.backgroundColor = "white";
}
</script>
<script>
var cloudStatus = document.getElementById("cloud_status");
var dataStatus = document.getElementById("data_status");
var button = document.getElementById("button");
var buttonText = document.getElementById("button_text");
var lightValue = document.getElementById("light_value");
var light_from_simblee;
var tempValue = document.getElementById("temp_value");
var temp_from_simblee;
var humidValue = document.getElementById("humid_value");
var humid_from_simblee;
var CO2Value = document.getElementById("CO2_value");
var CO2_from_simblee;
var cloud = new SimbleeCloud();
var destESN = 0xaebf5932; // enter your destination ESN here
cloud.myESN = 0x60606060; // enter your pool ESN here
cloud.userID = 0xe42532dd; // enter your user id here
cloud.connect();
var dataDisconnected = setInterval(function() {
//dataStatus.className = "disconnected";
dataStatus.innerHTML = "Disconnected";
}, 2000);
setInterval(function() {
var payload = new ArrayBuffer(1);
var view = new DataView(payload);
view.setUint8(0, "2".charCodeAt(0));
cloud.send(destESN, payload);
}, 1000);
cloud.onactive = function() {
//cloudStatus.className = "connected";
cloudStatus.innerHTML = "Connected";
var payload = new ArrayBuffer(1);
var view = new DataView(payload);
view.setUint8(0, "2".charCodeAt(0));
cloud.send(destESN, payload);
};
cloud.oninactive = function() {
//cloudStatus.className = "disconnected";
cloudStatus.innerHTML = "Disconnected";
};
cloud.onrequest = function(originESN, payload) {
window.clearInterval(dataDisconnected);
dataDisconnected = setInterval(function() {
//dataStatus.className = "disconnected";
dataStatus.innerHTML = "Disconnected";
}, 1500);
var view = new DataView(payload);
var data = String.fromCharCode(view.getUint8(0));
//dataStatus.className = "connected";
dataStatus.innerHTML = "Connected";
/* This is where we link our values from the cloud*/
/* Light data */
if (data == '5') {
light_from_simblee = String.fromCharCode(view.getUint8(1));
light_from_simblee += String.fromCharCode(view.getUint8(2));
light_from_simblee += String.fromCharCode(view.getUint8(3));
light_from_simblee += String.fromCharCode(view.getUint8(4));
lightValue.innerHTML = light_from_simblee;
}
if (data== '6'){
temp_from_simblee = String.fromCharCode(view.getUint8(1));
temp_from_simblee += String.fromCharCode(view.getUint8(2));
temp_from_simblee += String.fromCharCode(view.getUint8(3));
temp_from_simblee += String.fromCharCode(view.getUint8(4));
temp_from_simblee += String.fromCharCode(view.getUint8(5));
tempValue.innerHTML = temp_from_simblee;
}
if (data == '7'){
humid_from_simblee = String.fromCharCode(view.getUint8(1));
humid_from_simblee += String.fromCharCode(view.getUint8(2));
humid_from_simblee += String.fromCharCode(view.getUint8(3));
humid_from_simblee += String.fromCharCode(view.getUint8(4));
humid_from_simblee += String.fromCharCode(view.getUint8(5));
humidValue.innerHTML = humid_from_simblee;
}
if (data == '8'){
CO2_from_simblee = String.fromCharCode(view.getUint8(1));
CO2Value.innerHTML = CO2_from_simblee;
CO2_from_simblee += String.fromCharCode(view.getUint8(2));
CO2Value.innerHTML = CO2_from_simblee;
CO2_from_simblee += String.fromCharCode(view.getUint8(3));
CO2Value.innerHTML = CO2_from_simblee;
CO2_from_simblee += String.fromCharCode (view.getUint8(4));
CO2Value.innerHTML = CO2_from_simblee;
}
};
</script>
</html>