Updating path changes to business-controllers

revert-dabc3590
dilanua 8 years ago
parent 18a9ad4b8a
commit 6fe83cd0ac

@ -27,7 +27,7 @@ function onRequest(context) {
"backendApiUri": devicemgtProps["httpsURL"] + "/android_sense/stats/"
};
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/device.js").deviceModule;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {

@ -25,7 +25,7 @@ function onRequest(context) {
];
if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/device.js").deviceModule;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {

@ -29,7 +29,7 @@ function onRequest(context) {
"backendApiUri": devicemgtProps["httpsURL"] + "/arduino/device/stats/"
};
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/device.js").deviceModule;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {

@ -25,7 +25,7 @@ function onRequest(context) {
];
if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/device.js").deviceModule;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {"device": device, "backendApiUri" : devicemgtProps["httpsURL"] + "/arduino/", "autoCompleteParams" : autoCompleteParams};

@ -23,7 +23,7 @@ var uriMatcher = new URIMatcher(String(uri));
var log = new Log("api/policy-api.jag");
var constants = require("/app/modules/constants.js");
var policyModule = require("/app/modules/policy.js").policyModule;
var policyModule = require("/app/modules/business-controllers/policy.js")["policyModule"];
var deviceType, deviceId;

@ -18,7 +18,7 @@
function onRequest(context) {
var log = new Log("operation.js");
var operationModule = require("/app/modules/operation.js").operationModule;
var operationModule = require("/app/modules/business-controllers/operation.js")["operationModule"];
var device = context.unit.params.device;
var autoCompleteParams = context.unit.params.autoCompleteParams;
var controlOperations = operationModule.getControlOperations(device.type);

@ -19,7 +19,7 @@
function onRequest(context) {
var log = new Log("policy-view-edit-unit backend js");
log.debug("calling policy-view-edit-unit");
var userModule = require("/app/modules/user.js").userModule;
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
context.roles = userModule.getRoles().content;
return context;
}

@ -19,7 +19,7 @@
function onRequest(context) {
var log = new Log("policy-view-edit-unit backend js");
log.debug("calling policy-view-edit-unit");
var userModule = require("/app/modules/user.js").userModule;
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
context.roles = userModule.getRoles().content;
return context;
}

@ -22,7 +22,7 @@ function onRequest(context) {
var DTYPE_CONF_DEVICE_TYPE_KEY = "deviceType";
var DTYPE_CONF_DEVICE_TYPE_LABEL_KEY = "label";
var userModule = require("/app/modules/user.js")["userModule"];
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var utility = require('/app/modules/utility.js').utility;
var response = userModule.getRoles();
var wizardPage = {};

@ -29,7 +29,7 @@ function onRequest(context) {
"backendApiUri": devicemgtProps["httpsURL"] + "/raspberrypi/device/stats/"
};
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/device.js").deviceModule;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {

@ -25,7 +25,7 @@ function onRequest(context) {
];
if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/device.js").deviceModule;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {"device": device, "backendApiUri" : devicemgtProps["httpsURL"] + "/raspberrypi/", "autoCompleteParams" : autoCompleteParams};

@ -29,7 +29,7 @@ function onRequest(context) {
"backendApiUri": devicemgtProps["httpsURL"] + "/virtual_firealarm/device/stats/"
};
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/device.js").deviceModule;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {

@ -25,7 +25,7 @@ function onRequest(context) {
];
if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/device.js").deviceModule;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {"device": device, "backendApiUri" : devicemgtProps["httpsURL"] + "/virtual_firealarm/", "autoCompleteParams" : autoCompleteParams};

@ -22,7 +22,7 @@ function onRequest(context) {
var deviceId = request.getParameter("id");
if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/device.js").deviceModule;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device) {

@ -17,7 +17,7 @@
*/
function onRequest(context) {
var userModule = require("/app/modules/user.js")["userModule"];
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var generalConfig = context.app.conf["generalConfig"];
context["permissions"] = userModule.getUIPermissions();

@ -1,6 +1,6 @@
function onRequest(context) {
// var log = new Log("platform-configuration-unit backend js");
var userModule = require("/app/modules/user.js")["userModule"];
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var typesListResponse = userModule.getPlatforms();
if (typesListResponse["status"] == "success") {
context["types"] = typesListResponse["content"];

@ -19,7 +19,7 @@
function onRequest(context) {
var log = new Log("policy-view-edit-unit backend js");
log.debug("calling policy-view-edit-unit");
var userModule = require("/app/modules/user.js").userModule;
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
context.roles = userModule.getRoles().content;
context.users = userModule.getUsersByUsername().content;
return context;

@ -19,7 +19,7 @@
function onRequest(context) {
var log = new Log("policy-view-edit-unit backend js");
log.debug("calling policy-view-edit-unit");
var userModule = require("/app/modules/user.js").userModule;
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
context.roles = userModule.getRoles().content;
return context;
}

@ -17,7 +17,7 @@
*/
function onRequest(context) {
var userModule = require("/app/modules/user.js")["userModule"];
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var utility = require('/app/modules/utility.js').utility;
var response = userModule.getRoles();
var wizardPage = {};

@ -27,7 +27,7 @@ function onRequest(context) {
return options.fn(this);
}
});
var userModule = require("/app/modules/user.js")["userModule"];
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var mdmProps = require('/app/conf/reader/main.js')["conf"];
var constants = require("/app/modules/constants.js");
var uiPermissions = userModule.getUIPermissions();

Loading…
Cancel
Save