From 84ee82471674485409e2882804b0a5b65eed30cc Mon Sep 17 00:00:00 2001 From: Jayasanka Date: Mon, 28 Oct 2019 14:38:46 +0530 Subject: [PATCH] Add ent. app installation feature to APPM UI --- .../src/components/apps/release/ReleaseView.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/ReleaseView.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/ReleaseView.js index 7fd5c6eee12..d024f5903c2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/ReleaseView.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/ReleaseView.js @@ -46,15 +46,27 @@ class ReleaseView extends React.Component { const config = this.props.context; const release = this.props.app.applicationReleases[0]; const {uuid} = release; + const {isAndroidEnterpriseApp} = this.props.app; this.setState({ loading: true, }); + const parameters = {}; + let url = window.location.origin + config.serverConfig.invoker.uri + - config.serverConfig.invoker.store + "/subscription/" + uuid + "/" + type + "/" + operation; + config.serverConfig.invoker.store + "/subscription/" + uuid + "/" + type + "/"; + if (isAndroidEnterpriseApp) { + url += "ent-app-install/"; // add ent-app-install path param for android enterprise app + parameters.requiresUpdatingExternal = true; + } + url += operation; // add operation to url if (timestamp != null) { - url += `?timestamp=${timestamp}`; + parameters.timestamp = timestamp; // add timestamp for scheduled operations } + + const queryParams = Object.keys(parameters).map(key => key + '=' + parameters[key]).join('&'); + url += '?' + queryParams; + axios.post( url, payload,