dilanua 8 years ago
parent 4947664b4b
commit a92070f16e

@ -163,85 +163,94 @@
<h4 class="remove-margin"><i class="icon fw fw-info"></i>Not available yet</h4> <h4 class="remove-margin"><i class="icon fw fw-info"></i>Not available yet</h4>
</div> </div>
{{/equal}} {{/equal}}
{{#if device.viewModel.BatteryLevel}} {{#if device.viewModel.deviceInfo}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> {{#if device.viewModel.BatteryLevel}}
<div class="col-md-12"> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="wr-stats-board-tile"> <div class="col-md-12">
<div class="tile-name">BATTERY</div> <div class="wr-stats-board-tile">
<div> <div class="tile-name">BATTERY</div>
<div class="tile-icon"><i class="fw fw-battery"></i></div> <div>
<div class="tile-stats"> <div class="tile-icon"><i class="fw fw-battery"></i></div>
{{device.viewModel.BatteryLevel.value}} % <div class="tile-stats">
{{device.viewModel.BatteryLevel.value}} %
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> {{/if}}
{{/if}} <!--{{#if device.viewModel.cpuUsage}}-->
{{#if device.viewModel.cpuUsage}} <!--<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">-->
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <!--<div class="col-md-12">-->
<div class="col-md-12"> <!--<div class="wr-stats-board-tile">-->
<div class="wr-stats-board-tile"> <!--<div class="tile-name">CPU Usage</div>-->
<div class="tile-name">CPU Usage</div> <!--<div>-->
<div> <!--<div class="tile-icon"><i class="fw fw-dashboard"></i></div>-->
<div class="tile-icon"><i class="fw fw-dashboard"></i></div> <!--<div class="tile-stats">-->
<div class="tile-stats"> <!--{{device.viewModel.cpuUsage.value}} %-->
{{device.viewModel.cpuUsage.value}} % <!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--{{/if}}-->
{{#if device.viewModel.ramUsage}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12">
<div class="wr-stats-board-tile">
<div class="tile-name">RAM Usage</div>
<div>
<div class="tile-icon"><i class="fw fw-hardware"></i></div>
<div class="tile-stats">
{{device.viewModel.ramUsage.value}} %
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> {{/if}}
{{/if}} {{#if device.viewModel.internalMemory}}
{{#if device.viewModel.ramUsage}} <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div class="col-md-12">
<div class="col-md-12"> <div class="wr-stats-board-tile">
<div class="wr-stats-board-tile"> <div class="tile-name">Local Storage</div>
<div class="tile-name">RAM Usage</div> <div>
<div> <div class="tile-icon"><i class="fw fw-hdd"></i></div>
<div class="tile-icon"><i class="fw fw-hardware"></i></div> <div class="tile-stats">
<div class="tile-stats"> {{device.viewModel.internalMemory.usage}} %
{{device.viewModel.ramUsage.value}} %
</div>
</div>
</div>
</div>
</div>
{{/if}}
{{#if device.viewModel.internalMemory}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12">
<div class="wr-stats-board-tile">
<div class="tile-name">Local Storage</div>
<div>
<div class="tile-icon"><i class="fw fw-hdd"></i></div>
<div class="tile-stats">
{{device.viewModel.internalMemory.usage}} %
<span class="tile-stats-free"> <span class="tile-stats-free">
TOTAL OF {{device.viewModel.internalMemory.total}} GB TOTAL OF {{device.viewModel.internalMemory.total}} GB
</span> </span>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> {{/if}}
{{/if}} {{#if device.viewModel.externalMemory}}
{{#if device.viewModel.externalMemory}} <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div class="col-md-12">
<div class="col-md-12"> <div class="wr-stats-board-tile">
<div class="wr-stats-board-tile"> <div class="tile-name">External Storage</div>
<div class="tile-name">External Storage</div> <div>
<div> <div class="tile-icon"><i class="fw fw-usb-drive"></i></div>
<div class="tile-icon"><i class="fw fw-usb-drive"></i></div> <div class="tile-stats">
<div class="tile-stats"> {{device.viewModel.externalMemory.usage}} %
{{device.viewModel.externalMemory.usage}} %
<span class="tile-stats-free"> <span class="tile-stats-free">
TOTAL OF {{device.viewModel.externalMemory.total}} GB TOTAL OF {{device.viewModel.externalMemory.total}} GB
</span> </span>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{/if}}
{{else}}
<div class="message message-info">
<h4 class="remove-margin">
<i class="icon fw fw-info"></i>
Battery, RAM and Storage related information is not available yet.
</h4>
</div> </div>
{{/if}} {{/if}}
</div> </div>

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

Loading…
Cancel
Save