Difference between revisions of "Widget:WFSP-Dashboard"

From Open Energy Information

(move function)
(converted timestamps from UTC to local)
Line 327: Line 327:
 
             var turbineStatus = itemData[i].turbine_status.toString().replace(/,/g,'<br />');
 
             var turbineStatus = itemData[i].turbine_status.toString().replace(/,/g,'<br />');
 
             var systemStatus = itemData[i].system_status.toString().replace(/,/g,'<br />');
 
             var systemStatus = itemData[i].system_status.toString().replace(/,/g,'<br />');
             var lastReported = itemData[i].last_reported;
+
             var lastReported = String(new Date((itemData[i].last_reported).concat(" UTC"))).slice(0,21);
 
             wfspEnergy += turbineEnergy;
 
             wfspEnergy += turbineEnergy;
 
             if(!$.inArray("Running", systemStatus)){
 
             if(!$.inArray("Running", systemStatus)){
Line 486: Line 486:
 
             var turbineStatus = itemData[i].turbine_status.toString().replace(/,/g,'<br />');
 
             var turbineStatus = itemData[i].turbine_status.toString().replace(/,/g,'<br />');
 
             var systemStatus = itemData[i].system_status.toString().replace(/,/g,'<br />');
 
             var systemStatus = itemData[i].system_status.toString().replace(/,/g,'<br />');
             var lastReported = itemData[i].last_reported;
+
             var lastReported = String(new Date((itemData[i].last_reported).concat(" UTC"))).slice(0,21);
 +
 
 
             $('.watts').text(turbinePower.toFixed(2)*1000);
 
             $('.watts').text(turbinePower.toFixed(2)*1000);
 
             $('.volts').text(turbineVolts);
 
             $('.volts').text(turbineVolts);

Revision as of 12:44, 27 September 2017

This widget helps with Wind for Schools Portal Dashboard content.

{{#Widget:WFSP-Dashboard}}