Module: check_mk
Branch: master
Commit: 43695b4fd499a96f78e0fc74117660fc25dad1ec
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=43695b4fd499a9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Aug 22 08:46:27 2014 +0200
Fixed dynamic parts of view titles for single context type views
---
web/htdocs/views.py | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 26ca660..d8f2f1c 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1396,12 +1396,16 @@ def view_title(view):
extra_titles = [ ]
datasource = multisite_datasources[view["datasource"]]
tablename = datasource["table"]
- # FIXME: What about single object context_types contextes?
- used_filters = [ multisite_filters[fn] for fn in view["context"].keys() ]
- for filt in used_filters:
- heading = filt.heading_info(tablename)
- if heading:
- extra_titles.append(heading)
+
+ context_type = visuals.context_types[view['context_type']]
+ if context_type['single']:
+ extra_titles = [ v for k, v in visuals.get_context_html_vars(view) ]
+ else:
+ used_filters = [ multisite_filters[fn] for fn in view["context"].keys()
]
+ for filt in used_filters:
+ heading = filt.heading_info(tablename)
+ if heading:
+ extra_titles.append(heading)
title = _u(view["title"]) + " " + ",
".join(extra_titles)