From 91617a6dbb65b9a90f69e4ea046c3c25aa43e8ae Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Thu, 29 Aug 2019 13:22:04 +0530 Subject: [PATCH] Modify enrollment app install policy to support new app manager --- .../devicemgt/app/conf/config.json | 2 +- .../modules/business-controllers/policy.js | 20 +++++++++---------- .../public/js/policy-create.js | 2 +- .../public/js/policy-edit.js | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index a87877d6dc..60757b8461 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -166,6 +166,6 @@ "isOAuthEnabled": true, "backendRestEndpoints": { "deviceMgt": "/api/device-mgt/v1.0", - "appMgt": "/api/appm/store/v1.1" + "appMgt": "/api/application-mgt-store/v1.0" } } 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 1c84db0261..37dc9685b2 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 @@ -67,7 +67,6 @@ policyModule = function () { } else { policyObjectToView["deviceTypeIcon"] = policyObjectToView["platform"]; } - //policyObjectToView["icon"] = utility.getDeviceThumb(policyObjectToView["platform"]); var ownershipType = "None"; var deviceGroups = policyObjectFromRestEndpoint["deviceGroups"]; if (deviceGroups) { @@ -210,12 +209,15 @@ policyModule = function () { } try { var url = devicemgtProps["managerHTTPSURL"] + devicemgtProps["backendRestEndpoints"]["appMgt"] + - "/apps/mobileapp?field-filter=all"; - return serviceInvokers.XMLHttp.get(url, + "/applications"; + var data = { + limit: -1 + }; + return serviceInvokers.XMLHttp.post(url, data, function (backendResponse) { var response = {}; if (backendResponse.status === 200 && backendResponse.responseText) { - var appListFromRestEndpoint = parse(backendResponse.responseText)["appList"]; + var appListFromRestEndpoint = parse(backendResponse.responseText)["applications"]; var storeApps = []; var i, appObjectFromRestEndpoint, appObjectToView; for (i=0; i