-
Notifications
You must be signed in to change notification settings - Fork 0
/
safe.html
453 lines (401 loc) · 16.6 KB
/
safe.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
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<html>
<head>
<title>SEPA Dashboard 0.9.6</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Adapted from Fabio Viola version">
<meta name="author" content="Luca Roffia">
<!-- Bootstrap CSS -->
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin="anonymous">
<!-- Sepa dashboard -->
<link rel="stylesheet"
href="fontawesome-free-5.0.6/web-fonts-with-css/css/fontawesome-all.css">
<link rel="stylesheet" href="css/dashboard.css">
</head>
<body onload="">
<nav class="navbar">
<a class="navbar-brand" href="#"> <img src="icon/sepa.svg"
width="32" height="32" class="d-inline-block align-top" alt="">
Dashboard
</a>
</nav>
<ul class="nav nav-pills ml-3" id="pills-tab" role="tablist">
<li class="nav-item"><a class="nav-link active"
id="pills-configure-tab" data-toggle="pill" href="#pills-configure"
role="tab" aria-controls="pills-configure" aria-selected="true">Configure</a></li>
<!-- <li class="nav-item"><a class="nav-link" id="pills-update-tab"
data-toggle="pill" href="#pills-update" role="tab"
aria-controls="pills-update" aria-selected="false">Update</a></li>-->
<li class="nav-item"><a class="nav-link" id="pills-query-tab"
data-toggle="pill" href="#pills-query" role="tab"
aria-controls="pills-query" aria-selected="false">Query</a></li>
<li class="nav-item"><a class="nav-link" id="pills-subscribe-tab"
data-toggle="pill" href="#pills-subscribe" role="tab"
aria-controls="pills-subscribe" aria-selected="false">Subscribe</a></li>
<li class="nav-item"><a class="nav-link" id="pills-help-tab"
data-toggle="pill" href="#pills-help" role="tab"
aria-controls="pills-help" aria-selected="false">Help</a></li>
</ul>
<div class="tab-content" id="pills-tabContent">
<!-- QUERY TAB -->
<div class="tab-pane fade mt-3" id="pills-query" role="tabpanel"
aria-labelledby="pills-query-tab">
<div class="card rounded-3 ml-3 mr-3">
<div class="card-header bg-primary text-white" id="queryPanel">
<i class="fas fa-search"></i> <label for="queryDropdownMenu"
class="col-form-label-sm mr-3" id="queryLabel">Query</label>
<button class="btn btn-default dropdown-toggle btn-sm float-right"
type="button" id="queryDropdownMenu" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="true">Queries</button>
<ul class="dropdown-menu float-right"
aria-labelledby="queryDropdownMenu" id="queryDropdown">
</ul>
</div>
<div class="card-body">
<div class="row">
<textarea class="form-control form-control-sm" id="queryTextInput">SELECT ?time WHERE { <http://sepatest/currentTime> <http://sepatest/hasValue> ?time }</textarea>
</div>
<div class="row mt-3">
<div id="queryForcedBindings"></div>
</div>
<div class="row mt-3 justify-content-center">
<button type="button" class="btn btn-primary"
onclick="javascript:query();">
<small><i class="fas fa-share-square"></i> Query</small>
</button>
</div>
<div class="row">
<label> <b>Query results</b> <span
class="badge badge-pill badge-info">Literal</span> <span
class="badge badge-pill badge-success">URI</span>
</label>
</div>
<div class="row">
<div class="table-responsive">
<table class="table table-sm table-bordered table-hover"
id="queryTable">
<thead class="thead-light">
<tr></tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div class="form-group" align="center">
<!-- btn-sm btn-primary -->
<button type="button" class="btn btn-outline-danger float-right"
onclick="javascript:clearQueryResults();">
<small><i class="fas fa-ban"></i> Clear</small>
</button>
</div>
</div>
<div class="card-footer text-muted" id="queryResultLabel">Info</div>
</div>
</div>
<!-- UPDATE TAB -->
<div class="tab-pane fade mt-3" id="pills-update" role="tabpanel"
aria-labelledby="pills-update-tab">
<div class="card rounded-3 ml-3 mr-3">
<div class="card-header rounded-3 bg-primary text-white"
id="updatePanel">
<i class="fas fa-cloud-upload-alt"></i> <label
for="updateDropdownMenu" class="col-form-label-sm mr-3"
id="updateLabel">Update</label>
<button class="btn btn-default dropdown-toggle btn-sm float-right"
type="button" id="updateDropdownMenu" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="true">Updates</button>
<ul class="dropdown-menu float-right"
aria-labelledby="updateDropdownMenu" id="updateDropdown">
</ul>
</div>
<div class="card-body">
<div class="row">
<textarea class="form-control form-control-sm"
id="updateTextInput">DELETE {GRAPH <http://sepatest/graph> {<http://sepatest/currentTime> <http://sepatest/hasValue> ?oldTimestamp}} INSERT {GRAPH <http://sepatest/graph> {<http://sepatest/currentTime> <http://sepatest/hasValue> ?timestamp }} WHERE {OPTIONAL{<http://sepatest/currentTime> <http://sepatest/hasValue> ?oldTimestamp} . BIND(now() AS ?timestamp)}</textarea>
</div>
<div class="row mt-3" id="updateForcedBindings"></div>
<div class="row justify-content-center mt-3">
<button type="button" class="btn btn-primary"
onclick="javascript:update();">
<small><i class="fas fa-share-square"></i> Update</small>
</button>
</div>
</div>
<div class="card-footer text-muted" id="updateResultLabel">Info</div>
</div>
</div>
<!-- SUBSCRIBE TAB -->
<div class="tab-pane fade mt-3" id="pills-subscribe" role="tabpanel"
aria-labelledby="pills-subscribe-tab">
<!-- CARD SUBSCRIBE border-primary m-1 mt-0-->
<div class="card rounded-3 ml-3 mr-3">
<!-- small text-white bg-primary rounded-0 font-weight-light -->
<div class="card-header rounded-3 bg-primary text-white"
id="queryPanel">
<i class="fas fa-rocket"></i> <label for="subscribeDropdownMenu"
class="col-form-label-sm mr-3" id="subscribeLabel">Subscribe</label>
<button class="btn btn-default dropdown-toggle btn-sm float-right"
type="button" id="subscribeDropdownMenu" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="true">Subscribes</button>
<ul class="dropdown-menu float-right"
aria-labelledby="subscribeDropdownMenu" id="subscribeDropdown">
</ul>
</div>
<div class="card-body">
<!-- FORM FOR SUBSCRIBES -->
<form>
<div class="row mb-3">
<textarea class="form-control form-control-sm"
id="subscribeTextInput">SELECT ?time WHERE { <http://sepatest/currentTime> <http://sepatest/hasValue> ?time }</textarea>
</div>
<!-- <div class="form-group">
<label for="queryInput" class="col-form-label-sm"
id="subscribeLabel"><b>SPARQL Subscribe</b></label>
<button class="btn btn-default dropdown-toggle btn-sm ml-3"
type="button" id="dropdownMenu1" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="true">
Subscribes<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1"
id="subscribeDropdown">
</ul>
</div>
-->
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Alias</span>
</div>
<input type="text" class="form-control" placeholder="Username"
value="TEST" aria-label="Username"
aria-describedby="basic-addon1" id="subscriptionAlias">
</div>
<div class="row mt-3">
<div id="subscribeForcedBindings"></div>
</div>
<div class="form-group" align="center">
<button type="button" class="btn btn-primary"
onclick="javascript:subscribe();">
<small><i class="fas fa-share-square"></i> Subscribe</small>
</button>
</div>
</form>
</div>
<div class="card-footer text-muted" id="subscribeInfoLabel">Info</div>
</div>
<!-- CARD active subscriptions -->
<div class="card rounded-3 ml-3 mr-3 mt-3">
<div class="card-header rounded-3 bg-primary text-white"
id="subscribePanel">
<i class="fas fa-bolt"></i> Active subscriptions
</div>
<div class="card-body" id="activeSubscriptions">
<ul class="nav nav-pills" id="pills-tab-subscriptions"
role="tablist"></ul>
<div class="tab-content" id="pills-tabContent-subscriptions"></div>
</div>
<div class="card-footer text-muted" id="notificationsInfoLabel">Info</div>
</div>
</div>
<!-- CONFIGURE TAB -->
<div class="tab-pane fade show active mt-3" id="pills-configure"
role="tabpanel" aria-labelledby="pills-configure-tab">
<div class="container-fluid">
<div class="input-group mb-3">
<div class="custom-file">
<input type="file" class="custom-file-input" id="loadJsap"
aria-describedby="inputGroupFileAddon04"> <label
class="custom-file-label" for="loadJsap">Select JSAP file</label>
</div>
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button"
id="inputGroupFileAddon04" onclick="javascript:loadJsap()">Load</button>
</div>
</div>
<div class="card border rounded-3">
<div class="card-header rounded-3 text-white bg-primary">
<i class="fas fa-cogs"></i> SEPA broker connection parameters
</div>
<div class="card-body">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Host</span>
</div>
<input type="text" class="form-control"
value="mml.arces.unibo.it" id="host">
</div>
<label class="col-form-label-sm mt-3"><b>SPARQL 1.1
protocol</b></label>
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Protocol</span>
</div>
<input type="text" class="form-control" value="http"
id="sparql11protocol">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Port</span>
</div>
<input type="text" class="form-control" value="8000"
id="sparql11port">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Update
path</span>
</div>
<input type="text" class="form-control" value="/update"
id="updatePath">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Query
path</span>
</div>
<input type="text" class="form-control" value="/query"
id="queryPath">
</div>
<label class="col-form-label-sm mt-3"><b>SPARQL 1.1
Secure Event protocol</b></label>
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Protocol</span>
</div>
<input type="text" class="form-control" value="ws"
id="sparql11seprotocol">
<div class="input-group-prepend mb">
<span class="input-group-text" id="basic-addon1">Port</span>
</div>
<input type="text" class="form-control" value="9000"
id="sparql11seport">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Subscribe
path</span>
</div>
<input type="text" class="form-control" value="/subscribe"
id="subscribePath">
</div>
</div>
</div>
<div class="card border rounded-3 mt-3">
<div class="card-header rounded-3 text-white bg-primary">
<i class="fas fa-list-ul"></i> Namespaces
</div>
<div class="card-body">
<form class="form small">
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Prefix</span>
</div>
<input type="text" class="form-control" placeholder="Username"
value="wot-at-arces" aria-label="Username"
aria-describedby="basic-addon1" id="prefixField">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Namespace</span>
</div>
<input type="text" class="form-control" placeholder="Username"
value="http://site.unibo.it/wot" aria-label="Username"
aria-describedby="basic-addon1" id="namespaceField">
</div>
<div class="form-group" align="center">
<button type="button" class="btn btn-primary"
onclick="javascript:addNamespace();">
<small><i class="fas fa-edit"></i> Add/Edit</small>
</button>
</div>
</form>
<br>
<table
class="table table-bordered table-hover table-condensed table-sm"
id="namespacesTable">
<tr>
<th>Prefix</th>
<th>Namespace</th>
<th>Actions</th>
</tr>
</table>
</div>
</div>
</div>
</div>
<!-- HELP TAB -->
<div class="tab-pane fade mt-3" id="pills-help" role="tabpanel"
aria-labelledby="pills-help-tab">
<div class="container-fluid">
<div class="card border rounded-3 mb-3">
<div class="card-header rounded-3 text-white bg-primary">
<i class="fas fa-flag"></i> W3C recommendations
</div>
<div class="card-body">
<div class="alert alert-primary" role="alert">
<a href="https://www.w3.org/TR/sparql11-update/"
class="alert-link">SPARQL 1.1 Update Language</a>
</div>
<div class="alert alert-primary" role="alert">
<a href="https://www.w3.org/TR/sparql11-query/"
class="alert-link">SPARQL 1.1 Query Language</a>
</div>
<div class="alert alert-primary" role="alert">
<a href="https://www.w3.org/TR/sparql11-protocol/"
class="alert-link">SPARQL 1.1 Protocol</a>
</div>
</div>
</div>
<div class="card border rounded-3 mb-3">
<div class="card-header rounded-3 text-white bg-primary">
<i class="fab fa-firstdraft"></i> SEPA working drafts
</div>
<div class="card-body">
<div class="alert alert-warning" role="alert">
<a href="http://mml.arces.unibo.it/TR/sepa.html"
class="alert-link">SPARQL Event Processing Architecture</a>
</div>
<div class="alert alert-warning" role="alert">
<a href="http://mml.arces.unibo.it/TR/sparql11-se-protocol.html"
class="alert-link">SPARQL 1.1 Secure Event Protocol</a>
</div>
<div class="alert alert-warning" role="alert">
<a href="http://mml.arces.unibo.it/TR/sparql11-subscribe.html"
class="alert-link">SPARQL 1.1 Subscribe Language</a>
</div>
<div class="alert alert-warning" role="alert">
<a href="http://mml.arces.unibo.it/TR/jsap.html"
class="alert-link">JSON SPARQL Application Profile</a>
</div>
</div>
</div>
<div class="card border rounded-3">
<div class="card-header rounded-3 text-white bg-primary">
<i class="fas fa-info"></i> Contacts
</div>
<div class="card-body">
<div class="alert alert-success" role="alert">
<a href="https://site.unibo.it/wot/en" class="alert-link">Dynamic
Linked Data and Web of Things Research @ ARCES</a>
</div>
<div class="alert alert-success" role="alert">
<a href="https://github.com/arces-wot/SEPA" class="alert-link">Join
us and contribute <i class="fab fa-github"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<script
src="https://cdn.jsdelivr.net/npm/@arces-wot/sepa-js@0.1.0/web/sepa.js"></script>
<script type="text/javascript" src="js/sepadashboard.js"></script>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin="anonymous"></script>
</body>
</html>