Module: check_mk
Branch: master
Commit: b0f44d092bcc29ded4cdca73209e768123d2d785
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b0f44d092bcc29…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Feb 19 14:47:33 2013 +0100
FIX: Several BI display fixes
---
ChangeLog | 3 +++
web/htdocs/bi.css | 9 ++++++++-
web/htdocs/bi.py | 2 +-
web/htdocs/js/bi.js | 3 +++
web/plugins/views/bi.py | 6 +++---
5 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c7618ec..1680d81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,9 @@
BI:
* FIX: fixed invalid links to hosts and services in BI tree view
+ * FIX: fix exception in top/down and bottom/up views
+ * FIX: fix styling of top/down and bottom/up views (borders, padding)
+ * Make titles of non-leaf tree nodes klickable
1.2.2b3:
Checks & Agents:
diff --git a/web/htdocs/bi.css b/web/htdocs/bi.css
index 65f7e3b..473ecb1 100644
--- a/web/htdocs/bi.css
+++ b/web/htdocs/bi.css
@@ -63,6 +63,10 @@ tr.even0 .aggrtree ul.subtree {
padding-bottom: 1px;
}
+.aggrtree span.title span.content.name {
+ cursor: pointer;
+}
+
.aggrtree span.state {
margin-right: 3px;
width: 34px;
@@ -148,4 +152,7 @@ td.aggrtree_box {
.bibox {
padding: 0px;
}
-
+table.aggrtree.ltr td {
+ border: 1px solid #ccc;
+ padding: 3px;
+}
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index 05fe2f0..671410d 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -1483,7 +1483,7 @@ def aggr_render_node(tree, title, mousecode, show_host):
% (effective_state["state"], addclass,
render_bi_state(effective_state["state"]))
if mousecode:
h += '<img class=opentree %s>' % mousecode
- h += '<span class="content name">%s</span>' %
title
+ h += '<span class="content name" %s>%s</span>' %
(mousecode, title)
else:
h += title
diff --git a/web/htdocs/js/bi.js b/web/htdocs/js/bi.js
index 1b93ce7..5427f69 100644
--- a/web/htdocs/js/bi.js
+++ b/web/htdocs/js/bi.js
@@ -24,6 +24,9 @@
function bi_toggle_subtree(oImg, lazy)
{
+ if (oImg.tagName == "SPAN") { // clicked on title,
+ oImg = oImg.previousSibling;
+ }
var oSubtree = oImg.parentNode.childNodes[6];
var url = "bi_save_treestate.py?path=" + escape(oSubtree.id);
var do_open;
diff --git a/web/plugins/views/bi.py b/web/plugins/views/bi.py
index 921f8e1..1afe686 100644
--- a/web/plugins/views/bi.py
+++ b/web/plugins/views/bi.py
@@ -218,14 +218,14 @@ def paint_aggr_tree_ltr(row, mirror):
return gen_node(tree, height, show_host)
def gen_leaf(tree, height, show_host):
- return [(aggr_render_leaf(tree, show_host), height, [])]
+ return [(bi.aggr_render_leaf(tree, show_host), height, [])]
def gen_node(tree, height, show_host):
leaves = []
for node in tree[3]:
if not node[2].get("hidden"):
leaves += gen_table(node, height - 1, show_host)
- h = '<div class="aggr tree">' + aggr_render_node(tree,
tree[2]["title"], '', show_host) + "</div>"
+ h = '<div class="aggr tree">' + bi.aggr_render_node(tree,
tree[2]["title"], '', show_host) + "</div>"
if leaves:
leaves[0][2].append((len(leaves), h))
return leaves
@@ -235,7 +235,7 @@ def paint_aggr_tree_ltr(row, mirror):
tree = filter_tree_only_problems(tree)
depth = bi.status_tree_depth(tree)
leaves = gen_table(tree, depth, row["aggr_hosts"] > 1)
- h = '<table class="aggrtree">'
+ h = '<table class="aggrtree ltr">'
odd = "odd"
for code, colspan, parents in leaves:
h += '<tr>\n'