Module: check_mk
Branch: master
Commit: e551045102e55004a887e1f2570fe4e513039e36
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e551045102e550…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 21 10:25:45 2012 +0200
FIX: Totally hiding hidden filters from view editor now
---
ChangeLog | 7 ++++---
web/htdocs/forms.py | 8 +++++---
web/htdocs/views.py | 2 +-
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5dabe23..9f781b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -100,9 +100,6 @@
* FIX: Fixed error in printer_supply valuespec which lead to an exception
when defining host/service specific rules
* FIX: Fixed button url icon in docu-url link
- * FIX: Fixed handling of filter configuration in view editor where filters
- are using same variable names. Overlaping filters are now disabled
- in the editor.
BI:
* Great speed up of rule compilation in large environments
@@ -136,6 +133,10 @@
* FIX: Fixed bug in alert statistics view (only last 1000 lines were
processed for calculating the statistics)
* FIX: Added missing downtime icon for comment view
+ * FIX: Fixed handling of filter configuration in view editor where filters
+ are using same variable names. Overlaping filters are now disabled
+ in the editor.
+ * FIX: Totally hiding hidden filters from view editor now
Livecheck:
* FIX: Compile livecheck also if diet libc is missing
diff --git a/web/htdocs/forms.py b/web/htdocs/forms.py
index 3e96ff1..74b18c0 100644
--- a/web/htdocs/forms.py
+++ b/web/htdocs/forms.py
@@ -137,14 +137,16 @@ def container():
(g_section_isopen and "open" or "closed"))
g_section_open = True
-def section(title = None, checkbox = None, id = "", simple=False):
+def section(title = None, checkbox = None, id = "", simple=False, hide =
False):
global g_section_open
if g_section_open:
html.write('</td></tr>')
if id:
id = ' id="%s"' % id
- html.write('<tr class="%s"%s><td
class="legend%s">' %
- (g_section_isopen and "open" or "closed", id, simple and
" simple" or ""))
+ html.write('<tr class="%s"%s%s><td
class="legend%s">' %
+ (g_section_isopen and "open" or "closed", id,
+ hide and ' style="display:none;"' or '',
+ simple and " simple" or ""))
if title:
html.write('<div class="title%s">%s<span
class="dots">%s</span></div>' %
(checkbox and " withcheckbox" or "", title,
"."*100))
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index eaf7dd9..37711e9 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -619,7 +619,7 @@ def page_edit_view():
shown_help = False
for sortindex, title, fname, filt in s:
- forms.section(title)
+ forms.section(title, hide = not filt.visible())
if not shown_help:
html.help(_("Please configure, which of the available filters will be
used in this "
"view. <br><br><b>Show to user</b>: the
user will be able to see and modify these "