Module: check_mk
Branch: master
Commit: de1774d9f86ffcbe1674867b4531573bf1b886da
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=de1774d9f86ffc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 29 14:36:14 2012 +0200
FIX: Group filters can handle groups without aliases now
---
ChangeLog | 1 +
web/plugins/views/filters.py | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 51d510c..f5511bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,7 @@
* FIX: Oracle checks try to handle ORA-* errors reported by the agent
All oracle checks will return UNKNOWN when finding an ORA-* message
* FIX: filesystem levels set via WATO didn't work, but do now
+ * FIX: Group filters can handle groups without aliases now
1.2.0b1:
Core, Setup, etc.:
diff --git a/web/plugins/views/filters.py b/web/plugins/views/filters.py
index bc5f8ad..728a8da 100644
--- a/web/plugins/views/filters.py
+++ b/web/plugins/views/filters.py
@@ -80,7 +80,8 @@ def all_groups(what):
groups = dict(html.live.query("GET %sgroups\nColumns: name alias\n" %
what))
names = groups.keys()
names.sort()
- return [ (name, groups[name]) for name in names ]
+ # use alias by default but fallback to name if no alias defined
+ return [ (name, groups[name] or name) for name in names ]
class FilterGroupCombo(Filter):
def __init__(self, what, title, enforce):