From dde64e6065bf9b896137a313076d298f49d2cf51 Mon Sep 17 00:00:00 2001 From: Harshan Liyanage Date: Thu, 31 Aug 2017 17:02:13 +0530 Subject: [PATCH] Added new config param to fetch hostname. --- .../jaggeryapps/android-web-agent/app/conf/config.json | 1 + .../download-agent.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/conf/config.json b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/conf/config.json index c52e88276..43fe05ba8 100755 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/conf/config.json +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/conf/config.json @@ -2,6 +2,7 @@ "appContext" : "/android-web-agent/", "httpsURL" : "%https.ip%", "httpURL" : "%http.ip%", + "managerHTTPSURL": "https://%iot.manager.host%:%iot.manager.https.port%", "enrollmentDir": "/android-web-agent/enrollment", "adminService":"%https.ip%", "callBackUrl":"%https.ip%/mdm-admin", diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/pages/mdm.page.enrollments.android.download-agent/download-agent.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/pages/mdm.page.enrollments.android.download-agent/download-agent.js index 438338502..6edb05cc4 100755 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/pages/mdm.page.enrollments.android.download-agent/download-agent.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/pages/mdm.page.enrollments.android.download-agent/download-agent.js @@ -25,7 +25,7 @@ function onRequest(context) { // setting android agent download URL // Needs host=>http:9763 since self-signed certificates won't allow downloads in android //TODO: try to retrieve page name from UUF - viewModel.agentDownloadURL = mdmProps["generalConfig"]["host"] + mdmProps["appContext"] + "public/mdm.page.enrollments.android.download-agent/asset/" + mdmProps["androidAgentApp"]; + viewModel.agentDownloadURL = mdmProps["managerHTTPSURL"] + mdmProps["appContext"] + "public/mdm.page.enrollments.android.download-agent/asset/" + mdmProps["androidAgentApp"]; var companyProps = session.get("COMPANY_DETAILS"); if (!companyProps) { viewModel.companyName = mdmProps.generalConfig.companyName;