From cf0d38d43e0c4e7e1024e01d6d3404d90df7d7fa Mon Sep 17 00:00:00 2001 From: inoshperera Date: Fri, 19 Jan 2018 14:19:00 +0530 Subject: [PATCH] changing the used space to free space --- .../device-view.hbs | 10 +++++----- .../device-view.js | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) 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.device-view/device-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.device-view/device-view.hbs index fbb4841ef..1c0081a93 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.device-view/device-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.device-view/device-view.hbs @@ -55,7 +55,7 @@
{{#if device.deviceInfoAvailable}} {{#if device.BatteryLevel}} -

+

{{device.BatteryLevel.value}}%

@@ -67,17 +67,17 @@

{{/if}} {{#if device.internalMemory}} -

+

{{device.internalMemory.usage}} - GB Used/{{device.internalMemory.total}}GB Total + GB Free/{{device.internalMemory.total}}GB Total

{{/if}} {{#if device.externalMemory}} -

+

{{device.externalMemory.usage}} - GB Used/{{device.externalMemory.total}}GB Total + GB Free/{{device.externalMemory.total}}GB Total

{{/if}} {{else}} 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.device-view/device-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.device-view/device-view.js index 6135e0780..338320b3f 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.device-view/device-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.device-view/device-view.js @@ -153,11 +153,11 @@ function onRequest(context) { } viewModel["internalMemory"] = {}; - viewModel["internalMemory"]["total"] = replaceNaNVal(Math. - round(filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] * 100) / 100); if (filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] != 0) { - viewModel["internalMemory"]["usage"] = replaceNaNVal(Math.round((filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] - - filteredDeviceData["latestDeviceInfo"]["internalAvailableMemory"]) * 100) / 100); + viewModel["internalMemory"]["total"] = replaceNaNVal(Math.round + (filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] * 100) / 100); + viewModel["internalMemory"]["usage"] = replaceNaNVal(Math.round + (filteredDeviceData["latestDeviceInfo"]["internalAvailableMemory"] * 100) / 100); } else { viewModel["internalMemory"]["usage"] = 0; } @@ -167,8 +167,8 @@ function onRequest(context) { viewModel["externalMemory"]["total"] = replaceNaNVal(Math.round (filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 100) / 100); viewModel["externalMemory"]["usage"] = replaceNaNVal(Math. - round((filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] - - filteredDeviceData["latestDeviceInfo"]["externalAvailableMemory"])* 100) /100); + round(filteredDeviceData["latestDeviceInfo"]["externalAvailableMemory"]* 100) + /100); } else { viewModel["externalMemory"]["usage"] = 0; }