-
Notifications
You must be signed in to change notification settings - Fork 71
/
cp.html
578 lines (569 loc) · 31 KB
/
cp.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
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OpenZWave Control Panel</title>
<style>
#statnodehead th {
transform: rotate(45deg);
text-align: center;
padding-top: 20px;
padding-bottom: 40px;
}
/*
body {text-align: center; min-width: 830px; padding: 0}
div.esb {width: 25%; float: left; padding: 0; margin-left: auto; margin-right: auto; text-align: left}
div.rsb {float: left; padding: 0; margin-left: auto; margin-right: auto; text-align: left}
span.admmsg {border: 1px solid; display: none; width: 100%; text-indent: 5px}
div.stack {text-align: center; margin-left: auto; margin-right: auto;}
div.log {width: 100%; height: 206px; overflow: auto; padding: 4px; font-style: normal; font-size: 10px; font-family: Courier; }
table {text-align: left; width: 100%}
td {vertical-align: top}
th {vertical-align: top; text-decoration: underline}
legend {font-family: Arial}
tr {background-color: #FFFFFF}
.highlight {background-color: #8888FF}
.normal {background-color: #FFFFFF}
.click {background-color: #FF8888}
.hide {display:none}
#tt {position:absolute; display:block}
#tttop {display:block; height:5px; margin-left:5px; overflow:hidden}
#ttcont {display:block; padding:2px 12px 3px 7px; margin-left:5px; background:#666; color:#FFF}
#ttbot {display:block; height:5px; margin-left:5px; overflow:hidden}
*/
</style>
<link rel="icon" href="favicon.png" type="image/x-icon">
<link rel="shortcut icon" href="favicon.png" type="image/x-icon">
<script type="text/javascript" src="cp.js"></script>
<!-- Bootstrap setup -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body onload="GetDefaultDevice();" onmousemove="PosToolTip(event);">
<h1 id="title">OpenZWave Control Panel</h1>
<div class="container-fluid">
<div class="col-xs-6 col-sm-4">
<h2>Controller <small>Interface</small></h2>
<form class="form-horizontal" name="DevPost" method="post">
<input name="devhidden" class="hide" value="hidden">
<div class="form-group form-group-sm">
<label class="col-sm-4 control-label" for="devname">Device name</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="devname" id="devname">
</div>
</div>
<div class="form-group form-group-sm">
<label class="col-sm-4 control-label" for="usbb">USB</label>
<div class="col-sm-8">
<input class="form-control" name="usbb" id="usbb" type="checkbox" onchange="return DoDevUSB();">
</div>
</div>
<br>
<div style="float: left;">
<button class="btn btn-default" name="reset" type="button" style="text-align: center;"
onclick="var r=confirm('Do you really want to completely reset the interface?'); if (r) return DoDevPost('reset'); else return false;">Reset</button>
</div>
<div style="float: left; padding-left: 7px;">
<button class="btn btn-default" name="sreset" type="button" style="text-align: center;"
onclick="return DoDevPost('sreset');">Soft Reset</button>
</div>
<div style="float: right;">
<button class="btn btn-default" name="initialize" type="submit" style="text-align: center;"
onclick="return DoDevPost('open');">Initialize</button>
</div>
<div style="float: right; padding-right: 7px;">
<button class="btn btn-default" name="close" type="button" style="text-align: left;"
onclick=" return DoDevPost('close');">Close</button>
</div>
</form>
</div>
<div class="col-xs-6 col-sm-4">
<h2>Controller Status</h2>
<form class="form-horizontal">
<div class="form-group form-group-sm">
<label class="col-sm-4 control-label" for="homeid">Home Id</label>
<div class="col-sm-8">
<input class="form-control" readonly="true" size="12" name="homeid" id="homeid" value=""
type="text">
</div>
</div>
<div class="form-group form-group-sm">
<label class="col-sm-4 control-label" for="cmode">Controller Mode</label>
<div class="col-sm-8">
<input class="form-control" readonly="true" size="12" id="cmode" name="cmode" value=""
type="text">
</div>
</div>
<div class="form-group form-group-sm">
<label class="col-sm-4 control-label" for="nodecount">Node Count</label>
<div class="col-sm-8">
<input class="form-control" readonly="true" size="6" name="nodecount" id="nodecount" value=""
type="text">
</div>
</div>
<div class="form-group form-group-sm">
<label class="col-sm-4 control-label" for="sucnodeid">SUC Node</label>
<div class="col-sm-8">
<input class="form-control" readonly="true" size="6" name="sucnodeid" id="sucnodeid" value=""
type="text">
</div>
</div>
</form>
</div>
<div class="col-xs-6 col-sm-4">
<h2>Backup Controller</h2>
<form name="BackPost" method="post">
<input name="devhidden" class="hide" value="hidden">
<div class="stack" style="position: relative; height: 50px;">
<button class="btn btn-default" id="save" name="save" onclick="return DoSavePost();"
type="submit">Save...</button>
</div>
<div class="stack">
<span id="saveinfo" name="saveinfo" class="legend" style="display: none;">Changes need
saving...</span>
</div>
</form>
</div>
<div class="clearfix visible-xs-block"></div>
</div>
<div id="network" class="container-fluid">
<fieldset>
<legend> Network </legend>
<form name="NetPost" method="post">
<!--
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#scencntl" aria-controls="scencntl" role="tab" data-toggle="tab">Scenes</a></li>
<li role="presentation"><a href="#topocntl" aria-controls="topocntl" role="tab" data-toggle="tab">Topology</a></li>
<li role="presentation"><a href="#topo" aria-controls="topo" role="tab" data-toggle="tab">Statistics</a></li>
<li role="presentation"><a href="#statcntl" aria-controls="statcntl" role="tab" data-toggle="tab">Test & Heal</a></li>
</ul>
-->
<input name="nethidden" class="hide" value="hidden">
<div class="esb" style="margin-left: 14px; width: 180px;">
<select class="form-control" id="netops" onchange="return DoNetHelp();">
<option value="choice" selected="true">Select an operation:</option>
<option value="scen">Scenes</option>
<option value="topo">Topology</option>
<option value="stat">Statistics</option>
<option value="test">Test & Heal</option>
</select>
</div>
<div class="rsb" style="margin-left: 10px;">
<span id="netinfo" name="netinfo" class="admmsg" style="display: none;"></span>
</div>
<!--
<div id="scencntl" name="scencntl" class="rsb" style="display: none;">
<div class="rsb">
<div class="col-md-4 col-xs-4">
<label><span class="legend" style="font-size: 12px;">Scenes</span></label>
<select class="form-control" id="sceneids" size="6" onchange="curscene = this.options[this.selectedIndex].value; return SceneLoad('values');">
</select>
<div class="input-group">
<input placeholder="label" id="scenelabeltext" type="text" size="8" class="legend form-control" onchange="SceneLoad('label');">
<span class="input-group-btn">
<button class="btn btn-success" id="scenecreate" name="scenecreate" onclick="return SceneLoad('create');" type="submit" title="Create">
<span class="glyphicon glyphicon-plus"></span>
</button>
<button class="btn btn-warning" id="sceneexecute" name="sceneexecute" onclick="return SceneLoad('execute');" type="submit" title="Execute">
<span class="glyphicon glyphicon-flash"></span>
</button>
<button class="btn btn-danger" id="scenedelete" name="scenedelete" onclick="var ret = SceneLoad('delete'); curscene = null; return ret;" type="Delete" title="Delete">
<span class="glyphicon glyphicon-remove"></span>
</button>
</span>
</div>
</div>
<div class="col-md-8 col-xs-8">
<div class="col-md-6 col-xs-6">
<label><span class="legend" style="font-size: 12px;">Values</span></label>
<select class="form-control" id="scenevalues" size="6" onchange="return DisplaySceneValue(this.options[this.selectedIndex]);">
</select>
<div class="input-group">
<input id="valuetext" type="text" size="8" class="form-control">
<select class="form-control" id="valueselect" style="display: none;"></select>
<span class="input-group-btn">
<button class="btn btn-success" id="savescenevalue" onclick="return SceneLoad('addvalue');" type="submit" title="Add">
<span class="glyphicon glyphicon-plus"></span>
</button>
</span>
</div>
<label><span class="legend" style="font-size: 12px;" id="valueunits"></span></label>
</div>
<div class="col-md-6 col-xs-6">
<label><span class="legend" style="font-size: 12px; vertical-align: top;">Scene Values</span></label>
<select class="form-control" id="scenescenevalues" size="6" onchange="return DisplaySceneSceneValue(this.options[this.selectedIndex]);">
</select>
<div class="input-group">
<input id="scenevaluetext" type="text" size="8" class="form-control">
<select class="form-control" id="scenevalueselect" style="display: none;"></select>
<span class="input-group-btn">
<button class="btn btn-default" onclick="return SceneLoad('update');" type="submit" title="Save">
<span class="glyphicon glyphicon-floppy-disk"></span>
</button>
<button class="btn btn-danger" id="removescenevalue" onclick="return SceneLoad('remove');" type="submit" title="Remove">
<span class="glyphicon glyphicon-remove"></span>
</button>
</span>
</div>
<label><span class="legend" style="font-size: 12px;" id="scenevalueunits"></span></label>
</div>
</div>
</div>
</div>
-->
<div id="topocntl" name="topocntl" class="col-md-1" style="display: none;">
<button id="refreshtopo" class="btn btn-default" name="refreshtopo"
onclick="return TopoLoad('load');" type="submit">Refresh</button>
</div>
<div id="topo" class="col-md-10" style="display: none;">
<table border="0" cellpadding="1" cellspacing="0" class="table table-condensed">
<thead id="topohead">
<tr>
<th> </th>
<th> </th>
</tr>
</thead>
<tbody id="topobody">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
</div>
<div id="statcntl" name="statcntl" style="display: none;">
<button id="refreshstat" class="btn btn-default" name="refreshstat"
onclick="return StatLoad('load');" type="submit">Refresh</button>
</div>
<div id="statnet" style="display: none;">
<table border="0" cellpadding="1" cellspacing="0" class="table table-condensed">
<thead id="statnethead">
<tr>
<th style="text-align: right;">Network Errors</th>
<th style="text-decoration: none;"> </th>
<th style="text-align: right;">Message Counts</th>
<th style="text-decoration: none;"> </th>
<th style="text-align: right;">Network Info</th>
<th style="text-decoration: none;"> </th>
</tr>
</thead>
<tbody id="statnetbody">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
</div>
<div id="allstats" style="margin-left: auto; margin-right: auto; width: 100%;">
<div id="statnode" style="float: left; margin-left: 5px; width: 100%; display: none;">
<table border="0" cellpadding="1" cellspacing="0" style="text-align: center;">
<thead id="statnodehead">
<tr>
<th>Node</th>
<th>Sent</th>
<th>Failed</th>
<th>Retries</th>
<th>Received</th>
<th>Unsolicited</th>
<th>Duplicates</th>
<th>Last Sent</th>
<th>Last Received</th>
<th>Last Request RTT</th>
<th>Average Request RTT</th>
<th>Last Response RTT</th>
<th>Average Response RTT</th>
<th>Quality</th>
</tr>
</thead>
<tbody id="statnodebody" style="cursor: help;">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
</div>
<div id="statclass" style="float: left; margin-left: 5px; width: 25%; display: none;">
<table border="0" cellpadding="1" cellspacing="0" style="text-align: center;">
<thead id="statclasshead">
<tr>
<th style="text-align: center;">Class</th>
<th style="text-align: center;">Sent</th>
<th style="text-align: center;">Received</th>
</tr>
</thead>
<tbody id="statclassbody">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="thcntl" name="thcntl" class="rsb" style="display: none; margin-right: 5px;">
<div class="col-md-6">
<div class="form-group">
<label for="testnode" class="col-sm-2 control-label">Node:</label>
<div class="col-sm-10">
<input class="form-control" id="testnode" type="text" size="5" class="legend">
</div>
</div>
<div class="form-group">
<label for="testmcnt" class="col-sm-2 control-label">Message count:</label>
<div class="col-sm-10">
<input class="form-control" id="testmcnt" type="text" size="5" class="legend">
</div>
</div>
<div class="col-sm-10 col-sm-offset-2">
<button id="testbutton" name="testbutton" onclick="return TestHealLoad('test');"
type="submit" class="btn btn-default">Run</button>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="healnode" class="col-sm-2 control-label">Node:</label>
<div class="col-sm-10">
<input class="form-control" id="healnode" type="text" size="5">
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<label for="healrrs">
<input id="healrrs" type="checkbox" value="healrr">
Heal Return Routes
</label>
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<button id="healbutton" name="healbutton" onclick="return TestHealLoad('heal');"
type="submit" class="btn btn-default">Run</button>
</div>
</div>
</div>
</div>
<div id="testhealreport" class="log"
style="float: left; margin-left: 5px; width: 98%; text-align: left; display: none;">
</div>
</form>
</fieldset>
</div>
<div id="admin" class="container-fluid">
<fieldset>
<legend> Controller </legend>
<form name="AdmPost" method="post">
<input name="admhidden" class="hide" value="hidden">
<div class="esb" style="margin-left: 14px; width: 200px;">
<select class="form-control" id="adminops" onchange="return DoAdmHelp();">
<option value="choice" selected="true">Select an operation:</option>
<option value="addd">Add Device</option>
<option value="addds">Add Device (Secure)</option>
<option value="cprim">Create Primary</option>
<option value="rconf">Receive Configuration</option>
<option value="remd">Remove Device</option>
<option value="remfn">Remove Failed Node</option>
<option value="hnf">Has Node Failed</option>
<option value="repfn">Replace Failed Node</option>
<option value="tranpr">Transfer Primary Role</option>
<option value="reqnu">Request Network Update</option>
<option value="reqnnu">Request Node Neighbor Update</option>
<option value="assrr">Assign Return Route</option>
<option value="delarr">Delete All Return Routes</option>
<option value="snif">Send Node Information</option>
<option value="reps">Replication Send</option>
<option value="addbtn">Add Button</option>
<option value="delbtn">Delete Button</option>
<option value="refreshnode">Refresh Node Info</option>
</select>
</div>
<div id="admcntl" name="admcntl" class="rsb" style="display: none;"></div>
<button id="admgo" name="go" class="btn btn-success" style="display: none;"
onclick="return DoAdmPost(0);" type="submit">Go</button>
<button id="admcan" name="cancel" class="btn btn-warning" style="display: none;"
onclick="return DoAdmPost(1);" type="submit">Cancel</button>
<div class="rsb" style="margin-left: 10px;">
<span id="adminfo" name="adminfo" class="admmsg"></span>
</div>
</form>
</fieldset>
</div>
<div id="funcs" class="container-fluid">
<fieldset>
<legend> Functions </legend>
<form name="NodePost" method="post">
<input name="nodehidden" class="hide" value="hidden">
<div class="esb" style="margin-left: 14px; width: 180px;">
<!--
<div class="btn-group-vertical" data-toggle="buttons">
<label class="btn btn-default">
<input type="radio" value="nam" autocomplete="off"> Name
</label>
<label class="btn btn-default">
<input type="radio" value="loc" autocomplete="off"> Location
</label>
<label class="btn btn-default">
<input type="radio" value="grp" autocomplete="off"> Group
</label>
<label class="btn btn-default">
<input type="radio" value="pol" autocomplete="off"> Polling
</label>
</div>
<script type="text/javascript">
$('.btn-group-vertical input').on('change', DoNodeHelp);
</script>
<br>
-->
<select class="form-control" id="nodeops" onchange="return DoNodeHelp();">
<option value="choice" selected="true">Select an operation:</option>
<option value="nam">Name</option>
<option value="loc">Location</option>
<option value="grp">Group</option>
<option value="pol">Polling</option>
</select>
</div>
<div id="nodecntl" name="nodecntl" class="rsb" style="display: none; margin-right: 10px;"></div>
<div class="rsb">
<span id="nodeinfo" name="nodeinfo" class="admmsg"></span>
</div>
</form>
</fieldset>
</div>
<div id="devices" class="container-fluid">
<fieldset>
<legend>Devices</legend>
<form>
<table class="table table-striped table-condensed table-hover">
<thead>
<tr>
<th>Node Id</th>
<th>Basic Type</th>
<th>Generic Type</th>
<th>Product</th>
<th>Name</th>
<th>Location</th>
<th>Value</th>
<th>Last Heard</th>
<th>Status</th>
</tr>
</thead>
<tbody id="tbody">
<tr>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
</tr>
<tr>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
</tr>
<tr>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
</tr>
<tr>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
<td> <br> </td>
</tr>
</tbody>
</table>
</form>
</fieldset>
</div>
<div id="controls">
<div class="col-xs-4 col-sm-3">
<ul class="nav nav-pills nav-stacked">
<li role="presentation" class="active" id="configcur"><a href="#divconfigcur"
aria-controls="divconfigcur" role="tab" data-toggle="tab">Current Values</a></li>
<li role="presentation" id="configcon"><a href="#divconfigcon" aria-controls="divconfigcon" role="tab"
data-toggle="tab">Configuration</a></li>
<li role="presentation" id="configinfo"><a href="#divconfiginfo" aria-controls="divconfiginfo"
role="tab" data-toggle="tab">Information</a></li>
</ul>
</div>
<div class="col-xs-8 col-sm-9">
<form name="ValuePost" method="post">
<div class="tab-content">
<div id="divconfigcur" class="tab-pane active">
</div>
<div id="divconfigcon" class="tab-pane">
</div>
<div id="divconfiginfo" class="tab-pane">
</div>
</div>
</form>
</div>
<div style="float: left; position: relative; width: 340px; margin-right: -340px;">
</div>
</div>
<div id="log" style="float: left; width: 100%; text-align: left;">
<br>
<br>
<fieldset>
<legend> Log output </legend>
<form>
<pre id="logdata" class="log">
</pre>
</form>
</fieldset>
</div>
</body>
</html>