Merge pull request #228 from charithag/master

Fix UI issues occured after merge with emm ui
revert-dabc3590
Milan Perera 9 years ago
commit e56e3d0b85

@ -21,7 +21,7 @@ function onRequest(context) {
var deviceType = context.uriParams.deviceType; 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 && deviceId) {
var deviceModule = require("/app/modules/device.js").deviceModule; var deviceModule = require("/app/modules/device.js").deviceModule;
var device = deviceModule.viewDevice(deviceType, deviceId); var device = deviceModule.viewDevice(deviceType, deviceId);

@ -20,12 +20,6 @@ function onRequest(context) {
var log = new Log("operation.js"); var log = new Log("operation.js");
var operationModule = require("/app/modules/operation.js").operationModule; var operationModule = require("/app/modules/operation.js").operationModule;
var device = context.unit.params.device; var device = context.unit.params.device;
var controlOperations; var controlOperations = operationModule.getControlOperations(device.type);
try {
controlOperations = operationModule.getControlOperations(device.type);
}catch(e){
log.error("Control operation loading failed.");
controlOperations = null;
}
return {"control_operations": controlOperations, "device": device}; return {"control_operations": controlOperations, "device": device};
} }
Loading…
Cancel
Save