inoshperera 7 years ago
parent ab2332d34c
commit 89c4ab3fbd

@ -163,13 +163,12 @@ function onRequest(context) {
} }
viewModel["externalMemory"] = {}; viewModel["externalMemory"] = {};
viewModel["externalMemory"]["total"] = replaceNaNVal(Math.
round(filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 100) / 100);
if (filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] != 0) { if (filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] != 0) {
viewModel["externalMemory"]["total"] = replaceNaNVal(Math.round
(filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 100) / 100);
viewModel["externalMemory"]["usage"] = replaceNaNVal(Math. viewModel["externalMemory"]["usage"] = replaceNaNVal(Math.
round((filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] - round((filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] -
filteredDeviceData["latestDeviceInfo"]["externalAvailableMemory"]) filteredDeviceData["latestDeviceInfo"]["externalAvailableMemory"])* 100) /100);
/ filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 10000) / 100);
} else { } else {
viewModel["externalMemory"]["usage"] = 0; viewModel["externalMemory"]["usage"] = 0;
} }

Loading…
Cancel
Save