// COPYRIGHT: function schedule_crew(){function e(e){var t=document.getElementById("crew"),n="";for(n+="

Active workers

",n+="
Idle count: '+e.idle+"
",t.innerHTML=n}var t=new XMLHttpRequest;t.onreadystatechange=function(){4==t.readyState&&200==t.status&&e(JSON.parse(t.responseText))},"undefined"==typeof local_app_schedule_crew?(t.open("GET","/app/schedule/crew"),t.send()):e(JSON.parse(local_app_schedule_crew))}function schedule_doing(){function e(e){var t=document.getElementById("doing"),n=Object.keys(e);if(0===n.length)t.innerHTML="

No running tasks

";else{var r="",t.innerHTML=r}}var t=new XMLHttpRequest;t.onreadystatechange=function(){4==t.readyState&&200==t.status&&e(JSON.parse(t.responseText))},"undefined"==typeof local_app_schedule_doing?(t.open("GET","/app/schedule/doing"),t.send()):e(JSON.parse(local_app_schedule_doing))}function schedule_failure(){function e(e){var t=document.getElementById("failure");0===e.length?t.innerHTML="

No failed tasks

":t.innerHTML=schedule_table(e)}var t=new XMLHttpRequest;t.onreadystatechange=function(){4==t.readyState&&200==t.status&&e(JSON.parse(t.responseText))},"undefined"==typeof local_app_schedule_failure?(t.open("GET","/app/schedule/failure"),t.send()):e(JSON.parse(local_app_schedule_failure))}function schedule_load(){schedule_crew(),schedule_doing(),schedule_failure(),schedule_success(),schedule_todo()}function schedule_success(){function e(e){var t=document.getElementById("success");0===e.length?t.innerHTML="

No successful tasks

":t.innerHTML=schedule_table(e)}var t=new XMLHttpRequest;t.onreadystatechange=function(){4==t.readyState&&200==t.status&&e(JSON.parse(t.responseText))},"undefined"==typeof local_app_schedule_success?(t.open("GET","/app/schedule/success"),t.send()):e(JSON.parse(local_app_schedule_success))}function schedule_table(e){var t=["runid","target","task"],n="
",r=[];for(n+="",i=0;it.time_index?n=-1:e.time_indext.task?n=1:e.taskt.target?n=1:e.target",k=0;k'+e[i][t[k]]+"";for(r=Object.keys(e[i].timing),r.sort(function(t,n){return e[i].timing[t]e[i].timing[n]?1:0}),n+='"}return n+="
Run IDTargetTask NameTiming Information
',tk=0;tk";var s=moment(e[i].timing.started),a=moment(e[i].timing.completed);n+="",n+="
"+r[tk]+""+e[i].timing[r[tk]]+"
duration"+moment.duration(a.diff(s)).humanize()+"
"}function schedule_todo(){function e(e){var t=document.getElementById("todo");if(0===e.length)t.innerHTML="

No running tasks

";else{var n="
    ";for(i=0;i"+e[i].name+" : [",j=0;j"}n+="
",t.innerHTML=n}}var t=new XMLHttpRequest;t.onreadystatechange=function(){4==t.readyState&&200==t.status&&e(JSON.parse(t.responseText))},"undefined"==typeof local_app_schedule_todo?(t.open("GET","/app/schedule/todo"),t.send()):e(JSON.parse(local_app_schedule_todo))}