Module: check_mk
Branch: master
Commit: 2d01d48123444e1e7e8430f064196008fd9a0a0f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2d01d48123444e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 28 13:48:23 2017 +0100
4405 FIX Fixed setting custom times for timeperiod iCal import
Change-Id: I541fab59631d19a34e89049d42b7c61e140f5082
---
.werks/4405 | 11 +++++++++++
web/htdocs/wato.py | 10 +++++-----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/.werks/4405 b/.werks/4405
new file mode 100644
index 0000000..416a0d2
--- /dev/null
+++ b/.werks/4405
@@ -0,0 +1,11 @@
+Title: Fixed setting custom times for timeperiod iCal import
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1488286064
+
+
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 916c730..ca876f9 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8786,11 +8786,11 @@ def mode_timeperiod_import_ical(phase):
index += 1
html.set_var('except_%d_0' % index, event['date'])
html.set_var('except_indexof_%d' % index, "%d" %
index)
- if ical['times']:
- for n in range(3):
- if ical['times'][n]:
- html.set_var('except_%d_1_%d_from' % (index, n+1),
ical['times'][n][0])
- html.set_var('except_%d_1_%d_until' % (index, n+1),
ical['times'][n][1])
+ for n, time_spec in enumerate(ical["times"]):
+ start_time = ":".join(map(str, time_spec[0]))
+ end_time = ":".join(map(str, time_spec[1]))
+ html.set_var('except_%d_1_%d_from' % (index, n), start_time)
+ html.set_var('except_%d_1_%d_until' % (index, n), end_time)
return "edit_timeperiod"
return