|
|
@ -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};
|
|
|
|
}
|
|
|
|
}
|