|
|
|
@ -52,16 +52,11 @@ function onRequest(context) {
|
|
|
|
|
longitude: device["properties"]["LONGITUDE"]
|
|
|
|
|
};
|
|
|
|
|
} else if (device["type"] == "android") {
|
|
|
|
|
viewModel["deviceName"] = device["name"];
|
|
|
|
|
viewModel["deviceIdentifier"] = device["deviceIdentifier"];
|
|
|
|
|
viewModel["imei"] = device["properties"]["IMEI"];
|
|
|
|
|
viewModel["model"] = device["deviceInfo"]["deviceModel"];
|
|
|
|
|
viewModel["vendor"] = device["deviceInfo"]["vendor"];
|
|
|
|
|
viewModel["deviceName"] = device["name"];
|
|
|
|
|
viewModel["owner"] = device["owner"];
|
|
|
|
|
viewModel["ownership"] = device["ownership"];
|
|
|
|
|
viewModel["lastUpdatedTime"] = device["deviceInfo"]["updatedTime"].
|
|
|
|
|
substr(0, device["deviceInfo"]["updatedTime"].indexOf("+"));
|
|
|
|
|
|
|
|
|
|
viewModel["imei"] = device["properties"]["IMEI"];
|
|
|
|
|
var osBuildDate = device["properties"]["OS_BUILD_DATE"];
|
|
|
|
|
if (osBuildDate != null && osBuildDate != "0") {
|
|
|
|
|
viewModel["os_build_date"] = new Date(osBuildDate * 1000);
|
|
|
|
@ -79,6 +74,13 @@ function onRequest(context) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
deviceInfo = info;
|
|
|
|
|
|
|
|
|
|
if (device["deviceInfo"]) {
|
|
|
|
|
viewModel["model"] = device["deviceInfo"]["deviceModel"];
|
|
|
|
|
viewModel["vendor"] = device["deviceInfo"]["vendor"];
|
|
|
|
|
viewModel["lastUpdatedTime"] = device["deviceInfo"]["updatedTime"].
|
|
|
|
|
substr(0, device["deviceInfo"]["updatedTime"].indexOf("+"));
|
|
|
|
|
|
|
|
|
|
viewModel["BatteryLevel"] = {};
|
|
|
|
|
viewModel["BatteryLevel"]["value"] = device["deviceInfo"]["batteryLevel"];
|
|
|
|
|
|
|
|
|
@ -115,6 +117,7 @@ function onRequest(context) {
|
|
|
|
|
} else {
|
|
|
|
|
viewModel["externalMemory"]["usage"] = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (device["type"] == "windows") {
|
|
|
|
|
viewModel["imei"] = device["properties"]["IMEI"];
|
|
|
|
|
viewModel["model"] = device["properties"]["DEVICE_MODEL"];
|
|
|
|
|