|
|
@ -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 (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Card>
|
|
|
|
<Row gutter={28}>
|
|
|
|
<Row gutter={28}>
|
|
|
|
<Col md={6}>
|
|
|
|
<Col md={6}>
|
|
|
|
<Filters setFilters={this.setFilters}/>
|
|
|
|
<Filters setFilters={this.setFilters}/>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
<Col md={18}>
|
|
|
|
<Col md={18}>
|
|
|
|
<Card>
|
|
|
|
|
|
|
|
<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;
|