+{{/zone}}
+
+{{#zone "content"}}
+ {{unit "cdmf.unit.lib.data-table"}}
+ {{unit "cdmf.unit.device.operation-mod"}}
+ {{unit "cdmf.unit.device.view"}}
+{{/zone}}
\ No newline at end of file
diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.device.view/view.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.device.view/view.js
new file mode 100644
index 000000000..21ce99302
--- /dev/null
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.device.view/view.js
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+function onRequest(context){
+ var utility = require("/app/modules/utility.js").utility;
+ context.handlebars.registerHelper('equal', function (lvalue, rvalue, options) {
+ if (arguments.length < 3)
+ throw new Error("Handlebars Helper equal needs 2 parameters");
+ if( lvalue!=rvalue ) {
+ return options.inverse(this);
+ } else {
+ return options.fn(this);
+ }
+ });
+
+ var deviceType = context.uriParams.deviceType;
+ return {"deviceViewUnitName": utility.getTenantedDeviceUnitName(deviceType, "device-view")};
+}
diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.device.view/view.json b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.device.view/view.json
new file mode 100644
index 000000000..04395bd8f
--- /dev/null
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.device.view/view.json
@@ -0,0 +1,4 @@
+{
+ "version": "1.0.0",
+ "extends": "cdmf.page.device.view"
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/devices.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/devices.hbs
new file mode 100644
index 000000000..21917011c
--- /dev/null
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/devices.hbs
@@ -0,0 +1,166 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{unit "cdmf.unit.ui.title" pageTitle="Device Management"}}
+
+{{unit "cdmf.unit.data-tables-extended"}}
+{{unit "cdmf.unit.lib.qrcode"}}
+{{unit "mdm.unit.device.qr-modal"}}
+
+{{#zone "breadcrumbs"}}
+
+ {{/each}}
\ No newline at end of file
diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.policies/policies.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.policies/policies.hbs
new file mode 100644
index 000000000..54c837ab7
--- /dev/null
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.policies/policies.hbs
@@ -0,0 +1,643 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{unit "cdmf.unit.ui.title" pageTitle="Policy Management"}}
+{{unit "cdmf.unit.data-tables-extended"}}
+
+{{#zone "topCss"}}
+
+{{/zone}}
+
+{{#zone "breadcrumbs"}}
+
\ No newline at end of file
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-bar/public/templates/operations.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.operation-bar/public/templates/operations.hbs
index e2fcd8f2c..27d0d4062 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-bar/public/templates/operations.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.operation-bar/public/templates/operations.hbs
@@ -12,7 +12,6 @@
Please select a device or a list of devices to perform an operation.
{{#equal code "WIPE_DATA"}}
{{#equal type "android"}}
- Enter PIN code (Optional - This is required only if the device type
- is BYOD).
+ Enter PIN code (Optional - This is required only if the device type is BYOD).
-
-
+
{{/equal}}
@@ -122,25 +115,114 @@
{{#equal code "NOTIFICATION"}}
Type your message below.
+ Enter the date and time to schedule firmware upgrade.
+
+
+
+
+
+
+
+
+ Enter firmware upgrade server URL (ie. http://abc.com or http://abc.com/ota)
+ (Optional).
+
+
+
+
+
+ {{/equal}}
+ {{/equal}}
+
Do you want to perform this operation on selected device(s) ?
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 b35faac5a..3f1219765 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
@@ -1,17 +1,17 @@
/*
- * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
@@ -37,12 +37,50 @@ var operationModule = function () {
// Constants to define Android Operation Constants
var androidOperationConstants = {
"PASSCODE_POLICY_OPERATION_CODE": "PASSCODE_POLICY",
+ "VPN_OPERATION_CODE": "VPN",
"CAMERA_OPERATION_CODE": "CAMERA",
"ENCRYPT_STORAGE_OPERATION_CODE": "ENCRYPT_STORAGE",
"WIFI_OPERATION_CODE": "WIFI",
"WIPE_OPERATION_CODE": "WIPE_DATA",
"NOTIFICATION_OPERATION_CODE": "NOTIFICATION",
- "CHANGE_LOCK_CODE_OPERATION_CODE": "CHANGE_LOCK_CODE"
+ "WORK_PROFILE_CODE": "WORK_PROFILE",
+ "CHANGE_LOCK_CODE_OPERATION_CODE": "CHANGE_LOCK_CODE",
+ "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"
};
// Constants to define Windows Operation Constants
@@ -58,6 +96,7 @@ var operationModule = function () {
var iosOperationConstants = {
"PASSCODE_POLICY_OPERATION_CODE": "PASSCODE_POLICY",
"RESTRICTIONS_OPERATION_CODE": "RESTRICTION",
+ "VPN_OPERATION_CODE": "VPN",
"WIFI_OPERATION_CODE": "WIFI",
"EMAIL_OPERATION_CODE": "EMAIL",
"AIRPLAY_OPERATION_CODE": "AIR_PLAY",
@@ -66,13 +105,19 @@ var operationModule = function () {
"NOTIFICATION_OPERATION_CODE": "NOTIFICATION",
"CALENDAR_SUBSCRIPTION_OPERATION_CODE": "CALENDAR_SUBSCRIPTION",
"APN_OPERATION_CODE": "APN",
- "CELLULAR_OPERATION_CODE": "CELLULAR"
+ "DOMAIN_CODE": "DOMAIN",
+ "CELLULAR_OPERATION_CODE": "CELLULAR",
+ "PER_APP_VPN_OPERATION_CODE": "PER_APP_VPN",
+ "APP_TO_PER_APP_VPN_MAPPING_OPERATION_CODE": "APP_TO_PER_APP_VPN_MAPPING"
};
publicMethods.getIOSServiceEndpoint = function (operationCode) {
var featureMap = {
"DEVICE_LOCK": "lock",
- "ALARM": "alarm",
+ "VPN": "vpn",
+ "PER_APP_VPN": "perappvpn",
+ "APP_TO_PER_APP_VPN_MAPPING": "apptoperappvpnmapping",
+ "RING": "ring",
"LOCATION": "location",
"NOTIFICATION": "notification",
"AIR_PLAY": "airplay",
@@ -182,6 +227,76 @@ var operationModule = function () {
"restrictionsAutonomousSingleAppModePermittedAppIDs": operationPayload["autonomousSingleAppModePermittedAppIDs"]
};
break;
+ case iosOperationConstants["VPN_OPERATION_CODE"]:
+ var pptp = false;
+ var l2tp = false;
+ if (operationPayload["vpnType"] == "PPTP") {
+ pptp = true;
+ } else if (operationPayload["vpnType"] == "L2TP") {
+ l2tp = true;
+ }
+
+ payload = {
+ "userDefinedName": operationPayload["userDefinedName"],
+ "overridePrimary": operationPayload["overridePrimary"],
+ "onDemandEnabled": operationPayload["onDemandEnabled"],
+ "onDemandMatchDomainsAlways": operationPayload["onDemandMatchDomainsAlways"],
+ "onDemandMatchDomainsNever": operationPayload["onDemandMatchDomainsNever"],
+ "onDemandMatchDomainsOnRetry": operationPayload["onDemandMatchDomainsOnRetry"],
+ "onDemandRules": operationPayload["onDemandRules"],
+ "vendorConfigs": operationPayload["vendorConfigs"],
+ "vpnType": operationPayload["vpnType"],
+ "pptpAuthName": pptp ? operationPayload.ppp["authName"] : "",
+ "pptpTokenCard": pptp ? operationPayload.ppp["tokenCard"] : "",
+ "pptpAuthPassword": pptp ? operationPayload.ppp["authPassword"] : "",
+ "pptpCommRemoteAddress": pptp ? operationPayload.ppp["commRemoteAddress"] : "",
+ "pptpRSASecureID": pptp ? operationPayload.ppp["RSASecureID"] : "",
+ "pptpCCPEnabled": pptp ? operationPayload.ppp["CCPEnabled"] : "",
+ "pptpCCPMPPE40Enabled": pptp ? operationPayload.ppp["CCPMPPE40Enabled"] : "",
+ "pptpCCPMPPE128Enabled": pptp ? operationPayload.ppp["CCPMPPE128Enabled"] : "",
+ "l2tpAuthName": l2tp ? operationPayload.ppp["authName"] : "",
+ "l2tpTokenCard": l2tp ? operationPayload.ppp["tokenCard"] : "",
+ "l2tpAuthPassword": l2tp ? operationPayload.ppp["authPassword"] : "",
+ "l2tpCommRemoteAddress": l2tp ? operationPayload.ppp["commRemoteAddress"] : "",
+ "l2tpRSASecureID": l2tp ? operationPayload.ppp["RSASecureID"] : "",
+ "ipsecRemoteAddress": operationPayload.ipSec["remoteAddress"],
+ "ipsecAuthenticationMethod": operationPayload.ipSec["authenticationMethod"],
+ "ipsecLocalIdentifier": operationPayload.ipSec["localIdentifier"],
+ "ipsecSharedSecret": operationPayload.ipSec["sharedSecret"],
+ "ipsecPayloadCertificateUUID": operationPayload.ipSec["payloadCertificateUUID"],
+ "ipsecXAuthEnabled": operationPayload.ipSec["XAuthEnabled"],
+ "ipsecXAuthName": operationPayload.ipSec["XAuthName"],
+ "ipsecPromptForVPNPIN": operationPayload.ipSec["promptForVPNPIN"],
+ "ikev2RemoteAddress": operationPayload.ikEv2["remoteAddress"],
+ "ikev2LocalIdentifier": operationPayload.ikEv2["localIdentifier"],
+ "ikev2RemoteIdentifier": operationPayload.ikEv2["remoteIdentifier"],
+ "ikev2AuthenticationMethod": operationPayload.ikEv2["authenticationMethod"],
+ "ikev2SharedSecret": operationPayload.ikEv2["sharedSecret"],
+ "ikev2PayloadCertificateUUID": operationPayload.ikEv2["payloadCertificateUUID"],
+ "ikev2ExtendedAuthEnabled": operationPayload.ikEv2["extendedAuthEnabled"],
+ "ikev2AuthName": operationPayload.ikEv2["authName"],
+ "ikev2AuthPassword": operationPayload.ikEv2["authPassword"],
+ "ikev2DeadPeerDetectionInterval": operationPayload.ikEv2["deadPeerDetectionInterval"],
+ "ikev2ServerCertificateIssuerCommonName": operationPayload.ikEv2["serverCertificateIssuerCommonName"],
+ "ikev2ServerCertificateCommonName": operationPayload.ikEv2["serverCertificateCommonName"]
+ };
+ break;
+ case iosOperationConstants["PER_APP_VPN_OPERATION_CODE"]:
+ payload = {
+ "operation": {
+ "VPNUUID": operationPayload["PER-APP-VPNUUID"],
+ "safariDomains": operationPayload["safariDomains"],
+ "onDemandMatchAppEnabled": operationPayload["onDemandMatchAppEnabled"]
+ }
+ };
+ break;
+ case iosOperationConstants["APP_TO_PER_APP_VPN_MAPPING_OPERATION_CODE"]:
+ payload = {
+ "operation": {
+ "appLayerVPNMappings": operationPayload["appLayerVPNMappings"]
+ }
+ };
+ break;
case iosOperationConstants["WIFI_OPERATION_CODE"]:
payload = {
"wifiHiddenNetwork": operationPayload["hiddenNetwork"],
@@ -222,31 +337,31 @@ var operationModule = function () {
break;
case iosOperationConstants["EMAIL_OPERATION_CODE"]:
payload = {
- "emailAccountDescription": operationPayload["emailAccountDescription"],
- "emailAccountName": operationPayload["emailAccountName"],
- "emailAccountType": operationPayload["emailAccountType"],
- "emailAddress": operationPayload["emailAddress"],
- "emailIncomingMailServerAuthentication": operationPayload["incomingMailServerAuthentication"],
- "emailIncomingMailServerHostname": operationPayload["incomingMailServerHostName"],
- "emailIncomingMailServerPort": operationPayload["incomingMailServerPortNumber"],
- "emailIncomingUseSSL": operationPayload["incomingMailServerUseSSL"],
- "emailIncomingMailServerUsername": operationPayload["incomingMailServerUsername"],
- "emailIncomingMailServerPassword": operationPayload["incomingPassword"],
- "emailOutgoingMailServerPassword": operationPayload["outgoingPassword"],
- "emailOutgoingPasswordSameAsIncomingPassword": operationPayload["outgoingPasswordSameAsIncomingPassword"],
- "emailOutgoingMailServerAuthentication": operationPayload["outgoingMailServerAuthentication"],
- "emailOutgoingMailServerHostname": operationPayload["outgoingMailServerHostName"],
- "emailOutgoingMailServerPort": operationPayload["outgoingMailServerPortNumber"],
- "emailOutgoingUseSSL": operationPayload["outgoingMailServerUseSSL"],
- "emailOutgoingMailServerUsername": operationPayload["outgoingMailServerUsername"],
- "emailPreventMove": operationPayload["preventMove"],
- "emailPreventAppSheet": operationPayload["preventAppSheet"],
- "emailDisableMailRecentSyncing": operationPayload["disableMailRecentSyncing"],
- "emailIncomingMailServerIMAPPathPrefix": operationPayload["incomingMailServerIMAPPathPrefix"],
- "emailSMIMEEnabled": operationPayload["smimeenabled"],
- "emailSMIMESigningCertificateUUID": operationPayload["smimesigningCertificateUUID"],
- "emailSMIMEEncryptionCertificateUUID": operationPayload["smimeencryptionCertificateUUID"],
- "emailSMIMEEnablePerMessageSwitch": operationPayload["smimeenablePerMessageSwitch"]
+ "emailAccountDescription": operationPayload["emailAccountDescription"],
+ "emailAccountName": operationPayload["emailAccountName"],
+ "emailAccountType": operationPayload["emailAccountType"],
+ "emailAddress": operationPayload["emailAddress"],
+ "emailIncomingMailServerAuthentication": operationPayload["incomingMailServerAuthentication"],
+ "emailIncomingMailServerHostname": operationPayload["incomingMailServerHostName"],
+ "emailIncomingMailServerPort": operationPayload["incomingMailServerPortNumber"],
+ "emailIncomingUseSSL": operationPayload["incomingMailServerUseSSL"],
+ "emailIncomingMailServerUsername": operationPayload["incomingMailServerUsername"],
+ "emailIncomingMailServerPassword": operationPayload["incomingPassword"],
+ "emailOutgoingMailServerPassword": operationPayload["outgoingPassword"],
+ "emailOutgoingPasswordSameAsIncomingPassword": operationPayload["outgoingPasswordSameAsIncomingPassword"],
+ "emailOutgoingMailServerAuthentication": operationPayload["outgoingMailServerAuthentication"],
+ "emailOutgoingMailServerHostname": operationPayload["outgoingMailServerHostName"],
+ "emailOutgoingMailServerPort": operationPayload["outgoingMailServerPortNumber"],
+ "emailOutgoingUseSSL": operationPayload["outgoingMailServerUseSSL"],
+ "emailOutgoingMailServerUsername": operationPayload["outgoingMailServerUsername"],
+ "emailPreventMove": operationPayload["preventMove"],
+ "emailPreventAppSheet": operationPayload["preventAppSheet"],
+ "emailDisableMailRecentSyncing": operationPayload["disableMailRecentSyncing"],
+ "emailIncomingMailServerIMAPPathPrefix": operationPayload["incomingMailServerIMAPPathPrefix"],
+ "emailSMIMEEnabled": operationPayload["smimeenabled"],
+ "emailSMIMESigningCertificateUUID": operationPayload["smimesigningCertificateUUID"],
+ "emailSMIMEEncryptionCertificateUUID": operationPayload["smimeencryptionCertificateUUID"],
+ "emailSMIMEEnablePerMessageSwitch": operationPayload["smimeenablePerMessageSwitch"]
};
break;
case iosOperationConstants["AIRPLAY_OPERATION_CODE"]:
@@ -367,6 +482,112 @@ var operationModule = function () {
}
};
break;
+ case iosOperationConstants["VPN_OPERATION_CODE"]:
+ operationType = operationTypeConstants["PROFILE"];
+ var ppp = {};
+ var ipSec = {};
+ var ikev2 = {};
+ if (operationData["vpnType"] == "PPTP") {
+ ppp = {
+ "authName": operationData["pptpAuthName"],
+ "tokenCard": operationData["pptpTokenCard"],
+ "authPassword": operationData["pptpAuthPassword"],
+ "commRemoteAddress": operationData["pptpCommRemoteAddress"],
+ "RSASecureID": operationData["pptpRSASecureID"],
+ "CCPEnabled": operationData["pptpCCPEnabled"],
+ "CCPMPPE40Enabled": operationData["pptpCCPMPPE40Enabled"],
+ "CCPMPPE128Enabled": operationData["pptpCCPMPPE128Enabled"]
+ };
+ } else if (operationData["vpnType"] == "L2TP") {
+ ppp = {
+ "authName": operationData["l2tpAuthName"],
+ "tokenCard": operationData["l2tpTokenCard"],
+ "authPassword": operationData["l2tpAuthPassword"],
+ "commRemoteAddress": operationData["l2tpCommRemoteAddress"],
+ "RSASecureID": operationData["l2tpRSASecureID"]
+ };
+ } else if (operationData["vpnType"] == "IPSec") {
+ ipSec = {
+ "remoteAddress" : operationData["ipsecRemoteAddress"],
+ "authenticationMethod" : operationData["ipsecAuthenticationMethod"],
+ "localIdentifier" : operationData["ipsecLocalIdentifier"],
+ "sharedSecret" : operationData["ipsecSharedSecret"],
+ "payloadCertificateUUID" : operationData["ipsecPayloadCertificateUUID"],
+ "XAuthEnabled" : operationData["ipsecXAuthEnabled"],
+ "XAuthName" : operationData["ipsecXAuthName"],
+ "promptForVPNPIN" : operationData["ipsecPromptForVPNPIN"]
+ };
+ } else if (operationData["vpnType"] == "IKEv2") {
+ ikev2 = {
+ "remoteAddress" : operationData["ikev2RemoteAddress"],
+ "localIdentifier" : operationData["ikev2LocalIdentifier"],
+ "remoteIdentifier" : operationData["ikev2RemoteIdentifier"],
+ "authenticationMethod" : operationData["ikev2AuthenticationMethod"],
+ "sharedSecret" : operationData["ikev2SharedSecret"],
+ "payloadCertificateUUID" : operationData["ikev2PayloadCertificateUUID"],
+ "extendedAuthEnabled" : operationData["ikev2ExtendedAuthEnabled"],
+ "authName" : operationData["ikev2AuthName"],
+ "authPassword" : operationData["ikev2AuthPassword"],
+ "deadPeerDetectionInterval" : operationData["ikev2DeadPeerDetectionInterval"],
+ "serverCertificateIssuerCommonName" : operationData["ikev2ServerCertificateIssuerCommonName"],
+ "serverCertificateCommonName" : operationData["ikev2ServerCertificateCommonName"]
+ };
+ }
+
+ var domainsAlways = new Array();
+ for (var i = 0; i < operationData["onDemandMatchDomainsAlways"].length; i++) {
+ domainsAlways.push(operationData["onDemandMatchDomainsAlways"][i].domain);
+ }
+
+ var domainsNever = new Array();
+ for (var i = 0; i < operationData["onDemandMatchDomainsNever"].length; i++) {
+ domainsNever.push(operationData["onDemandMatchDomainsNever"][i].domain);
+ }
+
+ var domainsRetry = new Array();
+ for (var i = 0; i < operationData["onDemandMatchDomainsOnRetry"].length; i++) {
+ domainsRetry.push(operationData["onDemandMatchDomainsOnRetry"][i].domain);
+ }
+
+ payload = {
+ "operation": {
+ "userDefinedName": operationData["userDefinedName"],
+ "overridePrimary": operationData["overridePrimary"],
+ "onDemandEnabled": operationData["onDemandEnabled"],
+ "onDemandMatchDomainsAlways": domainsAlways,
+ "onDemandMatchDomainsNever": domainsNever,
+ "onDemandMatchDomainsOnRetry": domainsRetry,
+ "onDemandRules" : operationData["onDemandRules"],
+ "vendorConfigs" : operationData["vendorConfigs"],
+ "vpnType" : operationData["vpnType"],
+ "ppp": ppp,
+ "ipSec": ipSec,
+ "ikEv2": ikev2
+ }
+ };
+ break;
+ case iosOperationConstants["PER_APP_VPN_OPERATION_CODE"]:
+ operationType = operationTypeConstants["PROFILE"];
+ var domains = new Array();
+ for (var i = 0; i < operationData["safariDomains"].length; i++) {
+ domains.push(operationData["safariDomains"][i].domain);
+ }
+ payload = {
+ "operation": {
+ "VPNUUID": operationData["VPNUUID"],
+ "safariDomains": domains,
+ "onDemandMatchAppEnabled": operationData["onDemandMatchAppEnabled"]
+ }
+ };
+ break;
+ case iosOperationConstants["APP_TO_PER_APP_VPN_MAPPING_OPERATION_CODE"]:
+ operationType = operationTypeConstants["PROFILE"];
+ payload = {
+ "operation": {
+ "appLayerVPNMappings": operationData["appLayerVPNMappings"]
+ }
+ };
+ break;
case iosOperationConstants["RESTRICTIONS_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
@@ -528,6 +749,15 @@ var operationModule = function () {
}
};
break;
+ case iosOperationConstants["DOMAIN_CODE"]:
+ operationType = operationTypeConstants["PROFILE"];
+ payload = {
+ "operation": {
+ "emailDomains": operationData["emailDomains"],
+ "webDomains": operationData["webDomains"]
+ }
+ };
+ break;
case iosOperationConstants["CELLULAR_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
@@ -544,7 +774,7 @@ var operationModule = function () {
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
- "message": operationData["message"]
+ "message" : operationData["message"]
}
};
break;
@@ -584,9 +814,7 @@ var operationModule = function () {
};
break;
case androidOperationConstants["CAMERA_OPERATION_CODE"]:
- payload = {
- "cameraEnabled": operationPayload["enabled"]
- };
+ payload = operationPayload;
break;
case androidOperationConstants["ENCRYPT_STORAGE_OPERATION_CODE"]:
payload = {
@@ -596,7 +824,29 @@ var operationModule = function () {
case androidOperationConstants["WIFI_OPERATION_CODE"]:
payload = {
"wifiSSID": operationPayload["ssid"],
- "wifiPassword": operationPayload["password"]
+ "wifiPassword": operationPayload["password"],
+ "wifiType": operationPayload["type"],
+ "wifiEAP": operationPayload["eap"],
+ "wifiPhase2": operationPayload["phase2"],
+ "wifiProvisioning": operationPayload["provisioning"],
+ "wifiIdentity": operationPayload["identity"],
+ "wifiAnoIdentity": operationPayload["anonymousIdentity"],
+ "wifiCaCert" : operationPayload["cacert"],
+ "wifiCaCertName" : operationPayload["cacertName"]
+ };
+ break;
+ case androidOperationConstants["VPN_OPERATION_CODE"]:
+ payload = {
+ "serverAddress": operationPayload["serverAddress"],
+ "serverPort": operationPayload["serverPort"],
+ "sharedSecret": operationPayload["sharedSecret"],
+ "dnsServer": operationPayload["dnsServer"]
+ };
+ break;
+ case androidOperationConstants["APPLICATION_OPERATION_CODE"]:
+ payload = {
+ "restrictionType": operationPayload["restriction-type"],
+ "restrictedApplications": operationPayload["restricted-applications"]
};
break;
}
@@ -611,7 +861,40 @@ var operationModule = function () {
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
- "enabled": operationData["cameraEnabled"]
+ "CAMERA" : operationData["cameraEnabled"],
+ "DISALLOW_ADJUST_VOLUME" : operationData["disallowAdjustVolumeEnabled"],
+ "DISALLOW_CONFIG_BLUETOOTH" : operationData["disallowConfigBluetooth"],
+ "DISALLOW_CONFIG_CELL_BROADCASTS" : operationData["disallowConfigCellBroadcasts"],
+ "DISALLOW_CONFIG_CREDENTIALS" : operationData["disallowConfigCredentials"],
+ "DISALLOW_CONFIG_MOBILE_NETWORKS" : operationData["disallowConfigMobileNetworks"],
+ "DISALLOW_CONFIG_TETHERING" : operationData["disallowConfigTethering"],
+ "DISALLOW_CONFIG_VPN" : operationData["disallowConfigVpn"],
+ "DISALLOW_CONFIG_WIFI" : operationData["disallowConfigWifi"],
+ "DISALLOW_APPS_CONTROL" : operationData["disallowAppControl"],
+ "DISALLOW_CREATE_WINDOWS" : operationData["disallowCreateWindows"],
+ "DISALLOW_CROSS_PROFILE_COPY_PASTE" : operationData["disallowCrossProfileCopyPaste"],
+ "DISALLOW_DEBUGGING_FEATURES" : operationData["disallowDebugging"],
+ "DISALLOW_FACTORY_RESET" : operationData["disallowFactoryReset"],
+ "DISALLOW_ADD_USER" : operationData["disallowAddUser"],
+ "DISALLOW_INSTALL_APPS" : operationData["disallowInstallApps"],
+ "DISALLOW_INSTALL_UNKNOWN_SOURCES" : operationData["disallowInstallUnknownSources"],
+ "DISALLOW_MODIFY_ACCOUNTS" : operationData["disallowModifyAccounts"],
+ "DISALLOW_MOUNT_PHYSICAL_MEDIA" : operationData["disallowMountPhysicalMedia"],
+ "DISALLOW_NETWORK_RESET" : operationData["disallowNetworkReset"],
+ "DISALLOW_OUTGOING_BEAM" : operationData["disallowOutgoingBeam"],
+ "DISALLOW_OUTGOING_CALLS" : operationData["disallowOutgoingCalls"],
+ "DISALLOW_REMOVE_USER" : operationData["disallowRemoveUser"],
+ "DISALLOW_SAFE_BOOT" : operationData["disallowSafeBoot"],
+ "DISALLOW_SHARE_LOCATION" : operationData["disallowLocationSharing"],
+ "DISALLOW_SMS" : operationData["disallowSMS"],
+ "DISALLOW_UNINSTALL_APPS" : operationData["disallowUninstallApps"],
+ "DISALLOW_UNMUTE_MICROPHONE" : operationData["disallowUnmuteMicrophone"],
+ "DISALLOW_USB_FILE_TRANSFER" : operationData["disallowUSBFileTransfer"],
+ "ALLOW_PARENT_PROFILE_APP_LINKING" : operationData["disallowParentProfileAppLinking"],
+ "ENSURE_VERIFY_APPS" : operationData["ensureVerifyApps"],
+ "AUTO_TIME" : operationData["enableAutoTime"],
+ "SET_SCREEN_CAPTURE_DISABLED" : operationData["diableScreenCapture"],
+ "SET_STATUS_BAR_DISABLED" : operationData["disableStatusBar"]
}
};
break;
@@ -619,7 +902,7 @@ var operationModule = function () {
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
- "lockCode": operationData["lockCode"]
+ "lockCode" : operationData["lockCode"]
}
};
break;
@@ -627,7 +910,7 @@ var operationModule = function () {
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
- "encrypted": operationData["encryptStorageEnabled"]
+ "encrypted" : operationData["encryptStorageEnabled"]
}
};
break;
@@ -635,7 +918,18 @@ var operationModule = function () {
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
- "message": operationData["message"]
+ //"message" : operationData["message"]
+ "messageText": operationData["messageText"],
+ "messageTitle": operationData["messageTitle"]
+ }
+ };
+ break;
+ case androidOperationConstants["UPGRADE_FIRMWARE"]:
+ operationType = operationTypeConstants["PROFILE"];
+ payload = {
+ "operation": {
+ "schedule" : operationData["schedule"],
+ "server" : operationData["server"]
}
};
break;
@@ -643,7 +937,7 @@ var operationModule = function () {
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
- "pin": operationData["pin"]
+ "pin" : operationData["pin"]
}
};
break;
@@ -652,7 +946,47 @@ var operationModule = function () {
payload = {
"operation": {
"ssid": operationData["wifiSSID"],
- "password": operationData["wifiPassword"]
+ "type": operationData["wifiType"],
+ "password" : operationData["wifiPassword"],
+ "eap" : operationData["wifiEAP"],
+ "phase2" : operationData["wifiPhase2"],
+ "provisioning" : operationData["wifiProvisioning"],
+ "identity" : operationData["wifiIdentity"],
+ "anonymousIdentity" : operationData["wifiAnoIdentity"],
+ "cacert" : operationData["wifiCaCert"],
+ "cacertName" : operationData["wifiCaCertName"]
+ }
+ };
+ break;
+ case androidOperationConstants["VPN_OPERATION_CODE"]:
+ operationType = operationTypeConstants["PROFILE"];
+ payload = {
+ "operation": {
+ "serverAddress": operationData["serverAddress"],
+ "serverPort": operationData["serverPort"],
+ "sharedSecret": operationData["sharedSecret"],
+ "dnsServer": operationData["dnsServer"]
+ }
+ };
+ break;
+ case androidOperationConstants["LOCK_OPERATION_CODE"]:
+ operationType = operationTypeConstants["PROFILE"];
+ payload = {
+ "operation": {
+ "message" : operationData["lock-message"],
+ "isHardLockEnabled" : operationData["hard-lock"]
+ }
+ };
+ break;
+ case androidOperationConstants["WORK_PROFILE_CODE"]:
+ operationType = operationTypeConstants["PROFILE"];
+ payload = {
+ "operation": {
+ "profileName": operationData["workProfilePolicyProfileName"],
+ "enableSystemApps": operationData["workProfilePolicyEnableSystemApps"],
+ "hideSystemApps": operationData["workProfilePolicyHideSystemApps"],
+ "unhideSystemApps": operationData["workProfilePolicyUnhideSystemApps"],
+ "enablePlaystoreApps": operationData["workProfilePolicyEnablePlaystoreApps"]
}
};
break;
@@ -670,6 +1004,14 @@ var operationModule = function () {
}
};
break;
+ case androidOperationConstants["APPLICATION_OPERATION_CODE"]:
+ payload = {
+ "operation": {
+ "restriction-type": operationData["restrictionType"],
+ "restricted-applications": operationData["restrictedApplications"]
+ }
+ };
+ break;
default:
// If the operation is neither of above, it is a command operation
operationType = operationTypeConstants["COMMAND"];
@@ -686,28 +1028,31 @@ var operationModule = function () {
publicMethods.getAndroidServiceEndpoint = function (operationCode) {
var featureMap = {
- "WIFI": "wifi",
- "CAMERA": "camera",
- "DEVICE_LOCK": "lock",
+ "WIFI": "configure-wifi",
+ "CAMERA": "control-camera",
+ "VPN": "configure-vpn",
+ "DEVICE_LOCK": "lock-devices",
+ "DEVICE_UNLOCK": "unlock-devices",
"DEVICE_LOCATION": "location",
"CLEAR_PASSWORD": "clear-password",
"APPLICATION_LIST": "get-application-list",
- "DEVICE_RING": "ring-device",
- "DEVICE_REBOOT": "reboot-device",
+ "DEVICE_RING": "ring",
+ "DEVICE_REBOOT": "reboot",
"UPGRADE_FIRMWARE": "upgrade-firmware",
"DEVICE_MUTE": "mute",
- "NOTIFICATION": "notification",
- "ENCRYPT_STORAGE": "encrypt",
+ "NOTIFICATION": "send-notification",
+ "ENCRYPT_STORAGE": "encrypt-storage",
"CHANGE_LOCK_CODE": "change-lock-code",
- "WEBCLIP": "webclip",
+ "WEBCLIP": "set-webclip",
"INSTALL_APPLICATION": "install-application",
"UNINSTALL_APPLICATION": "uninstall-application",
"BLACKLIST_APPLICATIONS": "blacklist-applications",
- "PASSCODE_POLICY": "password-policy",
+ "PASSCODE_POLICY": "set-password-policy",
"ENTERPRISE_WIPE": "enterprise-wipe",
- "WIPE_DATA": "wipe-data"
+ "WIPE_DATA": "wipe"
};
- return "/mdm-android-agent/operation/" + featureMap[operationCode];
+ //return "/mdm-android-agent/operation/" + featureMap[operationCode];
+ return "/api/device-mgt/android/v1.0/admin/devices/" + featureMap[operationCode];
};
/**
@@ -754,7 +1099,7 @@ var operationModule = function () {
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
- "enabled": operationData["cameraEnabled"]
+ "enabled" : operationData["cameraEnabled"]
}
};
break;
@@ -762,7 +1107,7 @@ var operationModule = function () {
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
- "lockCode": operationData["lockCode"]
+ "lockCode" : operationData["lockCode"]
}
};
break;
@@ -770,7 +1115,7 @@ var operationModule = function () {
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
- "encrypted": operationData["encryptStorageEnabled"]
+ "encrypted" : operationData["encryptStorageEnabled"]
}
};
break;
@@ -778,7 +1123,7 @@ var operationModule = function () {
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
- "message": operationData["message"]
+ "message" : operationData["message"]
}
};
break;
@@ -852,9 +1197,10 @@ var operationModule = function () {
"DEVICE_RING": "fw-dial-up",
"DEVICE_REBOOT": "fw-refresh",
"UPGRADE_FIRMWARE": "fw-up-arrow",
- "DEVICE_MUTE": "fw-incoming-call",
+ "DEVICE_MUTE": "fw-mute",
"NOTIFICATION": "fw-message",
- "CHANGE_LOCK_CODE": "fw-security"
+ "CHANGE_LOCK_CODE": "fw-security",
+ "DEVICE_UNLOCK": "fw-lock"
};
return featureMap[operationCode];
};
@@ -891,7 +1237,7 @@ var operationModule = function () {
"LOCATION": "fw-map-location",
"ENTERPRISE_WIPE": "fw-clear",
"NOTIFICATION": "fw-message",
- "ALARM": "fw-dial-up"
+ "RING": "fw-dial-up"
};
return featureMap[operationCode];
};
@@ -904,9 +1250,7 @@ var operationModule = function () {
*/
$.fn.filterByData = function (prop, val) {
return this.filter(
- function () {
- return $(this).data(prop) == val;
- }
+ function () {return $(this).data(prop) == val;}
);
};
@@ -928,7 +1272,7 @@ var operationModule = function () {
var key = operationDataObj.data("key");
var value;
if (operationDataObj.is(":text") || operationDataObj.is("textarea") ||
- operationDataObj.is(":password")) {
+ operationDataObj.is(":password") || operationDataObj.is(":hidden")) {
value = operationDataObj.val();
} else if (operationDataObj.is(":checkbox")) {
value = operationDataObj.is(":checked");
@@ -941,7 +1285,8 @@ var operationModule = function () {
if (operationDataObj.hasClass("one-column-input-array")) {
$(".child-input", this).each(function () {
childInput = $(this);
- if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")) {
+ if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")
+ || childInput.is(":hidden")) {
childInputValue = childInput.val();
} else if (childInput.is(":checkbox")) {
childInputValue = childInput.is(":checked");
@@ -967,7 +1312,8 @@ var operationModule = function () {
var joinedInput;
$(".child-input", this).each(function () {
childInput = $(this);
- if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")) {
+ if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")
+ || childInput.is(":hidden")) {
childInputValue = childInput.val();
} else if (childInput.is(":checkbox")) {
childInputValue = childInput.is(":checked");
@@ -998,7 +1344,8 @@ var operationModule = function () {
$(".child-input", this).each(function () {
childInput = $(this);
childInputKey = childInput.data("child-key");
- if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")) {
+ if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")
+ || childInput.is(":hidden")) {
childInputValue = childInput.val();
} else if (childInput.is(":checkbox")) {
childInputValue = childInput.is(":checked");
@@ -1026,6 +1373,7 @@ var operationModule = function () {
operationData[key] = value;
}
);
+
switch (platformType) {
case platformTypeConstants["ANDROID"]:
payload = privateMethods.generateAndroidOperationPayload(operationCode, operationData, deviceList);
@@ -1089,58 +1437,94 @@ var operationModule = function () {
// var childInputValue;
if (operationDataObj.hasClass("one-column-input-array")) {
// generating input fields to populate complex value
- for (i = 0; i < value.length; ++i) {
- operationDataObj.parent().find("a").filterByData("click-event", "add-form").click();
- }
- // traversing through each child input
- $(".child-input", this).each(function () {
- childInput = $(this);
- var childInputValue = value[childInputIndex];
- // populating extracted value in the UI according to the input type
- if (childInput.is(":text") ||
- childInput.is("textarea") ||
- childInput.is(":password") ||
- childInput.is("select")) {
- childInput.val(childInputValue);
- } else if (childInput.is(":checkbox")) {
- operationDataObj.prop("checked", childInputValue);
+ if (value) {
+ for (i = 0; i < value.length; ++i) {
+ operationDataObj.parent().find("a").filterByData("click-event", "add-form").click();
}
- // incrementing childInputIndex
- childInputIndex++;
- });
+ // traversing through each child input
+ $(".child-input", this).each(function () {
+ childInput = $(this);
+ var childInputValue = value[childInputIndex];
+ // populating extracted value in the UI according to the input type
+ if (childInput.is(":text") ||
+ childInput.is(":hidden") ||
+ childInput.is("textarea") ||
+ childInput.is(":password") ||
+ childInput.is("select")) {
+ childInput.val(childInputValue);
+ } else if (childInput.is(":checkbox")) {
+ operationDataObj.prop("checked", childInputValue);
+ }
+ // incrementing childInputIndex
+ childInputIndex++;
+ });
+ }
} else if (operationDataObj.hasClass("valued-check-box-array")) {
// traversing through each child input
$(".child-input", this).each(function () {
childInput = $(this);
// check if corresponding value of current checkbox exists in the array of values
- if (value.indexOf(childInput.data("value")) != -1) {
- // if YES, set checkbox as checked
- childInput.prop("checked", true);
+ if (value) {
+ if (value.indexOf(childInput.data("value")) != -1) {
+ // if YES, set checkbox as checked
+ childInput.prop("checked", true);
+ }
}
});
} else if (operationDataObj.hasClass("multi-column-joined-input-array")) {
// generating input fields to populate complex value
- for (i = 0; i < value.length; ++i) {
- operationDataObj.parent().find("a").filterByData("click-event", "add-form").click();
+ if (value) {
+ for (i = 0; i < value.length; ++i) {
+ operationDataObj.parent().find("a").filterByData("click-event", "add-form").click();
+ }
+ var columnCount = operationDataObj.data("column-count");
+ var multiColumnJoinedInputArrayIndex = 0;
+ // handling scenarios specifically
+ if (operationDataObj.attr("id") == "wifi-mcc-and-mncs") {
+ // traversing through each child input
+ $(".child-input", this).each(function () {
+ childInput = $(this);
+ var multiColumnJoinedInput = value[multiColumnJoinedInputArrayIndex];
+ var childInputValue;
+ if ((childInputIndex % columnCount) == 0) {
+ childInputValue = multiColumnJoinedInput.substring(3, 0)
+ } else {
+ childInputValue = multiColumnJoinedInput.substring(3);
+ // incrementing childInputIndex
+ multiColumnJoinedInputArrayIndex++;
+ }
+ // populating extracted value in the UI according to the input type
+ if (childInput.is(":text") ||
+ childInput.is(":hidden") ||
+ childInput.is("textarea") ||
+ childInput.is(":password") ||
+ childInput.is("select")) {
+ childInput.val(childInputValue);
+ } else if (childInput.is(":checkbox")) {
+ operationDataObj.prop("checked", childInputValue);
+ }
+ // incrementing childInputIndex
+ childInputIndex++;
+ });
+ }
}
- var columnCount = operationDataObj.data("column-count");
- var multiColumnJoinedInputArrayIndex = 0;
- // handling scenarios specifically
- if (operationDataObj.attr("id") == "wifi-mcc-and-mncs") {
+ } else if (operationDataObj.hasClass("multi-column-key-value-pair-array")) {
+ // generating input fields to populate complex value
+ if (value) {
+ for (i = 0; i < value.length; ++i) {
+ operationDataObj.parent().find("a").filterByData("click-event", "add-form").click();
+ }
+ columnCount = operationDataObj.data("column-count");
+ var multiColumnKeyValuePairArrayIndex = 0;
// traversing through each child input
$(".child-input", this).each(function () {
childInput = $(this);
- var multiColumnJoinedInput = value[multiColumnJoinedInputArrayIndex];
- var childInputValue;
- if ((childInputIndex % columnCount) == 0) {
- childInputValue = multiColumnJoinedInput.substring(3, 0)
- } else {
- childInputValue = multiColumnJoinedInput.substring(3);
- // incrementing childInputIndex
- multiColumnJoinedInputArrayIndex++;
- }
+ var multiColumnKeyValuePair = value[multiColumnKeyValuePairArrayIndex];
+ var childInputKey = childInput.data("child-key");
+ var childInputValue = multiColumnKeyValuePair[childInputKey];
// populating extracted value in the UI according to the input type
if (childInput.is(":text") ||
+ childInput.is(":hidden") ||
childInput.is("textarea") ||
childInput.is(":password") ||
childInput.is("select")) {
@@ -1148,39 +1532,14 @@ var operationModule = function () {
} else if (childInput.is(":checkbox")) {
operationDataObj.prop("checked", childInputValue);
}
+ // incrementing multiColumnKeyValuePairArrayIndex for the next row of inputs
+ if ((childInputIndex % columnCount) == (columnCount - 1)) {
+ multiColumnKeyValuePairArrayIndex++;
+ }
// incrementing childInputIndex
childInputIndex++;
});
}
- } else if (operationDataObj.hasClass("multi-column-key-value-pair-array")) {
- // generating input fields to populate complex value
- for (i = 0; i < value.length; ++i) {
- operationDataObj.parent().find("a").filterByData("click-event", "add-form").click();
- }
- columnCount = operationDataObj.data("column-count");
- var multiColumnKeyValuePairArrayIndex = 0;
- // traversing through each child input
- $(".child-input", this).each(function () {
- childInput = $(this);
- var multiColumnKeyValuePair = value[multiColumnKeyValuePairArrayIndex];
- var childInputKey = childInput.data("child-key");
- var childInputValue = multiColumnKeyValuePair[childInputKey];
- // populating extracted value in the UI according to the input type
- if (childInput.is(":text") ||
- childInput.is("textarea") ||
- childInput.is(":password") ||
- childInput.is("select")) {
- childInput.val(childInputValue);
- } else if (childInput.is(":checkbox")) {
- operationDataObj.prop("checked", childInputValue);
- }
- // incrementing multiColumnKeyValuePairArrayIndex for the next row of inputs
- if ((childInputIndex % columnCount) == (columnCount - 1)) {
- multiColumnKeyValuePairArrayIndex++;
- }
- // incrementing childInputIndex
- childInputIndex++;
- });
}
}
}
@@ -1199,8 +1558,29 @@ var operationModule = function () {
for (var i = 0; i < operationCodes.length; ++i) {
var operationCode = operationCodes[i];
var payload = publicMethods.generatePayload(platformType, operationCode, null);
- generatedProfile[operationCode] = payload["operation"];
+
+ if(platformType == platformTypeConstants["ANDROID"] &&
+ operationCodes[i] == androidOperationConstants["CAMERA_OPERATION_CODE"]){
+ var operations = payload["operation"];
+ for (var key in operations){
+ operationCode = key;
+ var restriction = false;
+ if(operations[key]){
+ restriction = true;
+ }
+ var payloadResult = {
+ "operation": {
+ "enabled" : restriction
+ }
+ };
+ generatedProfile[operationCode] = payloadResult["operation"];
+ }
+
+ } else {
+ generatedProfile[operationCode] = payload["operation"];
+ }
}
+ console.log(generatedProfile);
return generatedProfile;
};
@@ -1213,14 +1593,125 @@ var operationModule = function () {
*/
publicMethods.populateProfile = function (platformType, payload) {
var i, configuredOperations = [];
+ var restrictions = {};
for (i = 0; i < payload.length; ++i) {
var configuredFeature = payload[i];
var featureCode = configuredFeature["featureCode"];
var operationPayload = configuredFeature["content"];
+ if(platformType == platformTypeConstants["ANDROID"]){
+ var restriction = JSON.parse(operationPayload);
+ if(featureCode == androidOperationConstants["CAMERA_OPERATION_CODE"]){
+ restrictions["cameraEnabled"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_ADJUST_VOLUME"]){
+ restrictions["disallowAdjustVolumeEnabled"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_CONFIG_BLUETOOTH"]){
+ restrictions["disallowConfigBluetooth"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_CONFIG_CELL_BROADCASTS"]){
+ restrictions["disallowConfigCellBroadcasts"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_CONFIG_CREDENTIALS"]){
+ restrictions["disallowConfigCredentials"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_CONFIG_MOBILE_NETWORKS"]){
+ restrictions["disallowConfigMobileNetworks"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_CONFIG_TETHERING"]){
+ restrictions["disallowConfigTethering"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_CONFIG_VPN"]){
+ restrictions["disallowConfigVpn"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_CONFIG_WIFI"]){
+ restrictions["disallowConfigWifi"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_APPS_CONTROL"]){
+ restrictions["disallowAppControl"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_CREATE_WINDOWS"]){
+ restrictions["disallowCreateWindows"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_CROSS_PROFILE_COPY_PASTE"]){
+ restrictions["disallowCrossProfileCopyPaste"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_DEBUGGING_FEATURES"]){
+ restrictions["disallowDebugging"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_FACTORY_RESET"]){
+ restrictions["disallowFactoryReset"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_ADD_USER"]){
+ restrictions["disallowAddUser"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_INSTALL_APPS"]){
+ restrictions["disallowInstallApps"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_INSTALL_UNKNOWN_SOURCES"]){
+ restrictions["disallowInstallUnknownSources"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_MODIFY_ACCOUNTS"]){
+ restrictions["disallowModifyAccounts"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_MOUNT_PHYSICAL_MEDIA"]){
+ restrictions["disallowMountPhysicalMedia"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_NETWORK_RESET"]){
+ restrictions["disallowNetworkReset"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_OUTGOING_BEAM"]){
+ restrictions["disallowOutgoingBeam"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_OUTGOING_CALLS"]){
+ restrictions["disallowOutgoingCalls"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_REMOVE_USER"]){
+ restrictions["disallowRemoveUser"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_SAFE_BOOT"]){
+ restrictions["disallowSafeBoot"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_SHARE_LOCATION"]){
+ restrictions["disallowLocationSharing"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_SMS"]){
+ restrictions["disallowSMS"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_UNINSTALL_APPS"]){
+ restrictions["disallowUninstallApps"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_UNMUTE_MICROPHONE"]){
+ restrictions["disallowUnmuteMicrophone"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["DISALLOW_USB_FILE_TRANSFER"]){
+ restrictions["disallowUSBFileTransfer"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["ALLOW_PARENT_PROFILE_APP_LINKING"]){
+ restrictions["disallowParentProfileAppLinking"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["ENSURE_VERIFY_APPS"]){
+ restrictions["ensureVerifyApps"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["AUTO_TIME"]){
+ restrictions["enableAutoTime"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["SET_SCREEN_CAPTURE_DISABLED"]){
+ restrictions["diableScreenCapture"] = restriction["enabled"];
+ continue;
+ } else if (featureCode == androidOperationConstants["SET_STATUS_BAR_DISABLED"]){
+ restrictions["disableStatusBar"] = restriction["enabled"];
+ continue;
+ }
+ }
//push the feature-code to the configuration array
configuredOperations.push(featureCode);
publicMethods.populateUI(platformType, featureCode, operationPayload);
}
+ if (typeof restrictions.cameraEnabled !== 'undefined') {
+ configuredOperations.push(androidOperationConstants["CAMERA_OPERATION_CODE"]);
+ publicMethods.populateUI(platformType, androidOperationConstants["CAMERA_OPERATION_CODE"], JSON.stringify(restrictions));
+ }
return configuredOperations;
};
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.qr-modal/qr-modal.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.qr-modal/qr-modal.hbs
new file mode 100644
index 000000000..d1c3e40a1
--- /dev/null
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.qr-modal/qr-modal.hbs
@@ -0,0 +1,36 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{#zone "content"}}
+
+
+
+
+
Scan QR code to start enrollment
+
+ Please scan the QR code using your mobile device to retrieve enrollment URL.
+
+
+
+
+
+
+
+
+
+
+{{/zone}}
\ No newline at end of file
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.qr-modal/qr-modal.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.qr-modal/qr-modal.js
new file mode 100644
index 000000000..0f9b584f6
--- /dev/null
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.qr-modal/qr-modal.js
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function onRequest(context) {
+ var mdmProps = require("/app/modules/conf-reader/main.js")["conf"];
+
+ var viewModel = {};
+ //TODO: Move enrollment URL into app-conf.json
+ viewModel.enrollmentURL = mdmProps.generalConfig.host + mdmProps.enrollmentDir;
+ return viewModel;
+}
\ No newline at end of file
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.qr-modal/qr-modal.json b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.qr-modal/qr-modal.json
new file mode 100644
index 000000000..688e93980
--- /dev/null
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.qr-modal/qr-modal.json
@@ -0,0 +1,3 @@
+{
+ "version": "1.0.0"
+}
\ No newline at end of file
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/public/img/device_icons/TemperatureController.png 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/public/img/device_icons/TemperatureController.png
new file mode 100644
index 000000000..e16b48d8e
Binary files /dev/null and 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/public/img/device_icons/TemperatureController.png differ
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/public/img/device_icons/android.png 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/public/img/device_icons/android.png
new file mode 100755
index 000000000..7fee78a64
Binary files /dev/null and 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/public/img/device_icons/android.png differ
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/public/img/device_icons/ios.png 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/public/img/device_icons/ios.png
new file mode 100644
index 000000000..4b09796f8
Binary files /dev/null and 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/public/img/device_icons/ios.png differ
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/public/img/graph.png 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/public/img/graph.png
new file mode 100644
index 000000000..dd819ef4f
Binary files /dev/null and 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/public/img/graph.png differ
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/public/js/device-detail.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.view/public/js/device-detail.js
new file mode 100644
index 000000000..074095034
--- /dev/null
+++ 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/public/js/device-detail.js
@@ -0,0 +1,318 @@
+/*
+ * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+var InitiateViewOption = null;
+
+(function () {
+ var deviceId = $(".device-id");
+ var deviceIdentifier = deviceId.data("deviceid");
+ var deviceType = deviceId.data("type");
+ var payload = [deviceIdentifier];
+ var operationTable;
+ var serviceUrl;
+
+ if (deviceType == "ios") {
+ serviceUrl = "/ios/operation/deviceinfo";
+ } else if (deviceType == "android") {
+ //var serviceUrl = "/mdm-android-agent/operation/device-info";
+ serviceUrl = "/api/device-mgt/android/v1.0/admin/devices/info";
+ }
+
+ if (serviceUrl) {
+ invokerUtil.post(
+ serviceUrl,
+ payload,
+ // success-callback
+ function () {
+ $(".panel-body").show();
+ },
+ // error-callback
+ function () {
+ var defaultInnerHTML =
+ "
Device data may not have been updated. Please refresh to try again.
\ No newline at end of file
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/public/templates/operations-log.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/public/templates/operations-log.hbs
new file mode 100644
index 000000000..cc5db5117
--- /dev/null
+++ 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/public/templates/operations-log.hbs
@@ -0,0 +1,24 @@
+
+
+
+
Operation Code
+
Status
+
Request created at
+
+
+
+ {{#each operations}}
+
+
{{code}}
+
+ {{#equal status "COMPLETED"}} Completed{{/equal}}
+ {{#equal status "PENDING"}} Pending{{/equal}}
+ {{#equal status "ERROR"}} Error{{/equal}}
+ {{#equal status "IN_PROGRESS"}} In Progress{{/equal}}
+
+
{{createdTimeStamp}}
+
+ {{/each}}
+
+
+
\ No newline at end of file
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/public/templates/policy-compliance.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/public/templates/policy-compliance.hbs
new file mode 100644
index 000000000..d20ca7a9c
--- /dev/null
+++ 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/public/templates/policy-compliance.hbs
@@ -0,0 +1,79 @@
+
-
- Please click "Go back to configurations", if you wish to save another configuration or click
- "Exit" to complete the process and go back to the dashboard.
-
-
-
-
-
-
-
-
-{{#zone "bottomJs"}}
- {{js "js/platform-configuration.js"}}
-{{/zone}}
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.platform.configuration/configuration.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.platform.configuration/configuration.js
deleted file mode 100644
index 6265d6047..000000000
--- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.platform.configuration/configuration.js
+++ /dev/null
@@ -1,9 +0,0 @@
-function onRequest(context) {
- // var log = new Log("platform-configuration-unit backend js");
- var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
- var typesListResponse = userModule.getPlatforms();
- if (typesListResponse["status"] == "success") {
- context["types"] = typesListResponse["content"];
- }
- return context;
-}
\ No newline at end of file
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.platform.configuration/configuration.json b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.platform.configuration/configuration.json
deleted file mode 100644
index be0496bf6..000000000
--- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.platform.configuration/configuration.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "version" : "1.0.0",
- "extends": "cdmf.unit.platform.configuration"
-}
\ No newline at end of file
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.platform.configuration/public/js/platform-configuration.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.platform.configuration/public/js/platform-configuration.js
deleted file mode 100644
index 7bbbad0b4..000000000
--- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.platform.configuration/public/js/platform-configuration.js
+++ /dev/null
@@ -1,878 +0,0 @@
-/*
- * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 Inc. licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * Checks if provided input is valid against RegEx input.
- *
- * @param regExp Regular expression
- * @param inputString Input string to check
- * @returns {boolean} Returns true if input matches RegEx
- */
-function inputIsValid(regExp, inputString) {
- return regExp.test(inputString);
-}
-
-/**
- * Checks if provided input is valid against RegEx input.
- *
- * @param regExp Regular expression
- * @param inputString Input string to check
- * @returns {boolean} Returns true if input matches RegEx
- */
-function isPositiveInteger(str) {
- return /^\+?(0|[1-9]\d*)$/.test(str);
-}
-
-/**
- * Get valid param.
- *
- * @param certificate
- * @param cached param (in the registry)
- * @returns {String} Returns the valid param
- */
-function validateCertificateParams(param, cachedParam) {
- if (param == '' && cachedParam != null) {
- return cachedParam;
- } else {
- return param;
- }
-}
-
-/**
- * Checks if an email address has the valid format or not.
- *
- * @param email Email address
- * @returns {boolean} true if email has the valid format, otherwise false.
- */
-function emailIsValid(email) {
- var regExp = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
- return regExp.test(email);
-}
-
-var iOSMDMCertificateName = null;
-var iOSMDMCertificate = null;
-var iOSAPNSCertificateName = null;
-var iOSAPNSCertificate = null;
-
-var notifierTypeConstants = {
- "LOCAL": "1",
- "GCM": "2"
-};
-// Constants to define platform types available
-var platformTypeConstants = {
- "ANDROID": "android",
- "IOS": "ios",
- "WINDOWS": "windows"
-};
-
-var responseCodes = {
- "CREATED": "Created",
- "SUCCESS": "201",
- "INTERNAL_SERVER_ERROR": "Internal Server Error"
-};
-
-var configParams = {
- "NOTIFIER_TYPE": "notifierType",
- "NOTIFIER_FREQUENCY": "notifierFrequency",
- "GCM_API_KEY": "gcmAPIKey",
- "GCM_SENDER_ID": "gcmSenderId",
- "ANDROID_EULA": "androidEula",
- "IOS_EULA": "iosEula",
- "CONFIG_COUNTRY": "configCountry",
- "CONFIG_STATE": "configState",
- "CONFIG_LOCALITY": "configLocality",
- "CONFIG_ORGANIZATION": "configOrganization",
- "CONFIG_ORGANIZATION_UNIT": "configOrganizationUnit",
- "MDM_CERT_PASSWORD": "MDMCertPassword",
- "MDM_CERT_TOPIC_ID": "MDMCertTopicID",
- "APNS_CERT_PASSWORD": "APNSCertPassword",
- "MDM_CERT": "MDMCert",
- "MDM_CERT_NAME": "MDMCertName",
- "APNS_CERT": "APNSCert",
- "APNS_CERT_NAME": "APNSCertName",
- "ORG_DISPLAY_NAME": "organizationDisplayName",
- "GENERAL_EMAIL_HOST": "emailHost",
- "GENERAL_EMAIL_PORT": "emailPort",
- "GENERAL_EMAIL_USERNAME": "emailUsername",
- "GENERAL_EMAIL_PASSWORD": "emailPassword",
- "GENERAL_EMAIL_SENDER_ADDRESS": "emailSender",
- "GENERAL_EMAIL_TEMPLATE": "emailTemplate",
- "COMMON_NAME": "commonName",
- "KEYSTORE_PASSWORD": "keystorePassword",
- "PRIVATE_KEY_PASSWORD": "privateKeyPassword",
- "BEFORE_EXPIRE": "beforeExpire",
- "AFTER_EXPIRE": "afterExpire",
- "WINDOWS_EULA": "windowsLicense"
-};
-
-function promptErrorPolicyPlatform(errorMsg) {
- var mainErrorMsgWrapper = "#platform-config-main-error-msg";
- var mainErrorMsg = mainErrorMsgWrapper + " span";
- $(mainErrorMsg).text(errorMsg);
- $(mainErrorMsgWrapper).show();
-}
-
-$(document).ready(function () {
-
- var platformsSupported = $("#typeDiv").attr("typeData");
- $("#gcm-inputs").hide();
- tinymce.init({
- selector: "textarea",
- height: 500,
- theme: "modern",
- plugins: [
- "autoresize",
- "advlist autolink lists link image charmap print preview anchor",
- "searchreplace visualblocks code fullscreen",
- "insertdatetime image table contextmenu paste"
- ],
- toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
- });
-
- var getAndroidConfigAPI = "/mdm-android-agent/configuration";
- var getGeneralConfigAPI = "/devicemgt_admin/configuration";
- var getIosConfigAPI = "/ios/configuration";
- var getWindowsConfigAPI = "/mdm-windows-agent/services/configuration";
-
- /**
- * Following requests would execute
- * on page load event of platform configuration page in WSO2 EMM Console.
- * Upon receiving the response, the parameters will be set to the fields,
- * in case those configurations are already set.
- */
-
- if (platformsSupported.indexOf('android') != -1) {
- invokerUtil.get(
- getAndroidConfigAPI,
- function (data) {
- data = JSON.parse(data);
- if (data != null && data.configuration != null) {
- for (var i = 0; i < data.configuration.length; i++) {
- var config = data.configuration[i];
- if (config.name == configParams["NOTIFIER_TYPE"]) {
- $("#android-config-notifier").val(config.value);
- if (config.value != notifierTypeConstants["GCM"]) {
- $("#gcm-inputs").hide();
- $("#local-inputs").show();
- } else {
- $("#gcm-inputs").show();
- $("#local-inputs").hide();
- }
- } else if (config.name == configParams["NOTIFIER_FREQUENCY"]) {
- $("input#android-config-notifier-frequency").val(config.value / 1000);
- } else if (config.name == configParams["GCM_API_KEY"]) {
- $("input#android-config-gcm-api-key").val(config.value);
- } else if (config.name == configParams["GCM_SENDER_ID"]) {
- $("input#android-config-gcm-sender-id").val(config.value);
- } else if (config.name == configParams["ANDROID_EULA"]) {
- $("#android-eula").val(config.value);
- }
- }
- }
- }, function (data) {
- console.log(data);
- });
- }
-
- invokerUtil.get(
- getGeneralConfigAPI,
- function (data) {
- data = JSON.parse(data);
- if (data && data.configuration) {
- for (var i = 0; i < data.configuration.length; i++) {
- var config = data.configuration[i];
- if (config.name == configParams["NOTIFIER_FREQUENCY"]) {
- $("input#monitoring-config-frequency").val(config.value / 1000);
- }
- }
- }
- }, function (data) {
- console.log(data);
- });
-
- if (platformsSupported.indexOf('windows') != -1) {
- invokerUtil.get(
- getWindowsConfigAPI,
- function (data) {
- data = JSON.parse(data);
- if (data != null && data.configuration != null) {
- for (var i = 0; i < data.configuration.length; i++) {
- var config = data.configuration[i];
- if (config.name == configParams["NOTIFIER_FREQUENCY"]) {
- $("input#windows-config-notifier-frequency").val(config.value / 1000);
- } else if (config.name == configParams["WINDOWS_EULA"]) {
- $("#windows-eula").val(config.value);
- }
- }
- }
- }, function (data) {
- console.log(data);
- }
- );
- }
-
- if (platformsSupported.indexOf('ios') != -1) {
- invokerUtil.get(
- getIosConfigAPI,
- function (data) {
- data = JSON.parse(data);
- if (data != null && data.configuration != null) {
- for (var i = 0; i < data.configuration.length; i++) {
- var config = data.configuration[i];
- if (config.name == configParams["CONFIG_COUNTRY"]) {
- $("input#ios-config-country").val(config.value);
- } else if (config.name == configParams["CONFIG_STATE"]) {
- $("input#ios-config-state").val(config.value);
- } else if (config.name == configParams["CONFIG_LOCALITY"]) {
- $("input#ios-config-locality").val(config.value);
- } else if (config.name == configParams["CONFIG_ORGANIZATION"]) {
- $("input#ios-config-organization").val(config.value);
- } else if (config.name == configParams["CONFIG_ORGANIZATION_UNIT"]) {
- $("input#ios-config-organization-unit").val(config.value);
- } else if (config.name == configParams["MDM_CERT_PASSWORD"]) {
- $("input#ios-config-mdm-certificate-password").val(config.value);
- } else if (config.name == configParams["MDM_CERT_TOPIC_ID"]) {
- $("input#ios-config-mdm-certificate-topic-id").val(config.value);
- } else if (config.name == configParams["APNS_CERT_PASSWORD"]) {
- $("input#ios-config-apns-certificate-password").val(config.value);
- } else if (config.name == configParams["MDM_CERT_NAME"]) {
- $("#mdm-cert-file-name").html(config.value);
- iOSMDMCertificateName = config.value;
- } else if (config.name == configParams["MDM_CERT"]) {
- iOSMDMCertificate = config.value;
- } else if (config.name == configParams["APNS_CERT_NAME"]) {
- $("#apns-cert-file-name").html(config.value);
- iOSAPNSCertificateName = config.value;
- } else if (config.name == configParams["APNS_CERT"]) {
- iOSAPNSCertificate = config.value;
- } else if (config.name == configParams["ORG_DISPLAY_NAME"]) {
- $("input#ios-org-display-name").val(config.value);
- } else if (config.name == configParams["IOS_EULA"]) {
- $("#ios-eula").val(config.value);
- }
- }
- }
- }, function (data) {
- console.log(data);
- }
- );
- }
-
- $("select.select2[multiple=multiple]").select2({
- tags: true
- });
-
- $("#android-config-notifier").change(function () {
- var notifierType = $("#android-config-notifier").find("option:selected").attr("value");
- if (notifierType != notifierTypeConstants["GCM"]) {
- $("#gcm-inputs").hide();
- $("#local-inputs").show();
- } else {
- $("#local-inputs").hide();
- $("#gcm-inputs").show();
- }
- });
-
- /**
- * Following click function would execute
- * when a user clicks on "Save" button
- * on Android platform configuration page in WSO2 EMM Console.
- */
- $("button#save-android-btn").click(function () {
- var notifierType = $("#android-config-notifier").find("option:selected").attr("value");
- var notifierFrequency = $("input#android-config-notifier-frequency").val();
- var gcmAPIKey = $("input#android-config-gcm-api-key").val();
- var gcmSenderId = $("input#android-config-gcm-sender-id").val();
- var androidLicense = tinymce.get('android-eula').getContent();
-
- var errorMsgWrapper = "#android-config-error-msg";
- var errorMsg = "#android-config-error-msg span";
- if (notifierType == notifierTypeConstants["LOCAL"] && !notifierFrequency) {
- $(errorMsg).text("Notifier frequency is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (notifierType == notifierTypeConstants["LOCAL"] && !isPositiveInteger(notifierFrequency)) {
- $(errorMsg).text("Provided notifier frequency is invalid. ");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (notifierType == notifierTypeConstants["GCM"] && !gcmAPIKey) {
- $(errorMsg).text("GCM API Key is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (notifierType == notifierTypeConstants["GCM"] && !gcmSenderId) {
- $(errorMsg).text("GCM Sender ID is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else {
-
- var addConfigFormData = {};
- var configList = new Array();
-
- var type = {
- "name": configParams["NOTIFIER_TYPE"],
- "value": notifierType,
- "contentType": "text"
- };
-
- var frequency = {
- "name": configParams["NOTIFIER_FREQUENCY"],
- "value": String(notifierFrequency * 1000),
- "contentType": "text"
- };
-
- var gcmKey = {
- "name": configParams["GCM_API_KEY"],
- "value": gcmAPIKey,
- "contentType": "text"
- };
-
- var gcmId = {
- "name": configParams["GCM_SENDER_ID"],
- "value": gcmSenderId,
- "contentType": "text"
- };
-
- var androidEula = {
- "name": configParams["ANDROID_EULA"],
- "value": androidLicense,
- "contentType": "text"
- };
-
- configList.push(type);
- configList.push(frequency);
- configList.push(androidEula);
- if (notifierType == notifierTypeConstants["GCM"]) {
- configList.push(gcmKey);
- configList.push(gcmId);
- }
-
- addConfigFormData.type = platformTypeConstants["ANDROID"];
- addConfigFormData.configuration = configList;
-
- var addConfigAPI = "/mdm-android-agent/configuration";
-
- invokerUtil.post(
- addConfigAPI,
- addConfigFormData,
- function (data) {
- data = JSON.parse(data);
- if (data.responseCode == responseCodes["CREATED"]) {
- $("#config-save-form").addClass("hidden");
- $("#record-created-msg").removeClass("hidden");
- } else if (data == 500) {
- $(errorMsg).text("Exception occurred at backend.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (data == 403) {
- $(errorMsg).text("Action was not permitted.");
- $(errorMsgWrapper).removeClass("hidden");
- } else {
- $(errorMsg).text("An unexpected error occurred.");
- $(errorMsgWrapper).removeClass("hidden");
- }
-
-
- }, function (data) {
- data = data.status;
- if (data == 500) {
- $(errorMsg).text("Exception occurred at backend.");
- } else if (data == 403) {
- $(errorMsg).text("Action was not permitted.");
- } else {
- $(errorMsg).text("An unexpected error occurred.");
- }
- $(errorMsgWrapper).removeClass("hidden");
- }
- );
- }
- });
-
- /**
- * Following click function would execute
- * when a user clicks on "Save" button
- * on General platform configuration page in WSO2 EMM Console.
- */
- $("button#save-general-btn").click(function () {
- var notifierFrequency = $("input#monitoring-config-frequency").val();
- var errorMsgWrapper = "#email-config-error-msg";
- var errorMsg = "#email-config-error-msg span";
-
- if (!notifierFrequency) {
- $(errorMsg).text("Monitoring frequency is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (!isPositiveInteger(notifierFrequency)) {
- $(errorMsg).text("Provided monitoring frequency is invalid. ");
- $(errorMsgWrapper).removeClass("hidden");
- } else {
- var addConfigFormData = {};
- var configList = new Array();
-
- var monitorFrequency = {
- "name": configParams["NOTIFIER_FREQUENCY"],
- "value": String((notifierFrequency * 1000)),
- "contentType": "text"
- };
-
- configList.push(monitorFrequency);
- addConfigFormData.configuration = configList;
-
- var addConfigAPI = "/devicemgt_admin/configuration";
- invokerUtil.post(
- addConfigAPI,
- addConfigFormData,
- function (data) {
- data = JSON.parse(data);
- if (data.statusCode == responseCodes["SUCCESS"]) {
- $("#config-save-form").addClass("hidden");
- $("#record-created-msg").removeClass("hidden");
- } else if (data == 500) {
- $(errorMsg).text("Exception occurred at backend.");
- } else if (data == 403) {
- $(errorMsg).text("Action was not permitted.");
- } else {
- $(errorMsg).text("An unexpected error occurred.");
- }
-
- $(errorMsgWrapper).removeClass("hidden");
- }, function (data) {
- data = data.status;
- if (data == 500) {
- $(errorMsg).text("Exception occurred at backend.");
- } else if (data == 403) {
- $(errorMsg).text("Action was not permitted.");
- } else {
- $(errorMsg).text("An unexpected error occurred.");
- }
- $(errorMsgWrapper).removeClass("hidden");
- }
- );
- }
- });
-
- var errorMsgWrapper = "#ios-config-error-msg";
- var errorMsg = "#ios-config-error-msg span";
- var fileTypes = ['pfx'];
- var notSupportedError = false;
-
- var base64MDMCert = "";
- var fileInputMDMCert = $('#ios-config-mdm-certificate');
- var fileNameMDMCert = "";
- var invalidFormatMDMCert = false;
-
- var base64APNSCert = "";
- var fileInputAPNSCert = $('#ios-config-apns-certificate');
- var fileNameAPNSCert = "";
- var invalidFormatAPNSCert = false;
-
- $(fileInputMDMCert).change(function () {
-
- if (!window.File || !window.FileReader || !window.FileList || !window.Blob) {
- $(errorMsg).text("The File APIs are not fully supported in this browser.");
- $(errorMsgWrapper).removeClass("hidden");
- notSupportedError = true;
- return;
- }
-
- var file = fileInputMDMCert[0].files[0];
- fileNameMDMCert = file.name;
- var extension = file.name.split('.').pop().toLowerCase(),
- isSuccess = fileTypes.indexOf(extension) > -1;
-
- if (isSuccess) {
- var fileReader = new FileReader();
- fileReader.onload = function (event) {
- base64MDMCert = event.target.result;
- };
- fileReader.readAsDataURL(file);
- invalidFormatMDMCert = false;
- } else {
- base64MDMCert = "";
- invalidFormatMDMCert = true;
- }
- });
-
- $(fileInputAPNSCert).change(function () {
-
- if (!window.File || !window.FileReader || !window.FileList || !window.Blob) {
- $(errorMsg).text("The File APIs are not fully supported in this browser.");
- $(errorMsgWrapper).removeClass("hidden");
- notSupportedError = true;
- return;
- }
-
- var file = fileInputAPNSCert[0].files[0];
- fileNameAPNSCert = file.name;
- var extension = file.name.split('.').pop().toLowerCase(),
- isSuccess = fileTypes.indexOf(extension) > -1;
-
- if (isSuccess) {
- var fileReader = new FileReader();
- fileReader.onload = function (event) {
- base64APNSCert = event.target.result;
- };
- fileReader.readAsDataURL(file);
- invalidFormatAPNSCert = false;
- } else {
- base64MDMCert = "";
- invalidFormatAPNSCert = true;
- }
- });
-
- $("button#save-ios-btn").click(function () {
-
- var configCountry = $("#ios-config-country").val();
- var configState = $("#ios-config-state").val();
- var configLocality = $("#ios-config-locality").val();
- var configOrganization = $("#ios-config-organization").val();
- var configOrganizationUnit = $("#ios-config-organization-unit").val();
- var MDMCertPassword = $("#ios-config-mdm-certificate-password").val();
- var MDMCertTopicID = $("#ios-config-mdm-certificate-topic-id").val();
- var APNSCertPassword = $("#ios-config-apns-certificate-password").val();
- var configOrgDisplayName = $("#ios-org-display-name").val();
- var iosLicense = tinymce.get('ios-eula').getContent();
-
- fileNameMDMCert = validateCertificateParams(fileNameMDMCert, iOSMDMCertificateName);
- fileNameAPNSCert = validateCertificateParams(fileNameAPNSCert, iOSAPNSCertificateName);
- base64MDMCert = validateCertificateParams(base64MDMCert, iOSMDMCertificate);
- base64APNSCert = validateCertificateParams(base64APNSCert, iOSAPNSCertificate);
-
- if (!configCountry) {
- $(errorMsg).text("SCEP country is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (!configState) {
- $(errorMsg).text("SCEP state is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (!configLocality) {
- $(errorMsg).text("SCEP locality is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (!configOrganization) {
- $(errorMsg).text("SCEP organization is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (!configOrganizationUnit) {
- $(errorMsg).text("SCEP organization unit is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (!MDMCertPassword) {
- $(errorMsg).text("MDM certificate password is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (!MDMCertTopicID) {
- $(errorMsg).text("MDM certificate topic ID is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (!APNSCertPassword) {
- $(errorMsg).text("APNS certificate password is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (notSupportedError) {
- $(errorMsg).text("The File APIs are not fully supported in this browser.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (invalidFormatMDMCert) {
- $(errorMsg).text("MDM certificate needs to be in pfx format.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (base64MDMCert == '') {
- $(errorMsg).text("MDM certificate is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (invalidFormatAPNSCert) {
- $(errorMsg).text("APNS certificate needs to be in pfx format.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (base64APNSCert == '') {
- $(errorMsg).text("APNS certificate is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (!configOrgDisplayName) {
- $(errorMsg).text("Organization display name is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else {
- var addConfigFormData = {};
- var configList = new Array();
-
- var configCountry = {
- "name": configParams["CONFIG_COUNTRY"],
- "value": configCountry,
- "contentType": "text"
- };
-
- var configState = {
- "name": configParams["CONFIG_STATE"],
- "value": configState,
- "contentType": "text"
- };
-
- var configLocality = {
- "name": configParams["CONFIG_LOCALITY"],
- "value": configLocality,
- "contentType": "text"
- };
-
- var configOrganization = {
- "name": configParams["CONFIG_ORGANIZATION"],
- "value": configOrganization,
- "contentType": "text"
- };
-
- var configOrganizationUnit = {
- "name": configParams["CONFIG_ORGANIZATION_UNIT"],
- "value": configOrganizationUnit,
- "contentType": "text"
- };
-
- var MDMCertPassword = {
- "name": configParams["MDM_CERT_PASSWORD"],
- "value": MDMCertPassword,
- "contentType": "text"
- };
-
- var MDMCertTopicID = {
- "name": configParams["MDM_CERT_TOPIC_ID"],
- "value": MDMCertTopicID,
- "contentType": "text"
- };
-
- var APNSCertPassword = {
- "name": configParams["APNS_CERT_PASSWORD"],
- "value": APNSCertPassword,
- "contentType": "text"
- };
-
- var paramBase64MDMCert = {
- "name": configParams["MDM_CERT"],
- "value": base64MDMCert,
- "contentType": "text"
- };
-
- var MDMCertName = {
- "name": configParams["MDM_CERT_NAME"],
- "value": fileNameMDMCert,
- "contentType": "text"
- };
-
- var paramBase64APNSCert = {
- "name": configParams["APNS_CERT"],
- "value": base64APNSCert,
- "contentType": "text"
- };
-
- var APNSCertName = {
- "name": configParams["APNS_CERT_NAME"],
- "value": fileNameAPNSCert,
- "contentType": "text"
- };
-
- var paramOrganizationDisplayName = {
- "name": configParams["ORG_DISPLAY_NAME"],
- "value": configOrgDisplayName,
- "contentType": "text"
- };
-
- var iosEula = {
- "name": configParams["IOS_EULA"],
- "value": iosLicense,
- "contentType": "text"
- };
-
- configList.push(configCountry);
- configList.push(configState);
- configList.push(configLocality);
- configList.push(configOrganization);
- configList.push(configOrganizationUnit);
- configList.push(MDMCertPassword);
- configList.push(MDMCertTopicID);
- configList.push(APNSCertPassword);
- configList.push(paramBase64MDMCert);
- configList.push(MDMCertName);
- configList.push(paramBase64APNSCert);
- configList.push(APNSCertName);
- configList.push(paramOrganizationDisplayName);
- configList.push(iosEula);
-
- addConfigFormData.type = platformTypeConstants["IOS"];
- addConfigFormData.configuration = configList;
-
- var addConfigAPI = "/ios/configuration";
-
- invokerUtil.post(
- addConfigAPI,
- addConfigFormData,
- function (data) {
- data = JSON.parse(data);
- if (data.responseCode == responseCodes["CREATED"]) {
- $("#config-save-form").addClass("hidden");
- $("#record-created-msg").removeClass("hidden");
- } else if (data == 500) {
- $(errorMsg).text("Exception occurred at backend.");
- } else if (data == 400) {
- $(errorMsg).text("Configurations cannot be empty.");
- } else {
- $(errorMsg).text("An unexpected error occurred.");
- }
-
- $(errorMsgWrapper).removeClass("hidden");
- }, function (data) {
- data = data.status;
- if (data == 500) {
- $(errorMsg).text("Exception occurred at backend.");
- } else if (data == 403) {
- $(errorMsg).text("Action was not permitted.");
- } else {
- $(errorMsg).text("An unexpected error occurred.");
- }
- $(errorMsgWrapper).removeClass("hidden");
- }
- );
- }
-
- });
-
- var errorMsgWrapperWindows = "#windows-config-error-msg";
- var errorMsgWindows = "#windows-config-error-msg span";
- var fileTypesWindows = ['jks'];
- var notSupportedError = false;
-
- var base64WindowsMDMCert = "";
- var fileInputWindowsMDMCert = $('#windows-config-mdm-certificate');
- var fileNameWindowsMDMCert = "";
- var invalidFormatWindowsMDMCert = false;
-
- $(fileInputWindowsMDMCert).change(function () {
-
- if (!window.File || !window.FileReader || !window.FileList || !window.Blob) {
- $(errorMsgWindows).text("The File APIs are not fully supported in this browser.");
- $(errorMsgWrapperWindows).removeClass("hidden");
- notSupportedError = true;
- return;
- }
-
- var file = fileInputWindowsMDMCert[0].files[0];
- fileNameWindowsMDMCert = file.name;
- var extension = file.name.split('.').pop().toLowerCase(),
- isSuccess = fileTypesWindows.indexOf(extension) > -1;
-
- if (isSuccess) {
- var fileReader = new FileReader();
- fileReader.onload = function (event) {
- base64WindowsMDMCert = event.target.result;
- };
- fileReader.readAsDataURL(file);
- invalidFormatWindowsMDMCert = false;
- } else {
- base64MDMCert = "";
- invalidFormatWindowsMDMCert = true;
- }
- });
-
- $("button#save-windows-btn").click(function () {
-
- var notifierFrequency = $("#windows-config-notifier-frequency").val();
- var windowsLicense = tinymce.get('windows-eula').getContent();
-
- if (!notifierFrequency) {
- $(errorMsgWindows).text("Polling Interval is a required field. It cannot be empty.");
- $(errorMsgWrapperWindows).removeClass("hidden");
- } else if (!windowsLicense) {
- $(errorMsgWindows).text("License is a required field. It cannot be empty.");
- $(errorMsgWrapperWindows).removeClass("hidden");
- } else if (!$.isNumeric(notifierFrequency)) {
- $(errorMsgWindows).text("Provided Notifier frequency is invalid. It must be a number.");
- $(errorMsgWrapperWindows).removeClass("hidden");
- } else {
- var addConfigFormData = {};
- var configList = new Array();
-
- var paramNotifierFrequency = {
- "name": configParams["NOTIFIER_FREQUENCY"],
- "value": String(notifierFrequency * 1000),
- "contentType": "text"
- };
-
- var windowsEula = {
- "name": configParams["WINDOWS_EULA"],
- "value": windowsLicense,
- "contentType": "text"
- };
-
- configList.push(paramNotifierFrequency);
- configList.push(windowsEula);
-
- addConfigFormData.type = platformTypeConstants["WINDOWS"];
- addConfigFormData.configuration = configList;
-
- var addConfigAPI = "/mdm-windows-agent/services/configuration";
-
- invokerUtil.post(
- addConfigAPI,
- addConfigFormData,
- function (data) {
- data = JSON.parse(data);
- if (data.responseCode == responseCodes["CREATED"]) {
- $("#config-save-form").addClass("hidden");
- $("#record-created-msg").removeClass("hidden");
- } else if (data == 500) {
- $(errorMsg).text("Exception occurred at backend.");
- } else if (data == 400) {
- $(errorMsg).text("Configurations cannot be empty.");
- } else {
- $(errorMsg).text("An unexpected error occurred.");
- }
-
- $(errorMsgWrapperWindows).removeClass("hidden");
- }, function (data) {
- data = data.status;
- if (data == 500) {
- $(errorMsg).text("Exception occurred at backend.");
- } else if (data == 403) {
- $(errorMsg).text("Action was not permitted.");
- } else {
- $(errorMsg).text("An unexpected error occurred.");
- }
- $(errorMsgWrapper).removeClass("hidden");
- }
- );
- }
-
- });
-});
-
-// Start of HTML embedded invoke methods
-var showAdvanceOperation = function (operation, button) {
- $(button).addClass('selected');
- $(button).siblings().removeClass('selected');
- var enabledPlatforms = $("#supportedPlatforms");
- var isPluginEnabled = false;
- switch (operation) {
- case 'ios':
- if (enabledPlatforms.data("ios")) {
- isPluginEnabled = true;
- }
- break;
- case 'windows':
- if (enabledPlatforms.data("windows")) {
- isPluginEnabled = true;
- }
- break;
- case 'android':
- if (enabledPlatforms.data("android")) {
- isPluginEnabled = true;
- }
- break;
- case 'general':
- isPluginEnabled = true;
- break;
- }
- if (isPluginEnabled) {
- var hiddenOperation = ".wr-hidden-operations-content > div";
- $(hiddenOperation + '[data-operation="' + operation + '"]').show();
- $(hiddenOperation + '[data-operation="' + operation + '"]').siblings().hide();
- } else {
- var hiddenOperation = ".wr-hidden-operations-content > div";
- $(hiddenOperation + '[data-operation="error"]').show();
- $(hiddenOperation + '[data-operation="error"]').siblings().hide();
- promptErrorPolicyPlatform("To use " + operation + " related functionalities you need to configure the server " +
- "accordingly.Please refer to the user guiled.");
- }
-};
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
new file mode 100644
index 000000000..6794312bd
--- /dev/null
+++ 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
@@ -0,0 +1,288 @@
+{{#zone "content"}}
+
+
+
+
+
+
+
1
+
Select a platform
+
+
+
+
+
+
2
+
Configure profile
+
+
+
+
+
+
3
+
Assign to groups
+
+
+
+
+
+
4
+
Publish to devices
+
+
+
+
+
+
+
+
Policy creation is successful.
+ Please click "Add Another Policy", if you wish to add another policy or click
+ "View policy list" to complete the process and go back to the policy list.
+
+
+
+
+
+
+
+ Add another policy
+
+
+ This configuration can be used to set a passcode policy to an Android Device.
+ Once this configuration profile is installed on a device, corresponding users will not be
+ able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Restrictions
+
+
+
+ This configurations can be used to restrict certain settings on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be
+ able
+ to modify these settings on their devices.
+
+ This configuration can be used to encrypt data on an Android device, when the device is
+ locked and
+ make it readable when the passcode is entered. Once this configuration profile is installed
+ on a device,
+ corresponding users will not be able to modify these settings on their devices.
+
+
+
+
+
+
+
+ Un-check following checkbox in case you do not need the device to be encrypted.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Wi-Fi Settings
+
+
+
+ This configurations can be used to configure Wi-Fi access on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be
+ able
+ to modify these settings on their devices.
+
+
+
+
+ Please note that * sign represents required fields of data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Application Restriction Settings
+
+
+
+ This configuration can be used to create a black list or white list of applications.
+
+ This configurations can be used to configure VPN settings on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be
+ able
+ to modify these settings on their devices.
+
+
+
+
+ Please note that * sign represents required fields of data.
+
+
+
+ The configurations below can be applied to the devices where the agent is running in Android
+ Work-Profile.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
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/public/templates/hidden-operations-ios.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/public/templates/hidden-operations-ios.hbs
new file mode 100644
index 000000000..ef6f2d368
--- /dev/null
+++ 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/public/templates/hidden-operations-ios.hbs
@@ -0,0 +1,4832 @@
+
+ This configuration can be used to set a passcode policy to an iOS Device.
+ Once this configuration profile is installed on a device, corresponding users
+ will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VPN Settings
+
+
+
+ This configurations can be used to configure VPN settings on an iOS device.
+ Once this configuration profile is installed on a device, corresponding users will not
+ be able
+ to modify these settings on their devices.
+
+
+
+
+Please note that * sign represents required fields of data.
+
+
+
+
+ This configuration can be used to configure add-on VPN software (per-app VPN),
+ and it works only on VPN services of
+ type 'VPN'. Once this configuration profile is installed on a device,
+ corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+ Please note that * sign represents required fields of data.
+
+
+
+
+ This configuration can be used to configure app-to-per-app VPN mappings.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+ Please note that * sign represents required fields of data.
+
+
+
+
+ These configurations can be used to set how devices connect to your wireless network(s),
+ including the necessary authentication
+ information. Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ For Manual Proxy Setup :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+For WEP, WPA or ANY Encryption Security Type :
+
+
+
+
+ These configurations can be used to define settings for connecting
+ to your POP or IMAP email accounts.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Incoming Mail Settings :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Outgoing Mail Settings :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AirPlay Settings
+
+
+
+ This configuration can be used to define settings for connecting to AirPlay
+ destinations.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
+
(This feature is supported only on iOS 7.0 and later.)
+
+ This configuration can be used to define settings for connecting to LDAP
+ servers.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
+
+ This configuration can be used to define settings for connecting to CalDAV
+ servers.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Calendar Subscription
+
+
+
+ This configuration can be used to define settings for calendar subscriptions.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Access Point Names ( APN )
+
+
+
+ These configurations can be used to specify Access Point Names ( APN ).
+ Once this configuration profile is installed on an iOS device, corresponding
+ users will not
+ be able to modify these settings on their devices.
+
(This feature is not supported on iOS 7.0 and later.)
+
+ These configurations can be used to specify Cellular Network Settings on an iOS
+ device.
+ Cellular settings cannot be installed if an APN setting is already installed and
+ upon successful installation, corresponding users will not be able to modify
+ these
+ settings on their devices.
+
(This feature is supported only on iOS 7.0 and later.)
+
+ These configurations can be used to restrict apps, device features and
+ media content available on an iOS device. Once this configuration profile is installed
+ on a device, corresponding users will not be able to modify these settings on their
+ devices.
+
\ No newline at end of file
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/public/templates/hidden-operations-windows.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/public/templates/hidden-operations-windows.hbs
new file mode 100644
index 000000000..2547a69ce
--- /dev/null
+++ 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/public/templates/hidden-operations-windows.hbs
@@ -0,0 +1,566 @@
+
+ This configuration can be used to set a passcode policy to an Windows Device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Restrictions on Camera
+
+
+
+ This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+ Un-check following checkbox in case you need to disable camera.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Encryption Settings
+
+
+
+ This configuration can be used to encrypt data on an Windows device, when the device is locked and
+ make it readable when the passcode is entered. Once this configuration profile is installed on a device,
+ corresponding users will not be able to modify these settings on their devices.
+
+
+
+
+
+
+
+ Un-check following checkbox in case you need to disable storage-encryption.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Application Restriction Settings
+
+
+
+ This configuration can be used to create a black list or white list of applications.
+
\ No newline at end of file
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/edit.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/edit.hbs
index 9c913a932..4f499fddd 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/edit.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/edit.hbs
@@ -1,239 +1,233 @@
-{{!
- Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-
- WSO2 Inc. licenses this file to you under the Apache License,
- Version 2.0 (the "License"); you may not use this file except
- in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-}}
+{{#zone "content"}}
-
+
-
-
-
1
Edit current profile
-
-
-
-
2
Edit assignment groups
-
-
-
-
3
Republish to devices
-
-
-
+
+
+
1
Edit current profile
+
+
+
+
2
Edit assignment groups
+
+
+
+
3
Republish to devices
+
+
+
-
-
-
Policy is successfully re-configured.
- Please click "Add Another Policy", if you wish to add another policy or click
- "View policy list" to complete the process and go back to the policy list.
-
-
-
+
- This configuration can be used to set a passcode policy to an Android Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
+
+
+
+
+
+
+ Passcode Policy
+
+
+
+ This configuration can be used to set a passcode policy to an Android Device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
-
+
+
+
-
-
-
+
+
+
-
-
+
-
-
-
+
+
+
Require alphanumeric value
-
-
+
+
-
-
- Minimum passcode length
+
+
+ Minimum passcode length
-
-
-
+
+
+
-
-
- Minimum number of complex characters
+
+
+ Minimum number of complex characters
-
-
-
+
+
+
-
-
- Maximum passcode age in days
+
+
+ Maximum passcode age in days
-
- ( Should be in between 1-to-730 days or none )
-
-
-
+
+ ( Should be in between 1-to-730 days or none )
+
+
+
-
-
- Passcode history
+
+
+ Passcode history
-
- ( Should be in between 1-to-50 passcodes or none )
-
-
-
+
+ ( Should be in between 1-to-50 passcodes or none )
+
+
+
-
-
- Maximum number of failed attempts
+
+
+ Maximum number of failed attempts
-
-
-
-
+
+
-
+
+
+
-
-
-
-
-
- Restrictions on Camera
-
-
-
-
-
-
-
- This configuration can be used to restrict the usage of camera on an Android device together with all the applications using the camera.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you need to disable camera.
-
-
-
-
-
+
+
+
+
+
+ Restrictions
+
+
+
+
+
+
+
+ This configurations can be used to restrict certain settings on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
Allow use of camera
-
-
-
+
+
+
+ Below restrictions will be applied on devices with Android version 5.0 Lollipop onwards only
+
+
+
+
+ Bellow restrictions will be applied on devices with Android version 6.0 Marshmallow onwards only.
+
+
+
+
+
+
+ Disable status bar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Encryption Settings
+
+
+
+
+
+
+
+ This configuration can be used to encrypt data on an Android device, when the device is locked and
+ make it readable when the passcode is entered. Once this configuration profile is installed on a device,
+ corresponding users will not be able to modify these settings on their devices.
+
+
+
+
+
+
+ Un-check following checkbox in case you do not need the device to be encrypted.
+
+
+
+
+
+
+ Enable storage-encryption
+
+
+
+
-
+
+
+
-
-
-
-
-
- Encryption Settings
-
-
-
-
-
-
-
- This configuration can be used to encrypt data on an Android device, when the device is locked and
- make it readable when the passcode is entered. Once this configuration profile is installed on a device,
- corresponding users will not be able to modify these settings on their devices.
-
-
+
+
+
+
+
+ Wi-Fi Settings
+
+
+
+
+
+
+
+ This configurations can be used to configure Wi-Fi access on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
-
-
-
-
- Un-check following checkbox in case you do not need the device to be encrypted.
-
+
+
- This configurations can be used to configure Wi-Fi access on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
+
+
+
+
+
+ VPN Settings
+
+
+
+
+
+
+
+ This configurations can be used to configure VPN settings on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+ The configurations below can be applied to the devices where the agent is running in Android Work-Profile.
+
+
+
+
+
+
+
+
+
+
+
+
+ Profile Name
+
+
+
+
+
+
+
+
+
+ Enable System Apps
+
+
+
+
+ ( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps, com.google.android.calculator )
+
+
+
+
+
+ Hide System Apps
+
+
+
+
+ ( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps, com.google.android.calculator )
+
+
+
+
+
+ Unhide System Apps
+
+
+
+
+ ( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps, com.google.android.calculator )
+
+
+
+
+
+ Enable Google Play Store Apps
+
+
+
+
+ ( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps, com.google.android.calculator )
+
+
+
+
+
+
\ No newline at end of file
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-ios.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-ios.hbs
index aec18bda8..612b913d6 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-ios.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-ios.hbs
@@ -1,2923 +1,4679 @@
- This configuration can be used to set a passcode policy to an iOS Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
+ This configuration can be used to set a passcode policy to an iOS Device.
+ Once this configuration profile is installed on a device, corresponding users
+ will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
Force Passcode
-
-
+
+
-
-
-
-
+
+
+
+
Allow simple value
-
-
+
+
-
-
-
-
+
+
+
+
Require alphanumeric value
-
-
+
+
-
-
- Minimum passcode length
-
+
+
+ Minimum passcode length
+
-
-
-
+
+
+
-
-
- Minimum number of complex characters
-
+
+
+ Minimum number of complex characters
+
-
-
-
+
+
+
-
-
- Maximum passcode age in days
- ( Should be in between 1-to-730 days or none )
-
+
+
+ Maximum passcode age in days
+ ( Should be in between 1-to-730 days or none )
+
-
-
-
+
+
+
-
-
- Passcode history
- ( Should be in between 1-to-50 passcodes or none )
-
+
+
+ Passcode history
+ ( Should be in between 1-to-50 passcodes or none )
+
-
-
-
+
+
+
-
-
- Auto Lock Time in minutes
-
+
+
+ Auto Lock Time in minutes
+
-
-
-
+
+
+
-
-
- Grace period in minutes for device lock
-
+
+
+ Grace period in minutes for device lock
+
-
-
-
+
+
+
-
-
- Maximum number of failed attempts
-
+
+
+ Maximum number of failed attempts
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VPN Settings
+
+
+
+
+
+
+
+ This configurations can be used to configure VPN settings on an iOS device.
+ Once this configuration profile is installed on a device, corresponding users will not
+ be able
+ to modify these settings on their devices.
+
+
+
+
+Please note that * sign represents required fields of data.
+
+
+
+
+
+ Server Certificate Issuer Common Name
+
+
+
+
+
+
+
+
+ Server Certificate Common Name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Per App VPN Settings
+
+
+
+
+
+
+
+ This configuration can be used to configure add-on VPN software (per-app VPN),
+ and it works only on VPN services of
+ type 'VPN'. Once this configuration profile is installed on a device,
+ corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+ Please note that * sign represents required fields of data.
+
+
+
+
+
-
-
-
-
-
-
-
- Wi-Fi Settings
-
-
-
-
-
-
-
- These configurations can be used to set how devices connect to your wireless network(s), including the necessary authentication
- information. Once this configuration profile is installed on an iOS device, corresponding users will not be able
- to modify these settings on their devices.
-
+ This configuration can be used to configure app-to-per-app VPN mappings.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+ Please note that * sign represents required fields of data.
+
+
+
+
+ These configurations can be used to set how devices connect to your wireless network(s),
+ including the necessary authentication
+ information. Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+ Service Set Identifier (SSID)
+
+
+
+
+
+
+
+
+
+ Domain Name
+
+
+
+
+ ( For Wi-Fi Hotspot 2.0 negotiation )
+
+
+
+
+
+
+
+
Hidden Network
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Hot Spot
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Enable Service Provider Roaming
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Auto Join
-
-
-
-
-
- Displayed Operator Name
-
+
+
+
+
+
+ Displayed Operator Name
+
-
-
-
-
-
-
- Proxy Setup
-
+
+
+
+
+
+
+ Proxy Setup
+
-
-
-
-
-
-
- For Manual Proxy Setup :
-
-
-
-
-
- Proxy Server
- ( Server URL or IP Address )
+
+
+
+
+
+
+ For Manual Proxy Setup :
+
+
+
+
+
+ Proxy Server
+ ( Server URL or IP Address )
-
-
-
+
+
+
-
-
- Proxy Server Port
+
+
+ Proxy Server Port
-
-
-
+
+
+
-
-
- Proxy Username
-
+
+
+ Proxy Username
+
-
-
-
+
+
+
-
-
- Proxy Password
-
+
+
+ Proxy Password
+
-
-
-
+
+
+
-
-
- Proxy PAC URL
-
+
+
+ Proxy PAC URL
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
Allow Proxy PAC Fallback
-
-
+
+
-
+
-
-
- Encryption Security Type
-
+
+
+ Encryption Security Type
+
-
-
-
-
-
-
- For WEP, WPA or ANY Encryption Security Type :
-
-
-
-
-
- Wi-Fi Password
-
+
+
+
+
+
+
+For WEP, WPA or ANY Encryption Security Type :
+
+
+
+
+ This configuration can be used to create a black list or white list of
+ applications.
-
+
-
-
-
-
-
-
-
- Email Settings
-
-
-
-
-
-
-
- These configurations can be used to define settings for connecting
- to your POP or IMAP email accounts.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
+ These configurations can be used to define settings for connecting
+ to your POP or IMAP email accounts.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
+
+
+
+
Outgoing password same as incoming password
-
-
-
-
-
- Password
-
+
+
+
+
+
+ Password
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AirPlay Settings
+
+
+
+
+
+
+
+ This configuration can be used to define settings for connecting to AirPlay
+ destinations.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
+
(This feature is supported only on iOS 7.0 and later.)
-
+
-
-
-
-
-
-
-
- AirPlay Settings
-
-
-
-
-
-
-
- This configuration can be used to define settings for connecting to AirPlay destinations.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
(This feature is supported only on iOS 7.0 and later.)
-
- This configuration can be used to define settings for connecting to LDAP servers.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
+
+
+
+
+
+
+
+
+
+ LDAP Settings
+
+
+
+
+
+
+
+ This configuration can be used to define settings for connecting to LDAP
+ servers.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
- This configuration can be used to define settings for connecting to CalDAV servers.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
+
+
+
+
+
+
+
+
+
+ Calendar
+
+
+
+
+
+
+
+ This configuration can be used to define settings for connecting to CalDAV
+ servers.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
-
+
+
+
-
-
-
+
+
+
-
-
- Account Description
-
+
+
+ Account Description
+
-
-
-
+
+
+
-
-
- Account Hostname
-
+
+
+ Account Hostname
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
Use Secure Socket Layer ( SSL )
-
-
+
+
-
-
- Account Port
-
+
+
+ Account Port
+
-
-
-
+
+
+
-
-
- Principal URL
+
+
+ Principal URL
-
-
-
+
+
+
-
-
- Account Username
-
+
+
+ Account Username
+
-
-
-
+
+
+
-
-
- Account Password
+
+
+ Account Password
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
- Calendar Subscription
-
-
-
-
-
-
-
- This configuration can be used to define settings for calendar subscriptions.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
+
+
+
+
+
+
+
+
+
+ Calendar Subscription
+
+
+
+
+
+
+
+ This configuration can be used to define settings for calendar subscriptions.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
-
+
+
+
-
-
-
+
+
+
-
-
- Description
+
+
+ Description
-
-
-
+
+
+
-
-
- Account Hostname URL
+
+
+ Account Hostname URL
-
-
-
+
+
+
-
-
-
-
+
+
+
+
Use Secure Socket Layer ( SSL )
-
-
+
+
-
-
- Username
+
+
+ Username
-
-
-
+
+
+
-
-
- Password
+
+
+ Password
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
- Access Point Names ( APN )
-
-
-
-
-
-
-
- These configurations can be used to specify Access Point Names ( APN ).
- Once this configuration profile is installed on an iOS device, corresponding users will not
- be able to modify these settings on their devices.
-
(This feature is not supported on iOS 7.0 and later.)
-
-
+
+
+
+
+
+
+
+
+
+ Access Point Names ( APN )
+
+
+
+
+
+
+
+ These configurations can be used to specify Access Point Names ( APN ).
+ Once this configuration profile is installed on an iOS device, corresponding
+ users will not
+ be able to modify these settings on their devices.
+
(This feature is not supported on iOS 7.0 and later.)
- These configurations can be used to specify Cellular Network Settings on an iOS device.
- Cellular settings cannot be installed if an APN setting is already installed and
- upon successful installation, corresponding users will not be able to modify these
- settings on their devices.
-
(This feature is supported only on iOS 7.0 and later.)
-
-
+
+
+
+
+
+
+
+
+
+ Cellular Network Settings
+
+
+
+
+
+
+
+ These configurations can be used to specify Cellular Network Settings on an iOS
+ device.
+ Cellular settings cannot be installed if an APN setting is already installed and
+ upon successful installation, corresponding users will not be able to modify
+ these
+ settings on their devices.
+
(This feature is supported only on iOS 7.0 and later.)
- These configurations can be used to restrict apps, device features and
- media content available on an iOS device. Once this configuration profile is installed
- on a device, corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
- Restrictions on Device Functionality :
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Restrictions
+
+
+
+
+
+
+
+ These configurations can be used to restrict apps, device features and
+ media content available on an iOS device. Once this configuration profile is installed
+ on a device, corresponding users will not be able to modify these settings on their
+ devices.
+
+
+
+
+
+
+
+
+
+Restrictions on Device Functionality :
+
+
+
+
+
+
+
+
Allow use of camera
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow Chat
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow screenshots
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow AirDrop ( Supervised only )
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow voice dialing while device is locked
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow Siri
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow Siri while device is locked
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Force use of Siri profanity filter
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow Siri to query user-generated content from web ( Supervised only )
-
-
\ No newline at end of file
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-windows.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-windows.hbs
index 3b5bb3bef..16f244845 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-windows.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-windows.hbs
@@ -1,460 +1,568 @@
- This configuration can be used to set a passcode policy to an Windows Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
+
+
+
+
+
+
+ Passcode Policy
+
+
+
+
+
+
+
+ This configuration can be used to set a passcode policy to an Windows Device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
Allow simple value
-
-
+
+
-
-
-
+
+
+
Require alphanumeric value
-
-
+
+
-
-
- Minimum passcode length
+
+
+ Minimum passcode length
-
-
-
+
+
+
-
-
- Minimum number of complex characters
+
+
+ Minimum number of complex characters
-
-
-
+
+
+
-
-
- Maximum passcode age in days
+
+
+ Maximum passcode age in days
-
- ( Should be in between 1-to-730 days or none )
-
-
-
+
+ ( Should be in between 1-to-730 days or none )
+
+
+
-
-
- Passcode history
+
+
+ Passcode history
-
- ( Should be in between 1-to-50 passcodes or none )
-
-
-
+
+ ( Should be in between 1-to-50 passcodes or none )
+
+
+
-
-
- Maximum number of failed attempts
+
+
+ Maximum number of failed attempts
-
-
-
-
+
+
-
+
+
+
-
-
-
-
-
- Restrictions on Camera
-
-
-
-
-
-
-
- This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
+
+
+
+
+
+ Restrictions on Camera
+
+
+
+
+
+
+
+ This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
-
-
-
-
- Un-check following checkbox in case you need to disable camera.
-
-
-
-
-
+
+
+
+
+
+
+ Un-check following checkbox in case you need to disable camera.
+
+
+
+
+
Allow use of camera
-
-
-
-
+
+
-
+
+
+
-
-
-
-
-
- Encryption Settings
-
-
-
-
-
-
-
- This configuration can be used to encrypt data on an Windows device, when the device is locked and
- make it readable when the passcode is entered. Once this configuration profile is installed on a device,
- corresponding users will not be able to modify these settings on their devices.
-
-
+
+
+
+
+
+ Encryption Settings
+
+
+
+
+
+
+
+ This configuration can be used to encrypt data on an Windows device, when the device is locked and
+ make it readable when the passcode is entered. Once this configuration profile is installed on a device,
+ corresponding users will not be able to modify these settings on their devices.
-
-
-
-
- Un-check following checkbox in case you need to disable storage-encryption.
-
-
-
-
-
+
+
+
+
+
+
+ Un-check following checkbox in case you need to disable storage-encryption.
+
+
+
+
+
Enable storage-encryption
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Application Restriction Settings
+
+
+
+
+
+
+
+ This configuration can be used to create a black list or white list of applications.
+
- This configuration can be used to set a passcode policy to an Android Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
+
+
+
+
+
+
+ Passcode Policy
+
+
+
+
+
+
+
+ This configuration can be used to set a passcode policy to an Android Device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
Allow simple value
-
-
+
+
-
-
-
+
+
+
Require alphanumeric value
-
-
+
+
-
-
- Minimum passcode length
+
+
+ Minimum passcode length
-
-
-
-
-
-
- Minimum number of complex characters
+
+
+
+
+
+
+ Minimum number of complex characters
-
-
-
-
-
-
- Maximum passcode age in days
+
+
+
+
+
+
+ Maximum passcode age in days
-
- ( Should be in between 1-to-730 days or none )
-
-
-
+
+ ( Should be in between 1-to-730 days or none )
+
+
+
-
-
- Passcode history
+
+
+ Passcode history
-
- ( Should be in between 1-to-50 passcodes or none )
-
-
-
+
+ ( Should be in between 1-to-50 passcodes or none )
+
+
+
-
-
- Maximum number of failed attempts
+
+
+ Maximum number of failed attempts
-
-
-
-
+
+
-
-
-
-
-
-
-
- Restrictions on Camera
-
-
-
-
-
-
-
- This configuration can be used to restrict the usage of camera on an Android device together with all the applications using the camera.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you need to disable camera.
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Restrictions
+
+
+
+
+
+
+
+ This configurations can be used to restrict certain settings on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Allow use of camera
-
-
-
+
+
+
+ Bellow restrictions will be applied on devices with Android version 5.0 Lollipop onwards only
+
+
+
+
+ Bellow restrictions will be applied on devices with Android version 6.0 Marshmallow onwards only.
+
+
+
+
+
+
+ Disable status bar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Encryption Settings
+
+
+
+
+
+
+
+ This configuration can be used to encrypt data on an Android device, when the device is locked and
+ make it readable when the passcode is entered. Once this configuration profile is installed on a device,
+ corresponding users will not be able to modify these settings on their devices.
+
+
+
+
+
+ Un-check following checkbox in case you do not need the device to be encrypted.
+
+
+
+
+
+
+ Enable storage-encryption
+
+
+
+
+
-
-
-
-
-
-
-
- Encryption Settings
-
-
-
-
-
-
-
- This configuration can be used to encrypt data on an Android device, when the device is locked and
- make it readable when the passcode is entered. Once this configuration profile is installed on a device,
- corresponding users will not be able to modify these settings on their devices.
-
-
+
+
+
+
+
+
+
+
+
+ Wi-Fi Settings
+
+
+
+
+
+
+
+ This configurations can be used to configure Wi-Fi access on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
-
-
-
-
- Un-check following checkbox in case you do not need the device to be encrypted.
-
+
+
- This configurations can be used to configure Wi-Fi access on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
+
+
+
+
+
+
+
+
+
+ VPN Settings
+
+
+
+
+
+
+
+ This configurations can be used to configure VPN settings on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+ The configurations below can be applied to the devices where the agent is running in Android Work-Profile.
+
+
+
+
+
+
+
+
+
+
+
+ Profile Name
+
+
+
+
+
+
+
+
+
+ Enable System Apps
+
+
+
+
+ ( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps, com.google.android.calculator )
+
+
+
+
+
+ Hide System Apps
+
+
+
+
+ ( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps, com.google.android.calculator )
+
+
+
+
+
+ Unhide System Apps
+
+
+
+
+ ( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps, com.google.android.calculator )
+
+
+
+
+
+ Enable Google Play Store Apps
+
+
+
+
+ ( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps, com.google.android.calculator )
+
+
- This configuration can be used to set a passcode policy to an iOS Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
+ This configuration can be used to set a passcode policy to an iOS Device.
+ Once this configuration profile is installed on a device, corresponding users
+ will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
Force Passcode
-
-
+
+
-
-
-
-
+
+
+
+
Allow simple value
-
-
+
+
-
-
-
-
+
+
+
+
Require alphanumeric value
-
-
+
+
-
-
- Minimum passcode length
-
+
+
+ Minimum passcode length
+
-
-
-
+
+
+
-
-
- Minimum number of complex characters
-
+
+
+ Minimum number of complex characters
+
-
-
-
+
+
+
-
-
- Maximum passcode age in days
- ( Should be in between 1-to-730 days or none )
-
+
+
+ Maximum passcode age in days
+ ( Should be in between 1-to-730 days or none )
+
-
-
-
+
+
+
-
-
- Passcode history
- ( Should be in between 1-to-50 passcodes or none )
-
+
+
+ Passcode history
+ ( Should be in between 1-to-50 passcodes or none )
+
-
-
-
+
+
+
-
-
- Auto Lock Time in minutes
-
+
+
+ Auto Lock Time in minutes
+
-
-
-
+
+
+
-
-
- Grace period in minutes for device lock
-
+
+
+ Grace period in minutes for device lock
+
-
-
-
+
+
+
-
-
- Maximum number of failed attempts
-
+
+
+ Maximum number of failed attempts
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VPN Settings
+
+
+
+
+
+
+
+ This configurations can be used to configure VPN settings on an iOS device.
+ Once this configuration profile is installed on a device, corresponding users will not
+ be able
+ to modify these settings on their devices.
+
+
+
+
+Please note that * sign represents required fields of data.
+
+
+
+
+
+ Server Certificate Issuer Common Name
+
+
+
+
+
+
+
+
+ Server Certificate Common Name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Per App VPN Settings
+
+
+
+
+
+
+
+ This configuration can be used to configure add-on VPN software (per-app VPN),
+ and it works only on VPN services of
+ type 'VPN'. Once this configuration profile is installed on a device,
+ corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+ Please note that * sign represents required fields of data.
+
+
+
+
+
-
-
-
-
-
-
-
- Wi-Fi Settings
-
-
-
-
-
-
-
- These configurations can be used to set how devices connect to your wireless network(s), including the necessary authentication
- information. Once this configuration profile is installed on an iOS device, corresponding users will not be able
- to modify these settings on their devices.
-
+ This configuration can be used to configure app-to-per-app VPN mappings.
+ Once this configuration profile is installed on a device, corresponding users will
+ not be able
+ to modify these settings on their devices.
+
+
+
+
+ Please note that * sign represents required fields of data.
+
+
+
+
+ These configurations can be used to set how devices connect to your wireless network(s),
+ including the necessary authentication
+ information. Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+ Service Set Identifier (SSID)
+
-
- ( For Wi-Fi Hotspot 2.0 negotiation )
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ Domain Name
+
+
+
+
+ ( For Wi-Fi Hotspot 2.0 negotiation )
+
+
+
+
+
+
+
+
Hidden Network
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Hot Spot
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Enable Service Provider Roaming
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Auto Join
-
-
-
-
-
- Displayed Operator Name
-
+
+
+
+
+
+ Displayed Operator Name
+
-
-
-
-
-
-
- Proxy Setup
-
+
+
+
+
+
+
+ Proxy Setup
+
-
-
-
-
-
-
- For Manual Proxy Setup :
-
-
-
-
-
- Proxy Server
- ( Server URL or IP Address )
+
+
+
+
+
+
+ For Manual Proxy Setup :
+
+
+
+
+
+ Proxy Server
+ ( Server URL or IP Address )
-
-
-
+
+
+
-
-
- Proxy Server Port
+
+
+ Proxy Server Port
-
-
-
+
+
+
-
-
- Proxy Username
-
+
+
+ Proxy Username
+
-
-
-
+
+
+
-
-
- Proxy Password
-
+
+
+ Proxy Password
+
-
-
-
+
+
+
-
-
- Proxy PAC URL
-
+
+
+ Proxy PAC URL
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
Allow Proxy PAC Fallback
-
-
-
-
-
-
-
- Encryption Security Type
-
-
-
-
-
-
-
-
-
- For WEP, WPA or ANY Encryption Security Type :
-
-
-
-
+ These configurations can be used to define settings for connecting
+ to your POP or IMAP email accounts.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
- Email Settings
-
-
-
-
-
-
-
- These configurations can be used to define settings for connecting
- to your POP or IMAP email accounts.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
+
+
+
Outgoing password same as incoming password
-
-
-
-
-
- Password
-
+
+
+
+
+
+ Password
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AirPlay Settings
+
+
+
+
+
+
+
+ This configuration can be used to define settings for connecting to AirPlay
+ destinations.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
+
(This feature is supported only on iOS 7.0 and later.)
-
+
-
-
-
-
-
-
-
- AirPlay Settings
-
-
-
-
-
-
-
- This configuration can be used to define settings for connecting to AirPlay destinations.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
(This feature is supported only on iOS 7.0 and later.)
-
- This configuration can be used to define settings for connecting to LDAP servers.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
+
+
+
+
+
+
+
+
+
+ LDAP Settings
+
+
+
+
+
+
+
+ This configuration can be used to define settings for connecting to LDAP
+ servers.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
- This configuration can be used to define settings for connecting to CalDAV servers.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
+
+
+
+
+
+
+
+
+
+ Calendar
+
+
+
+
+
+
+
+ This configuration can be used to define settings for connecting to CalDAV
+ servers.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
-
+
+
+
-
-
-
+
+
+
-
-
- Account Description
-
+
+
+ Account Description
+
-
-
-
+
+
+
-
-
- Account Hostname
-
+
+
+ Account Hostname
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
Use Secure Socket Layer ( SSL )
-
-
+
+
-
-
- Account Port
-
+
+
+ Account Port
+
-
-
-
+
+
+
-
-
- Principal URL
+
+
+ Principal URL
-
-
-
+
+
+
-
-
- Account Username
-
+
+
+ Account Username
+
-
-
-
+
+
+
-
-
- Account Password
+
+
+ Account Password
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
- Calendar Subscription
-
-
-
-
-
-
-
- This configuration can be used to define settings for calendar subscriptions.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
+
+
+
+
+
+
+
+
+
+ Calendar Subscription
+
+
+
+
+
+
+
+ This configuration can be used to define settings for calendar subscriptions.
+ Once this configuration profile is installed on an iOS device,
+ corresponding users will not be able to modify these settings on their devices.
-
+
+
+
-
-
-
+
+
+
-
-
- Description
+
+
+ Description
-
-
-
+
+
+
-
-
- Account Hostname URL
+
+
+ Account Hostname URL
-
-
-
+
+
+
-
-
-
-
+
+
+
+
Use Secure Socket Layer ( SSL )
-
-
+
+
-
-
- Username
+
+
+ Username
-
-
-
+
+
+
-
-
- Password
+
+
+ Password
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
- Access Point Names ( APN )
-
-
-
-
-
-
-
- These configurations can be used to specify Access Point Names ( APN ).
- Once this configuration profile is installed on an iOS device, corresponding users will not
- be able to modify these settings on their devices.
-
(This feature is not supported on iOS 7.0 and later.)
-
-
+
+
+
+
+
+
+
+
+
+ Access Point Names ( APN )
+
+
+
+
+
+
+
+ These configurations can be used to specify Access Point Names ( APN ).
+ Once this configuration profile is installed on an iOS device, corresponding
+ users will not
+ be able to modify these settings on their devices.
+
(This feature is not supported on iOS 7.0 and later.)
- These configurations can be used to specify Cellular Network Settings on an iOS device.
- Cellular settings cannot be installed if an APN setting is already installed and
- upon successful installation, corresponding users will not be able to modify these
- settings on their devices.
-
(This feature is supported only on iOS 7.0 and later.)
-
-
+
+
+
+
+
+
+
+
+
+ Cellular Network Settings
+
+
+
+
+
+
+
+ These configurations can be used to specify Cellular Network Settings on an iOS
+ device.
+ Cellular settings cannot be installed if an APN setting is already installed and
+ upon successful installation, corresponding users will not be able to modify
+ these
+ settings on their devices.
+
(This feature is supported only on iOS 7.0 and later.)
- These configurations can be used to restrict apps, device features and
- media content available on an iOS device. Once this configuration profile is installed
- on a device, corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
- Restrictions on Device Functionality :
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Restrictions
+
+
+
+
+
+
+
+ These configurations can be used to restrict apps, device features and
+ media content available on an iOS device. Once this configuration profile is installed
+ on a device, corresponding users will not be able to modify these settings on their
+ devices.
+
+
+
+
+
+
+
+
+
+Restrictions on Device Functionality :
+
+
+
+
+
+
+
+
Allow use of camera
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow Chat
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow screenshots
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow AirDrop ( Supervised only )
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow voice dialing while device is locked
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow Siri
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow Siri while device is locked
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Force use of Siri profanity filter
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Allow Siri to query user-generated content from web ( Supervised only )
-
-
\ No newline at end of file
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.view/public/templates/hidden-operations-windows.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.view/public/templates/hidden-operations-windows.hbs
index 5febc3972..172fff975 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.view/public/templates/hidden-operations-windows.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.view/public/templates/hidden-operations-windows.hbs
@@ -1,460 +1,568 @@
- This configuration can be used to set a passcode policy to an Windows Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
+
+
+
+
+
+
+ Passcode Policy
+
+
+
+
+
+
+
+ This configuration can be used to set a passcode policy to an Windows Device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
Allow simple value
-
-
+
+
-
-
-
+
+
+
Require alphanumeric value
-
-
+
+
-
-
- Minimum passcode length
+
+
+ Minimum passcode length
-
-
-
+
+
+
-
-
- Minimum number of complex characters
+
+
+ Minimum number of complex characters
-
-
-
+
+
+
-
-
- Maximum passcode age in days
+
+
+ Maximum passcode age in days
-
- ( Should be in between 1-to-730 days or none )
-
-
-
+
+ ( Should be in between 1-to-730 days or none )
+
+
+
-
-
- Passcode history
+
+
+ Passcode history
-
- ( Should be in between 1-to-50 passcodes or none )
-
-
-
+
+ ( Should be in between 1-to-50 passcodes or none )
+
+
+
-
-
- Maximum number of failed attempts
+
+
+ Maximum number of failed attempts
-
-
-
-
+
+
-
+
+
+
-
-
-
-
-
- Restrictions on Camera
-
-
-
-
-
-
-
- This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
+
+
+
+
+
+ Restrictions on Camera
+
+
+
+
+
+
+
+ This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
-
-
-
-
- Un-check following checkbox in case you need to disable camera.
-
-
-
-
-
+
+
+
+
+
+
+ Un-check following checkbox in case you need to disable camera.
+
+
+
+
+
Allow use of camera
-
-
-
-
+
+
-
+
+
+
-
-
-
-
-
- Encryption Settings
-
-
-
-
-
-
-
- This configuration can be used to encrypt data on an Windows device, when the device is locked and
- make it readable when the passcode is entered. Once this configuration profile is installed on a device,
- corresponding users will not be able to modify these settings on their devices.
-
-
+
+
+
+
+
+ Encryption Settings
+
+
+
+
+
+
+
+ This configuration can be used to encrypt data on an Windows device, when the device is locked and
+ make it readable when the passcode is entered. Once this configuration profile is installed on a device,
+ corresponding users will not be able to modify these settings on their devices.
-
-
-
-
- Un-check following checkbox in case you need to disable storage-encryption.
-
-
-
-
-
+
+
+
+
+
+
+ Un-check following checkbox in case you need to disable storage-encryption.
+
+
+
+
+
Enable storage-encryption
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Application Restriction Settings
+
+
+
+
+
+
+
+ This configuration can be used to create a black list or white list of applications.
+
\ No newline at end of file
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.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.policy.view/view.hbs
index ff5b1e03d..b7f2adf56 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.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.policy.view/view.hbs
@@ -1,20 +1,4 @@
-{{!
- Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-
- WSO2 Inc. licenses this file to you under the Apache License,
- Version 2.0 (the "License"); you may not use this file except
- in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-}}
+{{#zone "content"}}
{{#defineZone "policy-profile-top"}}
@@ -29,7 +13,8 @@
-
Policy Overview
+
+ Policy Overview
{{#defineZone "policy-detail-properties"}}
@@ -66,9 +51,8 @@
-
-
Profile
- Information
+
+ Profile Information
@@ -88,16 +72,17 @@
-
+{{/zone}}
{{#zone "bottomJs"}}
+
-
-
- {{js "/js/policy-view.js"}}
+ {{js "js/view.js"}}
{{/zone}}
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.view/view.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.view/view.js
index 3f4446f30..2d2a43826 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.view/view.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.view/view.js
@@ -1,25 +1,25 @@
/*
- * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function onRequest(context) {
- var log = new Log("policy-view-edit-unit backend js");
- log.debug("calling policy-view-edit-unit");
- var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
- context.roles = userModule.getRoles().content;
+// var log = new Log("policy-view-edit-unit backend js");
+
+// var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
+// context.roles = userModule.getRoles();
return context;
}
\ No newline at end of file
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.view/view.json b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/view.json
index fd2590129..36351d177 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.view/view.json
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/view.json
@@ -1,3 +1,4 @@
{
- "version" : "1.0.0"
+ "version" : "1.0.0",
+ "extends" : "cdmf.unit.policy.view"
}
\ No newline at end of file
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.wizard/wizard.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.wizard/wizard.js
index 10372ee19..e447231cc 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.wizard/wizard.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.wizard/wizard.js
@@ -18,6 +18,7 @@
function onRequest(context) {
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
+ var deviceModule = require("/app/modules/business-controllers/device.js").deviceModule;
var utility = require('/app/modules/utility.js').utility;
var response = userModule.getRoles();
var wizardPage = {};
@@ -25,7 +26,7 @@ function onRequest(context) {
wizardPage["roles"] = response["content"];
}
var deviceType = context.uriParams.deviceType;
- var typesListResponse = userModule.getPlatforms();
+ var typesListResponse = deviceModule.getDeviceTypes();
if (typesListResponse["status"] == "success") {
for (var type in typesListResponse["content"]) {
if (deviceType == typesListResponse["content"][type]["name"]) {
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 a89cb0031..b4c15eea3 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
@@ -104,7 +104,7 @@
{{/zone}}
{{#zone "bottomJs"}}
{{js "js/nav-menu.js"}}
{{/zone}}
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 c15f80b26..5015563a9 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
@@ -22,6 +22,15 @@ var modalPopup = ".wr-modalpopup",
var emmAdminBasePath = "/api/device-mgt/v1.0";
+//function openCollapsedNav() {
+// $(".wr-hidden-nav-toggle-btn").addClass("active");
+// $("#hiddenNav").slideToggle("slideDown", function () {
+// if ($(this).css("display") == "none") {
+// $(".wr-hidden-nav-toggle-btn").removeClass("active");
+// }
+// });
+//}
+
/*
* set popup maximum height function.
*/
@@ -50,74 +59,93 @@ function hidePopup() {
$(modalPopup).hide();
}
-var updateNotificationCount = function (data, textStatus, jqXHR) {
+/*
+ * QR-code generation function.
+ */
+function generateQRCode(qrCodeClass) {
+ var enrollmentURL = $("#qr-code-modal").data("enrollment-url");
+ $(qrCodeClass).qrcode({
+ text: enrollmentURL,
+ width: 200,
+ height: 200
+ });
+}
+
+function toggleEnrollment() {
+ $(".modalpopup-content").html($("#qr-code-modal").html());
+ generateQRCode(".modalpopup-content .qr-code");
+ showPopup();
+}
+
+var updateNotificationCountOnSuccess = function (data, textStatus, jqXHR) {
+ var notificationBubble = "#notification-bubble";
if (jqXHR.status == 200 && data) {
var responsePayload = JSON.parse(data);
- var newNotificationsCount = responsePayload.count;
+ var newNotificationsCount = responsePayload["count"];
if (newNotificationsCount > 0) {
- $("#notification-bubble").html(newNotificationsCount);
+ $(notificationBubble).html(newNotificationsCount);
+ $(notificationBubble).show();
+ } else {
+ $(notificationBubble).hide();
}
-// } else {
-// $("#notification-bubble").html("Error");
-// }
}
};
-function loadNotificationsPanel() {
- if ("true" == $("#right-sidebar").attr("is-authorized")) {
- var serviceURL = emmAdminBasePath + "/notifications?status=NEW";
- invokerUtil.get(serviceURL, updateNotificationCount, hideNotificationCount);
- loadNewNotifications();
- } else {
- $("#notification-bubble-wrapper").remove();
- }
+function updateNotificationCountOnError() {
+ var notificationBubble = "#notification-bubble";
+ $(notificationBubble).html("Error");
+ $(notificationBubble).show();
}
-function hideNotificationCount(jqXHR) {
- if (jqXHR.status == 404) {
- // this means "no new notifications to show"
- $("#notification-bubble").hide();
+function loadNewNotificationsOnSideViewPanel() {
+ if ($("#right-sidebar").attr("is-authorized") == "false") {
+ $("#notification-bubble-wrapper").remove();
} else {
- $("#notification-bubble").html("Error");
+ var serviceURL = emmAdminBasePath + "/notifications?status=NEW";
+ invokerUtil.get(serviceURL, updateNotificationCountOnSuccess, updateNotificationCountOnError);
+ loadNewNotifications();
}
}
function loadNewNotifications() {
var messageSideBar = ".sidebar-messages";
- if ($("#right-sidebar").attr("is-authorized") == "true") {
+ if ($("#right-sidebar").attr("is-authorized") == "false") {
+ $(messageSideBar).html("
You are not authorized to view notifications.
");
+ } else {
var notifications = $("#notifications");
var currentUser = notifications.data("currentUser");
$.template("notification-listing", notifications.attr("src"), function (template) {
var serviceURL = emmAdminBasePath + "/notifications?status=NEW";
-
- var successCallback = function (data, textStatus, jqXHR) {
- if (jqXHR.status == 200 && data) {
- var viewModel = {};
- var responsePayload = JSON.parse(data);
-
- if (responsePayload.notifications) {
- viewModel.notifications = responsePayload.notifications;
- if (responsePayload.count > 0) {
- $(messageSideBar).html(template(viewModel));
+ invokerUtil.get(
+ serviceURL,
+ // on success
+ function (data, textStatus, jqXHR) {
+ if (jqXHR.status == 200 && data) {
+ var viewModel = {};
+ var responsePayload = JSON.parse(data);
+ if (responsePayload["notifications"]) {
+ if (responsePayload.count > 0) {
+ viewModel["notifications"] = responsePayload["notifications"];
+ $(messageSideBar).html(template(viewModel));
+ } else {
+ $(messageSideBar).html("
No new notifications found...
");
+ }
} else {
- $(messageSideBar).html("
No new notifications found...
");
+ $(messageSideBar).html("
Unexpected error " +
+ "occurred while loading new notifications.
");
}
- } else {
- $(messageSideBar).html("
Unexpected error occurred while loading new notifications.
");
+ }
+ },
+ // on error
+ function (jqXHR) {
+ if (jqXHR.status = 500) {
+ $(messageSideBar).html("
Unexpected error occurred while trying " +
+ "to retrieve any new notifications.
");
}
}
- };
- var errorCallback = function (jqXHR) {
- if (jqXHR.status = 500) {
- $(messageSideBar).html("
Unexpected error occurred while trying " +
- "to retrieve any new notifications.