|
17 | 17 | <script src="js/jquery-ui.min.js"></script>
|
18 | 18 |
|
19 | 19 | <!-- Highcharts is not needed here but domoticz.js depends on it -->
|
20 |
| - <script charset="utf-8" src="js/highcharts.js"></script> |
| 20 | + <script charset="utf-8" src="js/highcharts/highcharts.js"></script> |
21 | 21 | <script charset="utf-8" src="js/domoticz.js"></script>
|
22 |
| - |
| 22 | + |
23 | 23 | <script src="js/d3.min.js"></script>
|
24 |
| - <script charset="utf-8" src="js/jquery.dataTables.min.js"></script> |
25 |
| - |
| 24 | + <script charset="utf-8" src="js/data-tables/jquery.dataTables.min.js"></script> |
| 25 | + |
26 | 26 | <script>
|
27 |
| - |
| 27 | + |
28 | 28 | function getParameter(paramName) {
|
29 | 29 | var searchString = window.location.search.substring(1),i, val, params = searchString.split('&');
|
30 | 30 | for (i=0;i<params.length;i++) {
|
|
51 | 51 | function getGroupName(group){
|
52 | 52 | return group ? group.groupName : '';
|
53 | 53 | }
|
54 |
| - |
| 54 | + |
55 | 55 | function removeNodeFromGroup(event) {
|
56 | 56 | var node = event.data.node;
|
57 | 57 | var group = event.data.group;
|
|
67 | 67 | if (result==true) {
|
68 | 68 | $.ajax({
|
69 | 69 | url: "json.htm?type=command¶m=zwaveremovegroupnode&idx=" + hwid + "&node=" + node.nodeID + "&group=" + group.id + "&removenode=" + removeNodeId,
|
70 |
| - async: false, |
| 70 | + async: false, |
71 | 71 | dataType: 'json',
|
72 | 72 | success: function(data) {
|
73 | 73 | bootbox.alert($.t('Groups updated!'));
|
|
93 | 93 | var addnode = $("#add_node").val();
|
94 | 94 | $.ajax({
|
95 | 95 | url: "json.htm?type=command¶m=zwaveaddgroupnode&idx=" + hwid + "&node=" + node.nodeID + "&group=" + group.id + "&addnode=" + addnode,
|
96 |
| - async: false, |
| 96 | + async: false, |
97 | 97 | dataType: 'json',
|
98 |
| - success: redrawGroupTable() |
99 |
| - }); |
| 98 | + success: redrawGroupTable() |
| 99 | + }); |
100 | 100 | }
|
101 | 101 | },
|
102 | 102 | nothanks: {
|
|
108 | 108 | }
|
109 | 109 | });
|
110 | 110 | }
|
111 |
| - |
| 111 | + |
112 | 112 | function redrawGroupTable() {
|
113 | 113 | bootbox.alert($.t('Groups updated. It can take a while before changes are visible.'));
|
114 | 114 | $("#grouptable").empty();
|
115 | 115 | drawGroupTable();
|
116 | 116 | }
|
117 |
| - |
118 |
| - function drawGroupTable() |
| 117 | + |
| 118 | + function drawGroupTable() |
119 | 119 | {
|
120 | 120 | var hwid = getParameter("hwid");
|
121 | 121 | $.ajax({
|
122 | 122 | url: "json.htm?type=command¶m=zwavegroupinfo&idx=" + hwid,
|
123 |
| - async: false, |
| 123 | + async: false, |
124 | 124 | dataType: 'json',
|
125 | 125 | success: function(data) {
|
126 | 126 | if (typeof data != 'undefined') {
|
|
179 | 179 | button.click({node: node, group: group}, addNodeToGroup);
|
180 | 180 | button.appendTo(td);
|
181 | 181 | td.appendTo(noderow);
|
182 |
| - groupsDone++; |
| 182 | + groupsDone++; |
183 | 183 | });
|
184 | 184 | }
|
185 | 185 | if (groupsDone<maxgroups) {
|
|
234 | 234 |
|
235 | 235 | $.ajax({
|
236 | 236 | url: "json.htm?type=command¶m=zwavenetworkinfo&idx=" + hwid,
|
237 |
| - async: false, |
| 237 | + async: false, |
238 | 238 | dataType: 'json',
|
239 | 239 | success: function(data) {
|
240 | 240 | if (typeof data != 'undefined') {
|
241 | 241 | if (data.status=="OK") {
|
242 | 242 | if (typeof data.result != 'undefined') {
|
243 |
| - |
| 243 | + |
244 | 244 | jsonnodes = data.result.mesh;
|
245 | 245 | var pos = 0;
|
246 | 246 | $.each(jsonnodes, function(i, item) {
|
247 | 247 | nodeslist.push(item.nodeID);
|
248 |
| - posdict[item.nodeID] = pos; |
| 248 | + posdict[item.nodeID] = pos; |
249 | 249 | pos++;
|
250 | 250 | });
|
251 | 251 | var rowlength = pos;
|
|
260 | 260 | });
|
261 | 261 | filleddict[posdict[item.nodeID]]=1;
|
262 | 262 | for (var i=0;i<rowlength;i++)
|
263 |
| - { |
| 263 | + { |
264 | 264 | if (filleddict[i]==1) {
|
265 | 265 | row.push(1);
|
266 | 266 | }
|
267 | 267 | else {
|
268 | 268 | row.push(0);
|
269 | 269 | }
|
270 |
| - } |
| 270 | + } |
271 | 271 | matrix.push(row);
|
272 | 272 | });
|
273 | 273 | }
|
|
315 | 315 | })
|
316 | 316 | .style("text-anchor", function(d) { return d.angle > Math.PI ? "end" : null; })
|
317 | 317 | .text(function(d) { return nodeslist[d.index]; });
|
318 |
| - |
| 318 | + |
319 | 319 | function groupTicks(d) {
|
320 | 320 | var k = (d.endAngle - d.startAngle) / 1; //append some width for unconnected ones
|
321 | 321 | return d3.range(0, d.value, 1).map(function(v, i) {
|
|
374 | 374 | g.on("mouseover", fade(0.1))
|
375 | 375 | .on("mouseout", fade(1));
|
376 | 376 | }
|
377 |
| - |
| 377 | + |
378 | 378 | function drawInfo() {
|
379 | 379 | $.ajax({
|
380 | 380 | url: "json.htm?type=command¶m=getlanguage",
|
381 |
| - async: false, |
| 381 | + async: false, |
382 | 382 | dataType: 'json',
|
383 | 383 | success: function(data) {
|
384 | 384 | if (typeof data.language != 'undefined') {
|
|
395 | 395 | drawGroupTable();
|
396 | 396 | }
|
397 | 397 | </script>
|
398 |
| - |
399 |
| - |
| 398 | + |
| 399 | + |
400 | 400 | <style>
|
401 | 401 | body {
|
402 | 402 | background: none;
|
|
425 | 425 | float: right;
|
426 | 426 | overflow: auto;
|
427 | 427 | }
|
428 |
| - |
| 428 | + |
429 | 429 | </style>
|
430 | 430 | </head>
|
431 | 431 | <body onload="drawInfo()">
|
432 | 432 | <div class="outer">
|
433 | 433 | <div class="left" ><div align="center" id="networkchart"></div></div>
|
434 | 434 | <div class="right"><table class="display" id="grouptable"></div>
|
435 | 435 | </div>
|
436 |
| - |
| 436 | + |
437 | 437 | </body>
|
438 | 438 | </html>
|
0 commit comments