Module: check_mk
Branch: master
Commit: 8afb7d8c59f71767eb6eed158e6f5d3820fdb782
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8afb7d8c59f717…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Oct 29 18:23:09 2011 +0200
WATO: fix typo in help text
---
web/plugins/wato/check_mk_configuration.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index cdd9aac..355b91b 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -459,7 +459,7 @@ register_rule(group,
title = _("Enable/disable notifications for hosts"),
help = _("This setting allows you to disable notifications about problems of a "
"host completely. Per default all notifications are enabled. Sometimes "
- "it is more conveniant to just disable notifications then to remove a "
+ "it is more convenient to just disable notifications then to remove a "
"host completely from the monitoring. Note: this setting has no effect "
"on the notifications of service problems of a host."),
choices = [ ("1", _("Enable host notifications")),
Module: check_mk
Branch: master
Commit: e354584d1b994a39fe125fee4ea675de9dc54307
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e354584d1b994a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Oct 29 17:59:49 2011 +0200
WATO: check for duplicate timeperiod names
---
web/htdocs/wato.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index b000a14..c96dfe7 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5165,6 +5165,10 @@ def mode_edit_timeperiod(phase):
raise MKUserError("name", _("Please specify a name of the new timeperiod."))
if not re.match("^[-a-z0-9A-Z_]*$", name):
raise MKUserError("name", _("Invalid timeperiod name. Only the characters a-z, A-Z, 0-9, _ and - are allowed."))
+ if name in timeperiods:
+ raise MKUserError("name", _("This name is already being used by another timeperiod."))
+ if name == "7X24":
+ raise MKUserError("name", _("The time period name 7X24 cannot be used. It is always autmatically defined."))
timeperiods[name] = timeperiod
log_pending(None, "edit-timeperiods", _("Created new time period %s" % name))
else:
@@ -5183,6 +5187,7 @@ def mode_edit_timeperiod(phase):
html.write("</td><td class=content>")
if new:
html.text_input("name")
+ html.set_focus("name")
else:
html.write(name)
html.write("</td></tr>")
@@ -5196,6 +5201,8 @@ def mode_edit_timeperiod(phase):
html.write(_("Alias") + "<br><i>" + _("A description of the timeperiod</i>"))
html.write("</td><td class=content>")
html.text_input("alias", alias, size = 50)
+ if not new:
+ html.set_focus("alias")
html.write("</td></tr>")
# Week days
Module: check_mk
Branch: master
Commit: 209496b8b52fc387af3ffba734856a9d3bb9afd1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=209496b8b52fc3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Oct 29 11:44:38 2011 +0200
WATO: rule editor: add titles to host tags
---
web/htdocs/js/wato.js | 9 +++++++
web/htdocs/wato.py | 63 +++++++++++++++++++++++++++++++-----------------
2 files changed, 50 insertions(+), 22 deletions(-)
diff --git a/web/htdocs/js/wato.js b/web/htdocs/js/wato.js
index f10930f..0480f9b 100644
--- a/web/htdocs/js/wato.js
+++ b/web/htdocs/js/wato.js
@@ -84,6 +84,15 @@ function wato_toggle_dropdown(oDropdown, divid) {
oDiv = null;
}
+function wato_toggle_dropdownn(oDropdown, divid) {
+ var oDiv = document.getElementById(divid);
+ if (oDropdown.value == "ignore")
+ oDiv.style.display = "none";
+ else
+ oDiv.style.display = "";
+ oDiv = null;
+}
+
// ----------------------------------------------------------------------------
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index b0827fe..7b6f936 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -4432,9 +4432,9 @@ class ElementSelection(ValueSpec):
self.load_elements()
if len(self._elements) == 0:
raise MKUserError(varprefix,
- _("You cannot save this rule. There are not defined any elements for this selection yet." % self._what))
+ _("You cannot save this rule. There are not defined any elements for this selection yet."))
if value not in self._elements:
- raise MKUserError(varprefix, _("%s is not an existing element in this selection.") % (value, self._what))
+ raise MKUserError(varprefix, _("%s is not an existing element in this selection.") % (value,))
def validate_datatype(self, value, varprefix):
if type(value) != str:
@@ -7830,29 +7830,48 @@ def mode_edit_rule(phase):
html.write(_("You have not configured any host tags. If you work with rules "
"you should better do so and add a <tt>wato_host_tags = ..</tt> "
"to your <tt>multisite.mk</tt>. You will find an example there."))
- for id, title, tags in config.wato_host_tags:
- default_tag = None
- ignore = True
- for t in tag_specs:
- if t[0] == '!':
- n = True
- t = t[1:]
+ else:
+ html.write("<table>")
+ for id, title, tags in config.wato_host_tags:
+ html.write("<tr><td>%s: </td>" % title)
+ default_tag = None
+ ignore = True
+ for t in tag_specs:
+ if t[0] == '!':
+ n = True
+ t = t[1:]
+ else:
+ n = False
+ if t in [ x[0] for x in tags]:
+ ignore = False
+ negate = n
+ if ignore:
+ deflt = "ignore"
+ elif negate:
+ deflt = "isnot"
+ else:
+ deflt = "is"
+
+ html.write("<td>")
+ html.select("tag_" + id, [
+ ("ignore", _("ignore")),
+ ("is", _("is")),
+ ("isnot", _("isnot"))], deflt,
+ onchange="wato_toggle_dropdownn(this, 'tag_sel_%s');" % id)
+ html.write("</td><td>")
+ if html.form_submitted():
+ div_is_open = html.var("tag_" + id) != "ignore"
else:
- n = False
- if t in [ x[0] for x in tags]:
- ignore = False
- negate = n
-
- html.radiobutton("tag_" + id, "ignore", ignore, _("ignore"))
- html.write(" ")
- html.radiobutton("tag_" + id, "is", not ignore and not negate, _("is"))
- html.write(" ")
- html.radiobutton("tag_" + id, "isnot", not ignore and negate, _("is not"))
- html.write(" ")
- html.select("tagvalue_" + id, [t[0:2] for t in tags if t[0] != None], deflt=default_tag)
- html.write("<br>")
+ div_is_open = deflt != "ignore"
+ html.write('<div id="tag_sel_%s" style="white-space: nowrap; %s">' % (
+ id, not div_is_open and "display: none;" or ""))
+ html.select("tagvalue_" + id, [t[0:2] for t in tags if t[0] != None], deflt=default_tag)
+ html.write("</div>")
+ html.write("</td></tr>")
+ html.write("</table>")
html.write("</td></tr>")
+
# Explicit hosts / ALL_HOSTS
html.write("<tr><td class=legend>")
html.write(_("Explicit hosts"))
Module: check_mk
Branch: master
Commit: e25e677bce3ac4f008757e8d798ee37ac60d0e90
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e25e677bce3ac4…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Oct 29 11:04:47 2011 +0200
Fixed ChangeLog, moved message to 1.1.12p1
---
ChangeLog | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 16aec47..7f09a6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,8 +26,6 @@
Multisite:
* FIX: Fixed encoding problem when opening dashboard
- * FIX: Added id parameter to render_statistics() method to allow more than
- one pie dashlet for host/service stats
1.1.12p1:
@@ -35,6 +33,8 @@
* FIX: mk_oracle now also detects XE databases
* FIX: printer_alerts: handle 0-entries of Brother printers
* FIX: printer_supply: fix Perf-O-Meter if no max known
+ * FIX: Added id parameter to render_statistics() method to allow more than
+ one pie dashlet for host/service stats
Multisite:
* FIX: finally fixed long-wanted "NagStaMon create hundreds