changing the used space to free space

revert-dabc3590
inoshperera 7 years ago
parent 89c4ab3fbd
commit cf0d38d43e

@ -55,7 +55,7 @@
<div class="vital-strip">
{{#if device.deviceInfoAvailable}}
{{#if device.BatteryLevel}}
<p title="Total used /Total available storage" data-toggle="tooltip">
<p title="Battery level percentage" data-toggle="tooltip">
<i class="icon fw fw-battery fw-2x"></i>
<span>{{device.BatteryLevel.value}}%</span>
</p>
@ -67,17 +67,17 @@
</p>
{{/if}}
{{#if device.internalMemory}}
<p title="Total used /Total available internal storage" data-toggle="tooltip">
<p title="Free space / Total available internal storage" data-toggle="tooltip">
<i class="icon fw fw-hdd fw-2x fw-rotate-90"></i>
<span>{{device.internalMemory.usage}}</span>
<span class="memory-amt">GB Used/{{device.internalMemory.total}}GB Total</span>
<span class="memory-amt">GB Free/{{device.internalMemory.total}}GB Total</span>
</p>
{{/if}}
{{#if device.externalMemory}}
<p title="Total used /Total available external storage" data-toggle="tooltip">
<p title="Free space / Total available external storage" data-toggle="tooltip">
<i class="icon fw fw-usb-drive fw-2x"></i>
<span>{{device.externalMemory.usage}}</span>
<span class="memory-amt">GB Used/{{device.externalMemory.total}}GB Total</span>
<span class="memory-amt">GB Free/{{device.externalMemory.total}}GB Total</span>
</p>
{{/if}}
{{else}}

@ -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;
}

Loading…
Cancel
Save