Fix bug in stats listing

application-manager-new
charithag 9 years ago
parent 9cdba70f72
commit 807e16d6b3

@ -73,27 +73,28 @@ if (stats) {
function getDeviceData(deviceType, deviceId){ function getDeviceData(deviceType, deviceId){
var device = deviceModule.getDevice(deviceType, deviceId); var device = deviceModule.getDevice(deviceType, deviceId);
var uname = device.enrolmentInfo.owner;
if (!device){ if (!device){
return; return;
} }
switch (deviceType) { switch (deviceType) {
case "firealarm": case "firealarm":
getFireAlarmData(user.username, device, from, to); getFireAlarmData(uname, device, from, to);
break; break;
case "sensebot": case "sensebot":
getSensebotData(user.username, device, from, to); getSensebotData(uname, device, from, to);
break; break;
case "arduino": case "arduino":
getArduinoData(user.username, device, from, to); getArduinoData(uname, device, from, to);
break; break;
case "digital_display": case "digital_display":
getDigitalDisplayData(user.username, device, from, to); getDigitalDisplayData(uname, device, from, to);
break; break;
case "android_sense": case "android_sense":
getAndroidSenseData(user.username, device, from, to); getAndroidSenseData(uname, device, from, to);
break; break;
case "raspberrypi": case "raspberrypi":
getDigitalDisplayData(user.username, device, from, to); getDigitalDisplayData(uname, device, from, to);
break; break;
} }
} }

Loading…
Cancel
Save