Module: check_mk
Branch: master
Commit: 797d7a316375b17d353db9f5fd736ec52abe10ae
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=797d7a316375b1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 6 15:06:18 2019 +0100
Fix duplicate filters in some views after recent refactoring
Peer reviewed by ON.
Change-Id: I2f8f0d26897dffa888289406baa94c58f692c555
---
cmk/gui/visuals.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/cmk/gui/visuals.py b/cmk/gui/visuals.py
index 011e363..a6ebd3e 100644
--- a/cmk/gui/visuals.py
+++ b/cmk/gui/visuals.py
@@ -1087,24 +1087,24 @@ def filters_of_visual(visual, info_keys, link_filters=None):
if link_filters is None:
link_filters = []
- filters = []
+ filters = {}
for info_key in info_keys:
if info_key in visual['single_infos']:
for key in info_params(info_key):
- filters.append(get_filter(key))
+ filters[key] = get_filter(key)
continue
for key, val in visual['context'].items():
if isinstance(val, dict): # this is a real filter
try:
- filters.append(get_filter(key))
+ filters[key] = get_filter(key)
except KeyError:
pass # Silently ignore not existing filters
# See get_link_filter_names() comment for details
for key, dst_key in get_link_filter_names(visual, info_keys, link_filters):
- filters.append(get_filter(dst_key))
+ filters[dst_key] = get_filter(dst_key)
# add ubiquitary_filters that are possible for these infos
for fn in get_ubiquitary_filters():
@@ -1114,9 +1114,9 @@ def filters_of_visual(visual, info_keys, link_filters=None):
if fn == "wato_folder" and (not filter_.available() or 'host' in visual['single_infos']):
continue
if not filter_.info or filter_.info in info_keys:
- filters.append(filter_)
+ filters[fn] = filter_
- return list(set(filters)) # remove duplicates
+ return filters.values()
# TODO: Cleanup this special case
Module: check_mk
Branch: master
Commit: b4a7daeda5ed84f0c776321de95172605ad27332
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b4a7daeda5ed84…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 6 13:38:35 2019 +0100
Fixed broken link
Change-Id: Ib0a6fd25aece6ba4da5c5c4b3a9c87cc8f4f20af
---
cmk/gui/watolib/sites.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmk/gui/watolib/sites.py b/cmk/gui/watolib/sites.py
index 340d5f7..cf7cfc4 100644
--- a/cmk/gui/watolib/sites.py
+++ b/cmk/gui/watolib/sites.py
@@ -188,7 +188,7 @@ class SiteManagement(object):
"transport. Starting with Check_MK 1.6 it is possible to use encrypted Livestatus "
"communication. Sites created with 1.6 will automatically use encrypted communication "
"by default. Sites created with previous versions need to be configured manually to "
- "enable the encryption. Have a look at <a href=\"werks.py?werk=7017\">werk #7017</a> "
+ "enable the encryption. Have a look at <a href=\"werk.py?werk=7017\">werk #7017</a> "
"for further information."),
)