diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index 8b923a9b825..95996fb6bbf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -5,7 +5,7 @@ "httpsWebURL" : "%https.ip%", "wssURL" : "https://localhost:9445", "wsURL" : "%http.ip%", - "portalURL": "https://${server.ip}:9445", + "portalURL": "https://%server.ip%:9445", "dashboardServerURL" : "%https.ip%", "androidEnrollmentDir": "/android-web-agent/enrollment", "windowsEnrollmentDir": "/windows-web-agent/enrollment", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/conf-reader/main.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/conf-reader/main.js index f81849fe3bd..8e02b70ff38 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/conf-reader/main.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/conf-reader/main.js @@ -33,6 +33,9 @@ var conf = function () { } else if ((typeof value === "string") && value.indexOf("%date-year%") > -1) { var year = new Date().getFullYear(); return value.replace("%date-year%", year); + } else if ((typeof value === "string") && value.indexOf("%server.ip%") > -1) { + var getProperty = require("process").getProperty; + return value.replace("%server.ip%", getProperty("carbon.local.ip")); } return value; }