function autoRefresh(){document.getElementById("refreshtogg").checked&&hubber.server.updateAll()}function restart(a){document.getElementById("restarterbtn"+a).disabled=!0,document.getElementById("restarterbtn"+a).value="Sending restart request...",hubber.server.restartTask(a)}function editJobData(a,b){$("#jobcalculating").html("Calculating: "+a),$("#jobfinished").html("Finished: "+b)}function editTaskData(a,b){if(null!=b.LastHeartbeat){var c=new Date(b.LastHeartbeat);$("#lastupdpar"+a).html("Last update: "+c.toUTCString())}else $("#lastupdpar"+a).html("No updates yet");if(document.getElementById("restarter"+a).style.display="none","0"==b.State)$("#statepar"+a).css({color:"gray","font-weight":"normal"}),$("#statepar"+a).html("State: Offline");else if("1"==b.State)$("#statepar"+a).css({color:"white","font-weight":"normal"}),$("#statepar"+a).html("State: Waiting");else if("2"==b.State)$("#statepar"+a).css({color:"white","font-weight":"normal","text-shadow":"2px 2px black"}),$("#statepar"+a).html("State: Transferring");else if("3"==b.State)$("#statepar"+a).css({color:"white","font-weight":"normal"}),$("#statepar"+a).html("State: Calculating");else if("4"==b.State)$("#statepar"+a).css({color:"white","font-weight":"normal"}),$("#statepar"+a).html("State: Paused"),document.getElementById("restarter"+a).style.display="",document.getElementById("restarterbtn"+a).disabled=!1,document.getElementById("restarterbtn"+a).value="Restart task";else if("5"==b.State){$("#statepar"+a).css({color:"#009900","font-weight":"900","text-shadow":"1px 1px black"}),$("#statepar"+a).html("State: Finished");var d=new Date(b.StateLog[b.StateLog.length-1].DateTime);$("#lastupdpar"+a).html("Finished: "+d.toUTCString())}else"6"==b.State?($("#statepar"+a).css({color:"#e60000","font-weight":"900","text-shadow":"1px 1px black"}),$("#statepar"+a).html("State: Aborted"),document.getElementById("restarter"+a).style.display="",document.getElementById("restarterbtn"+a).disabled=!1,document.getElementById("restarterbtn"+a).value="Restart task"):"7"==b.State&&($("#statepar"+a).css({color:"#e60000","font-weight":"900","text-shadow":"1px 1px black"}),$("#statepar"+a).html("State: Failed"),document.getElementById("restarter"+a).style.display="",document.getElementById("restarterbtn"+a).disabled=!1,document.getElementById("restarterbtn"+a).value="Restart task");$("#executionpar"+a).html(b.ExecutionTime+" executed"),null!=b.StateLog[b.StateLog.length-1].Exception?""!=b.StateLog[b.StateLog.length-1].Exception?($("#exceptionpar"+a).html("Exception: "+b.StateLog[b.StateLog.length-1].Exception),$("#exceptionpar"+a).css({color:"#e60000","font-weight":"700","text-shadow":"1px 1px black"})):"6"==b.State?($("#exceptionpar"+a).html("Task is aborted."),$("#exceptionpar"+a).css({color:"#e65c00","font-weight":"700","text-shadow":"1px 1px black"})):($("#exceptionpar"+a).html("No exceptions"),$("#exceptionpar"+a).css({color:"white","text-shadow":"2px 2px black"})):($("#exceptionpar"+a).html("No exceptions"),$("#exceptionpar"+a).css({color:"white","text-shadow":"2px 2px black"})),$("#statechangespar"+a).html("Statelogs: "+b.StateLog.length);var e=new Date(b.StateLog[0].DateTime),f=new Date(b.StateLog[b.StateLog.length-1].DateTime);$("#graphtitle"+a).html("From "+e.toUTCString()+"
to "+f.toUTCString())}function initSaveData(a,b,c){var d=dataConversion(b,c);d.unshift(a),dataCollection.push(d)}function saveData(a,b,c){for(var d=dataConversion(b,c),e=0;e