Fixing: Requested resource /app/conf/reader/main.js cannot be found

merge-requests/1/head
Rasika Perera 8 years ago
parent 8d151120df
commit 7b62aa3361

@ -18,7 +18,7 @@
function onRequest(context) { function onRequest(context) {
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require("/app/conf/reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["httpsURL"].replace("https", "wss"); var websocketEndpoint = devicemgtProps["httpsURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER); var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER);

@ -18,7 +18,7 @@
function onRequest(context){ function onRequest(context){
var viewModel = {}; var viewModel = {};
var devicemgtProps = require("/app/conf/reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
viewModel.hostName = devicemgtProps["httpsWebURL"]; viewModel.hostName = devicemgtProps["httpsWebURL"];
return viewModel; return viewModel;
} }

@ -17,7 +17,7 @@
*/ */
function onRequest(context) { function onRequest(context) {
var devicemgtProps = require("/app/conf/reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var devices = context.unit.params.devices; var devices = context.unit.params.devices;
var deviceType = context.uriParams.deviceType; var deviceType = context.uriParams.deviceType;

@ -19,7 +19,7 @@
function onRequest(context) { function onRequest(context) {
var log = new Log("stats.js"); var log = new Log("stats.js");
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require("/app/conf/reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss"); var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER); var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER);

@ -23,7 +23,7 @@
* @returns {*} A context object that returns the dynamic state of this page to be presented * @returns {*} A context object that returns the dynamic state of this page to be presented
*/ */
function onRequest(context) { function onRequest(context) {
var devicemgtProps = require("/app/conf/reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var page = {}; var page = {};
page["usernameJSRegEx"] = devicemgtProps.userValidationConfig.usernameJSRegEx; page["usernameJSRegEx"] = devicemgtProps.userValidationConfig.usernameJSRegEx;
page["usernameHelpText"] = devicemgtProps.userValidationConfig.usernameHelpMsg; page["usernameHelpText"] = devicemgtProps.userValidationConfig.usernameHelpMsg;

@ -17,7 +17,7 @@
*/ */
function onRequest(context) { function onRequest(context) {
var devicemgtProps = require("/app/conf/reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var devices = context.unit.params.devices; var devices = context.unit.params.devices;
var deviceType = context.uriParams.deviceType; var deviceType = context.uriParams.deviceType;

@ -19,7 +19,7 @@
function onRequest(context) { function onRequest(context) {
var log = new Log("stats.js"); var log = new Log("stats.js");
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require("/app/conf/reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss"); var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER); var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER);

@ -17,7 +17,7 @@
*/ */
function onRequest(context) { function onRequest(context) {
var devicemgtProps = require("/app/conf/reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var devices = context.unit.params.devices; var devices = context.unit.params.devices;
var deviceType = context.uriParams.deviceType; var deviceType = context.uriParams.deviceType;

@ -19,7 +19,7 @@
function onRequest(context) { function onRequest(context) {
var log = new Log("stats.js"); var log = new Log("stats.js");
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require("/app/conf/reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss"); var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var jwtService = carbon.server.osgiService('org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService'); var jwtService = carbon.server.osgiService('org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService');

Loading…
Cancel
Save