Module: check_mk
Branch: master
Commit: b1f4fff3f9c20bbb45ffa13629a51e6f507c72f5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b1f4fff3f9c20b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 23 15:05:31 2018 +0200
6363 FIX Fixed "host_inventory" exception when using "Has inventory
data" filter
When using the filter "Has inventory data" in a host view an exception like
this could occur: "Internal error: 'host_inventory'"
Change-Id: I4ed0023993db4588b074d8f27bceb9b6c6e0b3cb
---
.werks/6363 | 12 ++++++++++++
cmk/gui/plugins/visuals/inventory.py | 3 +++
2 files changed, 15 insertions(+)
diff --git a/.werks/6363 b/.werks/6363
new file mode 100644
index 0000000..2dc5075
--- /dev/null
+++ b/.werks/6363
@@ -0,0 +1,12 @@
+Title: Fixed "host_inventory" exception when using "Has inventory
data" filter
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1532351063
+
+When using the filter "Has inventory data" in a host view an exception like
+this could occur: "Internal error: 'host_inventory'"
diff --git a/cmk/gui/plugins/visuals/inventory.py b/cmk/gui/plugins/visuals/inventory.py
index 0beb3dd..ddadb0f 100644
--- a/cmk/gui/plugins/visuals/inventory.py
+++ b/cmk/gui/plugins/visuals/inventory.py
@@ -453,6 +453,9 @@ class FilterHasInventory(FilterTristate):
def __init__(self):
super(FilterHasInventory, self).__init__("has_inv", _("Has
Inventory Data"), "host", "host_inventory")
+ def need_inventory(self):
+ return True
+
def filter(self, infoname):
return "" # No Livestatus filtering right now