Module: check_mk
Branch: master
Commit: 7ca2b6a32ad6f62f2fc50f85e97742cf37a3792a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ca2b6a32ad6f6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 1 21:25:38 2016 +0100
JSON export of BI honors URL var expansion_level now
---
web/htdocs/bi.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index eea8175..07bc9c3 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -1551,7 +1551,9 @@ def render_tree_json(row):
json_node = render_node_json(node, show_host)
is_leaf = len(node) == 3
- if not is_leaf:
+ is_next_level_open = len(path) <= expansion_level
+
+ if not is_leaf and is_next_level_open:
json_node["nodes"] = []
for child_node in node[3]:
if not child_node[2].get("hidden"):