Module: check_mk
Branch: master
Commit: f3eb747466eff2778c94add35571ade9d5b653ce
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f3eb747466eff2…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Thu Mar 30 17:26:55 2017 +0200
Inline match_levels_alternative into Levels, as that's the only place it's being
used
Change-Id: I3fe1cc342f22696ce914c3122c9bb11c53819f78
---
web/htdocs/wato.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 774ca5d..36d4f53 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -13978,15 +13978,16 @@ def PredictiveLevels(**args):
# To be used as ValueSpec for levels on numeric values, with
# prediction
-def match_levels_alternative(v):
- if type(v) == dict:
- return 2
- elif type(v) == tuple and v != (None, None):
- return 1
- else:
- return 0
-
def Levels(**kwargs):
+
+ def match_levels_alternative(v):
+ if type(v) == dict:
+ return 2
+ elif type(v) == tuple and v != (None, None):
+ return 1
+ else:
+ return 0
+
help = kwargs.get("help")
unit = kwargs.get("unit")
title = kwargs.get("title")