Module: check_mk
Branch: master
Commit: fc7fc9e4fdb98f1598c48e5785e2ca64b3aa434e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fc7fc9e4fdb98f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 4 13:27:39 2013 +0100
FIX: Services in hosttables now use the service name as header (if no custom title set)
---
ChangeLog | 1 +
web/htdocs/views.py | 3 ++-
web/plugins/views/layouts.py | 2 ++
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9230d87..53d0026 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -79,6 +79,7 @@
* FIX: Views: toggling forms does not disable the checkbox button anymore
* FIX: Dashboard: Fixed wrong display options in links after data reloads
* FIX: Fixed "remove all downtimes" button in views when no downtimes to be
deleted
+ * FIX: Services in hosttables now use the service name as header (if no custom title
set)
WATO:
* FIX: Fixed generated manual check definitions for checks without items
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 04ad94f..89d9ada 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2440,8 +2440,9 @@ def paint_header(view, p):
t = painter.get("short", painter["title"])
if len(p) >= 4: # join column
join_index = p[3]
+ t = p[3] # use join index (service name) as title
if len(p) >= 5 and p[4]:
- t = p[4]
+ t = p[4] # use custom defined title
# Optional: Sort link in title cell
# Use explicit defined sorter or implicit the sorter with the painter name
diff --git a/web/plugins/views/layouts.py b/web/plugins/views/layouts.py
index cd6d3fd..1d63b5a 100644
--- a/web/plugins/views/layouts.py
+++ b/web/plugins/views/layouts.py
@@ -78,6 +78,8 @@ def render_single_dataset(rows, view, group_painters, painters,
num_columns, _ig
painter, link = p[0:2]
if len(p) >= 5 and p[4]:
title = p[4] # Use custom title
+ elif len(p) == 4 and p[3]:
+ title = p[3] # Use the join index (service name) as title
else:
title = painter["title"]