From de60fa325e399f99e72e9795a8ee2b4af7727d89 Mon Sep 17 00:00:00 2001 From: kamidu Date: Wed, 26 Oct 2016 17:41:35 +0530 Subject: [PATCH] Fix the ios- manage domain policy issue --- .../public/js/operation-mod.js | 77 +++++++++---------- .../app/units/mdm.unit.device.view/view.hbs | 16 ++-- 2 files changed, 45 insertions(+), 48 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 4c4f57fc58..8ca88a0a19 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 @@ -48,41 +48,41 @@ var operationModule = function () { "LOCK_OPERATION_CODE": "DEVICE_LOCK", "UPGRADE_FIRMWARE": "UPGRADE_FIRMWARE", "DISALLOW_ADJUST_VOLUME": "DISALLOW_ADJUST_VOLUME", - "DISALLOW_CONFIG_BLUETOOTH" : "DISALLOW_CONFIG_BLUETOOTH", - "DISALLOW_CONFIG_CELL_BROADCASTS" : "DISALLOW_CONFIG_CELL_BROADCASTS", - "DISALLOW_CONFIG_CREDENTIALS" : "DISALLOW_CONFIG_CREDENTIALS", - "DISALLOW_CONFIG_MOBILE_NETWORKS" : "DISALLOW_CONFIG_MOBILE_NETWORKS", - "DISALLOW_CONFIG_TETHERING" : "DISALLOW_CONFIG_TETHERING", - "DISALLOW_CONFIG_VPN" : "DISALLOW_CONFIG_VPN", - "DISALLOW_CONFIG_WIFI" : "DISALLOW_CONFIG_WIFI", - "DISALLOW_APPS_CONTROL" : "DISALLOW_APPS_CONTROL", - "DISALLOW_CREATE_WINDOWS" : "DISALLOW_CREATE_WINDOWS", - "DISALLOW_CROSS_PROFILE_COPY_PASTE" : "DISALLOW_CROSS_PROFILE_COPY_PASTE", - "DISALLOW_DEBUGGING_FEATURES" : "DISALLOW_DEBUGGING_FEATURES", - "DISALLOW_FACTORY_RESET" : "DISALLOW_FACTORY_RESET", - "DISALLOW_ADD_USER" : "DISALLOW_ADD_USER", - "DISALLOW_INSTALL_APPS" : "DISALLOW_INSTALL_APPS", - "DISALLOW_INSTALL_UNKNOWN_SOURCES" : "DISALLOW_INSTALL_UNKNOWN_SOURCES", - "DISALLOW_MODIFY_ACCOUNTS" : "DISALLOW_MODIFY_ACCOUNTS", - "DISALLOW_MOUNT_PHYSICAL_MEDIA" : "DISALLOW_MOUNT_PHYSICAL_MEDIA", - "DISALLOW_NETWORK_RESET" : "DISALLOW_NETWORK_RESET", - "DISALLOW_OUTGOING_BEAM" : "DISALLOW_OUTGOING_BEAM", - "DISALLOW_OUTGOING_CALLS" : "DISALLOW_OUTGOING_CALLS", - "DISALLOW_REMOVE_USER" : "DISALLOW_REMOVE_USER", - "DISALLOW_SAFE_BOOT" : "DISALLOW_SAFE_BOOT", - "DISALLOW_SHARE_LOCATION" : "DISALLOW_SHARE_LOCATION", - "DISALLOW_SMS" : "DISALLOW_SMS", - "DISALLOW_UNINSTALL_APPS" : "DISALLOW_UNINSTALL_APPS", - "DISALLOW_UNMUTE_MICROPHONE" : "DISALLOW_UNMUTE_MICROPHONE", - "DISALLOW_USB_FILE_TRANSFER" : "DISALLOW_USB_FILE_TRANSFER", - "ALLOW_PARENT_PROFILE_APP_LINKING" : "ALLOW_PARENT_PROFILE_APP_LINKING", - "ENSURE_VERIFY_APPS" : "ENSURE_VERIFY_APPS", - "AUTO_TIME" : "AUTO_TIME", - "SET_SCREEN_CAPTURE_DISABLED" : "SET_SCREEN_CAPTURE_DISABLED", - "SET_STATUS_BAR_DISABLED" : "SET_STATUS_BAR_DISABLED", - "APPLICATION_OPERATION_CODE" : "APP-RESTRICTION", - "SYSTEM_UPDATE_POLICY_CODE" : "SYSTEM_UPDATE_POLICY", - "KIOSK_APPS_CODE" : "KIOSK_APPS" + "DISALLOW_CONFIG_BLUETOOTH": "DISALLOW_CONFIG_BLUETOOTH", + "DISALLOW_CONFIG_CELL_BROADCASTS": "DISALLOW_CONFIG_CELL_BROADCASTS", + "DISALLOW_CONFIG_CREDENTIALS": "DISALLOW_CONFIG_CREDENTIALS", + "DISALLOW_CONFIG_MOBILE_NETWORKS": "DISALLOW_CONFIG_MOBILE_NETWORKS", + "DISALLOW_CONFIG_TETHERING": "DISALLOW_CONFIG_TETHERING", + "DISALLOW_CONFIG_VPN": "DISALLOW_CONFIG_VPN", + "DISALLOW_CONFIG_WIFI": "DISALLOW_CONFIG_WIFI", + "DISALLOW_APPS_CONTROL": "DISALLOW_APPS_CONTROL", + "DISALLOW_CREATE_WINDOWS": "DISALLOW_CREATE_WINDOWS", + "DISALLOW_CROSS_PROFILE_COPY_PASTE": "DISALLOW_CROSS_PROFILE_COPY_PASTE", + "DISALLOW_DEBUGGING_FEATURES": "DISALLOW_DEBUGGING_FEATURES", + "DISALLOW_FACTORY_RESET": "DISALLOW_FACTORY_RESET", + "DISALLOW_ADD_USER": "DISALLOW_ADD_USER", + "DISALLOW_INSTALL_APPS": "DISALLOW_INSTALL_APPS", + "DISALLOW_INSTALL_UNKNOWN_SOURCES": "DISALLOW_INSTALL_UNKNOWN_SOURCES", + "DISALLOW_MODIFY_ACCOUNTS": "DISALLOW_MODIFY_ACCOUNTS", + "DISALLOW_MOUNT_PHYSICAL_MEDIA": "DISALLOW_MOUNT_PHYSICAL_MEDIA", + "DISALLOW_NETWORK_RESET": "DISALLOW_NETWORK_RESET", + "DISALLOW_OUTGOING_BEAM": "DISALLOW_OUTGOING_BEAM", + "DISALLOW_OUTGOING_CALLS": "DISALLOW_OUTGOING_CALLS", + "DISALLOW_REMOVE_USER": "DISALLOW_REMOVE_USER", + "DISALLOW_SAFE_BOOT": "DISALLOW_SAFE_BOOT", + "DISALLOW_SHARE_LOCATION": "DISALLOW_SHARE_LOCATION", + "DISALLOW_SMS": "DISALLOW_SMS", + "DISALLOW_UNINSTALL_APPS": "DISALLOW_UNINSTALL_APPS", + "DISALLOW_UNMUTE_MICROPHONE": "DISALLOW_UNMUTE_MICROPHONE", + "DISALLOW_USB_FILE_TRANSFER": "DISALLOW_USB_FILE_TRANSFER", + "ALLOW_PARENT_PROFILE_APP_LINKING": "ALLOW_PARENT_PROFILE_APP_LINKING", + "ENSURE_VERIFY_APPS": "ENSURE_VERIFY_APPS", + "AUTO_TIME": "AUTO_TIME", + "SET_SCREEN_CAPTURE_DISABLED": "SET_SCREEN_CAPTURE_DISABLED", + "SET_STATUS_BAR_DISABLED": "SET_STATUS_BAR_DISABLED", + "APPLICATION_OPERATION_CODE": "APP-RESTRICTION", + "SYSTEM_UPDATE_POLICY_CODE": "SYSTEM_UPDATE_POLICY", + "KIOSK_APPS_CODE": "KIOSK_APPS" }; // Constants to define Windows Operation Constants @@ -151,10 +151,8 @@ var operationModule = function () { break; case iosOperationConstants["DOMAIN_OPERATION_CODE"]: payload = { - "operation": { - "emailDomains": operationData["emailDomains"], - "webDomains": operationData["webDomains"] - } + "emailDomains": operationPayload["emailDomains"], + "webDomains": operationPayload["webDomains"] }; break; case iosOperationConstants["RESTRICTIONS_OPERATION_CODE"]: @@ -1636,7 +1634,6 @@ var operationModule = function () { generatedProfile[operationCode] = payload["operation"]; } } - console.log(generatedProfile); return generatedProfile; }; 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.view/view.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.hbs index b5c1287dda..5379eb8dbb 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.view/view.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.hbs @@ -52,13 +52,13 @@ Status {{#equal deviceView.status "ACTIVE"}}  Active{{/equal}} + class="fw fw-ok icon-success">Active{{/equal}} {{#equal deviceView.status "INACTIVE"}}  Inactive{{/equal}} + class="fw fw-warning icon-warning">Inactive{{/equal}} {{#equal deviceView.status "BLOCKED"}}  Blocked{{/equal}} + class="fw fw-remove icon-danger">Blocked{{/equal}} {{#equal deviceView.status "REMOVED"}}  Removed{{/equal}} + class="fw fw-delete icon-danger">Removed{{/equal}} {{/if}} @@ -314,7 +314,7 @@