Module: check_mk
Branch: master
Commit: ac781af774bbb8ee35a755a4c38bf24c04c21702
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ac781af774bbb8…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon May 26 14:59:58 2014 +0200
Virtual Host Tree: fix switching of different tree layouts
The bug was introduced by the new "bomb" icon.
---
web/htdocs/js/checkmk.js | 1 +
web/plugins/sidebar/shipped.py | 14 ++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index d0957ce..213d4e5 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -239,6 +239,7 @@ function post_url(url, params) {
AJAX.send(params);
}
+
function bulkUpdateContents(ids, codes) {
var codes = eval(codes);
for (var i = 0, len = ids.length; i < len; i++) {
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index 39756de..1fa1868 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -1309,12 +1309,14 @@ def tag_tree_bullet(state, leaf):
def render_tag_tree_level(taggroups, path, title, tree):
bullet = tag_tree_bullet(tag_tree_worst_state(tree), False)
if tag_tree_has_svc_problems(tree):
- html.plug()
- url = tag_tree_url(taggroups, path, "svcproblems")
- html.icon_button(url, _("Show the service problems contained in this
branch"),
- "svc_problems", target="main")
- bullet += html.drain()
- html.unplug()
+ # We cannot use html.plug() here, since this is not (yet)
+ # reentrant and it is used by the sidebar snapin updater.
+ # So we need to duplicate the code of icon_button here:
+ bullet += ('<a target="main" onfocus="if (this.blur)
this.blur();" href="%s">'
+ '<img align=absmiddle class=iconbutton title="%s"
src="images/button_svc_problems_lo.png" '
+ 'onmouseover="hilite_icon(this, 1)"
onmouseout="hilite_icon(this, 0)"></a>' % (
+ tag_tree_url(taggroups, path, "svcproblems"),
+ _("Show the service problems contained in this branch")))
if path:
html.begin_foldable_container("tag-tree", ".".join(map(str,
path)), False, bullet + title)