Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: c82ee402db872a457869aa65d5503fa3c8339894
https://github.com/tribe29/checkmk/commit/c82ee402db872a457869aa65d5503fa3c…
Author: Óscar Nájera <oscar.najera(a)tribe29.com>
Date: 2021-11-29 (Mon, 29 Nov 2021)
Changed paths:
A cmk/gui/legacy_filters.py
M cmk/gui/plugins/visuals/filters.py
M cmk/gui/plugins/visuals/inventory.py
M cmk/gui/plugins/visuals/utils.py
M tests/unit/cmk/gui/plugins/visuals/test_filters.py
M tests/unit/cmk/gui/test_visuals.py
Log Message:
-----------
Modularize tri state filters
Separate livestatus filter logic out of visual logic
Use closures instead of class attributes which needed to be propagated
across all filter classes. Closures allow to isolate state. Now the
livestatus query constructor is just a function injected so is the
filter table. The is less need for subclassing.
I'm still unsure if options would belong to filter, completely free or
to the visual display. For the moment, they are on the isolated filter.
Still checkmk logic is that filters are registered on the visuals filter
registry. They are still dependent on the GUI, that might need to be
split later on.
Change-Id: Ia3cd9d21330464d0178fefb02829deb524156f5f