forked from m2massociates/everygateDemo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
307 lines (307 loc) · 15.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Everygate Workaround</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="css/demo.css" type="text/css"/>
<link rel="icon" type="image/png" sizes="16x16" href="imgs/favicon-16x16.png">
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="https://www.m2massociates.com" target="_blank" style="padding:0;margin:0;"><img src="imgs/logo.png" style="height:60px;margin-top:-5px;"></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav"></ul>
<ul class="nav navbar-nav navbar-right">
<li style="padding-top:7px"><button type="button" class="btn btn-info" data-toggle="modal" data-target="#myModal">Connect</button></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-md-3 text-left" id="location_div">
<div class="div_header">
<h3>GPS Tracking</h3>
<button title="toggle fullscreen" onclick="fullscreen('location')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk" type="checkbox" id="_location_json" title="show/hide topic json">
</div>
<div id="location" class="div_header"></div>
</div>
<div class="col-md-3 text-left" id="telemetry_1_div">
<div class="div_header">
<h3>Condition Monitoring</h3>
<button title="toggle fullscreen" onclick="fullscreen('telemetry_1')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk _estimote_telemetry_json" name="domainList" type="checkbox" title="show/hide topic json">
</div>
<div id="telemetry_1" class="div_header">
<b>Light:<span id="select_dev_id_1" style="width:200px;float:right;margin-left:7px;"></span></b>
<div id="chartdiv-1"></div>
</div>
</div>
<div class="col-md-3 text-left" id="telemetry_2_div">
<div class="div_header">
<h3>Condition Monitoring</h3>
<button title="toggle fullscreen" onclick="fullscreen('telemetry_2')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk _estimote_telemetry_json" name="domainList" type="checkbox" title="show/hide topic json">
</div>
<div id="telemetry_2" class="div_header">
<b>Temperature:<span id="select_dev_id_2" style="width:200px;float:right;margin-left:7px;"></span></b>
<div id="chartdiv-2"></div>
</div>
</div>
<div class="col-md-3 text-left" id="telemetry_3_div">
<div class="div_header">
<h3>Condition Monitoring</h3>
<button title="toggle fullscreen" onclick="fullscreen('telemetry_3')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk _estimote_telemetry_json" name="domainList" type="checkbox" title="show/hide topic json">
<span id="select_dev_id" style="width:100px;float:left;margin-left:7px;"></span>
</div>
<div id="telemetry_3" class="div_header">
<b>Pressure:<span id="select_dev_id_3" style="width:200px;float:right;margin-left:7px;"></span></b>
<div id="chartdiv-6"></div>
</div>
</div>
<div class="col-md-3 text-left" id="nfc_div">
<div class="div_header">
<h3>NFC Tag Scanner</h3>
<button title="toggle fullscreen" onclick="fullscreen('nfc')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk" type="checkbox" id="_nfc_json" title="show/hide topic json">
</div>
<div id="nfc" class="div_header"></div>
</div>
<div class="col-md-3 text-left" id="ble_div">
<div class="div_header">
<h3>BluetoothLE Buttons</h3>
<button title="toggle fullscreen" onclick="fullscreen('ble')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk" type="checkbox" id="_ble_json" title="show/hide topic json">
</div>
<div id="ble" class="div_header">
<div id="btn-1" class="btn-ble" style="background:black;float:left;" ></div>
<div id="btn-2" class="btn-ble" style="background:gray; float:right;"></div>
</div>
</div>
<div class="col-md-3 text-left" id="dig_input_div">
<div class="div_header">
<h3>DIG INPUT</h3>
<button title="toggle fullscreen" onclick="fullscreen('dig_input')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk _estimote_telemetry_json" name="domainList" type="checkbox" title="show/hide topic json">
</div>
<div id="dig_input" class="div_header">
<i class="glyphicons glyphicons-door"></i>
<b>GPIO:<span id="select_dev_id_4" style="width:200px;float:right;margin-left:7px;"></span></b>
<div id="digInputDiv" style="width:100%;float:left;display:none">
<select id="dig_input_s" style="margin-top:5px;float:right;width:200px;">
<option value="0">gpio 1</option>
<option value="1">gpio 2</option>
<option value="2">gpio 3</option>
<option value="3">gpio 4</option>
</select>
</div>
<hr style="float:left;width:100%"/>
<div id="dig_input_res_div" style="width:100%;float:left;text-align:center"></div>
</div>
</div>
<div class="col-md-3 text-left" id="dig_output_div">
<div class="div_header">
<h3>DIG OUTPUT</h3>
<button title="toggle fullscreen" onclick="fullscreen('dig_output')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk" id="_estimote_publish_json" type="checkbox" title="show/hide topic json">
</div>
<div id="dig_output" class="div_header">
<i class="glyphicons glyphicons-door"></i>
<b>GPIO:<span id="select_dev_id_5" style="width:200px;float:right;margin-left:7px;"></span></b>
<div id="digOutputDiv" style="width:100%;float:left;display:none">
<select id="dig_output_s" style="margin-top:5px;float:right;width:200px;">
<option value="0">gpio 1</option>
<option value="1">gpio 2</option>
<option value="2">gpio 3</option>
<option value="3">gpio 4</option>
</select>
<select id="dig_output_v" style="margin-top:5px;float:right;width:200px;">
<option value="true" >true </option>
<option value="false">false</option>
</select>
<button type="submit" class="btn btn-success" onclick="publishMsg()" id="publish_btn" style="margin-top:-10px;float:left;">Publish</button>
</div>
<hr style="float:left;width:100%"/>
<div id="dig_output_res_div" style="width:100%;float:left;text-align:center"></div>
</div>
</div>
<div class="col-md-3 text-left" id="lv_can_div">
<div class="div_header">
<h3>CAN-BUS Sensors</h3>
<button title="toggle fullscreen" onclick="fullscreen('lv_can')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk" type="checkbox" id="_lv_can_json" title="show/hide topic json">
</div>
<div id="lv_can" class="div_header">
<b>RPM:</b>
<div id="chartdiv-3"></div><hr />
<b>Fuel Level(Lt):</b>
<div id="chartdiv-4"></div><hr />
<b>Pedal Position(%):</b>
<div id="chartdiv-5"></div><hr />
</div>
</div>
<div class="col-md-3 text-left" id="diagnostics_div">
<div class="div_header">
<h3>Self-Diagnostics</h3>
<button title="toggle fullscreen" onclick="fullscreen('diagnostics')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk" type="checkbox" id="_diagnostics_json" title="show/hide topic json">
</div>
<div id="diagnostics" class="div_header">
<h4><i class="glyphicon glyphicon-phone"> </i> imei: <b id="imei_state"></b></h4>
<h4><i class="glyphicon glyphicon-off"> </i> status: <b id="imei_status"></b></h4>
<h4><i class="glyphicon glyphicon-time"> </i> time: <b id="time_state"></b></h4>
<h4><i class="glyphicon glyphicon-globe"> </i> wifi: <b id="wifi_state"></b></h4>
<h4><i class="glyphicon glyphicon-sort"> </i> mobile data: <b id="data_state"></b></h4>
<h4><i class="glyphicon glyphicon-screenshot"> </i> GPS: <b id="GPS_state"></b></h4>
<h4><i class="glyphicon glyphicon-link"> </i> bluetooth: <b id="bluetooth_state"></b></h4>
<h4><i class="glyphicon glyphicon-record"> </i> nfc: <b id="nfc_state"></b></h4>
<h4><i class="glyphicon glyphicon-plane"> </i> airplane mode: <b id="airplane_state"></b></h4>
</div>
</div>
<div class="col-md-3 text-left" id="user_data_div">
<div class="div_header">
<h3>Worker's Feedback</h3>
<button title="toggle fullscreen" onclick="fullscreen('user_data')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<input class="chk" type="checkbox" id="_user_data_json" title="show/hide topic json">
</div>
<div id="user_data" class="div_header"></div>
</div>
<div class="col-md-3 text-left" id="json_div">
<div class="div_header">
<h3>raw json</h3>
<button title="toggle fullscreen" onclick="fullscreen('json')" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-fullscreen"></i></button>
<button title="clear content" onclick="$('#json').empty();" type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-refresh"></i></button>
</div>
<div id="json" class="div_header"></div>
</div>
</div>
</div>
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Credentials</h4>
</div>
<div class="modal-body">
<p>
<form id="connect_form" name="connect_form" class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-3" for="hostname">hostname:</label>
<div class="col-sm-9">
<input name="field1" type="text" class="form-control" id="hostname" placeholder="Enter hostname" value="api.m2massociates.com">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="port">port:</label>
<div class="col-sm-9">
<input name="field2" type="number" class="form-control" id="port" placeholder="Enter port" value="9002">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="qos">qos:</label>
<div class="col-sm-9">
<input name="field3" type="number" class="form-control" id="qos" placeholder="Enter qos" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="userName">username:</label>
<div class="col-sm-9">
<input name="field4" type="text" class="form-control" id="userName" placeholder="Enter username" value="everygatedemo@gmail.com">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="password">password:</label>
<div class="col-sm-9">
<input name="field5" type="text" class="form-control" id="password" placeholder="Enter password" value="15f87cb3a4759e9e12e21bd35bf71e02">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="keepAliveInterval">keep alive:</label>
<div class="col-sm-9">
<input name="field6" type="number" class="form-control" id="keepAliveInterval" placeholder="Enter keep alive" value="60">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="timeout">timeout:</label>
<div class="col-sm-9">
<input name="field7" type="number" class="form-control" id="timeout" placeholder="Enter timeout" value="3">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="useSSL">ssl:</label>
<div class="col-sm-9">
<select name="field8" class="form-control" id="useSSL">
<option value="true">true</option>
<option value="false">false</option>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="cleanSession">clean session:</label>
<div class="col-sm-9">
<select name="field9" class="form-control" id="cleanSession">
<option value="true">true</option>
<option value="false">false</option>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="topic">Topic:</label>
<div class="col-sm-9">
<input name="field10" type="text" class="form-control" id="topic" placeholder="Enter topic" value="85/358240059005652/#">
</div>
</div>
<div class="form-group">
<div class="col-sm-12" style="text-align:right">
<label for="remeber">Remember Settings:</label>
<input type="checkbox" id="remeber">
</div>
</div>
<div class="form-group">
<div class="col-sm-12" style="text-align:right">
<button class="btn btn-info" onclick="clearCookies()" id="clear_btn">Clear</button>
</div>
</div>
</form>
</p>
<div id="connection_result" class="alert alert-success" style="margin-top:18px;display:none">
<strong>Successfully Connected!</strong>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-danger" onclick="disconnect()" id="disconnect_btn" style="display:none">Disconnect</button>
<button type="submit" class="btn btn-success" onclick="connect()" id="connect_btn">Connect</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/pako.js"></script>
<script src="js/mqttLib.js"></script>
<script src="js/main.js"></script>
<script src="js/jquery.cookie.js"></script>
<script async defer src="https://maps.googleapis.com/maps/api/js?callback=initMap"></script>
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/gauge.js"></script>
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script src="js/jquery.pulsate.min.js"></script>
<script src="js/cookieFormElements.js"></script>
</html>