Module: check_mk
Branch: master
Commit: 614d34edc8575ef12e2033009a483520eff7154d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=614d34edc8575e…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Tue Sep 12 14:54:59 2017 +0200
5014 FIX df: Fixed error if dynamic levels should be set
Since 1.2.8 no dynamic levels could be set anymore. The error "You need to
specify levels for filesystems larger than 0 bytes." prevented the user from
saving a rule if a filesystem has not 0 bytes. Thix has been fixed now.
Change-Id: Ica4e5f21b5dc72ccaebd034b1136c9868ada4909
---
.werks/5014 | 12 ++++++++++++
web/plugins/wato/check_parameters.py | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/5014 b/.werks/5014
new file mode 100644
index 0000000..e88c5b1
--- /dev/null
+++ b/.werks/5014
@@ -0,0 +1,12 @@
+Title: df: Fixed error if dynamic levels should be set
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1505220682
+Class: fix
+
+Since 1.2.8 no dynamic levels could be set anymore. The error "You need to
+specify levels for filesystems larger than 0 bytes." prevented the user from
+saving a rule if a filesystem has not 0 bytes. Thix has been fixed now.
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index ff4ad91..666eb13 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -6545,7 +6545,7 @@ def get_free_used_dynamic_valuespec(what, name, default_value = (80.0, 90.0)):
]
def validate_dynamic_levels(value, varprefix):
- if not [ v for v in value if v[0] == 0 ]:
+ if [ v for v in value if v[0] == 0 ]:
raise MKUserError(varprefix, _("You need to specify levels for "
"%ss larger than 0 bytes.") % name)