+
Please note that * sign represents required fields of data.
-
-
-
-
-
-
-
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/js/android-policy-view.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/js/android-policy-view.js
index 0dba7a2ed..7afcd4b66 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/js/android-policy-view.js
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/js/android-policy-view.js
@@ -166,6 +166,33 @@ var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneI
$(paneSelector).addClass("hidden");
}
};
+
+/**
+ * Method to switch panes based on the selected radio button.
+ *
+ * The method will un hide the element with the id (paneIdPrefix + selectElement.value)
+ *
+ * @param selectElement selected HTML element
+ * @param paneIdPrefix prefix of the id of the pane to un hide.
+ * @param valueSet applicable value set
+ */
+var switchPaneAgainstValueSetForRadioButtons = function (selectElement, paneIdPrefix, valueSet) {
+ var selectedValueOnChange = selectElement.value;
+ var paneSelector = "#" + paneIdPrefix;
+ for (var i = 0; i < valueSet.length; ++i) {
+ if (selectedValueOnChange !== valueSet[i]) {
+ if ($(paneSelector).hasClass("expanded")) {
+ $(paneSelector).removeClass("expanded");
+ }
+ $(paneSelector + valueSet[i]).slideUp();
+ } else {
+ if (!$(paneSelector).hasClass("expanded")) {
+ $(paneSelector).addClass("expanded");
+ }
+ $(paneSelector + selectedValueOnChange).slideDown();
+ }
+ }
+};
// End of HTML embedded invoke methods
/**
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/templates/android-policy-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/templates/android-policy-view.hbs
index eb7033388..1cce8875b 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/templates/android-policy-view.hbs
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/templates/android-policy-view.hbs
@@ -968,7 +968,8 @@
-
+
Global Proxy Settings
@@ -984,79 +985,128 @@
device. Once this configuration profile is installed on a device, all the network traffic
will be routed through the proxy server.
-
- This method requires the caller to be the device owner.
-
-
- This proxy is only a recommendation and it is possible that some apps will ignore it.
-
+
Please note that * sign represents required fields of data.
-
-
- Proxy Host
-
-
-
-
-
-
-
-
- Proxy Port
-
-
-
-
-
- Port number should be between 0 - 65535
+
+ Proxy Configuration Type
+
+
+
+
+
+
+
+
+ Manual
+
-
-
-
-
- Excluded List
+
+
-
+ title="Proxy configurations will be automatically fetched from Proxy PAC file.">
+ Auto
-
-
-
- Username
-
-
-
-
-
+
+
+
+ Proxy Host
+
+
+
+
+
+
+
+
+ Proxy Port
+
+
+
+
+
+ Target port should be between 0 - 65535
+
+
+
+
+
+ Proxy Exclusion List
+
+
+
+
+
+
+
+
+ Username
+
+
+
+
+
+
+
+
+ Password
+
+
+
+
+
+
-
-
- Password
-
-
-
-
-
+
+
+
+ Proxy PAC File URL
+
+
+
+
+
+
-
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/js/android-policy-operations.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/js/android-policy-operations.js
index 09f1838c2..19d522c3d 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/js/android-policy-operations.js
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/js/android-policy-operations.js
@@ -251,38 +251,50 @@ var validatePolicyProfile = function () {
// initializing continueToCheckNextInputs to true
continueToCheckNextInputs = true;
- var proxyHost = $("input#proxy-host").val();
- var proxyPort = $("input#proxy-port").val();
- if (!proxyHost) {
- validationStatus = {
- "error": true,
- "subErrorMsg": "Proxy server host name is required.",
- "erroneousFeature": operation
- };
- continueToCheckNextInputs = false;
- }
+ if ($("input#manual-proxy-configuration-radio-button").is(":checked")) {
+ var proxyHost = $("input#proxy-host").val();
+ var proxyPort = $("input#proxy-port").val();
+ if (!proxyHost) {
+ validationStatus = {
+ "error": true,
+ "subErrorMsg": "Proxy server host name is required.",
+ "erroneousFeature": operation
+ };
+ continueToCheckNextInputs = false;
+ }
- if (!proxyPort) {
- validationStatus = {
- "error": true,
- "subErrorMsg": "Proxy server port is required.",
- "erroneousFeature": operation
- };
- continueToCheckNextInputs = false;
- }else if (!$.isNumeric(proxyPort)) {
- validationStatus = {
- "error": true,
- "subErrorMsg": "Proxy server port requires a number input.",
- "erroneousFeature": operation
- };
- continueToCheckNextInputs = false;
- } else if (!inputIsValidAgainstRange(proxyPort, 0, 65535)) {
- validationStatus = {
- "error": true,
- "subErrorMsg": "Proxy server port is not within the range of valid port numbers.",
- "erroneousFeature": operation
- };
- continueToCheckNextInputs = false;
+ if (!proxyPort) {
+ validationStatus = {
+ "error": true,
+ "subErrorMsg": "Proxy server port is required.",
+ "erroneousFeature": operation
+ };
+ continueToCheckNextInputs = false;
+ } else if (!$.isNumeric(proxyPort)) {
+ validationStatus = {
+ "error": true,
+ "subErrorMsg": "Proxy server port requires a number input.",
+ "erroneousFeature": operation
+ };
+ continueToCheckNextInputs = false;
+ } else if (!inputIsValidAgainstRange(proxyPort, 0, 65535)) {
+ validationStatus = {
+ "error": true,
+ "subErrorMsg": "Proxy server port is not within the range of valid port numbers.",
+ "erroneousFeature": operation
+ };
+ continueToCheckNextInputs = false;
+ }
+ } else if ($("input#auto-proxy-configuration-radio-button").is(":checked")) {
+ var pacFileUrl = $("input#proxy-pac-url").val();
+ if (!pacFileUrl) {
+ validationStatus = {
+ "error": true,
+ "subErrorMsg": "Proxy pac file URL is required for proxy auto config.",
+ "erroneousFeature": operation
+ };
+ continueToCheckNextInputs = false;
+ }
}
// at-last, if the value of continueToCheckNextInputs is still true
@@ -795,6 +807,33 @@ var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneI
}
};
+/**
+ * Method to switch panes based on the selected radio button.
+ *
+ * The method will un hide the element with the id (paneIdPrefix + selectElement.value)
+ *
+ * @param selectElement selected HTML element
+ * @param paneIdPrefix prefix of the id of the pane to un hide.
+ * @param valueSet applicable value set
+ */
+var switchPaneAgainstValueSetForRadioButtons = function (selectElement, paneIdPrefix, valueSet) {
+ var selectedValueOnChange = selectElement.value;
+ var paneSelector = "#" + paneIdPrefix;
+ for (var i = 0; i < valueSet.length; ++i) {
+ if (selectedValueOnChange !== valueSet[i]) {
+ if ($(paneSelector).hasClass("expanded")) {
+ $(paneSelector).removeClass("expanded");
+ }
+ $(paneSelector + valueSet[i]).slideUp();
+ } else {
+ if (!$(paneSelector).hasClass("expanded")) {
+ $(paneSelector).addClass("expanded");
+ }
+ $(paneSelector + selectedValueOnChange).slideDown();
+ }
+ }
+};
+
// End of HTML embedded invoke methods
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/templates/android-policy-operations.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/templates/android-policy-operations.hbs
index 5c51b323b..376405224 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/templates/android-policy-operations.hbs
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/templates/android-policy-operations.hbs
@@ -1003,79 +1003,133 @@
device. Once this configuration profile is installed on a device, all the network traffic
will be routed through the proxy server.
-
- This method requires the caller to be the device owner.
-
-
- This proxy is only a recommendation and it is possible that some apps will ignore it.
-