Module: check_mk
Branch: master
Commit: 8d1c88e99339c51d06b071ea36b1c2e71ed7ce1c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8d1c88e99339c5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 14 14:02:45 2017 +0200
Reclassified werk
Change-Id: Ie80809146bac64fdb2e1b986d3f6d2e9cc95287e
---
.werks/4915 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.werks/4915 b/.werks/4915
index 02001ea..6a610f6 100644
--- a/.werks/4915
+++ b/.werks/4915
@@ -5,7 +5,7 @@ Compatible: compat
Edition: cre
Version: 1.5.0i1
Date: 1499693045
-Class: feature
+Class: fix
The graphs have been different between common memory checks and services
provided by solaris_mem. This has been changed now. A side effect is the
Module: check_mk
Branch: master
Commit: 89c5a41941130b8bb0c8fce18345998aafbfeaf3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=89c5a41941130b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 14 09:03:46 2017 +0200
4991 FIX Fixed the Installed-Size header of baked deb packages
The debian packages of the agents previously had a fixed Installed-Size
header of 1 KB which is obviously not correct. The estimated installed
size is now calculated individually for each package.
Change-Id: I08cfb5f456422b41de2035e711f1e2be1a143baf
---
.werks/4991 | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/.werks/4991 b/.werks/4991
new file mode 100644
index 0000000..510ae12
--- /dev/null
+++ b/.werks/4991
@@ -0,0 +1,13 @@
+Title: Fixed the Installed-Size header of baked deb packages
+Level: 1
+Component: agents
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.5.0i1
+Date: 1500015688
+
+The debian packages of the agents previously had a fixed Installed-Size
+header of 1 KB which is obviously not correct. The estimated installed
+size is now calculated individually for each package.
Module: check_mk
Branch: master
Commit: 979a4a38d199f1d5d89e63bf9bbdde1ce09b670a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=979a4a38d199f1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 14 11:57:47 2017 +0200
Improved error handling when trying to edit/clone not existing notification rules
Change-Id: I9cde608d325bfa1caacaa3a70f2c10a80aa4b6c0
---
web/htdocs/htmllib.py | 6 +++++-
web/htdocs/wato.py | 14 ++++++++++----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 26eed7f..f35f0a9 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -1116,7 +1116,10 @@ class RequestHandler(object):
raise MKUserError(varname, _("The given text is wrong encoded. "
"You need to provide a UTF-8 encoded text."))
- def get_integer_input(self, varname):
+ def get_integer_input(self, varname, deflt=None):
+ if deflt is not None and not self.has_var(varname):
+ return deflt
+
try:
return int(self.var(varname))
except TypeError:
@@ -1124,6 +1127,7 @@ class RequestHandler(object):
except ValueError:
raise MKUserError(varname, _("The parameter \"%s\" is not an integer.") % varname)
+
# Returns a dictionary containing all parameters the user handed over to this request.
# The concept is that the user can either provide the data in a single "request" variable,
# which contains the request data encoded as JSON, or provide multiple GET/POST vars which
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 7b7d7d4..c458be0 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8640,8 +8640,8 @@ notification_rule_start_async_repl = False
def mode_notification_rule(phase, profilemode):
global notification_rule_start_async_repl
- edit_nr = int(html.var("edit", "-1"))
- clone_nr = int(html.var("clone", "-1"))
+ edit_nr = html.get_integer_input("edit", -1)
+ clone_nr = html.get_integer_input("clone", -1)
if profilemode:
userid = config.user.id
config.user.need_permission("general.edit_notifications")
@@ -8681,11 +8681,17 @@ def mode_notification_rule(phase, profilemode):
if new:
if clone_nr >= 0 and not html.var("_clear"):
rule = {}
- rule.update(rules[clone_nr])
+ try:
+ rule.update(rules[clone_nr])
+ except IndexError:
+ raise MKUserError(None, _("This %s does not exist.") % "notification rule")
else:
rule = {}
else:
- rule = rules[edit_nr]
+ try:
+ rule = rules[edit_nr]
+ except IndexError:
+ raise MKUserError(None, _("This %s does not exist.") % "notification rule")
vs = vs_notification_rule(userid)