Module: check_mk
Branch: master
Commit: 87e607a115068b36f61e41897291104f75b70822
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=87e607a115068b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 14 15:18:14 2016 +0100
3289 FIX Fixed missing filters in HW-/SW-Inventory views after editing the view
When editing HW-/SW-Inventory based views like the software package search,
all software related filters were gone after saving the view. Only removing
the customized view helped to bring the old view back.
Loosing the filters has now been fixed. You can now edit such views as expected.
---
.werks/3289 | 14 ++++++++++++++
ChangeLog | 1 +
web/plugins/visuals/inventory.py | 16 ++++++++--------
3 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/.werks/3289 b/.werks/3289
new file mode 100644
index 0000000..8511a5f
--- /dev/null
+++ b/.werks/3289
@@ -0,0 +1,14 @@
+Title: Fixed missing filters in HW-/SW-Inventory views after editing the view
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1457964984
+
+When editing HW-/SW-Inventory based views like the software package search,
+all software related filters were gone after saving the view. Only removing
+the customized view helped to bring the old view back.
+
+Loosing the filters has now been fixed. You can now edit such views as expected.
diff --git a/ChangeLog b/ChangeLog
index c69465b..65724fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -157,6 +157,7 @@
* 3219 FIX: lnx_distro: Now detecting Oracle VM Server correctly
* 3229 FIX: lnx_distro: SLES based systems have now an OS name inventorized\
* 3265 FIX: mk_inventory.solaris: fix problem on Solaris 10, do prtdiag and prtpicl
only in global zone
+ * 3289 FIX: Fixed missing filters in HW-/SW-Inventory views after editing the
view...
1.2.8b1:
diff --git a/web/plugins/visuals/inventory.py b/web/plugins/visuals/inventory.py
index 085875f..311f4fe 100644
--- a/web/plugins/visuals/inventory.py
+++ b/web/plugins/visuals/inventory.py
@@ -39,7 +39,7 @@ def try_int(x):
class FilterInvtableText(Filter):
def __init__(self, infoname, name, title):
varname = infoname + "_" + name
- Filter.__init__(self, varname, title, infoname + "s", [varname], [])
+ Filter.__init__(self, varname, title, infoname, [varname], [])
def display(self):
htmlvar = self.htmlvars[0]
@@ -64,7 +64,7 @@ class FilterInvtableText(Filter):
class FilterInvtableAge(Filter):
def __init__(self, infoname, name, title, only_days=False):
name = infoname + "_" + name
- Filter.__init__(self, name, title, infoname + "s", [name +
"_from", name + "_to"], [])
+ Filter.__init__(self, name, title, infoname, [name + "_from", name +
"_to"], [])
def display(self):
html.write("<table><tr><td style='vertical-align:
middle;'>")
@@ -120,7 +120,7 @@ class FilterInvtableTimestampAsAge(FilterInvtableAge):
class FilterInvtableIDRange(Filter):
def __init__(self, infoname, name, title):
name = infoname + "_" + name
- Filter.__init__(self, name, title, infoname + "s", [name +
"_from", name + "_to"], [])
+ Filter.__init__(self, name, title, infoname, [name + "_from", name +
"_to"], [])
def display(self):
html.write(_("from:") + " ")
@@ -152,7 +152,7 @@ class FilterInvtableOperStatus(Filter):
def __init__(self, infoname, name, title):
varname = infoname + "_" + name
varnames = [ varname + "_" + str(x) for x in interface_oper_states ]
- Filter.__init__(self, varname, title, infoname + "s", varnames, [])
+ Filter.__init__(self, varname, title, infoname, varnames, [])
def display(self):
html.begin_checkbox_group()
@@ -189,7 +189,7 @@ class FilterInvtableOperStatus(Filter):
class FilterInvtableAdminStatus(Filter):
def __init__(self, infoname, name, title):
varname = infoname + "_" + name
- Filter.__init__(self, varname, title, infoname + "s", [ varname ], [])
+ Filter.__init__(self, varname, title, infoname, [ varname ], [])
def display(self):
html.begin_radio_group(horizontal = True)
@@ -212,7 +212,7 @@ class FilterInvtableAdminStatus(Filter):
class FilterInvtableAvailable(Filter):
def __init__(self, infoname, name, title):
varname = infoname + "_" + name
- Filter.__init__(self, varname, title, infoname + "s", [ varname ], [])
+ Filter.__init__(self, varname, title, infoname, [ varname ], [])
def display(self):
html.begin_radio_group(horizontal = True)
@@ -238,7 +238,7 @@ class FilterInvtableAvailable(Filter):
class FilterInvtableInterfaceType(Filter):
def __init__(self, infoname, name, title):
varname = infoname + "_" + name
- Filter.__init__(self, varname, title, infoname + "s", [ varname ], [])
+ Filter.__init__(self, varname, title, infoname, [ varname ], [])
def double_height(self):
return True
@@ -276,7 +276,7 @@ class FilterInvtableInterfaceType(Filter):
class FilterInvtableVersion(Filter):
def __init__(self, infoname, name, title):
varname = infoname + "_" + name
- Filter.__init__(self, varname, title, infoname + "s", [varname +
"_from", varname + "_to"], [])
+ Filter.__init__(self, varname, title, infoname, [varname + "_from",
varname + "_to"], [])
def display(self):
htmlvar = self.htmlvars[0]