|
|
@ -44,15 +44,29 @@ class ListApps extends React.Component {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setSearchText = (appName) => {
|
|
|
|
|
|
|
|
const filters = {...this.state.filters};
|
|
|
|
|
|
|
|
if (appName === '' && filters.hasOwnProperty("appName")) {
|
|
|
|
|
|
|
|
delete filters["appName"];
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
filters.appName = appName;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
filters
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
console.log(filters);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const {isDrawerVisible, filters} = this.state;
|
|
|
|
const {isDrawerVisible, filters} = this.state;
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Row gutter={28}>
|
|
|
|
|
|
|
|
<Col md={6}>
|
|
|
|
<Card>
|
|
|
|
<Filters setFilters={this.setFilters}/>
|
|
|
|
<Row gutter={28}>
|
|
|
|
</Col>
|
|
|
|
<Col md={6}>
|
|
|
|
<Col md={18}>
|
|
|
|
<Filters setFilters={this.setFilters}/>
|
|
|
|
<Card>
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
<Col md={18}>
|
|
|
|
<Row>
|
|
|
|
<Row>
|
|
|
|
<Col span={6}>
|
|
|
|
<Col span={6}>
|
|
|
|
<Title level={4}>Apps</Title>
|
|
|
|
<Title level={4}>Apps</Title>
|
|
|
@ -60,7 +74,7 @@ class ListApps extends React.Component {
|
|
|
|
<Col span={18} style={{textAlign: "right"}}>
|
|
|
|
<Col span={18} style={{textAlign: "right"}}>
|
|
|
|
<Search
|
|
|
|
<Search
|
|
|
|
placeholder="input search text"
|
|
|
|
placeholder="input search text"
|
|
|
|
// onSearch={value => console.log(value)}
|
|
|
|
onSearch={this.setSearchText}
|
|
|
|
style={{width: 200}}
|
|
|
|
style={{width: 200}}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
@ -69,13 +83,11 @@ class ListApps extends React.Component {
|
|
|
|
<AppsTable filters={filters} showDrawer={this.showDrawer}/>
|
|
|
|
<AppsTable filters={filters} showDrawer={this.showDrawer}/>
|
|
|
|
<AppDetailsDrawer visible={isDrawerVisible} onClose={this.closeDrawer}
|
|
|
|
<AppDetailsDrawer visible={isDrawerVisible} onClose={this.closeDrawer}
|
|
|
|
app={this.state.selectedApp}/>
|
|
|
|
app={this.state.selectedApp}/>
|
|
|
|
</Card>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
</Row>
|
|
|
|
</Card>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// const ListApps = connect(mapStateToProps, {getApps})(ConnectedListApps);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default ListApps;
|
|
|
|
export default ListApps;
|