on-http-y1
Version:
OnRack Http Server
33 lines (32 loc) • 1.14 kB
JSON
{
"@odata.context" : "<%= basepath %>/$metadata#TaskService/Tasks/$entity",
"@odata.id": "<%= url %>",
"@odata.type": "#TasksCollection.TaskCollection",
"Oem" : {},
"Name": "Task Collection",
"Members@odata.count": <%= graphs.length %>,
"Members": [
<% graphs.forEach(function(graph, i, arr) { %>
{
"@odata.type": "#Task.1.0.0.Task",
"@odata.id": "<%= basepath %>/TaskService/Tasks/<%=graph.id%>",
"@odata.context": "<%= basepath %>/$metadata#TaskService/Tasks/$entity",
"Name": "<%= graph.name %>",
"TaskState": "<%= graph.state %>",
"Messages": [],
"TaskStatus": "<%= graph.status %>",
"StartTime": "<%= graph.startTime %>",
<% if(graph.endTime) { %>
"EndTime": "<%= graph.endTime %>",
<% } %>
"Id": "<%= graph.id %>",
"Oem" : {
"RackHD": {
"SystemId": "<%= graph.systemId %>"
}
}
}
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
<% }); %>
]
}