Module: check_mk
Branch: master
Commit: 26e1086705b521fef4f1d3edf04bb7a10bfdc41d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=26e1086705b521…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 14:23:57 2014 +0100
#1492 FIX Fixed too long URL bug when deleting a timeperiod right after creating one
---
.werks/1492 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1492 b/.werks/1492
new file mode 100644
index 0000000..47db6bf
--- /dev/null
+++ b/.werks/1492
@@ -0,0 +1,10 @@
+Title: Fixed too long URL bug when deleting a timeperiod right after creating one
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1415280213
+
+
diff --git a/ChangeLog b/ChangeLog
index ed86bc6..e60f40c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
* 1165 FIX: Fixed exception in service discovery of logwatch event console forwarding checks...
* 1490 FIX: Timperiod excludes can now even be configured when creating a timeperiod...
* 1491 FIX: Fixed bug in dynamic lists where removing an item was not always possible...
+ * 1492 FIX: Fixed too long URL bug when deleting a timeperiod right after creating one
Notifications:
* 1168 FIX: HTML mails can now be configured to display graphs among each other...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 103a006..8dea064 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9182,7 +9182,7 @@ def mode_timeperiods(phase):
timeperiod = timeperiods[name]
edit_url = make_link([("mode", "edit_timeperiod"), ("edit", name)])
- delete_url = html.makeactionuri([("_delete", name)])
+ delete_url = make_action_link([("mode", "timeperiods"), ("_delete", name)])
table.cell(_("Actions"), css="buttons")
html.icon_button(edit_url, _("Properties"), "edit")
Module: check_mk
Branch: master
Commit: 663b5ceede70100be9289cf9b14cef3ffa979e81
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=663b5ceede7010…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 13:52:44 2014 +0100
Clarified meaning of timeperiod exceptions
---
web/htdocs/wato.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index d7b6a65..6699527 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9535,7 +9535,7 @@ def mode_edit_timeperiod(phase):
if not timeperiod_excludes(timeperiods, tpname, name):
other_tps.append((tpname, tp.get("alias") or name))
- vs_excl = ListChoice(choices = other_tps)
+ vs_excl = ListChoice(choices=other_tps)
# convert Check_MK representation of range to ValueSpec-representation
def convert_from_tod(tod):
@@ -9683,9 +9683,11 @@ def mode_edit_timeperiod(phase):
html.write("</table>")
# Exceptions
- forms.section(_("Exceptions"))
+ forms.section(_("Exceptions (from weekdays)"))
html.help(_("Here you can specify exceptional time ranges for certain "
- "dates in the form YYYY-MM-DD."))
+ "dates in the form YYYY-MM-DD which are used to define more "
+ "specific definitions to override the times configured for the matching "
+ "weekday."))
exceptions = []
for k in timeperiod:
@@ -9697,6 +9699,8 @@ def mode_edit_timeperiod(phase):
# Excludes
if other_tps:
forms.section(_("Exclude"))
+ html.help(_('You can use other timeperiod defnitions to exclude the times '
+ 'defined in the other timeperiods from this current timeperiod.'))
vs_excl.render_input("exclude", timeperiod.get("exclude", []))
Module: check_mk
Branch: master
Commit: 8d18825445e677d91d5002b49156b269cae51d36
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8d18825445e677…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 13:41:58 2014 +0100
#1491 FIX Fixed bug in dynamic lists where removing an item was not always possible
We use the so called valuespec ListOf() in several places where a dynamic amount
of elements can be added to a list of things, for example the number of exceptions
of a timeperiod in the timeperiod edit dialog.
Now, when you created a new timeperiod, added one exception and imediately removed
it, you had no chance to save this timeperiod without adding another exception to
the list. This has been fixed now.
---
.werks/1491 | 16 ++++++++++++++++
ChangeLog | 1 +
web/htdocs/valuespec.py | 10 +++++++---
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/.werks/1491 b/.werks/1491
new file mode 100644
index 0000000..ae33d74
--- /dev/null
+++ b/.werks/1491
@@ -0,0 +1,16 @@
+Title: Fixed bug in dynamic lists where removing an item was not always possible
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1415277372
+
+We use the so called valuespec ListOf() in several places where a dynamic amount
+of elements can be added to a list of things, for example the number of exceptions
+of a timeperiod in the timeperiod edit dialog.
+
+Now, when you created a new timeperiod, added one exception and imediately removed
+it, you had no chance to save this timeperiod without adding another exception to
+the list. This has been fixed now.
diff --git a/ChangeLog b/ChangeLog
index 55d95d7..a2b9d9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
* 1489 Added iCalendar import for generating timeperiods e.g. for holidays...
* 1165 FIX: Fixed exception in service discovery of logwatch event console forwarding checks...
* 1490 FIX: Timperiod excludes can now even be configured when creating a timeperiod...
+ * 1491 FIX: Fixed bug in dynamic lists where removing an item was not always possible...
Notifications:
* 1168 FIX: HTML mails can now be configured to display graphs among each other...
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index b8e1695..3ab26c8 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -845,7 +845,7 @@ class ListOf(ValueSpec):
# original 'value' but take the value from the HTML variables.
if html.has_var("%s_count" % varprefix):
filled_in = True
- count = int(html.var("%s_count" % varprefix))
+ count = len(self.get_indexes(varprefix))
value = [None] * count # dummy for the loop
else:
filled_in = False
@@ -892,16 +892,20 @@ class ListOf(ValueSpec):
s += '<tr><td>%s</td></tr>' % self._valuespec.value_to_text(v)
return s + '</table>'
- def from_html_vars(self, varprefix):
+ def get_indexes(self, varprefix):
count = int(html.var(varprefix + "_count"))
n = 1
indexes = {}
while n <= count:
indexof = html.var(varprefix + "_indexof_%d" % n)
- if indexof != None: # deleted entry
+ # for deleted entries, we have removed the whole row, therefore indexof is None
+ if indexof != None:
indexes[int(indexof)] = n
n += 1
+ return indexes
+ def from_html_vars(self, varprefix):
+ indexes = self.get_indexes(varprefix)
value = []
k = indexes.keys()
k.sort()
Module: check_mk
Branch: master
Commit: b06827416bb071781498b1fa51f9d69dc675b95f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b06827416bb071…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 12:19:08 2014 +0100
Fixed SyntaxWarning in apache error log (used prior to global declaration)
---
web/htdocs/images/icon_ical.png | Bin 0 -> 4711 bytes
web/htdocs/userdb.py | 3 +--
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/web/htdocs/images/icon_ical.png b/web/htdocs/images/icon_ical.png
new file mode 100644
index 0000000..d3b8f47
Binary files /dev/null and b/web/htdocs/images/icon_ical.png differ
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 9ab3306..753a357 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -40,6 +40,7 @@ builtin_user_attribute_names = []
def load_plugins():
global user_attributes
global multisite_user_connectors
+ global builtin_user_attribute_names
# Do not cache the custom user attributes. They can be created by the user
# during runtime, means they need to be loaded during each page request.
@@ -59,8 +60,6 @@ def load_plugins():
multisite_user_connectors = []
load_web_plugins("userdb", globals())
-
- global builtin_user_attribute_names
builtin_user_attribute_names = user_attributes.keys()
declare_custom_user_attrs()
Module: check_mk
Branch: master
Commit: 5a2c2f9eb9ce1f082e373d0b941f7f343df9b8e0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5a2c2f9eb9ce1f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 12:25:55 2014 +0100
#1489 Added iCalendar import for generating timeperiods e.g. for holidays
The timeperiod management module of WATO has been extended with an import
mode vor iCalendar (*.ics) files. This can be used to easily create timeperiods
for holidays which then can be used to exclude them from your other timeperiods.
There are a lot of pages on the internet which provide you with iCalendar including
the appointments for either the holidays of specific years. They might also contain
appointments which have a recurrence configured, e.g. on a yearly base. The import
currently deals with monthly and yearly recurrences of appointments by resolving them
for the configured time horizon.
After interpreting the iCalendar file, you will be redirected to the timeperiod
creation dialog where you can either modify the prefilled values or just confirm
the dialog to finally create the timeperiod.
---
.werks/1489 | 21 +++++
ChangeLog | 1 +
web/htdocs/valuespec.py | 1 +
web/htdocs/wato.py | 227 +++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 250 insertions(+)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=5a2c2f9eb9…
Module: check_mk
Branch: master
Commit: b9a0fe57be145d16184deda33784111116b3d76f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b9a0fe57be145d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 12:34:08 2014 +0100
#1490 FIX Timperiod excludes can now even be configured when creating a timeperiod
Configuring excludes was only possible when editing a timeperiod.
---
.werks/1490 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1490 b/.werks/1490
new file mode 100644
index 0000000..2b6e801
--- /dev/null
+++ b/.werks/1490
@@ -0,0 +1,10 @@
+Title: Timperiod excludes can now even be configured when creating a timeperiod
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1415273607
+
+Configuring excludes was only possible when editing a timeperiod.
diff --git a/ChangeLog b/ChangeLog
index fcbaae9..55d95d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,7 @@
* 1170 Added buttons to move rules to top/bottom of the list to ruleset edit dialog
* 1489 Added iCalendar import for generating timeperiods e.g. for holidays...
* 1165 FIX: Fixed exception in service discovery of logwatch event console forwarding checks...
+ * 1490 FIX: Timperiod excludes can now even be configured when creating a timeperiod...
Notifications:
* 1168 FIX: HTML mails can now be configured to display graphs among each other...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a1de88a..d7b6a65 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9532,7 +9532,7 @@ def mode_edit_timeperiod(phase):
# exclude the current timeperiod (in order to avoid cycles)
other_tps = []
for tpname, tp in timeperiods.items():
- if not new and not timeperiod_excludes(timeperiods, tpname, name):
+ if not timeperiod_excludes(timeperiods, tpname, name):
other_tps.append((tpname, tp.get("alias") or name))
vs_excl = ListChoice(choices = other_tps)
Module: check_mk
Branch: master
Commit: dedb1a37c924556ad7ec96686fc9425ad1d003bf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dedb1a37c92455…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Nov 6 11:03:56 2014 +0100
cisco_sensor_item.include: fixed bug
---
checks/cisco_sensor_item.include | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checks/cisco_sensor_item.include b/checks/cisco_sensor_item.include
index b188f94..9bdaa18 100644
--- a/checks/cisco_sensor_item.include
+++ b/checks/cisco_sensor_item.include
@@ -32,7 +32,7 @@ def cisco_sensor_item(trial_string, fall_back):
# -> Depends on the device model
try:
# Try to handle all cases found in mkzeug/walks
- splited = [ x.strip for x in trial_string.split(',')]
+ splited = [ x.strip() for x in trial_string.split(',')]
if len(splited) == 1:
item = trial_string
# If the last part contains # or Power, take the complete string