Module: check_mk
Branch: master
Commit: 2e022fed792125b03ef4c83f709cbe246dfbcf21
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2e022fed792125…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 17 17:46:26 2011 +0100
Show icon if user has modified a filter
---
ChangeLog | 1 +
web/htdocs/check_mk.css | 8 ++++++++
web/htdocs/images/icon_filter_set.png | Bin 0 -> 3259 bytes
web/htdocs/views.py | 7 ++++++-
4 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d9cdac9..3e25df3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* New icon on a service whos host is in downtime
* Only show most frequently used context buttons (configurable
in multisite.mk via context_buttons_to_show)
+ * Show icon if user has modified a view's filter settings
WATO:
* Evolved to full featured monitoring configuration tool!
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index 4fbc484..8da5dbd 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -989,6 +989,14 @@ img.icon {
width: 20px;
height: 20px;
}
+img.tabicon {
+ width: 16px;
+ height: 16px;
+ vertical-align: middle;
+ position: relative;
+ top: -1px;
+ left: 0px;
+}
/* Icon image place inline in some documentation text */
.wato img.icon.docu {
width: 14px;
diff --git a/web/htdocs/images/icon_filter_set.png
b/web/htdocs/images/icon_filter_set.png
new file mode 100644
index 0000000..b11a7b6
Binary files /dev/null and b/web/htdocs/images/icon_filter_set.png differ
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 01676cd..492184c 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1289,7 +1289,12 @@ def show_view(view, show_heading = False, show_buttons = True,
show_footer = Tru
# Filter-button
if 'F' in display_options and len(show_filters) > 0:
filter_isopen = html.var("search", "") == ""
and view["mustsearch"]
- toggle_button("table_filter", filter_isopen, _("Filter"),
["filter"])
+ # Show warning-icon if some filter is set
+ label = _("Filter")
+ if html.var("filled_in") == "filter":
+ label = '<img class=tabicon
src="images/icon_filter_set.png"> %s' % label
+
+ toggle_button("table_filter", filter_isopen, label,
["filter"])
html.write("<td class=minigap></td>\n")
# Command-button, open command form if checkboxes are currently shown