Module: check_mk
Branch: master
Commit: 2c1cd6f12f5d7f81c585a758c130db7ac2b5bb39
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2c1cd6f12f5d7f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Apr 12 11:40:30 2011 +0200
FIX: ignore case when sorting groups in ...groups snapin
---
ChangeLog | 1 +
web/plugins/sidebar/shipped.py | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 66d3f27..1b4848d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@
Multisite:
* FIX: Nagios-Snapin: avoid duplicate slash in URL
* FIX: custom_style_sheet now also honored by sidebar
+ * FIX: ignore case when sorting groups in ...groups snapin
* Added snmp_uptime, uptime and printer_supply perfometers
BI:
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index a27c989..99e3755 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -157,12 +157,12 @@ sidebar_snapins["views"] = {
def render_groups(what):
data = html.live.query("GET %sgroups\nColumns: name alias\n" % what)
name_to_alias = dict(data)
- groups = [(name_to_alias[name], name) for name in name_to_alias.keys()]
- groups.sort() # sort by Alias!
+ groups = [(name_to_alias[name].lower(), name_to_alias[name], name) for name in
name_to_alias.keys()]
+ groups.sort() # sort by Alias in lowercase
target = views.get_context_link(html.req.user, "%sgroup" % what)
if target:
html.write('<ul>')
- for alias, name in groups:
+ for alias_lower, alias, name in groups:
bulletlink(alias, target + "&%sgroup=%s" % (what,
htmllib.urlencode(name)))
html.write('</ul>')