Module: check_mk
Branch: master
Commit: 14e707e9007f78724263fc5f0c7c3b7d7e404ab7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=14e707e9007f78…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Dec 14 17:33:04 2018 +0100
added WK6701: The hostname information was missing when exporting BI data via
csv/json/python
Change-Id: I91d4554b8118d307d8c758dedad2b14a9b2cbc54
---
.werks/6701 | 13 +++++++++++++
cmk/gui/bi.py | 5 +++++
2 files changed, 18 insertions(+)
diff --git a/.werks/6701 b/.werks/6701
new file mode 100644
index 0000000..ac595ad
--- /dev/null
+++ b/.werks/6701
@@ -0,0 +1,13 @@
+Title: The hostname information was missing when exporting BI data via csv/json/python
+Level: 1
+Component: bi
+Class: feature
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1544778288
+
+The hostname and site information was missing on BI end nodes. This has been fixed.
+
+
diff --git a/cmk/gui/bi.py b/cmk/gui/bi.py
index 476b011..03dbadc 100644
--- a/cmk/gui/bi.py
+++ b/cmk/gui/bi.py
@@ -2718,6 +2718,11 @@ def render_tree_json(row):
"in_service_period": tree[0]["in_service_period"],
}
+ if is_leaf:
+ site, hostname = tree[2]["host"]
+ json_node["site"] = site
+ json_node["hostname"] = hostname
+
# Check if we have an assumed state: comparing assumed state (tree[1]) with state
(tree[0])
if tree[1] and tree[0] != tree[1]:
json_node["assumed"] = True