-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
362 lines (301 loc) · 17.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
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
<!doctype html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Emergency Services Geolocation using xAPI</title>
<meta name="description" content="">
<meta name="author" content="">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""/>
<link href="css/bootstrap-tour-standalone.min.css" rel="stylesheet"/>
<link href="css/style.css?v=sddfgfsdf" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" type="text/javascript"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js" type="text/javascript"></script><script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"
integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew=="
crossorigin=""></script>
<script src="https://digitallearningsolutions.com.au/ESxAPI/js/togeojson.js" type="text/javascript"></script>
<script src="https://unpkg.com/@mapbox/mapbox-sdk/umd/mapbox-sdk.min.js"></script>
<script src="https://digitallearningsolutions.com.au/ESxAPI/conf/config.json?v=1234" type="text/javascript"></script>
<script src="https://digitallearningsolutions.com.au/ESxAPI/conf/exData.json" type="text/javascript"></script>
<script src="https://digitallearningsolutions.com.au/ESxAPI/js/xapi/cryptojs_v3.1.2.js" type="text/javascript"></script>
<script src="https://digitallearningsolutions.com.au/ESxAPI/js/xapi/xapiwrapper.js" type="text/javascript"></script>
<script type="text/javascript" src="https://digitallearningsolutions.com.au/ESxAPI/js/qrcode.min.js"></script>
<script type="text/javascript" src="js/bootstrap-tour-standalone.min.js"></script>
<script type="text/javascript" src="js/session.js"></script>
</head>
<body >
<div id="loader"></div>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark static-top">
<div class="container">
<a class="navbar-brand" href="#">Emergency Services Geolocation using xAPI</a>
<div id="buttons" class="row" style="display:none">
<div class="btn-group" role="group" aria-label="Map Buttons">
<button type="button" title="Check In" id="btnCheckIn" class="btn btn-warning "><i class="fa fa-crosshairs"></i> </button>
<button type="button" title="Simulate a Check In" id="btnSimulateCheckIn" class="btn btn-info "><i class="fa fa-map-marked-alt"></i> </button>
<button type="button" title="Other Users (Last 24 hours)" id="btnShowOthers" class="btn btn-success "><i class="fa fa-users"></i> </button>
<button type="button" id="btnShowDashboard" title="LRS Data" class="btn btn-success "><i class="fa fa-chart-line"></i> </button>
</div>
</div>
<button type="button" id="btnLogin" title="Login" class="btn btn-success" data-toggle="modal" data-target="#mdlLogin"><i class="fa fa-street-view"></i> Start Here</button>
<div class="btn-group" role="group" aria-label="">
<div class="dropdown">
<button class="btn btn-info dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
State
</button>
<div class="dropdown-menu" id="selectState" aria-labelledby="dropdownMenuButton">
</div>
</div>
<div class="dropdown">
<button class="btn btn-info" data-toggle="modal" data-target="#mdlQRcode" type="button" id="ddSim" >
<i class="fa fa-qrcode" title="Generate Simulation QR Code"></i>
</button>
</div>
<button type="button" id="btnSettings" title="Settings" class="btn btn-danger" data-toggle="modal" data-target="#mdlSettings"><i class="fa fa-cog"></i></button>
<button type="button" title="Show Hide Circle" id="btnToggleCircle" class="btn btn-info "><i class="fa fa-circle-notch"></i> </button>
<button type="button"id="btnAbout" title="About this App" class="btn btn-warning" data-toggle="modal" data-target="#mdlAbout"><i class="fa fa-info"></i></button>
</div>
</div>
</nav>
<!-- Page Content -->
<div class="container-fluid">
<div class="SpeechMessage alert alert-danger"><span style="text-align:center;font-weight:bolder">Your browser does not support speech to text so unable to place a voice activated xAPI Statement</span>
<div id="showMayDay" style="display:none"><p>Checkin to send a Manual MayDay <button id="btnMayDay" class="btn btn-danger btn-sm">Send Manual MayDay</button></p></div></div>
<div class="row" id="initial" style="margin:auto 0;margin-top:30px;">
<div class="col-12">
<div class="alert alert-danger " style='text-align:center;' >
<i class="fa fa-location-arrow fa-2x"></i><br/>
Fetching location to kick things off. You may need to accept a message to allow the app to get your location.
<p>If this message remains, please check your Location settings or refresh the app.</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div id="map"></div>
</div>
</div>
<!-- Modals -->
<div class="modal fade" tabindex="-1" role="dialog" id="mdlAbout">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">About this App</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p style="text-align: center"><img src="images/team_downunder.png" alt="Team Downunder"/></p>
<p>The Australian xAPI Team - creating an application to marry emergency services real-time data with GeoLocation check-ins in xAPI. Creating a central repository of users where data analytics can be used to fill gaps in training based on incidents.</p>
<div style="border:solid 1pt #999;padding:5px;">
<fieldset >
<legend>Buttons</legend>
<div class="row">
<div class="column"><ul style="list-style: none">
<li><i class="fa fa-info alert alert-warning"></i> About the app and help</li>
<li><i class="fa fa-street-view alert alert-success"></i> Start here and login or just view the map</li>
<li><i class="fa fa-crosshairs alert alert-warning"></i> Checkin to your current location</li>
<li><i class="fa fa-map-marked-alt alert alert-info"></i> Simulate a checkin</li>
</ul>
</div>
<div class="column">
<ul style="list-style: none">
<li><i class="fa fa-users alert alert-success"></i> All users that have checked in (last 24 hours)</li>
<li><i class="fa fa-chart-line alert alert-success"></i> Show Reports</li>
<li><i class="fa fa-cog alert alert-danger"></i> View Settings</li>
<li><i class="fa fa-circle-notch alert alert-info"></i> Toggle the radius circle</li>
</ul>
</div>
</div>
</fieldset>
</div>
<p>Developed as part of the Fall 2020 xAPI Cohort</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="mdlSettings">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Settings</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label>LRS endPoint </label>
<input type="text" class="form-control" type="name" id="endpoint" placeholder="LRS endpoint" value="" required="true"/>
</div>
<div class="form-group">
<label>LRS Auth </label>
<input type="text" class="form-control" type="name" id="authkey" placeholder="authkey username:password" value="" required="true"/>
</div>
<div class="form-group">
<label>xAPI objectID </label>
<input type="text" class="form-control" type="name" id="objectID" placeholder="xAPI ObjectID eg https://xapi.com.au" value="" required="true"/>
</div>
<div class="form-group">
<label>Application Root URL </label>
<input type="text" class="form-control" type="name" id="rootURL" placeholder="root URL eg https://xapi.com.au/ESxAPI" value="" required="true"/>
</div>
<div class="form-group">
<label>LRS Dashboard </label>
<input type="text" class="form-control" type="name" id="dashboard" placeholder="dashboard URL eg https://xapi.com.au/ESxAPI/Dashboard" value="" required="true"/>
</div>
<div class="form-group">
<label>Incident Radius (in Kms) </label>
<input type="text" class="form-control" type="number" id="radius" placeholder="Radius eg 5000 for 5kms" value="5000" required="true"/>kms
</div>
<div class="form-group">
<label>Open Maps Key</label>
<input type="text" class="form-control" type="number" id="MapBoxToken" placeholder="" value="" readonly required="true"/>
</div>
<div class="form-group">
<label>Google Maps Key </label>
<input type="text" class="form-control" type="number" id="GoogleMapsKey" placeholder="" value="" readonly required="true"/>
</div>
</div>
<div class="modal-footer">
<button type="button" id='btnsaveSettings' class="btn btn-primary">Save changes</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="mdlLogin">
<div class="modal-dialog modal-notify modal-success" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Login - Need to know who you are first</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div id="message" class='alert alert-danger'></div>
<form>
<div class="form-group">
<label>Name </label>
<input type="text" class="form-control" type="name" id="name" placeholder="Your Name" value="" required="true">
</div>
<div class="form-group">
<label>Email</label>
<input type="email" class="form-control" id="email" placeholder="Your Email address" value="" type="email" required="true">
</div>
Remember me
<input type="checkbox" id="rememberme" placeholder="" value="" >
</form>
</div>
<div class="modal-footer">
<button type='button' class="btn btn-info btn-sm" id="btnUserOnly"><i class="fa fa-map"></i>Just show me the Map</button>
<button type="button" id="btnStart" class="btn btn-primary btn-sm" > Check in <i class="fa fa-crosshairs"></i> </button>
</div>
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="mdlQRcode">
<div class="modal-dialog modal-notify modal-success" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Generate Simulation Link / QR code</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div id="message" class='alert alert-danger' style="display:none"></div>
<form>
<div class="form-group">
<label>Select Simulations </label>
<!-- Search for Simulation -->
<input type="input" class="form-control input-lg" id="txt-search" placeholder="Type your search string">
</div>
<div id="filter-records"></div>
<div class="form-group">
<label>Enter Crew Name</label>
<input type="text" class="form-control" id="crewName" placeholder="eg Alpha Crew" value="" type="email" required="true">
</div>
</form>
<div id="qrcode" style="width:150px; height:150px; margin-top:15px;margin:0 auto; border:solid 1px #fff"></div>
<div id="qrcodeURL" style="margin:0 auto; border:solid 1px #fff"></div>
</div>
<div class="modal-footer">
<button type='button' class="btn btn-info btn-sm" id="btnGetQRCode"><i class="fa fa-qrcode"></i> Generate QR Code</button>
<button type="button" id="btnCanceSim" class="btn btn-primary btn-sm" data-dismiss="modal"> Cancel </button>
</div>
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="mdladdSimulation">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<form name="addSimulation">
<div class="modal-header">
<h5 class="modal-title">Add Simulation</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div id="Simmessage" class='alert alert-danger' style="display:none;"></div>
<input type="hidden" id="lat"/>
<input type="hidden" id="long"/>
<input type="hidden" readonly id="location"/>
<div class="form-group">
<label>Simulation at</label>
<div class='location'></div>
</div>
<div class="form-group">
<label>Simulation Title </label>
<input type="text" class="form-control" type="text" id="simtitle" placeholder="eg Fire at Work" value="" required="true">
</div>
<div class="form-group">
<label>Type of Incident</label>
<select class="form-control" id="incidentType">
<option value="">Select</option>
<option value="Bushfire">Bushfire</option>
<option value="House Fire">House Fire</option>
<option value="Grass Fire">Grass Fire</option>
<option value="Truck Rollover">Truck Rollover</option>
<option value="Car Fire">Car Fire</option>
<option value="Storm Damage">Storm Damage</option>
<option value="Other">Other</option>
</select>
</div>
<div class="form-group">
<label>Radius for Simulation in metres</label>
<input type="number" class="form-control" id="simradius" placeholder="50000" value="50000" required="true">
</div>
<div class="form-group">
<label>Number of resources on scene</label>
<input type="number" class="form-control" id="simresources" placeholder="1" value="1" required="true">
</div>
<div class="form-group">
Incident Details
<textarea cols="30" rows="5" class="form-control" id="incidentDescrip"></textarea>
</div>
</div>
<div class="modal-footer">
<button type='button' class="btn btn-info btn-sm" id="btnSaveSim"><i class="fa fa-save"></i>Save Simulation</button>
<button type="button" id="btnCanceSim" class="btn btn-primary btn-sm" data-dismiss="modal"> Cancel </button>
</div>
</form>
</div>
</div>
</div>
<script async="" defer="" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCfuQm0olWCGhBSgShTtHzJHbHde9Es-KE"></script>
<script src="js/helpers.js?v=Az9sdfsdf45fphAc" type="text/javascript"></script>
<script src="js/app.js?v=wexc" type="text/javascript"></script>
</body>
</html>