-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
354 lines (315 loc) · 9.67 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="images/logo-white.svg" type="image/svg">
<title>Home | EnvOS</title>
<link rel="stylesheet" href="css/main.css">
<!--
This style should be in the html file itself, so that you don't have to
wait for the main CSS file to load
-->
<style>
#loading {
font-family: "Roboto", Helvetica, Arial, sans-serif;
box-sizing: border-box;
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: rgb(20, 20, 20);
z-index: 100;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
transition: opacity 0.5s ease-in-out;
}
/* https://loading.io/css/ */
.lds-dual-ring {
display: inline-block;
width: 80px;
height: 80px;
}
.lds-dual-ring:after {
content: " ";
display: block;
width: 64px;
height: 64px;
margin: 8px;
border-radius: 50%;
border: 6px solid #fff;
border-color: #fff transparent #fff transparent;
animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
#offline_text {
color: white;
margin-top: 2em;
}
</style>
</head>
<body>
<div id="loading">
<div class="lds-dual-ring"></div>
<div id="offline_text" style="display: none;">Your station is offline...</div>
</div>
<div class="wrapper">
<div class="header">
<div>
<img src="images/logo-white.svg">
<div class="header-text">
<span>EcoCity</span>
<small>ID: <span style="user-select:text;" data-replace="id">-</span></small>
</div>
<div id="status-icons">
<!-- <img id="wifi_s" src="images/wifi_off.svg" class="off"> -->
<!-- <img id="ap_s" src="images/ap.svg" class="off"> -->
<!-- <img id="ethernet_s" src="images/ethernet.svg" class="off"> -->
</div>
</div>
</div>
<div class="content">
<div id="home_page" class="">
<div id="city" class="panel hide">
<img id="weather_icon" src="images/weather/02.svg">
<div class="weather">
<div>
<span><span id="weather_temperature">-</span>°C <span id="weather_humidity">-</span>%</span>
<small id="weather_city">-</small>
</div>
</div>
<div id="city_aqi" class="hide">
<span id="aqi">-</span>
<small>AQI in your city</small>
</div>
</div>
<div id="values_content">
<div class="panel tabs">
<span id="v_last" class="selected">Realtime</span>
<span id="v_send">Average</span>
</div>
<div id="values_table_last">
<span>Loading...</span>
</div>
<div id="values_table_send" class="hide">
<span>Loading...</span>
</div>
</div>
</div>
<div id="station_page" class="hide">
<div class="panel station">
<img src="images/cube-solid.svg">
<div>
<span class="h" data-replace="station-name">Station name</span>
<small data-replace="station-details">Station details</small>
</div>
</div>
<div class="box-panel panel">
<div class="h">Station info</div>
<div id="station_info">
<div>Version: <code data-replace="software-version">-</code></div>
<div>ID: <code data-replace="id">-</code></div>
<div>MAC: <code data-replace="mac">-</code></div>
<div>IP: <code data-replace="local-ip">-</code></div>
</div>
</div>
<div class="sensors-panel box-panel panel">
<div class="h">Available sensors</div>
<div id="sensors_list">
</div>
</div>
</div>
<div id="settings_page" class="hide">
<div class="box-panel panel">
<div class="h">Wi-Fi Connection</div>
<label class="checkbox">
<input type="checkbox" name="wifi_connect" master="master" />
Connect to Wi-Fi
</label>
<select class="text-box" id="wlan_ssid" name="wlan_ssid"></select>
<input class="text-box" type="password" name="wlan_pass" placeholder="Password" value="" maxlength="64" />
</div>
<div class="box-panel panel">
<div class="h">Authentication</div>
<label class="checkbox">
<input type="checkbox" name="www_auth" master="master" />
Enable authentication
</label>
<input class="text-box" type="text" name="www_user" placeholder="User" value="" maxlength="34" /><br/>
<input class="text-box" type="password" name="www_pass" placeholder="Password" value="" maxlength="64" />
</div>
<div class="box-panel panel" hardware="ethernet">
<div class="h">Ethernet</div>
<label class="checkbox">
<input type="checkbox" name="ethernet_connect" />
Use Ethernet for data sending
</label>
</div>
<div class="box-panel panel" hardware="lcd">
<div class="h">LCD</div>
<label class="checkbox">
<input type="checkbox" name="lcd_backlight" />
LCD backlight
</label>
<label class="checkbox">
<input type="checkbox" name="lcd_auto_backlight" />
Turn off LCD backlight at night
</label>
</div>
<div class="box-panel panel" hardware="buzzer">
<div class="h">Overage alerts</div>
<label class="checkbox">
<input type="checkbox" name="overage_alerts" />
Sound alerts
</label>
</div>
<div id="private_apis" class="hide">
<div class="box-panel panel">
<div class="h">Custom server</div>
<label class="checkbox">
<input type="checkbox" name="send2custom" master="master" />
Send data to custom server
</label>
<table class="fw-table">
<tr class="fw-table">
<td>Host </td>
<td>
<input class="text-box" type="text" name="host_custom" placeholder="Host" maxlength="99" /><br/>
</td>
</tr>
<tr class="fw-table">
<td>Port </td>
<td>
<input class="text-box" type="number" name="port_custom" placeholder="Port" maxlength="5" /><br/>
</td>
</tr>
<tr class="fw-table">
<td>User </td>
<td>
<input class="text-box" type="text" name="user_custom" placeholder="User" maxlength="64" /><br/>
</td>
</tr>
<tr class="fw-table">
<td>Pass </td>
<td>
<input class="text-box" type="text" name="pass_custom" placeholder="Pass" maxlength="64" /><br/>
</td>
</tr>
</table>
</div>
<div class="box-panel panel">
<div class="h">MQTT</div>
<label class="checkbox">
<input type="checkbox" name="send2mqtt" master="master" />
Send data to MQTT
</label>
<table class="fw-table">
<tr class="fw-table">
<td>Host </td>
<td>
<input class="text-box" type="text" name="host_mqtt" placeholder="Host" maxlength="99" /><br/>
</td>
</tr>
<tr class="fw-table">
<td>Port </td>
<td>
<input class="text-box" type="number" name="port_mqtt" placeholder="Port" maxlength="5" /><br/>
</td>
</tr>
<tr class="fw-table">
<td>User </td>
<td>
<input class="text-box" type="text" name="user_mqtt" placeholder="User" maxlength="64" /><br/>
</td>
</tr>
<tr class="fw-table">
<td>Pass </td>
<td>
<input class="text-box" type="text" name="pass_mqtt" placeholder="Pass" maxlength="64" /><br/>
</td>
</tr>
</table>
</div>
<div class="box-panel panel">
<div class="h">InfluxDB</div>
<label class="checkbox">
<input type="checkbox" name="send2influx" master="master" />
Send data to InfluxDB
</label>
<table class="fw-table">
<tr class="fw-table">
<td>URL </td>
<td>
<input class="text-box" type="text" name="url_influx" placeholder="URL" maxlength="99" /><br/>
</td>
</tr>
<tr class="fw-table">
<td>Token </td>
<td>
<input class="text-box" type="text" name="token_influx" placeholder="Token" maxlength="99" /><br/>
</td>
</tr>
<tr class="fw-table">
<td>ORG </td>
<td>
<input class="text-box" type="text" name="org_influx" placeholder="ORG" maxlength="99" /><br/>
</td>
</tr>
<tr class="fw-table">
<td>Bucket </td>
<td>
<input class="text-box" type="text" name="bucket_influx" placeholder="Bucket" maxlength="99" /><br/>
</td>
</tr>
</table>
</div>
</div>
<div id="private_apis_blocked" class="box-panel panel">
<div class="h">Custom APIs</div>
<span style="color: gray">
To access the functionality of sending data to MQTT, InfluxDB and other APIs, please contact the developers.
</span>
</div>
<div class="save-panel box-panel panel">
<div>
<span>Save settings</span>
<button id="save_settings">Save</button>
</div>
</div>
</div>
<br/>
<br/>
<br/>
<br/>
</div>
<div class="menu">
<span id="menu_list">
<div id="m_station">
<img src="images/cube-solid.svg">
<span>Station</span>
</div>
<div id="m_home" class="selected">
<img src="images/house-solid.svg">
<span>Home</span>
</div>
<div id="m_settings">
<img src="images/gear-solid.svg">
<span>Settings</span>
</div>
</span>
</div>
</div>
<script type="module" src="js/utils.js"></script>
<script type="module" src="js/main.js"></script>
<script type="module" src="js/values.js"></script>
<script type="module" src="js/weather_and_aqi.js"></script>
</body>
</html>