From: guodan1 Date: Thu, 27 Dec 2018 09:08:51 +0000 (+0800) Subject: mgr/dashboard: Add a 'clear filter' button to configuration page X-Git-Tag: v14.1.0~325^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2de479f565cf1c5666a537c90bec1d156b09f4ed;p=ceph.git mgr/dashboard: Add a 'clear filter' button to configuration page Fixes:http://tracker.ceph.com/issues/36173 Signed-off-by: familyuu --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.html index c6fce9f31325..36d280aebb0e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.html @@ -18,6 +18,12 @@ + + + + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.ts index 3f33a43b4e66..9c056bcb602f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.ts @@ -25,6 +25,7 @@ export class ConfigurationComponent implements OnInit { { label: this.i18n('Level'), prop: 'level', + initValue: 'basic', value: 'basic', options: ['basic', 'advanced', 'dev'], applyFilter: (row, value) => { @@ -42,6 +43,7 @@ export class ConfigurationComponent implements OnInit { { label: this.i18n('Service'), prop: 'services', + initValue: 'any', value: 'any', options: ['any', 'mon', 'mgr', 'osd', 'mds', 'common', 'mds_client', 'rgw'], applyFilter: (row, value) => { @@ -55,6 +57,7 @@ export class ConfigurationComponent implements OnInit { { label: this.i18n('Source'), prop: 'source', + initValue: 'any', value: 'any', options: ['any', 'mon'], applyFilter: (row, value) => { @@ -125,4 +128,11 @@ export class ConfigurationComponent implements OnInit { updateFilter() { this.data = [...this.data]; } + + resetFilter() { + this.filters.forEach((item) => { + item.value = item.initValue; + }); + this.data = [...this.data]; + } }