Module: check_mk
Branch: master
Commit: fb2cd6da875dc20ca2aac90a3d0fa227670bc529
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fb2cd6da875dc2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri May 15 09:45:48 2015 +0200
New configuration option for mknotifyd
---
checks/mknotifyd | 2 +-
web/htdocs/valuespec.py | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/checks/mknotifyd b/checks/mknotifyd
index b9ee50b..a839d54 100644
--- a/checks/mknotifyd
+++ b/checks/mknotifyd
@@ -80,7 +80,7 @@ def parse_mknotifyd(info):
else:
if value == "None":
value = None
- elif value and varname not in [ "Type", "State",
"Version", "Status Message" ]:
+ elif value and varname not in [ "Type", "State",
"Version", "Status Message", "Pending Acknowledgements" ]:
value = int(value.split()[0])
sub_entry[varname] = value
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 33ec9e3..0294774 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -202,11 +202,12 @@ class Age(ValueSpec):
html.write("</div>")
def from_html_vars(self, varprefix):
+ # TODO: Validate for correct numbers!
return (
- saveint(html.var(varprefix+'_days', 0)) * 3600 * 24
- + saveint(html.var(varprefix+'_hours',0)) * 3600
- + saveint(html.var(varprefix+'_minutes',0)) * 60
- + saveint(html.var(varprefix+'_seconds',0))
+ saveint(html.var(varprefix + '_days', 0)) * 3600 * 24
+ + saveint(html.var(varprefix + '_hours', 0)) * 3600
+ + saveint(html.var(varprefix + '_minutes', 0)) * 60
+ + saveint(html.var(varprefix + '_seconds', 0))
)
def value_to_text(self, value):