on-http-y1
Version:
OnRack Http Server
29 lines (28 loc) • 723 B
JSON
<%
var type = _.findKey(Constants.WorkItems.Pollers, function(value) {
return value === name;
});
%>
{
"id": "<%=id%>",
"type": "<%=type.toLowerCase()%>",
"pollInterval": <%=pollInterval%>,
<% if (node !== null) { %>
"node": "<%=basepath%>/nodes/<%=node%>",
<% } else { %>
"node": null,
<% } %>
"config": <%-JSON.stringify(config)%>,
<% if (lastStarted !== null) { %>
"lastStarted": "<%=lastStarted%>",
<% } else { %>
"lastStarted": null,
<% } %>
<% if (lastFinished !== null) { %>
"lastFinished": "<%=lastFinished%>",
<% } else { %>
"lastFinished": null,
<% } %>
"paused": <%=paused%>,
"failureCount": <%=failureCount%>
}