]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Add column filtering feature to cd-table
authorKiefer Chang <kiefer.chang@suse.com>
Tue, 31 Dec 2019 06:32:26 +0000 (14:32 +0800)
committerKiefer Chang <kiefer.chang@suse.com>
Tue, 14 Jan 2020 07:10:10 +0000 (15:10 +0800)
commit0834f9a3cda8c8fd41795e04e89c9dd61fc97fa9
tree3cc8b21e06459a9543fc67991bb3dff92ecb3aac
parent6adcace69498f6ae597fb4a83a221dd0cf3af8bd
mgr/dashboard: Add column filtering feature to cd-table

Add column filtering feature to the cd-table component.
- Create filters from columns.
- Create filter options from row data in columns.
- Allow specifying custom functions to do filtering.
- Allow specifying hard-coded options for filters.
- Allow specifying extra filters other than visible columns on table.

Previously, this feature was implemented in inventory component. Refactor
it to move the logic into cd-table, so all tables can use the feature if
needed.

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.scss
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-table-column-filter.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-table-column-filters-change.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-table-column.ts