Updating operation APIs

revert-70aa11f8
dilanua 8 years ago
parent 6b4ab635af
commit 83498b1039

@ -32,8 +32,8 @@ if (uriMatcher.match("/{context}/api/operation/paginate")) {
var length = request.getParameter("length"); var length = request.getParameter("length");
var search = request.getParameter("search[value]"); var search = request.getParameter("search[value]");
var restAPIEndpoint = devicemgtProps["httpsURL"] + devicemgtProps["backendRestEndpoints"]["deviceMgt"] + "/devices/" + var restAPIEndpoint = devicemgtProps["httpsURL"] + devicemgtProps["backendRestEndpoints"]["deviceMgt"] +
deviceType + "/" + deviceId + "/operations?offset=" + index + "&limit=" + length; "/devices/" + deviceType + "/" + deviceId + "/operations?offset=" + index + "&limit=" + length;
serviceInvokers.XMLHttp.get( serviceInvokers.XMLHttp.get(
restAPIEndpoint, restAPIEndpoint,
@ -46,7 +46,7 @@ if (uriMatcher.match("/{context}/api/operation/paginate")) {
paginatedResult["recordsFiltered"] = responsePayload["count"]; paginatedResult["recordsFiltered"] = responsePayload["count"];
paginatedResult["data"] = responsePayload["operations"]; paginatedResult["data"] = responsePayload["operations"];
response["status"] = 200; response["status"] = restAPIResponse["status"];
response["content"] = paginatedResult; response["content"] = paginatedResult;
} else { } else {
response["status"] = restAPIResponse["status"]; response["status"] = restAPIResponse["status"];

Loading…
Cancel
Save