Module: check_mk
Branch: master
Commit: fd94aa09d1a042781ac5ecc1e185420ff3ae2d51
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fd94aa09d1a042…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon May 2 10:01:43 2011 +0200
Multisite: custom title for join columns
---
web/htdocs/views.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index b12c406..2768d0f 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1299,7 +1299,8 @@ def do_table_join(master_ds, master_rows, master_filters,
join_painters, join_co
# Create additional filters
join_filter = ""
- for paintfunc, linkview, title, join_key in join_painters:
+ for entry in join_painters:
+ paintfunc, linkview, title, join_key = entry[:4]
join_filter += "Filter: %s = %s\n" % (join_slave_column, join_key )
join_filter += "Or: %d\n" % len(join_painters)
query = master_filters + join_filter
@@ -2013,7 +2014,10 @@ def paint(p, row):
def paint_header(p):
painter = p[0]
if len(p) >= 4: # join column
- t = p[3]
+ if len(p) >= 5 and p[4]:
+ t = p[4]
+ else:
+ t = p[3]
else:
t = painter.get("short", painter["title"])
html.write("<th>%s</th>" % t)