From d18b9a408288ef7c79e81192b2a5a4d449f40e8d Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Tue, 20 Sep 2016 12:39:10 +0530 Subject: [PATCH 1/5] Adding COSU policy edit configurations - Android EMM UI --- .../public/js/operation-mod.js | 18 ++ .../templates/hidden-operations-android.hbs | 216 ++++++++++-------- 2 files changed, 139 insertions(+), 95 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js index 4026079093..a03b8c004c 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js @@ -840,6 +840,24 @@ var operationModule = function () { "restrictedApplications": operationPayload["restricted-applications"] }; break; + case androidOperationConstants["SYSTEM_UPDATE_POLICY_CODE"]: + if (operationPayload["type"] != "window") { + payload = { + "cosuSystemUpdatePolicyType": operationPayload["type"] + }; + } else { + payload = { + "cosuSystemUpdatePolicyType": operationPayload["type"], + "cosuSystemUpdatePolicyWindowStartTime": operationPayload["startTime"], + "cosuSystemUpdatePolicyWindowEndTime": operationPayload["endTime"] + }; + } + break; + case androidOperationConstants["KIOSK_APPS_CODE"]: + payload = { + "cosuWhitelistedApplications": operationPayload["whitelistedApplications"] + }; + break; } return payload; }; diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/templates/hidden-operations-android.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/templates/hidden-operations-android.hbs index e33d995ea6..55f8e48592 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/templates/hidden-operations-android.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/templates/hidden-operations-android.hbs @@ -97,6 +97,24 @@ + + + + +   System Update Policy (COSU) + + + + + + + + + Whitelist Apps (COSU) + + + +
@@ -1298,88 +1316,91 @@
- -
- -
+
+
-
From afea5fcfc6a50921964f86c2b5062a55ed39efea Mon Sep 17 00:00:00 2001 From: dilanua Date: Tue, 20 Sep 2016 14:21:40 +0530 Subject: [PATCH 4/5] Refactoring notifications side-pane - EMM UI --- .../app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs | 2 +- .../mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs index 6ff1a6ec46..db1507922b 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs @@ -99,7 +99,7 @@

- +
{{/zone}} {{#zone "bottomJs"}} diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js index aff39d484a..6184a24301 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js @@ -131,7 +131,12 @@ function loadNewNotifications() { // viewModel["appContext"] = context; $(messageSideBar).html(template(viewModel)); } else { - $(messageSideBar).html("

No new notifications found

"); + $(messageSideBar).html( + "

No New Notifications

" + + "
" + + "Check this section for error notifications
related to device operations" + + "
" + ); } } else { $(messageSideBar).html("

Unexpected error " + From 6144d9eea2af9727041524eaf7919f9c5bfeb507 Mon Sep 17 00:00:00 2001 From: kamidu Date: Tue, 20 Sep 2016 14:46:08 +0530 Subject: [PATCH 5/5] Fic for EMM-1581 --- .../devicemgt/app/units/mdm.unit.policy.create/create.hbs | 2 +- .../devicemgt/app/units/mdm.unit.policy.create/create.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/create.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/create.hbs index 5d5c13a911..183d45284e 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/create.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/create.hbs @@ -177,7 +177,7 @@

{{/if}} - {{#if isAuthorizedVieUsers}} + {{#if isAuthorizedViewUsers}}
diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/create.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/create.js index 8d7c124bda..7fadabcd61 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/create.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/create.js @@ -60,8 +60,8 @@ function onRequest() { viewModelData["roles"] = result["content"]; } viewModelData.isAuthorized = userModule.isAuthorized("/permission/admin/device-mgt/policies/manage"); - viewModelData.isAuthorizedViewUsers = userModule.isAuthorized("/permission/admin/device-mgt/roles/view"); - viewModelData.isAuthorizedViewRoles = userModule.isAuthorized("/permission/admin/device-mgt/users/view"); + viewModelData.isAuthorizedViewUsers = userModule.isAuthorized("/permission/admin/device-mgt/users/view"); + viewModelData.isAuthorizedViewRoles = userModule.isAuthorized("/permission/admin/device-mgt/roles/view"); return viewModelData; }