mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add ent. app installation feature to APPM UI
This commit is contained in:
parent
9b98475ea1
commit
84ee824716
@ -46,15 +46,27 @@ class ReleaseView extends React.Component {
|
|||||||
const config = this.props.context;
|
const config = this.props.context;
|
||||||
const release = this.props.app.applicationReleases[0];
|
const release = this.props.app.applicationReleases[0];
|
||||||
const {uuid} = release;
|
const {uuid} = release;
|
||||||
|
const {isAndroidEnterpriseApp} = this.props.app;
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: true,
|
loading: true,
|
||||||
});
|
});
|
||||||
|
const parameters = {};
|
||||||
|
|
||||||
let url = window.location.origin + config.serverConfig.invoker.uri +
|
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 (timestamp != null) {
|
if (isAndroidEnterpriseApp) {
|
||||||
url += `?timestamp=${timestamp}`;
|
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) {
|
||||||
|
parameters.timestamp = timestamp; // add timestamp for scheduled operations
|
||||||
|
}
|
||||||
|
|
||||||
|
const queryParams = Object.keys(parameters).map(key => key + '=' + parameters[key]).join('&');
|
||||||
|
url += '?' + queryParams;
|
||||||
|
|
||||||
axios.post(
|
axios.post(
|
||||||
url,
|
url,
|
||||||
payload,
|
payload,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user