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.platform.configuration/public/js/platform-configuration.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.platform.configuration/public/js/platform-configuration.js index 4ad5d5341..a179701e5 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.platform.configuration/public/js/platform-configuration.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.platform.configuration/public/js/platform-configuration.js @@ -227,11 +227,8 @@ $(document).ready(function () { addConfigAPI, addConfigFormData, function (data, textStatus, jqXHR) { - data = JSON.parse(data); - if (jqXHR.status == 201) { - $("#config-save-form").addClass("hidden"); - $("#record-created-msg").removeClass("hidden"); - } + $("#config-save-form").addClass("hidden"); + $("#record-created-msg").removeClass("hidden"); }, function (data) { if (data.status == 500) { 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/public/js/device-listing.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js index fbc60b3a1..5bcc4c3bd 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js @@ -21,9 +21,9 @@ * when a user clicks on the list item * initial mode and with out select mode. */ -function InitiateViewOption(url) { +function InitiateViewOption() { if ($(".select-enable-btn").text() == "Select") { - $(location).attr('href', url); + $(location).attr('href', $(this).data("url")); } } @@ -148,8 +148,8 @@ function loadDevices() { if (row.status != 'REMOVED') { url = "device/" + deviceType + "?id=" + deviceIdentifier; } - return '
' + - '' + + return '
' + + '' + '
' } }, 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 index f56ba9556..65b3fe27d 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/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 @@ -25,12 +25,13 @@ var InitiateViewOption = null; var ownership = deviceId.data("ownership"); var operationTable; + positionArrow($(".media .list-group-item.active"),"#device_details_tab"); $(".media.tab-responsive [data-toggle=tab]").on("shown.bs.tab", function (e) { var activeTabPane = $(e.target).attr("href"); var activeListGroupItem = $(".media .list-group-item.active"); $(activeTabPane).removeClass("visible-xs-block"); $(activeTabPane).siblings().not(".arrow-left").addClass("visible-xs-block"); - positionArrow(activeListGroupItem); + positionArrow(activeListGroupItem,activeTabPane); }); $(".media.tab-responsive .tab-content").on("shown.bs.collapse", function (e) { @@ -50,7 +51,7 @@ var InitiateViewOption = null; } }); - function positionArrow(selectedTab) { + function positionArrow(selectedTab,activeTabPane) { var selectedTabHeight = $(selectedTab).innerHeight(); var arrowPosition = 0; var totalHeight = 0; @@ -75,6 +76,12 @@ var InitiateViewOption = null; } $(arrow).css("top", arrowPosition - 10); + + var listHeight = $(".tab-responsive .media-left ul").height(); + var paneHeight = $(activeTabPane).height(); + if(listHeight > paneHeight){ + $(activeTabPane).height(listHeight); + } } function loadOperationsLog(update) { @@ -185,17 +192,17 @@ var InitiateViewOption = null; $("#applications-list-container").html(content); } else { $("#applications-list-container"). - html("

No applications found.

" + - "

Please try refreshing the list in a while.

"); + html("

No applications found.

" + + "

Please try refreshing the list in a while.

"); } } }, // error-callback function () { $("#applications-list-container"). - html("

 Loading application list " + - "was not successful. please try refreshing the list in a while.

"); - }); + html("

 Loading application list " + + "was not successful. please try refreshing the list in a while.

"); + }); }); } @@ -251,50 +258,50 @@ var InitiateViewOption = null; // error-callback function () { $("#policy-list-container"). - html("
" + - "

" + - "" + - "Loading policy compliance related data " + - "was not successful. please try refreshing in a while." + - "

" + - "
" + - "

" + - "

" + - "

" - ); + html("
" + + "

" + + "" + + "Loading policy compliance related data " + + "was not successful. please try refreshing in a while." + + "

" + + "
" + + "

" + + "

" + + "

" + ); } ); } } else if ((jqXHR.status == 200 && !data)) { $("#policy-spinner").addClass("hidden"); $("#policy-list-container"). - html("
" + - "

" + - "" + - "There is currently no effective policy applied for this device." + - "

" + - "
" + - "

" + - "

" + - "

" - ); + html("
" + + "

" + + "" + + "There is currently no effective policy applied for this device." + + "

" + + "
" + + "

" + + "

" + + "

" + ); } }, // error-callback function () { $("#policy-spinner").addClass("hidden"); $("#policy-list-container"). - html("
" + - "

" + - "" + - "Loading policy compliance related data " + - "was not successful. please try refreshing in a while." + - "

" + - "
" + - "

" + - "

" + - "

" - ); + html("
" + + "

" + + "" + + "Loading policy compliance related data " + + "was not successful. please try refreshing in a while." + + "

" + + "
" + + "

" + + "

" + + "

" + ); } ); } @@ -309,6 +316,10 @@ var InitiateViewOption = null; loadApplicationsList(); loadPolicyCompliance(); + if ($("#device_details_tab").length == 0) { + $(".device-detail-body").addClass("hidden"); + } + $("#refresh-policy").click(function () { $("#policy-spinner").removeClass("hidden"); loadPolicyCompliance(); 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 index a97ce7518..673806e89 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/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 @@ -1,7 +1,7 @@
-
+
{{#equal deviceType "android"}} @@ -18,7 +18,7 @@ {{deviceType}}
-
+
@@ -48,7 +48,7 @@
-
+
- - - - + + + + {{#each complianceFeatures}} diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.hbs index d44d94957..fe0163522 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.hbs @@ -6,7 +6,8 @@ {{#if deviceFound}} {{#if isAuthorized}}

+ data-deviceid="{{deviceView.deviceIdentifier}}" data-type="{{deviceView.deviceType}}" + data-ownership="{{deviceView.ownership}}"> Device {{deviceView.name}} {{#if deviceView.model}} @@ -15,413 +16,463 @@ {{/if}}

-
-
-
-
-
-
Device Overview
- {{#defineZone "device-detail-properties"}} -
FeatureCompliance
FeatureCompliance
- - {{#if deviceView.deviceIdentifier}} - - - - - {{/if}} - {{#if deviceView.name}} - - - - - {{/if}} - {{#if deviceView.vendor}} - {{#if deviceView.model}} +
+
+
+
+
+
Device + Overview +
+ {{#defineZone "device-detail-properties"}} +
Device ID{{deviceView.deviceIdentifier}}
Name{{deviceView.name}}
+ + {{#if deviceView.deviceIdentifier}} - - + + {{/if}} + {{#if deviceView.name}} + + + + + {{/if}} + {{#if deviceView.vendor}} + {{#if deviceView.model}} + + + + + {{/if}} + {{/if}} + {{#if deviceView.status}} + + + + + {{/if}} + {{#if deviceView.owner}} + + + + + {{/if}} + {{#if deviceView.ownership}} + + + + + {{/if}} + {{#if deviceView.imei}} + + + + + {{/if}} + {{#if deviceView.udid}} + + + + + {{/if}} + {{#if deviceView.osBuildDate}} + + + + + {{/if}} + {{#if deviceView.phoneNumber}} + + + + + {{/if}} + {{#if deviceView.lastUpdatedTime}} + + + + + {{/if}} + +
Model{{deviceView.vendor}} {{deviceView.model}}Device ID{{deviceView.deviceIdentifier}}
Name{{deviceView.name}}
Model{{deviceView.vendor}} {{deviceView.model}}
Status + {{#equal deviceView.status "ACTIVE"}}  Active{{/equal}} + {{#equal deviceView.status "INACTIVE"}}  Inactive{{/equal}} + {{#equal deviceView.status "BLOCKED"}}  Blocked{{/equal}} + {{#equal deviceView.status "REMOVED"}}  Removed{{/equal}} +
Owner{{deviceView.owner}}
Ownership{{deviceView.ownership}}
IMEI{{deviceView.imei}}
UDID{{deviceView.udid}}
Firmware Build + Date + {{deviceView.osBuildDate}}
Phone Number{{deviceView.phoneNumber}}
Last Update{{deviceView.lastUpdatedTime}}
+ {{/defineZone}} +
+ Operations +
+
+ {{unit "mdm.unit.device.operation-bar" deviceType=deviceView.deviceType ownership=deviceView.ownership}} +
+
+
+
+ -
-
-
- - {{#defineZone "device-detail-properties"}} -
-
- + {{#defineZone "device-detail-properties"}} +
+
+ -
- - -
-
-
- - {{#equal deviceView.deviceType "windows"}} -
-

Not available yet

-
- {{/equal}} - {{#if deviceView.deviceInfoAvailable}} - {{#if deviceView.BatteryLevel}} -
-
-
-
BATTERY
-
-
-
- {{deviceView.BatteryLevel.value}} % -
-
-
-
+ {{#if deviceView.isNotWindows}} +
+ - {{/if}} - - - - - - + +
+
+
+ + {{#equal deviceView.deviceType "windows"}} +
+

Not + available yet

+
+ {{/equal}} + {{#if deviceView.deviceInfoAvailable}} + {{#if deviceView.BatteryLevel}} +
+
+
+
BATTERY
+
+
+
+ {{deviceView.BatteryLevel.value}} % +
+
+
+
+
+ {{/if}} + + + + + + - + - - - - - - {{#if deviceView.ramUsage}} -
-
-
-
RAM Usage
-
-
-
- {{deviceView.ramUsage.value}} % -
-
-
-
-
- {{/if}} - {{#if deviceView.internalMemory}} -
-
-
-
Local Storage
-
-
-
- {{deviceView.internalMemory.usage}} % - + + + + + + {{#if deviceView.ramUsage}} +
+
+
+
RAM Usage
+
+
+
+ {{deviceView.ramUsage.value}} % +
+
+
+
+
+ {{/if}} + {{#if deviceView.internalMemory}} +
+
+
+
Local Storage
+
+
+
+
+ {{deviceView.internalMemory.usage}} % + TOTAL OF {{deviceView.internalMemory.total}} GB -
-
-
-
-
- {{/if}} - {{#if deviceView.externalMemory}} -
-
-
-
External Storage
-
-
-
- {{deviceView.externalMemory.usage}} % - +
+
+
+
+
+ {{/if}} + {{#if deviceView.externalMemory}} +
+
+
+
External Storage
+
+
+
+ {{deviceView.externalMemory.usage}} % + TOTAL OF {{deviceView.externalMemory.total}} GB +
+
+
+
+
+ {{/if}} + {{else}} +
+

+ + Battery, RAM and Storage related information are not + available yet. +

-
+ {{/if}}
- {{/if}} - {{else}} -
-

- - Battery, RAM and Storage related information are not available yet. -

{{/if}} -
-
-
-
-
- -
{{else}}

diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.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/view.js index 6ec083d68..a5505e8f0 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.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/view.js @@ -35,6 +35,10 @@ function onRequest(context) { var viewModel = {}; if (filteredDeviceData["type"]) { viewModel["deviceType"] = filteredDeviceData["type"]; + viewModel.isNotWindows = true; + if (viewModel["deviceType"] == "windows") { + viewModel.isNotWindows = false; + } } if (filteredDeviceData["deviceIdentifier"]) { viewModel["deviceIdentifier"] = filteredDeviceData["deviceIdentifier"]; @@ -45,6 +49,10 @@ function onRequest(context) { if (filteredDeviceData["enrolmentInfo"]) { if (filteredDeviceData["enrolmentInfo"]["status"]) { viewModel["status"] = filteredDeviceData["enrolmentInfo"]["status"]; + viewModel.isActive = false ; + if (filteredDeviceData["enrolmentInfo"]["status"]== "ACTIVE") { + viewModel.isActive = true ; + } } if (filteredDeviceData["enrolmentInfo"]["owner"]) { viewModel["owner"] = filteredDeviceData["enrolmentInfo"]["owner"]; @@ -139,7 +147,7 @@ function onRequest(context) { } if (filteredDeviceData["latestDeviceInfo"]["updatedTime"]) { viewModel["lastUpdatedTime"] = filteredDeviceData["latestDeviceInfo"]["updatedTime"]. - substr(0, filteredDeviceData["latestDeviceInfo"]["updatedTime"].indexOf("+")); + substr(0, filteredDeviceData["latestDeviceInfo"]["updatedTime"].indexOf("+")); } viewModel["BatteryLevel"] = {}; viewModel["BatteryLevel"]["value"] = filteredDeviceData["latestDeviceInfo"]["batteryLevel"]; @@ -195,6 +203,5 @@ function onRequest(context) { } else { deviceViewData["deviceFound"] = false; } - return deviceViewData; } \ 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/js/policy-create.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js index d0598ea6f..7778f71bb 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js @@ -354,7 +354,23 @@ validateStep["policy-profile"] = function () { }; continueToCheckNextInputs = false; } - + // For the secure wifi types, it is required to have a password + var wifiTypeUIElement = $("#wifi-type"); + var wifiType = wifiTypeUIElement.find("option:selected").val(); + if (wifiTypeUIElement.is("input:checkbox")) { + wifiType = wifiTypeUIElement.is(":checked").toString(); + } + if (wifiType != "none") { + if (!$("#wifi-password").val()) { + validationStatus = { + "error": true, + "subErrorMsg": "Password is required for the wifi security type " + wifiType + ". " + + "Please provide a password to proceed.", + "erroneousFeature": operation + }; + continueToCheckNextInputs = false; + } + } // at-last, if the value of continueToCheckNextInputs is still true // this means that no error is found if (continueToCheckNextInputs) { 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-android.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs index f05d320f9..0756465ed 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs @@ -879,7 +879,7 @@