/datum/processSchedulerView /datum/processSchedulerView/Topic(href, href_list) if (!href_list["action"]) return switch (href_list["action"]) if ("kill") var/toKill = href_list["name"] processScheduler.killProcess(toKill) refreshProcessTable() if ("enable") var/toEnable = href_list["name"] processScheduler.enableProcess(toEnable) refreshProcessTable() if ("disable") var/toDisable = href_list["name"] processScheduler.disableProcess(toDisable) refreshProcessTable() if ("refresh") refreshProcessTable() /datum/processSchedulerView/proc/refreshProcessTable() windowCall("handleRefresh", getProcessTable()) /datum/processSchedulerView/proc/windowCall(var/function, var/data = null) usr << output(data, "processSchedulerContext.browser:[function]") /datum/processSchedulerView/proc/getProcessTable() var/text = "" // and the context of each for (var/list/data in processScheduler.getStatusData()) text += "" text += "" text += "" text += "" text += "" text += "" text += "" text += "" text += "" text += "" text += "
NameAvg(s)Last(s)Highest(s)TickcountTickrateStateAction
[data["name"]][num2text(data["averageRunTime"]/10,3)][num2text(data["lastRunTime"]/10,3)][num2text(data["highestRunTime"]/10,3)][num2text(data["ticks"],4)][data["schedule"]][data["status"]]" if (data["disabled"]) text += "" else text += "" text += "
" return text /** * getContext * Outputs an interface showing stats for all processes. */ /datum/processSchedulerView/proc/getContext() bootstrap_browse() usr << browse('processScheduler.js', "file=processScheduler.js;display=0") var/text = {" Process Scheduler Detail [bootstrap_includes()]

Process Scheduler

The process scheduler controls [processScheduler.getProcessCount()] loops.

"} text += "
" text += getProcessTable() text += "
" usr << browse(text, "window=processSchedulerContext;size=800x600") /datum/processSchedulerView/proc/bootstrap_browse() usr << browse('bower_components/jquery/dist/jquery.min.js', "file=jquery.min.js;display=0") usr << browse('bower_components/bootstrap2.3.2/bootstrap/js/bootstrap.min.js', "file=bootstrap.min.js;display=0") usr << browse('bower_components/bootstrap2.3.2/bootstrap/css/bootstrap.min.css', "file=bootstrap.min.css;display=0") usr << browse('bower_components/bootstrap2.3.2/bootstrap/img/glyphicons-halflings-white.png', "file=glyphicons-halflings-white.png;display=0") usr << browse('bower_components/bootstrap2.3.2/bootstrap/img/glyphicons-halflings.png', "file=glyphicons-halflings.png;display=0") usr << browse('bower_components/json2/json2.js', "file=json2.js;display=0") /datum/processSchedulerView/proc/bootstrap_includes() return {" "}