Module: check_mk
Branch: master
Commit: a7d748e898767b53146ff65c9ba7c1c1e9575154
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a7d748e898767b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 8 15:53:14 2014 +0100
#1693 Added search form to global settings page
It is not always easy to find a global setting in the number of
foldable containers which all can be folded by default. To find
a setting one might have to open multiple of the containers to
get to the requested option. This search form should make it
easier to find a needed option.
---
.werks/1693 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 54 ++++++++++++++++++++++++++++++++++++++++++----------
3 files changed, 58 insertions(+), 10 deletions(-)
diff --git a/.werks/1693 b/.werks/1693
new file mode 100644
index 0000000..e092730
--- /dev/null
+++ b/.werks/1693
@@ -0,0 +1,13 @@
+Title: Added search form to global settings page
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.5i7
+Date: 1418050203
+Class: feature
+
+It is not always easy to find a global setting in the number of
+foldable containers which all can be folded by default. To find
+a setting one might have to open multiple of the containers to
+get to the requested option. This search form should make it
+easier to find a needed option.
diff --git a/ChangeLog b/ChangeLog
index 6b3c831..1ea1273 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -204,6 +204,7 @@
* 1707 WATO rule editor: show title of tag group when rendering the conditions of a rule...
* 1689 Creating WATO backends for each configured site now...
* 1690 Pending changes can now be discarded...
+ * 1693 Added search form to global settings page...
* 1165 FIX: Fixed exception in service discovery of logwatch event console forwarding checks...
* 1490 FIX: Timperiod excludes can now even be configured when creating a timeperiod...
* 1491 FIX: Fixed bug in dynamic lists where removing an item was not always possible...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index dd20af9..0cc26bf 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7377,8 +7377,15 @@ def mode_ldap_config(phase):
# '----------------------------------------------------------------------'
def mode_globalvars(phase):
+ search = html.var("search")
+ if search != None:
+ search = search.strip().lower()
+
if phase == "title":
- return _("Global configuration settings for Check_MK")
+ if search:
+ return _("Global configuration settings matching %s") % html.attrencode(search)
+ else:
+ return _("Global configuration settings for Check_MK")
elif phase == "buttons":
global_buttons()
@@ -7436,11 +7443,24 @@ def mode_globalvars(phase):
else:
return
- render_global_configuration_variables(default_values, current_settings)
+ render_global_configuration_variables(default_values, current_settings, search=search)
-def render_global_configuration_variables(default_values, current_settings, show_all = False):
+def render_global_configuration_variables(default_values, current_settings, show_all=False, search=None):
groupnames = g_configvar_groups.keys()
groupnames.sort()
+
+ html.begin_form("search")
+ html.write(_("Search for settings: "))
+ html.text_input("search", size=32)
+ html.hidden_fields()
+ html.hidden_field("mode", "globalvars")
+ html.set_focus("search")
+ html.write(" ")
+ html.button("_do_seach", _("Search"))
+ html.end_form()
+ html.write('<br>')
+
+ at_least_one_painted = False
html.write('<div class=globalvars>')
for groupname in groupnames:
header_is_painted = False # needed for omitting empty groups
@@ -7456,15 +7476,25 @@ def render_global_configuration_variables(default_values, current_settings, show
else:
continue
+ help_text = type(valuespec.help()) == unicode and valuespec.help().encode("utf-8") or valuespec.help() or ''
+ title_text = type(valuespec.title()) == unicode and valuespec.title().encode("utf-8") or valuespec.title()
+
+ if search and search not in groupname \
+ and search not in domain \
+ and search not in varname \
+ and search not in help_text \
+ and search not in title_text:
+ continue # skip variable when search is performed and nothing matches
+ at_least_one_painted = True
+
if not header_is_painted:
- forms.header(groupname, isopen=False)
+ # always open headers when searching
+ forms.header(groupname, isopen=search)
header_is_painted = True
defaultvalue = default_values.get(varname, valuespec.default_value())
edit_url = make_link([("mode", "edit_configvar"), ("varname", varname), ("site", html.var("site", ""))])
- help_text = type(valuespec.help()) == unicode and valuespec.help().encode("utf-8") or valuespec.help() or ''
- title_text = type(valuespec.title()) == unicode and valuespec.title().encode("utf-8") or valuespec.title()
title = '<a href="%s" class=%s title="%s">%s</a>' % \
(edit_url, varname in current_settings and '"modified"' or '""',
html.strip_tags(help_text), title_text)
@@ -7495,7 +7525,11 @@ def render_global_configuration_variables(default_values, current_settings, show
"snapin_switch_" + (defaultvalue and "on" or "off"))
else:
html.write('<a href="%s">%s</a>' % (edit_url, to_text))
- forms.end()
+
+ if header_is_painted:
+ forms.end()
+ if not at_least_one_painted:
+ html.message(_('Did not find any global setting matching your search.'))
html.write('</div>')
@@ -10107,7 +10141,7 @@ def mode_edit_site_globals(phase):
html.show_error(_("This site is not a replication slave. You cannot configure specific settings for it."))
return
- render_global_configuration_variables(default_values, current_settings, show_all = True)
+ render_global_configuration_variables(default_values, current_settings, show_all=True)
def create_site_globals_file(siteid, tmp_dir):
if not os.path.exists(tmp_dir):
@@ -13839,8 +13873,8 @@ def mode_rulesets(phase, group=None):
help = _("Here you can create explicit checks that are not being created by the automatic service discovery.")
only_used = False
elif search != None:
- title = _("Rules matching ") + search
- help = _("All rules that contain '%s' in their name") % search
+ title = _("Rules matching ") + html.attrencode(search)
+ help = _("All rules that contain '%s' in their name") % html.attrencode(search)
only_used = False
else:
title, help = g_rulegroups.get(group, (group, None))
Module: check_mk
Branch: master
Commit: 9a2760ca63631444d0f1e27a0afd0341596ed3cc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9a2760ca636314…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 8 15:24:08 2014 +0100
#1692 FIX Aggregations with umlauts in title/topic can now be displayed in BI/Availability
---
.werks/1692 | 9 +++++++++
ChangeLog | 1 +
web/plugins/visuals/bi.py | 4 ++--
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/1692 b/.werks/1692
new file mode 100644
index 0000000..4be6b1e
--- /dev/null
+++ b/.werks/1692
@@ -0,0 +1,9 @@
+Title: Aggregations with umlauts in title/topic can now be displayed in BI/Availability
+Level: 1
+Component: bi
+Compatible: compat
+Version: 1.2.5i7
+Date: 1418048520
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index e1484fd..6b3c831 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -241,6 +241,7 @@
BI:
* 1435 FIX: Saving BI aggregations: No longer reports 'Request-URI Too Large'...
* 1559 FIX: Fix link from BI icon to BI views (aggregations affected by this host/service)
+ * 1692 FIX: Aggregations with umlauts in title/topic can now be displayed in BI/Availability
Event Console:
* 1169 Added host state type filter to "recent event history" view
diff --git a/web/plugins/visuals/bi.py b/web/plugins/visuals/bi.py
index 51fa55c..e4087c5 100644
--- a/web/plugins/visuals/bi.py
+++ b/web/plugins/visuals/bi.py
@@ -75,10 +75,10 @@ class BITextFilter(Filter):
html.text_input(self.htmlvars[0])
def heading_info(self):
- return html.var(self.htmlvars[0])
+ return html.var_utf8(self.htmlvars[0])
def filter_table(self, rows):
- val = html.var(self.htmlvars[0])
+ val = html.var_utf8(self.htmlvars[0])
if not val:
return rows
if self.how == "regex":
Module: check_mk
Branch: master
Commit: e95ddf70132b950983657eb8f1ac1cd5733efa01
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e95ddf70132b95…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 8 14:29:01 2014 +0100
#1690 Pending changes can now be discarded
We added a button to the "activate changes" page which can be used to discard
the currently pending changes. This is done by applying the last automatically
created snapshot and activating it.
---
.werks/1690 | 11 ++++
ChangeLog | 1 +
web/htdocs/images/icon_discard.png | Bin 0 -> 3550 bytes
web/htdocs/js/wato.js | 6 ++-
web/htdocs/wato.py | 101 ++++++++++++++++++++++++------------
5 files changed, 86 insertions(+), 33 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=e95ddf7013…
Module: check_mk
Branch: master
Commit: 2f99ab4fce11167cd76bbc9e418f843c2d3738d9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2f99ab4fce1116…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 8 14:57:44 2014 +0100
#1691 FIX Fixed problem when watching BI aggregations with umlauts in titles or group name
---
.werks/1691 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/bi.py | 6 +++---
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.werks/1691 b/.werks/1691
new file mode 100644
index 0000000..92c6635
--- /dev/null
+++ b/.werks/1691
@@ -0,0 +1,9 @@
+Title: Fixed problem when watching BI aggregations with umlauts in titles or group name
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.5i7
+Date: 1418047044
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 0fc2540..96ab0c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -186,6 +186,7 @@
* 1683 FIX: Replaced a lot of old GIF images with better looking PNG images
* 1687 FIX: Add visual to dashboard menu can now be closed with click anywhere on page
* 1709 FIX: Fix exception when a non-Ascii character is part of the variable part of a view title
+ * 1691 FIX: Fixed problem when watching BI aggregations with umlauts in titles or group name
WATO:
* 1170 Added buttons to move rules to top/bottom of the list to ruleset edit dialog
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index 9fcbac7..753a76a 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -1405,7 +1405,7 @@ def ajax_set_assumption():
save_assumptions()
def ajax_save_treestate():
- path_id = html.var("path")
+ path_id = html.var_utf8("path")
current_ex_level, path = path_id.split(":", 1)
current_ex_level = int(current_ex_level)
@@ -1419,9 +1419,9 @@ def ajax_save_treestate():
save_ex_level(current_ex_level)
def ajax_render_tree():
- aggr_group = html.var("group")
+ aggr_group = html.var_utf8("group")
reqhosts = [ tuple(sitehost.split('#')) for sitehost in html.var("reqhosts").split(',') ]
- aggr_title = html.var("title")
+ aggr_title = html.var_utf8("title")
omit_root = not not html.var("omit_root")
boxes = not not html.var("boxes")
only_problems = not not html.var("only_problems")
Module: check_mk
Branch: master
Commit: 28c844617cd31c606d59d08467039c235c4a5d13
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=28c844617cd31c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 8 14:30:31 2014 +0100
#1710 FIX omd_status: Fix totally missing section in Linux agent
Reason was an invalid call to <tt>run_cached</tt>. As a result the agent section
<tt>omd_status</tt> was always empty. This has been fixed.
---
.werks/1710 | 10 ++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1710 b/.werks/1710
new file mode 100644
index 0000000..6e5dfcc
--- /dev/null
+++ b/.werks/1710
@@ -0,0 +1,10 @@
+Title: omd_status: Fix totally missing section in Linux agent
+Level: 2
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1418045381
+Class: fix
+
+Reason was an invalid call to <tt>run_cached</tt>. As a result the agent section
+<tt>omd_status</tt> was always empty. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 5e46b51..7f1614a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -126,6 +126,7 @@
* 1688 FIX: juniper_screenos_mem: Fixed wrong total memory computation
* 1658 FIX: agent_vsphere: no longer crashes when decommissioned vms report no hardware information...
* 1708 FIX: cups_queues: fix outputting of current printer jobs if printer daemon is CUPS...
+ * 1710 FIX: omd_status: Fix totally missing section in Linux agent...
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 3dbaaa1..5f925e1 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -529,7 +529,7 @@ fi
# Check status of OMD sites
if type omd >/dev/null
then
- run_cached omd_status 60 "echo '<<<omd_status>>>' ; omd status --bare --auto"
+ run_cached -s omd_status 60 "omd status --bare --auto"
fi