Module: check_mk
Branch: master
Commit: 7bb5167d13f4249e216b88e762522681903b1ce5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7bb5167d13f424…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Mon Nov 12 12:47:51 2018 +0100
6417 FIX Users may disable notifications by accident after upgrading to 1.5.0
Due to a rendering issue in the personal settings the option "Temporarily disable
all notifications" is always set in the GUI when a user or admin edits the settings
for the first time after an update to version 1.5.0.
If the user or admin then saves the settings and does not enable the notifications,
the setting is saved and the user does not receive notifications anymore. If a
user profile was not modified after an update, notifications worked as expected.
If a profile is saved for the first time after an update, the old configuration
file format is transformed to the new format. After that the setting is rendered
correctly.
To circumvent any problems please make sure that the notification settings of all
users are set properly after the update and that the settings are saved at least
once with the correct value.
For a large amount of users it may be tedious to change the settings off all users.
In this case it may be more straight forward to edit the file
~/etc/check_mk/conf.d/wato/contacts.mk directly. In the file all values for the key
"disable_notifications" have to be modified. The old value "True" has to be replaced
by the dictionary "{'disable': True}" and the old value "False" has to be replaced
by the empty dictionary "{}".
The issue is fixed in version 1.5.0p8. If you update from 1.4.0 to a version
>= 1.5.0p8 you are not affected by this issue.
Change-Id: I89c7641133caedb966636d88a2a75c9af30362c5
---
.werks/6417 | 34 +++++++++++++++++++++++++++++++
cmk/gui/plugins/userdb/user_attributes.py | 14 +++++++------
cmk_base/notify.py | 1 -
3 files changed, 42 insertions(+), 7 deletions(-)
diff --git a/.werks/6417 b/.werks/6417
new file mode 100644
index 0000000..e4f8265
--- /dev/null
+++ b/.werks/6417
@@ -0,0 +1,34 @@
+Title: Users may disable notifications by accident after upgrading to 1.5.0
+Level: 2
+Component: notifications
+Class: fix
+Compatible: incomp
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1542012103
+
+Due to a rendering issue in the personal settings the option "Temporarily disable
+all notifications" is always set in the GUI when a user or admin edits the settings
+for the first time after an update to version 1.5.0.
+
+If the user or admin then saves the settings and does not enable the notifications,
+the setting is saved and the user does not receive notifications anymore. If a
+user profile was not modified after an update, notifications worked as expected.
+If a profile is saved for the first time after an update, the old configuration
+file format is transformed to the new format. After that the setting is rendered
+correctly.
+
+To circumvent any problems please make sure that the notification settings of all
+users are set properly after the update and that the settings are saved at least
+once with the correct value.
+
+For a large amount of users it may be tedious to change the settings off all users.
+In this case it may be more straight forward to edit the file
+~/etc/check_mk/conf.d/wato/contacts.mk directly. In the file all values for the key
+"disable_notifications" have to be modified. The old value "True" has to be replaced
+by the dictionary "{'disable': True}" and the old value "False" has to be replaced
+by the empty dictionary "{}".
+
+The issue is fixed in version 1.5.0p8. If you update from 1.4.0 to a version
+>= 1.5.0p8 you are not affected by this issue.
diff --git a/cmk/gui/plugins/userdb/user_attributes.py b/cmk/gui/plugins/userdb/user_attributes.py
index b14400d..66e699a 100644
--- a/cmk/gui/plugins/userdb/user_attributes.py
+++ b/cmk/gui/plugins/userdb/user_attributes.py
@@ -103,11 +103,11 @@ class DisableNotificationsUserAttribute(UserAttribute):
return Transform(
Dictionary(
title=_("Disable Notifications"),
- help=_("When this option is active the you will not get <b>any</b> "
+ help=_("When this option is active you will not get <b>any</b> "
"alerts or other notifications via email, SMS or similar. "
- "This overrides all other notification settings or rules, so make "
- "sure that you know what you do. Moreover you can customize a timerange "
- "within no notifications are generated."),
+ "This overrides all other notification settings and rules, so make "
+ "sure that you know what you do. Moreover you can specify a timerange "
+ "where no notifications are generated."),
elements=[("disable",
FixedValue(
True,
@@ -125,8 +125,10 @@ class DisableNotificationsUserAttribute(UserAttribute):
forth=self._transform_disable_notification)
def _transform_disable_notification(self, p):
- if not isinstance(p, dict):
- return {"disable": True}
+ if isinstance(p, bool):
+ if p:
+ return {"disable": True}
+ return {}
return p
def permission(self):
diff --git a/cmk_base/notify.py b/cmk_base/notify.py
index db5a129..2ae135f 100755
--- a/cmk_base/notify.py
+++ b/cmk_base/notify.py
@@ -123,7 +123,6 @@ $LONGSERVICEOUTPUT$
def _transform_user_disable_notifications_opts(contact):
if "disable_notifications" in contact and isinstance(contact["disable_notifications"], bool):
return {"disable": contact["disable_notifications"]}
-
return contact.get("disable_notifications", {})
Module: check_mk
Branch: master
Commit: aa70d0795e95a5672a5680e319dc21ff7057a481
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aa70d0795e95a5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 9 16:56:43 2018 +0100
6856 FIX Host permission fields are now resizable with modern theme
When using the modern theme it was not possible to resize the permission
contact group list fields which is useful when having long group names.
Change-Id: I886626b53b28481a6020975ee4fd4223ce314c6d
---
.werks/6856 | 12 ++++++++++++
web/htdocs/themes/facelift/theme.css | 5 +----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/.werks/6856 b/.werks/6856
new file mode 100644
index 0000000..803dd5d
--- /dev/null
+++ b/.werks/6856
@@ -0,0 +1,12 @@
+Title: Host permission fields are now resizable with modern theme
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1541778965
+
+When using the modern theme it was not possible to resize the permission
+contact group list fields which is useful when having long group names.
diff --git a/web/htdocs/themes/facelift/theme.css b/web/htdocs/themes/facelift/theme.css
index 89f941d..494b17e 100644
--- a/web/htdocs/themes/facelift/theme.css
+++ b/web/htdocs/themes/facelift/theme.css
@@ -76,7 +76,7 @@ input, input[type=text], input[type=password], select, textarea, div.snapin sele
height: auto;
box-shadow: none;
border: 1px solid #cccfdb !important;
- max-width: 640px; }
+ }
#snapin_tag_tree select {
background: #FFFFFF !important;
color: #1A243D !important; }
@@ -109,9 +109,6 @@ input, input[type=text], input[type=password], select, textarea, div.snapin sele
input.toggle_timespecific_parameter, select.toggle_timespecific_parameter, textarea.toggle_timespecific_parameter, div.snapin select.toggle_timespecific_parameter, div.snapin textarea.toggle_timespecific_parameter, .toggle_timespecific_parameter#mk_side_search_field {
display: block; }
-select[multiple=multiple] {
- resize: none !important; }
-
div.snapin select {
width: 100% !important;
height: 100% !important; }
Module: check_mk
Branch: master
Commit: 1a89847848d3a3133070b1d9a2c577d83830598d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1a89847848d3a3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 12 12:02:46 2018 +0100
Revert "Fix test selection after py.test 3.10.0 update"
This reverts commit c11fa0ba36a3f4bd9d87a132a13e489dcc18cd07.
---
conftest.py | 20 --------------------
tests/conftest.py | 14 ++++++++++++++
2 files changed, 14 insertions(+), 20 deletions(-)
diff --git a/conftest.py b/conftest.py
deleted file mode 100644
index 7c69987..0000000
--- a/conftest.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import pytest
-
-# Our enterprise tests are located at enterprise/tests. During tests our enterprise tests are
-# found by py.tests because of symlinks at tests/{integration,unit}/enterprise.
-# Since https://github.com/pytest-dev/pytest/issues/4174 the conftest.py in tests/conftest.py
-# does not apply anymore on the tests that are physically located in enterprise/tests.
-# Our workaround to make the skipping work again was to move this function to the top level
-# conftest.py file.
-def pytest_runtest_setup(item):
- """Skip tests of unwanted types"""
- test_type = item.get_closest_marker("type")
- if test_type is None:
- raise Exception("Test is not TYPE marked: %s" % item)
-
- if not item.config.getoption("-T"):
- raise SystemExit("Please specify type of tests to be executed (py.test -T TYPE)")
-
- test_type_name = test_type.args[0]
- if test_type_name != item.config.getoption("-T"):
- pytest.skip("Not testing type %r" % test_type_name)
diff --git a/tests/conftest.py b/tests/conftest.py
index 09db7f7..d24a751 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -80,6 +80,20 @@ def pytest_collection_modifyitems(items):
item.add_marker(pytest.mark.type.with_args(ty))
+def pytest_runtest_setup(item):
+ """Skip tests of unwanted types"""
+ test_type = item.get_closest_marker("type")
+ if test_type is None:
+ raise Exception("Test is not TYPE marked: %s" % item)
+
+ if not item.config.getoption("-T"):
+ raise SystemExit("Please specify type of tests to be executed (py.test -T TYPE)")
+
+ test_type_name = test_type.args[0]
+ if test_type_name != item.config.getoption("-T"):
+ pytest.skip("Not testing type %r" % test_type_name)
+
+
# Some cmk.* code is calling things like cmk. is_raw_edition() at import time
# (e.g. cmk_base/default_config/notify.py) for edition specific variable
# defaults. In integration tests we want to use the exact version of the
Module: check_mk
Branch: master
Commit: 7afe5dbcd2972ecde79a61a1d5f4f7b5e4a7c02a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7afe5dbcd2972e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 12 10:05:53 2018 +0100
6859 FIX Fixed problem creating custom graphs with many metrics
Since 1.5 creating custom graphs out of graphs with many metrics,
e.g. combined graphs, could fail. The custom graph was not created
when clicking on "New custom graph..." and nothing visible happened.
CMK-1219
Change-Id: I6f8ab2a1ca6e848c14b135cf7e141db4d191008f
---
.werks/6859 | 15 +++++++++++++++
web/htdocs/js/checkmk.js | 6 +++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/.werks/6859 b/.werks/6859
new file mode 100644
index 0000000..a591af8
--- /dev/null
+++ b/.werks/6859
@@ -0,0 +1,15 @@
+Title: Fixed problem creating custom graphs with many metrics
+Level: 1
+Component: metrics
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.6.0i1
+Date: 1542013340
+
+Since 1.5 creating custom graphs out of graphs with many metrics,
+e.g. combined graphs, could fail. The custom graph was not created
+when clicking on "New custom graph..." and nothing visible happened.
+
+CMK-1219
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index d1d7569..ca7fd46 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -3293,11 +3293,11 @@ function pagetype_add_to_container(page_type, page_name)
var url = 'ajax_pagetype_add_element.py'
+ '?page_type=' + page_type
+ '&page_name=' + page_name
- + '&element_type=' + element_type
- + '&create_info=' + encodeURIComponent(create_info_json);
+ + '&element_type=' + element_type;
call_ajax(url, {
- method : "GET",
+ method : "POST",
+ post_data : "create_info=" + encodeURIComponent(create_info_json),
response_handler : function(handler_data, response_body) {
// We get to lines of response. The first is an URL we should be
// redirected to. The second is "true" if we should reload the