From 690bd7de5ceddc62dcb5fa002a7f588880b48f63 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Fri, 9 Sep 2016 14:58:31 +0530 Subject: [PATCH 1/2] modal popup changes --- .../cdmf.page.certificates/certificates.hbs | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/certificates.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/certificates.hbs index 86f161ae359..6bb4257acc3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/certificates.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/certificates.hbs @@ -121,48 +121,49 @@
-
-
-
-

Done. Certificate was successfully removed.

- -
+ + +
-
-
-
-

An unexpected error occurred. Please try again later.

+ + +
+
-
-
-
-

+ + Unauthorized action! +

+ +
+ +
From 6a9225d2490be54b887ab08fbd0ca067e0784a6b Mon Sep 17 00:00:00 2001 From: dilanua Date: Fri, 9 Sep 2016 15:30:23 +0530 Subject: [PATCH 2/2] Updating device module for permissions - Ui --- .../devicemgt/app/modules/business-controllers/device.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js index 4b205346d9a..b970b04cf9d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/device.js @@ -40,7 +40,7 @@ deviceModule = function () { // var deviceCloudService = devicemgtProps["httpsURL"] + "/common/device_manager"; -/** + /** * Only GET method is implemented for now since there are no other type of methods used this method. * @param url - URL to call the backend without the host * @param method - HTTP Method (GET, POST) @@ -273,6 +273,9 @@ deviceModule = function () { deviceObject[constants["DEVICE_PROPERTIES"]] = properties; response["content"] = deviceObject; return response; + } else if (backendResponse.status == 401) { + response["status"] = "unauthorized"; + return response; } else { response["status"] = "error"; return response;