diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/api/device-api.jag b/modules/distribution/src/repository/jaggeryapps/iotserver/api/device-api.jag index 9337c8ed..e7de6454 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/api/device-api.jag +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/api/device-api.jag @@ -105,7 +105,7 @@ if (uriMatcher.match("/{context}/api/device/sketch/download/{downloadId}")) { sketchGenerateLinkEndPoint = deviceManagerService + "/device/" + sketchType + "/generate_link"; var fileId = get(sketchGenerateLinkEndPoint + "?owner=" + user.username, null, "text"); - result = "curl -k " + carbonHttpsServletTransport + constants.WEB_APP_CONTEXT + "/api/device/sketch/download/" + fileId.data + " > agent.zip"; + result = "curl -k " + carbonHttpsServletTransport + constants.WEB_APP_CONTEXT + "/api/device/sketch/download/" + fileId.data; } } @@ -193,7 +193,7 @@ if (uriMatcher.match("/{context}/api/device/sketch/download/{downloadId}")) { count++; } } - result.data = count; + result = count.toString(); } else if (uriMatcher.match("/{context}/api/devices/types")) { diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/api/policy-api.jag b/modules/distribution/src/repository/jaggeryapps/iotserver/api/policy-api.jag index d0bc221a..154ab016 100755 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/api/policy-api.jag +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/api/policy-api.jag @@ -59,8 +59,7 @@ if (uriMatcher.match("/{context}/api/policies/update")) { result = 500; } } else if (uriMatcher.match("/{context}/api/policies/count")) { - result = {} - result.data = policyModule.getPolicies().length; + result = policyModule.getPolicies().length.toString(); } // returning the result. diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/api/user-api.jag b/modules/distribution/src/repository/jaggeryapps/iotserver/api/user-api.jag index 7c7f2171..8457a67f 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/api/user-api.jag +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/api/user-api.jag @@ -141,8 +141,7 @@ if (uriMatcher.match("/{context}/api/user/login/")) { result = userModule.getUsers(); } else if (uriMatcher.match("/{context}/api/users/count")) { - result = {}; - result.data = userModule.getUsers().length; + result = userModule.getUsers().length; } // returning the result. diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/dashboard/dashboard.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/dashboard/dashboard.hbs index 32f87c21..4a363d5e 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/dashboard/dashboard.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/dashboard/dashboard.hbs @@ -59,6 +59,34 @@ {{/if}} +