Module: check_mk
Branch: master
Commit: 8daa6355a40a996ce425b857ad5fadb5d4ff4af2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8daa6355a40a99…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Oct 7 17:57:41 2014 +0200
This filter just worked in the positive sense, not in the negative or
in the ignore sense. This has been fixed.
---
.werks/1379 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/visuals/inventory.py | 8 +++++++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/1379 b/.werks/1379
new file mode 100644
index 0000000..74e6964
--- /dev/null
+++ b/.werks/1379
@@ -0,0 +1,10 @@
+Title: Fixed filter "Host has inventory data"
+Level: 1
+Component: inv
+Compatible: compat
+Version: 1.2.5i6
+Date: 1412697314
+Class: fix
+
+This filter just worked in the positive sense, not in the negative or
+in the ignore sense. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 554de9d..5bc5c41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -164,6 +164,7 @@
NOTE: Please refer to the migration notes!
* 0653 script to extract hw/sw inventory data in csv format...
* 0655 FIX: win_cpuinfo and mk_inventory.ps1 agent: unit of CPU speed fixed, fixes
for long output lines in agent
+ * 1379 FIX: Fixed filter "Host has inventory data"...
check:
* 1384 oracle_jobs: new WATO rules, changed service name to SID.OWNER.NAME...
diff --git a/web/plugins/visuals/inventory.py b/web/plugins/visuals/inventory.py
index b7701c4..6d96135 100644
--- a/web/plugins/visuals/inventory.py
+++ b/web/plugins/visuals/inventory.py
@@ -121,7 +121,13 @@ class FilterHasInventory(FilterTristate):
return "" # No Livestatus filtering right now
def filter_table(self, rows):
- return [ row for row in rows if row["host_inventory"] ]
+ tri = self.tristate_value()
+ if tri == -1:
+ return rows
+ elif tri == 1:
+ return [ row for row in rows if row["host_inventory"] ]
+ else: # not
+ return [ row for row in rows if not row["host_inventory"] ]
declare_filter(801, FilterHasInventory())