Browse code

minor revisions

Gandolf authored on 07/09/2021 23:35:12
Showing 1 changed files
... ...
@@ -231,6 +231,7 @@ function main() {
231 231
     initializeDateSelector();
232 232
     getNodeData();
233 233
     getNodeCharts();
234
+    setInterval(getNodeData, 10000);
234 235
 }
235 236
 
236 237
 function getNodeData() {
... ...
@@ -292,23 +293,19 @@ function displayData(dataItem) {
292 293
     statusElmt.innerHTML = "Online";
293 294
     statusElmt.style.color = "green";
294 295
 
295
-    chartUpdateInterval = dataItem.chartUpdateInterval;
296
-    dataRequestInterval = dataItem.dataRequestInterval;
296
+    chartUpdateInterval =  dataItem.chartUpdateInterval;
297 297
     periodElmt.innerHTML = chartUpdateInterval / 60;
298
-    setInterval(getNodeData, 1000 * dataRequestInterval);
299 298
     setInterval(getNodeCharts, 1000 * chartUpdateInterval);
300 299
 }
301 300
 
302 301
 function displayOfflineStatus() {
302
+    var localTimeZone;
303 303
     var d = new Date();
304
-    localTimeZone = d.getTimezoneOffset() / 60;
305
-    dateElmt.innerHTML = (d.getMonth() + 1) + "/" + d.getDate() + "/" +
306
-                          d.getFullYear();    
307
-    timeElmt.innerHTML = d.getHours() + ":" + d.getMinutes() +
308
-                         "  <small>(GMT+" + localTimeZone + ")</small>";
309
-    periodElmt.innerHTML = "?";    
304
+
310 305
     statusElmt.innerHTML = "offline";    
311 306
     statusElmt.style.color = "red";
307
+
308
+    periodElmt.innerHTML = "?";    
312 309
 }
313 310
 
314 311
 function initializeDateSelector() {
Browse code

minor revision

Gandolf authored on 07/06/2021 21:24:13
Showing 1 changed files
1 1
old mode 100644
2 2
new mode 100755
... ...
@@ -125,8 +125,9 @@ Charts update every: <span id="period"></span> minutes
125 125
  onclick="setChartPeriod(2)">4 weeks</span></li>
126 126
 <li class="selectorElement"><span class="selectorElement"
127 127
  onclick="setChartPeriod(3)">12 months</span></li>
128
-<li class="selectorElement"><span class="selectorElement"
129
- onclick="setChartPeriod(0)">Custom…</span></li>
128
+<li id="customSelector" class="selectorElement" style="visibility:hidden;">
129
+<span  class="selectorElement"
130
+ onclick="setChartPeriod(0)">Custom...</span></li>
130 131
 </ul>
131 132
 </span>
132 133
 
... ...
@@ -177,10 +178,10 @@ www.arednmesh.org</a>.</li>
177 178
 <br>
178 179
 
179 180
 <script>
180
-
181
+"use strict";
181 182
 /* Global constants */
182 183
 
183
-var nodeDataUrl = "dynamic/nodeOnline.js";
184
+var nodeDataUrl = "dynamic/arednsigData.js";
184 185
 
185 186
 /* Global DOM objects */
186 187 <