Update digital display related files

NuwanSameera 9 years ago
parent 59680f0743
commit 12bdceb2ac

@ -1,6 +1,6 @@
function onRequest (context) { function onRequest(context) {
var log = new Log("detail.js"); var log = new Log("detail.js");
var deviceType = request.getParameter("type"); var deviceType = context.uriParams.deviceType;
var deviceId = request.getParameter("id"); var deviceId = request.getParameter("id");
if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
@ -12,11 +12,11 @@ function onRequest (context) {
var deviceInfo = device.properties.DEVICE_INFO; var deviceInfo = device.properties.DEVICE_INFO;
if (deviceInfo != undefined && String(deviceInfo.toString()).length > 0) { if (deviceInfo != undefined && String(deviceInfo.toString()).length > 0) {
deviceInfo = parse(stringify(deviceInfo)); deviceInfo = parse(stringify(deviceInfo));
viewModel.system = device.properties.IMEI; viewModel.system = device.properties.IMEI;
viewModel.machine = "Digital Display"; viewModel.machine = "digital_display";
viewModel.vendor = device.properties.VENDOR; viewModel.vendor = device.properties.VENDOR;
} }
device.viewModel = viewModel; device.viewModel = viewModel;
} }
context.device = device; context.device = device;
Loading…
Cancel
Save