From c12630e65c076d5e734176625eff589e8b67a462 Mon Sep 17 00:00:00 2001 From: dilanua Date: Sun, 24 Jul 2016 21:20:51 +0530 Subject: [PATCH] Refactoring base ui app config reader --- .../jaggeryapps/devicemgt/api/data-tables-invoker-api.jag | 2 +- .../main/resources/jaggeryapps/devicemgt/api/device-api.jag | 2 +- .../main/resources/jaggeryapps/devicemgt/api/group-api.jag | 2 +- .../main/resources/jaggeryapps/devicemgt/api/invoker-api.jag | 2 +- .../resources/jaggeryapps/devicemgt/api/operation-api.jag | 2 +- .../src/main/resources/jaggeryapps/devicemgt/api/user-api.jag | 2 +- .../devicemgt/app/conf/{devicemgt-props.js => reader/main.js} | 4 ++-- .../devicemgt/app/{modules => conf/reader}/pinch.min.js | 0 .../jaggeryapps/devicemgt/app/modules/api-wrapper-util.js | 2 +- .../devicemgt/app/modules/backend-service-invoker.js | 2 +- .../resources/jaggeryapps/devicemgt/app/modules/device.js | 2 +- .../main/resources/jaggeryapps/devicemgt/app/modules/group.js | 2 +- .../main/resources/jaggeryapps/devicemgt/app/modules/init.js | 2 +- .../main/resources/jaggeryapps/devicemgt/app/modules/login.js | 2 +- .../resources/jaggeryapps/devicemgt/app/modules/operation.js | 2 +- .../resources/jaggeryapps/devicemgt/app/modules/policy.js | 2 +- .../main/resources/jaggeryapps/devicemgt/app/modules/user.js | 2 +- .../main/resources/jaggeryapps/devicemgt/app/modules/util.js | 2 +- .../resources/jaggeryapps/devicemgt/app/modules/utility.js | 2 +- .../devicemgt/app/pages/cdmf.page.dashboard/dashboard.js | 2 +- .../devicemgt/app/pages/cdmf.page.group.create/create.js | 2 +- .../devicemgt/app/pages/cdmf.page.user.create/create.js | 2 +- .../devicemgt/app/pages/cdmf.page.user.edit/edit.js | 2 +- .../jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.js | 2 +- .../devicemgt/app/units/cdmf.unit.device.type.view/view.js | 2 +- .../devicemgt/app/units/cdmf.unit.role.create/create.js | 2 +- .../devicemgt/app/units/cdmf.unit.role.edit/edit.js | 2 +- .../devicemgt/app/units/cdmf.unit.role.listing/listing.js | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) rename components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/{devicemgt-props.js => reader/main.js} (95%) rename components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/{modules => conf/reader}/pinch.min.js (100%) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/data-tables-invoker-api.jag b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/data-tables-invoker-api.jag index f118862bf1..9e75c45d18 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/data-tables-invoker-api.jag +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/data-tables-invoker-api.jag @@ -22,7 +22,7 @@ var log = new Log("api/data-tables-invoker-api.jag"); var uri = request.getRequestURI(); var uriMatcher = new URIMatcher(String(uri)); -var devicemgtProps = require("/app/conf/devicemgt-props.js").config(); +var devicemgtProps = require("/app/conf/reader/main.js").config(); var serviceInvokers = require("/app/modules/backend-service-invoker.js")["backendServiceInvoker"]; function appendQueryParam (url, queryParam , value) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag index d609d950e8..0a95efff1e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag @@ -24,7 +24,7 @@ var log = new Log("api/device-api.jag"); var constants = require("/app/modules/constants.js"); var deviceModule = require("/app/modules/device.js").deviceModule; var utility = require("/app/modules/utility.js").utility; -var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); +var devicemgtProps = require("/app/conf/reader/main.js").config(); var userModule = require("/app/modules/user.js").userModule; var serviceInvokers = require("/app/modules/backend-service-invoker.js").backendServiceInvoker; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/group-api.jag b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/group-api.jag index 4d5bd9973f..6edc578656 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/group-api.jag +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/group-api.jag @@ -23,7 +23,7 @@ var uriMatcher = new URIMatcher(String(uri)); var log = new Log("api/device-api.jag"); var constants = require("/app/modules/constants.js"); var utility = require("/app/modules/utility.js").utility; -var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); +var devicemgtProps = require("/app/conf/reader/main.js").config(); var serviceInvokers = require("/app/modules/backend-service-invoker.js").backendServiceInvoker; var user = session.get(constants.USER_SESSION_KEY); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/invoker-api.jag b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/invoker-api.jag index 1fd232e3c7..d808aa612b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/invoker-api.jag +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/invoker-api.jag @@ -23,7 +23,7 @@ var uri = request.getRequestURI(); var uriMatcher = new URIMatcher(String(uri)); var constants = require("/app/modules/constants.js"); -var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); +var devicemgtProps = require("/app/conf/reader/main.js").config(); var serviceInvokers = require("/app/modules/backend-service-invoker.js")["backendServiceInvoker"]; if (uriMatcher.match("/{context}/api/invoker/execute/")) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/operation-api.jag b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/operation-api.jag index 797eac1bd1..e23288eeec 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/operation-api.jag +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/operation-api.jag @@ -23,7 +23,7 @@ var uriMatcher = new URIMatcher(String(uri)); var log = new Log("api/operation-api.jag"); var serviceInvokers = require("/app/modules/backend-service-invoker.js")["backendServiceInvoker"]; -var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); +var devicemgtProps = require("/app/conf/reader/main.js").config(); if (uriMatcher.match("/{context}/api/operation/paginate")) { var deviceType = request.getParameter("deviceType"); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/user-api.jag b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/user-api.jag index 05364453b5..1f5dd33501 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/user-api.jag +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/api/user-api.jag @@ -23,7 +23,7 @@ var uriMatcher = new URIMatcher(String(uri)); var log = new Log("api/user-api.jag"); var constants = require("/app/modules/constants.js"); -var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); +var devicemgtProps = require("/app/conf/reader/main.js").config(); var userModule = require("/app/modules/user.js").userModule; var deviceModule = require("/app/modules/device.js").deviceModule; var utility = require("/app/modules/utility.js").utility; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/devicemgt-props.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/reader/main.js similarity index 95% rename from components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/devicemgt-props.js rename to components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/reader/main.js index 39a7c2eb51..219c6de62d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/devicemgt-props.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/reader/main.js @@ -19,9 +19,9 @@ var config = function () { var conf = application.get("UI_CONFIG"); if (!conf) { - var pinch = require("/app/modules/pinch.min.js")["pinch"]; - var server = require("carbon")["server"]; + var pinch = require("/app/conf/reader/pinch.min.js")["pinch"]; var config = require("/app/conf/config.json"); + var server = require("carbon")["server"]; pinch(config, /^/, function (path, key, value) { if ((typeof value === "string") && value.indexOf("%https.ip%") > -1) { return value.replace("%https.ip%", server.address("https")); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/pinch.min.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/reader/pinch.min.js similarity index 100% rename from components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/pinch.min.js rename to components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/reader/pinch.min.js diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/api-wrapper-util.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/api-wrapper-util.js index becd0c13c8..14fe692824 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/api-wrapper-util.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/api-wrapper-util.js @@ -20,7 +20,7 @@ var apiWrapperUtil = function () { var module = {}; var tokenUtil = require("/app/modules/util.js").util; var constants = require("/app/modules/constants.js"); - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var log = new Log("/app/modules/api-wrapper-util.js"); module.refreshToken = function () { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/backend-service-invoker.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/backend-service-invoker.js index 19e5a7c379..632e72cf40 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/backend-service-invoker.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/backend-service-invoker.js @@ -31,7 +31,7 @@ var backendServiceInvoker = function () { var TOKEN_EXPIRED = "Access token expired"; var TOKEN_INVALID = "Invalid input. Access token validation failed"; - var devicemgtProps = require("/app/conf/devicemgt-props.js").config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var constants = require("/app/modules/constants.js"); var userModule = require("/app/modules/user.js")["userModule"]; var tokenUtil = require("/app/modules/api-wrapper-util.js")["apiWrapperUtil"]; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/device.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/device.js index 367db085bc..bcee18781a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/device.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/device.js @@ -22,7 +22,7 @@ deviceModule = function () { var utility = require('/app/modules/utility.js').utility; var constants = require('/app/modules/constants.js'); - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var serviceInvokers = require("/app/modules/backend-service-invoker.js").backendServiceInvoker; var ArrayList = Packages.java.util.ArrayList; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/group.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/group.js index d4cd86a29c..feebae5946 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/group.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/group.js @@ -22,7 +22,7 @@ var groupModule = {}; var userModule = require("/app/modules/user.js").userModule; var constants = require('/app/modules/constants.js'); - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var utility = require("/app/modules/utility.js").utility; var serviceInvokers = require("/app/modules/backend-service-invoker.js").backendServiceInvoker; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js index 8d2b0c197f..0c0f7e0925 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js @@ -17,7 +17,7 @@ */ var carbonModule = require("carbon"); -var devicemgtProps = require("/app/conf/devicemgt-props.js").config(); +var devicemgtProps = require("/app/conf/reader/main.js").config(); var carbonServer = new carbonModule.server.Server({ tenanted: true, url: devicemgtProps["httpsURL"] + "/admin" diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/login.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/login.js index 4597c2d737..a720c724be 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/login.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/login.js @@ -33,7 +33,7 @@ var onFail; properties = {username: context.input.username, password: context.input.password}; apiWrapperUtil.setupAccessTokenPair(constants.GRANT_TYPE_PASSWORD, properties); } - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var carbonServer = require("carbon").server; (new carbonServer.Server({url: devicemgtProps["adminService"]})) .login(context.input.username, context.input.password); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/operation.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/operation.js index 1655adf1ed..e49c37cecd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/operation.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/operation.js @@ -20,7 +20,7 @@ var operationModule = function () { var log = new Log("/app/modules/operation.js"); var utility = require('/app/modules/utility.js').utility; var constants = require('/app/modules/constants.js'); - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var serviceInvokers = require("/app/modules/backend-service-invoker.js").backendServiceInvoker; var publicMethods = {}; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/policy.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/policy.js index a4ee8c1256..d623683249 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/policy.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/policy.js @@ -25,7 +25,7 @@ policyModule = function () { var constants = require('/app/modules/constants.js'); var utility = require("/app/modules/utility.js")["utility"]; - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var serviceInvokers = require("/app/modules/backend-service-invoker.js").backendServiceInvoker; var publicMethods = {}; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/user.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/user.js index b0e05fdd8a..608ba421c7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/user.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/user.js @@ -24,7 +24,7 @@ var userModule = function () { var constants = require("/app/modules/constants.js"); var utility = require("/app/modules/utility.js")["utility"]; - var devicemgtProps = require("/app/conf/devicemgt-props.js").config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var serviceInvokers = require("/app/modules/backend-service-invoker.js")["backendServiceInvoker"]; /* Initializing user manager */ diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/util.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/util.js index 3334ea6664..01cbb616fe 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/util.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/util.js @@ -21,7 +21,7 @@ var util = function () { var module = {}; var Base64 = Packages.org.apache.commons.codec.binary.Base64; var String = Packages.java.lang.String; - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var carbon = require('carbon'); var constants = require("/app/modules/constants.js"); var adminUser = devicemgtProps["adminUser"]; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/utility.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/utility.js index c92fea29cd..da8b95feab 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/utility.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/utility.js @@ -20,7 +20,7 @@ var utility; utility = function () { var constants = require('/app/modules/constants.js'); - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var log = new Log("/app/modules/utility.js"); var JavaClass = Packages.java.lang.Class; var PrivilegedCarbonContext = Packages.org.wso2.carbon.context.PrivilegedCarbonContext; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js index 82aa1101a6..9220fc5bb8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js @@ -21,7 +21,7 @@ function onRequest(context) { var user = session.get(constants.USER_SESSION_KEY); var userModule = require("/app/modules/user.js").userModule; var permissions = userModule.getUIPermissions(); - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); if (!permissions.VIEW_DASHBOARD) { response.sendRedirect(constants.WEB_APP_CONTEXT + "/devices"); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.js index 5c646f33f9..57e24f4551 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.js @@ -23,7 +23,7 @@ * @returns {*} A context object that returns the dynamic state of this page to be presented */ function onRequest(context) { - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var page = {}; page["groupNameJSRegEx"] = devicemgtProps.groupValidationConfig.groupNameJSRegEx; page["groupNameRegExViolationErrorMsg"] = devicemgtProps.groupValidationConfig.groupNameRegExViolationErrorMsg; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.js index 2119d5d600..641a0b1c64 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.js @@ -26,7 +26,7 @@ function onRequest(context) { //var log = new Log("/app/pages/cdmf.page.user.create server-side js"); var userModule = require("/app/modules/user.js")["userModule"]; - var devicemgtProps = require("/app/conf/devicemgt-props.js").config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); var page = {}; var response = userModule.getRolesByUserStore(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.js index 982661fcd4..1d19063197 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.js @@ -20,7 +20,7 @@ function onRequest(context) { var userModule = require("/app/modules/user.js").userModule; var userName = request.getParameter("username"); var user = userModule.getUser(userName)["content"]; - var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + var devicemgtProps = require("/app/conf/reader/main.js").config(); if (user) { var title; if (user.firstname || user.lastname) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.js index d0085bd39d..e48afde551 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.js @@ -29,7 +29,7 @@ function onRequest(context) { var page = {}; var userModule = require("/app/modules/user.js")["userModule"]; - var deviceMgtProps = require("/app/conf/devicemgt-props.js").config(); + require("/app/conf/reader/main.js").config(); page["adminUser"] = deviceMgtProps["adminUser"]; page["permissions"] = userModule.getUIPermissions(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.view/view.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.view/view.js index 770ee3ca8c..593ebad5da 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.view/view.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.view/view.js @@ -30,7 +30,7 @@ function onRequest (context) { var userModule = require("/app/modules/user.js").userModule; var constants = require("/app/modules/constants.js"); var permissions = userModule.getUIPermissions(); - var mdmProps = require('/app/conf/devicemgt-props.js').config(); + var mdmProps = require("/app/conf/reader/main.js").config(); context.permissions = permissions; context["enrollmentURL"] = mdmProps.enrollmentURL; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.js index b98e0e2310..0cf5326700 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.js @@ -24,7 +24,7 @@ */ function onRequest(context) { var userModule = require("/app/modules/user.js")["userModule"]; - var deviceMgtProps = require('/app/conf/devicemgt-props.js').config(); + var deviceMgtProps = require("/app/conf/reader/main.js").config(); var response = userModule.getRoles(); if (response["status"] == "success") { context["roles"] = response["content"]; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.js index 90970d8e42..c2633447db 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.js @@ -24,7 +24,7 @@ */ function onRequest(context) { var userModule = require("/app/modules/user.js")["userModule"]; - var deviceMgtProps = require("/app/conf/devicemgt-props.js").config(); + var deviceMgtProps = require("/app/conf/reader/main.js").config(); var uri = request.getRequestURI(); var uriMatcher = new URIMatcher(String(uri)); var isMatched = uriMatcher.match("/{context}/role/edit/{rolename}"); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/listing.js index 2cd3d91080..af1cff839d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/listing.js @@ -30,7 +30,7 @@ function onRequest(context) { if (userModule.isAuthorized("/permission/admin/device-mgt/roles/remove")) { context["removePermitted"] = true; } - var deviceMgtProps = require("/app/conf/devicemgt-props.js").config(); + var deviceMgtProps = require("/app/conf/reader/main.js").config(); context["appContext"] = deviceMgtProps.appContext; context["adminRole"] = deviceMgtProps.adminRole; return context;