Module: check_mk
Branch: master
Commit: 6698f24491d37bc2e0b48fc2c13bd70615a7de26
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6698f24491d37b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 6 11:42:18 2017 +0200
4950 FIX Virtual host tree: Fixed navigating back to root of tree
Change-Id: I170f6490cc0175f64a09c2e2445e6573cbce120a
---
.werks/4950 | 10 ++++++++++
web/htdocs/sidebar.py | 2 +-
web/plugins/sidebar/shipped.py | 3 ++-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/4950 b/.werks/4950
new file mode 100644
index 0000000..af34f14
--- /dev/null
+++ b/.werks/4950
@@ -0,0 +1,10 @@
+Title: Virtual host tree: Fixed navigating back to root of tree
+Level: 1
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1499334098
+Class: fix
+
+
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index b1a8b9f..e60c1cc 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -651,7 +651,7 @@ def ajax_tag_tree():
html.write("OK")
def ajax_tag_tree_enter():
- path = html.var("path").split("|") if
html.has_var("path") else []
+ path = html.var("path").split("|") if html.var("path")
else []
tree_conf = config.user.load_file("virtual_host_tree", {"tree":
0, "cwd": {}})
tree_conf["cwd"][tree_conf["tree"]] = path
config.user.save_file("virtual_host_tree", tree_conf)
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index 4bf3e13..e6d0300 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -1835,7 +1835,8 @@ def compute_tag_tree(taglist):
try:
sites.live().set_prepend_site(True)
query = "GET hosts\n" \
- "Columns: host_name filename state num_services_ok num_services_warn
num_services_crit num_services_unknown custom_variables"
+ "Columns: host_name filename state num_services_ok num_services_warn
" \
+ "num_services_crit num_services_unknown custom_variables"
hosts = sites.live().query(query)
finally:
sites.live().set_prepend_site(False)