From 45494526347e2dd17578cce99abccca78b69ca39 Mon Sep 17 00:00:00 2001 From: dilanua Date: Thu, 11 Aug 2016 11:04:34 +0530 Subject: [PATCH] Updating getAllPolicies UI function with icon key --- .../devicemgt/app/modules/business-controllers/policy.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/policy.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/policy.js index f569accf61..2d22a6f9cb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/policy.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/policy.js @@ -45,6 +45,7 @@ policyModule = function () { policyObjectToView["priorityId"] = policyObjectFromRestEndpoint["priorityId"]; policyObjectToView["name"] = policyObjectFromRestEndpoint["policyName"]; policyObjectToView["platform"] = policyObjectFromRestEndpoint["profile"]["deviceType"]; + policyObjectToView["icon"] = utility.getDeviceThumb(policyObjectToView["platform"]); policyObjectToView["ownershipType"] = policyObjectFromRestEndpoint["ownershipType"]; var assignedRoleCount = policyObjectFromRestEndpoint["roles"].length; @@ -73,14 +74,14 @@ policyModule = function () { policyObjectToView["status"] = "Active/Updated"; isUpdated = true; } else if (policyObjectFromRestEndpoint["active"] == true && - policyObjectFromRestEndpoint["updated"] == false) { + policyObjectFromRestEndpoint["updated"] == false) { policyObjectToView["status"] = "Active"; } else if (policyObjectFromRestEndpoint["active"] == false && - policyObjectFromRestEndpoint["updated"] == true) { + policyObjectFromRestEndpoint["updated"] == true) { policyObjectToView["status"] = "Inactive/Updated"; isUpdated = true; } else if (policyObjectFromRestEndpoint["active"] == false && - policyObjectFromRestEndpoint["updated"] == false) { + policyObjectFromRestEndpoint["updated"] == false) { policyObjectToView["status"] = "Inactive"; } // push view-objects to list @@ -125,7 +126,7 @@ policyModule = function () { } try { var url = devicemgtProps["httpsURL"] + devicemgtProps["backendRestEndpoints"]["deviceMgt"] + - "/policies?offset=0&limit=100"; + "/policies?offset=0&limit=100"; return serviceInvokers.XMLHttp.get(url, privateMethods.handleGetAllPoliciesResponse); } catch (e) { throw e;