Module: check_mk
Branch: master
Commit: 6a97a2781a7b5c06ae46b2e68564737ab77232a5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6a97a2781a7b5c…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jun 26 10:23:25 2013 +0200
fixed: merged accept_int into allow_int.
SMB share: set allow int to True
---
web/htdocs/valuespec.py | 6 +++---
web/htdocs/wato.py | 4 ++--
web/plugins/wato/active_checks.py | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 0135e7f..40fbd94 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -815,7 +815,7 @@ class Float(Integer):
Integer.__init__(self, **kwargs)
self._decimal_separator = kwargs.get("decimal_separator",
".")
self._display_format = kwargs.get("display_format", "%.2f")
- self._accept_int = kwargs.get("accept_int", False)
+ self._allow_int = kwargs.get("allow_int", False)
def canonical_value(self):
return float(Integer.canonical_value(self))
@@ -832,9 +832,9 @@ class Float(Integer):
def validate_datatype(self, value, varprefix):
if type(value) != float and not \
- (type(value) == int and self._accept_int):
+ (type(value) == int and self._allow_int):
raise MKUserError(varprefix, _("The value %r has type %s, but must be of
type float%s") %
- (value, type_name(value), self._accept_int and _(" or int") or
""))
+ (value, type_name(value), self._allow_int and _(" or int") or
""))
class Percentage(Float):
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 51f6cb8..b2efec8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -11407,8 +11407,8 @@ def Levels(**kwargs):
Tuple(
title = _("Fixed Levels"),
elements = [
- Float(unit = unit, title = _("Warning at"), default_value
= default_levels[0], accept_int = True),
- Float(unit = unit, title = _("Critical at"),
default_value = default_levels[1], accept_int = True),
+ Float(unit = unit, title = _("Warning at"), default_value
= default_levels[0], allow_int = True),
+ Float(unit = unit, title = _("Critical at"),
default_value = default_levels[1], allow_int = True),
],
),
PredictiveLevels(
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 6834ea0..d21fe40 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -786,8 +786,8 @@ register_rule(group,
Tuple(
title = _("Levels for used disk space"),
elements = [
- Percentage(title = _("Warning at"), default_value = 85,
unit=_("% used space")),
- Percentage(title = _("Critical at"), default_value = 95,
unit=_("% used space")),
+ Percentage(title = _("Warning at"), default_value = 85,
unit=_("% used space"), allow_int = True),
+ Percentage(title = _("Critical at"), default_value = 95,
unit=_("% used space"), allow_int = True),
]
)),
( "auth",