diff --git a/spug_web/src/pages/host/Table.js b/spug_web/src/pages/host/Table.js index 0595490..5543c5b 100644 --- a/spug_web/src/pages/host/Table.js +++ b/spug_web/src/pages/host/Table.js @@ -78,6 +78,9 @@ class ComTable extends React.Component { if (store.f_zone) { data = data.filter(item => item['zone'].toLowerCase().includes(store.f_zone.toLowerCase())) } + if (store.f_host) { + data = data.filter(item => item['hostname'].toLowerCase().includes(store.f_host.toLowerCase())) + } return ( diff --git a/spug_web/src/pages/host/index.js b/spug_web/src/pages/host/index.js index ebae285..5f13a3a 100644 --- a/spug_web/src/pages/host/index.js +++ b/spug_web/src/pages/host/index.js @@ -14,17 +14,20 @@ export default observer(function () { return ( - + - + store.f_name = e.target.value} placeholder="请输入"/> - + + store.f_host = e.target.value} placeholder="请输入"/> + + diff --git a/spug_web/src/pages/host/store.js b/spug_web/src/pages/host/store.js index a1f9269..9bb731c 100644 --- a/spug_web/src/pages/host/store.js +++ b/spug_web/src/pages/host/store.js @@ -16,6 +16,7 @@ class Store { @observable f_name; @observable f_zone; + @observable f_host; fetchRecords = () => { this.isFetching = true;