Module: check_mk
Branch: master
Commit: f0dd6aaf7c8406bde2f205d0bbe9755d707cedf4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f0dd6aaf7c8406…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 6 17:38:13 2016 +0200
3373 FIX Fixed exception when handling syntax errors while loading pagetype files
---
.werks/3373 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/pagetypes.py | 6 ++++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/3373 b/.werks/3373
new file mode 100644
index 0000000..f542142
--- /dev/null
+++ b/.werks/3373
@@ -0,0 +1,9 @@
+Title: Fixed exception when handling syntax errors while loading pagetype files
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.9i1
+Date: 1459957038
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 347830c..8a3c0db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -177,6 +177,7 @@
* 3364 FIX: Fixed exception when creating a view of a single log entry...
* 3326 FIX: Fixed white text on white background in mobile GUI
* 3327 FIX: Disallow scheduling downtimes with an end date that is before the start date
+ * 3373 FIX: Fixed exception when handling syntax errors while loading pagetype files
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node selection...
diff --git a/web/htdocs/pagetypes.py b/web/htdocs/pagetypes.py
index 304aa1f..34d0977 100644
--- a/web/htdocs/pagetypes.py
+++ b/web/htdocs/pagetypes.py
@@ -655,7 +655,8 @@ class Overridable(Base):
self.add_instance((user, name), self(page_dict))
except SyntaxError, e:
- raise MKGeneralException(_("Cannot load %s from %s: %s") % (what, path, e))
+ raise MKGeneralException(_("Cannot load %s from %s: %s") %
+ (self.type_name(), path, e))
# FIXME: Better switch to "new style classes" and use super() and then override load()
# in the subclass. Brings more flexibility.
@@ -663,7 +664,8 @@ class Overridable(Base):
self._load()
# Declare permissions - one for each of the pages, if it is public
- config.declare_permission_section(self.type_name(), self.phrase("title_plural"), do_sort = True)
+ config.declare_permission_section(self.type_name(), self.phrase("title_plural"),
+ do_sort = True)
for instance in self.instances():
if instance.is_public():
Module: check_mk
Branch: master
Commit: 4812ac108618e78d20b4ee67d6a1b5b833bb3eda
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4812ac108618e7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 6 16:18:33 2016 +0200
Fix formatting of a few WATO error messages
---
web/htdocs/watolib.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index c595121d9..efc8946 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -1311,16 +1311,16 @@ class Folder(BaseFolder):
if c in permitted_groups:
return
- reason = _("Sorry, you have no permissions to the folder <b>%s</b>. ") % self.alias_path()
+ reason = _("Sorry, you have no permissions to the folder <b>%s</b>.") % self.alias_path()
if not permitted_groups:
- reason += _("The folder is not permitted for any contact group.")
+ reason += " " + _("The folder is not permitted for any contact group.")
else:
- reason += _("The folder's permitted contact groups are <b>%s</b>. ") % ", ".join(permitted_groups)
+ reason += " " + _("The folder's permitted contact groups are <b>%s</b>.") % ", ".join(permitted_groups)
if user_contactgroups:
- reason += _("Your contact groups are <b>%s</b>.") % ", ".join(user_contactgroups)
+ reason += " " + _("Your contact groups are <b>%s</b>.") % ", ".join(user_contactgroups)
else:
- reason += _("But you are not a member of any contact group.")
- reason += _("You may enter the folder as you might have permission on a subfolders, though.")
+ reason += " " + _("But you are not a member of any contact group.")
+ reason += " " + _("You may enter the folder as you might have permission on a subfolders, though.")
raise MKAuthException(reason)
Module: check_mk
Branch: master
Commit: 41342ae432019a6d6ff94b884bd8003b795dc4e1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=41342ae432019a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 6 16:09:10 2016 +0200
3329 FIX Function discover_services now allows the URL parameter mode
The <tt>mode</tt> can e.g. be set to <tt>fixall</tt> in order to remove execeeding
and add missing services. The implementation was always present, but the validation
of the request complained that <tt>mode</tt> was not a valid parameter. This has
been fixed. Thanks to Thomas Huber.
---
.werks/3329 | 13 +++++++++++++
ChangeLog | 1 +
web/plugins/webapi/webapi.py | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/3329 b/.werks/3329
new file mode 100644
index 0000000..49def9e
--- /dev/null
+++ b/.werks/3329
@@ -0,0 +1,13 @@
+Title: Function discover_services now allows the URL parameter mode
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459951658
+
+The <tt>mode</tt> can e.g. be set to <tt>fixall</tt> in order to remove execeeding
+and add missing services. The implementation was always present, but the validation
+of the request complained that <tt>mode</tt> was not a valid parameter. This has
+been fixed. Thanks to Thomas Huber.
diff --git a/ChangeLog b/ChangeLog
index 8577fb0..2ff2488 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -232,6 +232,7 @@
* 3366 FIX: Fixed renaming of hosts not updating parents configured in folders
* 3369 FIX: Printing configuration warning when host references itself as parent
* 3371 FIX: Be compatible to old site=None setting read from hosts.mk...
+ * 3329 FIX: Function discover_services now allows the URL parameter mode...
Notifications:
* 3263 Notifications: allow users to restrict by their contact groups...
diff --git a/web/plugins/webapi/webapi.py b/web/plugins/webapi/webapi.py
index bbb2ff3..d39b6d3 100644
--- a/web/plugins/webapi/webapi.py
+++ b/web/plugins/webapi/webapi.py
@@ -229,7 +229,7 @@ api_actions["delete_host"] = {
###############
def action_discover_services(request):
- validate_request_keys(request, ["hostname"])
+ validate_request_keys(request, ["hostname", "mode"])
config.need_permission("wato.services")
mode = html.var("mode") and html.var("mode") or "new"
Module: check_mk
Branch: master
Commit: ed39da0391c46b87abad46490cf8ca5b7349ad22
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed39da0391c46b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 6 16:03:38 2016 +0200
3371 FIX Be compatible to old site=None setting read from hosts.mk
Old WATO versions saved the site attribute with a value of None which
is not allowed in current WATO versions. Either the key has to be missing
when no specific site is configured or the key has to be missing. Cleaned
this up.
Fixed exception: TypeError (cannot concatenate 'str' and 'NoneType' objects)
---
.werks/3371 | 15 +++++++++++++++
ChangeLog | 1 +
web/htdocs/watolib.py | 10 +++++++---
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/.werks/3371 b/.werks/3371
new file mode 100644
index 0000000..d7f0b3a
--- /dev/null
+++ b/.werks/3371
@@ -0,0 +1,15 @@
+Title: Be compatible to old site=None setting read from hosts.mk
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459951352
+
+Old WATO versions saved the site attribute with a value of None which
+is not allowed in current WATO versions. Either the key has to be missing
+when no specific site is configured or the key has to be missing. Cleaned
+this up.
+
+Fixed exception: TypeError (cannot concatenate 'str' and 'NoneType' objects)
diff --git a/ChangeLog b/ChangeLog
index 5ae17e6..8577fb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -231,6 +231,7 @@
* 3365 FIX: Cleaned up wrong counting of parents when renaming a host
* 3366 FIX: Fixed renaming of hosts not updating parents configured in folders
* 3369 FIX: Printing configuration warning when host references itself as parent
+ * 3371 FIX: Be compatible to old site=None setting read from hosts.mk...
Notifications:
* 3263 Notifications: allow users to restrict by their contact groups...
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index a5822e3..c595121d9 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -754,10 +754,14 @@ class Folder(BaseFolder):
if host_name in variables["host_attributes"]:
attributes = variables["host_attributes"][host_name]
- # Otherwise it is in import from some manual old version of from some
- # CMDB and we reconstruct the attributes. That way the folder inheritance
- # information is not available and all tags are set explicitely
+ # Old WATO was saving "site" attribute with value of None. Skip this key.
+ if "site" in attributes and attributes["site"] == None:
+ del attributes["site"]
+
else:
+ # Otherwise it is an import from some manual old version of from some
+ # CMDB and we reconstruct the attributes. That way the folder inheritance
+ # information is not available and all tags are set explicitely
attributes = {}
alias = self._get_alias_from_extra_conf(host_name, variables)
if alias != None:
Module: check_mk
Branch: master
Commit: 26a2861f9ce03707adc88d1ba8bec7624c820131
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=26a2861f9ce037…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 6 15:53:10 2016 +0200
3328 Default cloned views to be not public
If you create a view as a clone from an existing view than the new view
defaults <b>not</b> to be public. Previously the public-flag was cloned
as well. That could lead into trouble by an admin overriding the views of
others by that way.
---
.werks/3328 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/visuals.py | 2 ++
3 files changed, 16 insertions(+)
diff --git a/.werks/3328 b/.werks/3328
new file mode 100644
index 0000000..2c78926
--- /dev/null
+++ b/.werks/3328
@@ -0,0 +1,13 @@
+Title: Default cloned views to be not public
+Level: 2
+Component: multisite
+Class: feature
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459950688
+
+If you create a view as a clone from an existing view than the new view
+defaults <b>not</b> to be public. Previously the public-flag was cloned
+as well. That could lead into trouble by an admin overriding the views of
+others by that way.
diff --git a/ChangeLog b/ChangeLog
index 91b9bb1..5ae17e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -140,6 +140,7 @@
* 3297 SEC: Fixes possible XSS in views sidebar snapin...
* 2237 Unique name for columns of Host Groups and Service Groups...
* 3310 New dashlet which shows user notifications
+ * 3328 Default cloned views to be not public...
* 3059 FIX: Fixed highlighting of availability timeline time slices
* 3175 FIX: Fix timeranges of graphs that are embedded in a dashboard...
* 3076 FIX: fixed broken views in check_mk raw edition
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index 2bafd63..13e07b5 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -581,6 +581,7 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None,
n += 1
newname = visualname + "_clone%d" % n
visual["name"] = newname
+ visual["public"] = False
visualname = newname
oldname = None # Prevent renaming
if cloneuser == config.user_id:
@@ -592,6 +593,7 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None,
mode = 'clone'
if not visual:
raise MKGeneralException(_('The requested %s does not exist.') % visual_types[what]['title'])
+ visual["public"] = False
single_infos = visual['single_infos']
Module: check_mk
Branch: master
Commit: fead0bae132cd74925eb204eb0aea36771220917
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fead0bae132cd7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 6 15:38:12 2016 +0200
3327 FIX Disallow scheduling downtimes with an end date that is before the start date
---
.werks/3327 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/views/commands.py | 3 +++
3 files changed, 14 insertions(+)
diff --git a/.werks/3327 b/.werks/3327
new file mode 100644
index 0000000..f594d5f
--- /dev/null
+++ b/.werks/3327
@@ -0,0 +1,10 @@
+Title: Disallow scheduling downtimes with an end date that is before the start date
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459949875
+
+
diff --git a/ChangeLog b/ChangeLog
index 592535a..91b9bb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -174,6 +174,7 @@
* 3321 FIX: Globes in dashboards now correctly reflect selected WATO folder...
* 3364 FIX: Fixed exception when creating a view of a single log entry...
* 3326 FIX: Fixed white text on white background in mobile GUI
+ * 3327 FIX: Disallow scheduling downtimes with an end date that is before the start date
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node selection...
diff --git a/web/plugins/views/commands.py b/web/plugins/views/commands.py
index af56bff..c5fc3c6 100644
--- a/web/plugins/views/commands.py
+++ b/web/plugins/views/commands.py
@@ -566,6 +566,9 @@ def command_downtime(cmdtag, spec, row):
raise MKUserError("_down_to", _("You cannot set a downtime that ends in the past. "
"This incident will be reported."))
+ if down_to < down_from:
+ raise MKUserError("_down_to", _("Your end date is before your start date."))
+
title = _("<b>schedule a downtime from %s to %s</b> on ") % (
time.asctime(time.localtime(down_from)),
time.asctime(time.localtime(down_to)))