Module: check_mk
Branch: master
Commit: e232fabfd13698fb65bb6e157c973c10ec17044b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e232fabfd13698…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Aug 31 12:33:31 2011 +0200
Adding missing sorter for comment types (host/service)
---
web/htdocs/views.py | 3 ++-
web/plugins/views/sorters.py | 1 +
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 356e59d..4c139f5 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2262,7 +2262,8 @@ def get_primary_sorter_order(view, painter):
def get_separated_sorters(view):
group_sort = [ (get_sorter_name_of_painter(multisite_painters[p[0]]), False)
for p in view['group_painters']
- if p[0] in multisite_painters ]
+ if p[0] in multisite_painters
+ and get_sorter_name_of_painter(multisite_painters[p[0]]) is not
None ]
view_sort = [ s for s in view['sorters'] if not s[0] in group_sort ]
# Get current url individual sorters. Parse the "sort" url parameter,
diff --git a/web/plugins/views/sorters.py b/web/plugins/views/sorters.py
index 9e6f87a..951f770 100644
--- a/web/plugins/views/sorters.py
+++ b/web/plugins/views/sorters.py
@@ -229,6 +229,7 @@ declare_1to1_sorter("comment_author",
cmp_simple_string)
declare_1to1_sorter("comment_comment", cmp_simple_string)
declare_1to1_sorter("comment_time", cmp_simple_number)
declare_1to1_sorter("comment_expires", cmp_simple_number, reverse =
True)
+declare_1to1_sorter("comment_what", cmp_simple_number)
declare_simple_sorter("comment_type", _("Comment type"),
"comment_type", cmp_simple_number)
# Downtimes