Module: check_mk
Branch: master
Commit: 4153e91e771966f9570348041cadb6d36dfc9080
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4153e91e771966…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 24 11:11:43 2016 +0100
3344 FIX Removed host inventory painters and sorters from non host based views
---
.werks/3344 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/views/inventory.py | 9 ++++-----
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/.werks/3344 b/.werks/3344
new file mode 100644
index 0000000..b66e77b
--- /dev/null
+++ b/.werks/3344
@@ -0,0 +1,10 @@
+Title: Removed host inventory painters and sorters from non host based views
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1458814286
+
+
diff --git a/ChangeLog b/ChangeLog
index ddfd2a4..c3a44a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -136,6 +136,7 @@
* 3336 FIX: Fixed possible crash on werk list page...
* 3337 FIX: Improved error handling of invalid perfdata in the GUI
* 3339 FIX: Fixed exception on "Aggregations Affected by Service" page when
no host/service given
+ * 3344 FIX: Removed host inventory painters and sorters from non host based views
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node
selection...
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index 2daa3b7..2db86ee 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -56,8 +56,7 @@ inv_filter_info = {
"timestamp" : { "unit" : _("secs") },
}
-
-# Declare all three with one simple call (for simple data types)
+# Declares painters, sorters and filters to be used in views based on all host related
datasources.
def declare_inv_column(invpath, datatype, title, short = None):
if invpath == ".":
name = "inv"
@@ -67,7 +66,7 @@ def declare_inv_column(invpath, datatype, title, short = None):
# Declare column painter
multisite_painters[name] = {
"title" : invpath == "." and _("Inventory Tree")
or (_("Inventory") + ": " + title),
- "columns" : [],
+ "columns" : ["host_inventory"],
"load_inv" : True,
"paint" : lambda row: paint_host_inventory(row, invpath),
"sorter" : name,
@@ -80,7 +79,7 @@ def declare_inv_column(invpath, datatype, title, short = None):
# Declare sorter. It will detect numbers automatically
multisite_sorters[name] = {
"title" : _("Inventory") + ": " + title,
- "columns" : [],
+ "columns" : ["host_inventory"],
"load_inv" : True,
"cmp" : lambda a, b: cmp_inventory_node(a, b, invpath),
}
@@ -368,7 +367,7 @@ def inv_titleinfo_long(invpath, node):
multisite_painters["inventory_tree"] = {
"title" : _("Hardware & Software Tree"),
- "columns" : [],
+ "columns" : ["host_inventory"],
"load_inv" : True,
"paint" : paint_inv_tree,
}