Merge branch 'application-mgt-new' into 'master'

Add ent. app installation feature to APPM UI

See merge request entgra/carbon-device-mgt!362
feature/appm-store/pbac
Dharmakeerthi Lasantha 5 years ago
commit 5d08e98b8a

@ -31,10 +31,16 @@ class ListApps extends React.Component {
super(props);
this.state = {
filters: {}
}
};
this.appName = '';
}
setFilters = (filters) => {
if (this.appName === '' && filters.hasOwnProperty("appName")) {
delete filters["appName"];
} else {
filters.appName = this.appName;
}
this.setState({
filters
});
@ -42,6 +48,7 @@ class ListApps extends React.Component {
setSearchText = (appName) => {
const filters = {...this.state.filters};
this.appName = appName;
if (appName === '' && filters.hasOwnProperty("appName")) {
delete filters["appName"];
} else {
@ -52,6 +59,17 @@ class ListApps extends React.Component {
});
};
onChangeSearchText = (e) => {
const filters = {...this.state.filters};
const appName = e.target.value;
if (appName === '' && filters.hasOwnProperty("appName")) {
delete filters["appName"];
this.setState({
filters
});
}
};
render() {
const {isDrawerVisible, filters} = this.state;
return (
@ -67,9 +85,10 @@ class ListApps extends React.Component {
</Col>
<Col span={18} style={{textAlign: "right"}}>
<Search
placeholder="input search text"
placeholder="Search by app name"
onSearch={this.setSearchText}
style={{width: 170, zIndex:0}}
onChange={this.onChangeSearchText}
style={{width: 240, zIndex: 0}}
/>
</Col>
</Row>

@ -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,

@ -1767,6 +1767,11 @@
<version>${carbon.multitenancy.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven.checkstyle.vesion}</version>
</dependency>
</dependencies>
</dependencyManagement>
@ -2247,6 +2252,8 @@
<node.version>v10.15.3</node.version>
<npm.version>6.9.0</npm.version>
<maven.checkstyle.vesion>3.1.0</maven.checkstyle.vesion>
<!--websocket related lib versions-->
<tomcat.websocket.version>7.0.85</tomcat.websocket.version>
<javax.websocket.version>1.0</javax.websocket.version>

Loading…
Cancel
Save