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/devicemgt-props.js index 9200130ab02..39a7c2eb513 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/devicemgt-props.js @@ -17,23 +17,23 @@ */ var config = function () { - var conf = application.get("PINCH_CONFIG"); + var conf = application.get("UI_CONFIG"); if (!conf) { - var pinch = require('/app/modules/pinch.min.js').pinch; - var server = require('carbon').server; - var config = require('/app/conf/config.json'); + var pinch = require("/app/modules/pinch.min.js")["pinch"]; + var server = require("carbon")["server"]; + var config = require("/app/conf/config.json"); pinch(config, /^/, function (path, key, value) { - if ((typeof value === 'string') && value.indexOf('%https.ip%') > -1) { - return value.replace('%https.ip%', server.address("https")); - } else if ((typeof value === 'string') && value.indexOf('%http.ip%') > -1) { - return value.replace('%http.ip%', server.address("http")); - } else if ((typeof value === 'string') && value.indexOf('%date-year%') > -1) { + if ((typeof value === "string") && value.indexOf("%https.ip%") > -1) { + return value.replace("%https.ip%", server.address("https")); + } else if ((typeof value === "string") && value.indexOf("%http.ip%") > -1) { + return value.replace("%http.ip%", server.address("http")); + } else if ((typeof value === "string") && value.indexOf("%date-year%") > -1) { var year = new Date().getFullYear(); return value.replace("%date-year%", year); } return value; }); - application.put("PINCH_CONFIG", config); + application.put("UI_CONFIG", config); conf = config; } return conf;