From a92070f16ef5ea99bd094dbc262503ed19ea42d2 Mon Sep 17 00:00:00 2001 From: dilanua Date: Fri, 23 Sep 2016 11:45:13 +0530 Subject: [PATCH] Fix for jira: https://wso2.org/jira/browse/EMM-1617 --- .../app/units/mdm.unit.device.view/view.hbs | 123 ++++++++++-------- .../app/units/mdm.unit.device.view/view.js | 4 + 2 files changed, 70 insertions(+), 57 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.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 70ef8f508..6cd497fc8 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 @@ -163,85 +163,94 @@

Not available yet

{{/equal}} - {{#if device.viewModel.BatteryLevel}} -
-
-
-
BATTERY
-
-
-
- {{device.viewModel.BatteryLevel.value}} % + {{#if device.viewModel.deviceInfo}} + {{#if device.viewModel.BatteryLevel}} +
+
+
+
BATTERY
+
+
+
+ {{device.viewModel.BatteryLevel.value}} % +
-
- {{/if}} - {{#if device.viewModel.cpuUsage}} -
-
-
-
CPU Usage
-
-
-
- {{device.viewModel.cpuUsage.value}} % + {{/if}} + + + + + + + + + + + + + + + + {{#if device.viewModel.ramUsage}} +
+
+
+
RAM Usage
+
+
+
+ {{device.viewModel.ramUsage.value}} % +
-
- {{/if}} - {{#if device.viewModel.ramUsage}} -
-
-
-
RAM Usage
-
-
-
- {{device.viewModel.ramUsage.value}} % -
-
-
-
-
- {{/if}} - {{#if device.viewModel.internalMemory}} -
-
-
-
Local Storage
-
-
-
- {{device.viewModel.internalMemory.usage}} % + {{/if}} + {{#if device.viewModel.internalMemory}} +
+
+
+
Local Storage
+
+
+
+ {{device.viewModel.internalMemory.usage}} % TOTAL OF {{device.viewModel.internalMemory.total}} GB +
-
- {{/if}} - {{#if device.viewModel.externalMemory}} -
-
-
-
External Storage
-
-
-
- {{device.viewModel.externalMemory.usage}} % + {{/if}} + {{#if device.viewModel.externalMemory}} +
+
+
+
External Storage
+
+
+
+ {{device.viewModel.externalMemory.usage}} % TOTAL OF {{device.viewModel.externalMemory.total}} GB +
+ {{/if}} + {{else}} +
+

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

{{/if}}
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 d4a932630..8ba22bcd0 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 @@ -76,6 +76,8 @@ function onRequest(context) { deviceInfo = info; if (device["deviceInfo"]) { + viewModel["deviceInfo"] = true; + viewModel["model"] = device["deviceInfo"]["deviceModel"]; viewModel["vendor"] = device["deviceInfo"]["vendor"]; viewModel["lastUpdatedTime"] = device["deviceInfo"]["updatedTime"]. @@ -117,6 +119,8 @@ function onRequest(context) { } else { viewModel["externalMemory"]["usage"] = 0; } + } else { + viewModel["deviceInfo"] = false; } } else if (device["type"] == "windows") { viewModel["imei"] = device["properties"]["IMEI"];