Module: check_mk
Branch: master
Commit: 41d56216339e358b60de4e262f35fe80b853846d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=41d56216339e35…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 12 07:47:00 2018 +0200
werk: Fixed reading current version after a26b52d8
Change-Id: I36f48bcff8c32b8dd9a556f3967d6ab39287a5e9
---
werk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/werk b/werk
index c5840e1..100fe5e 100755
--- a/werk
+++ b/werk
@@ -106,12 +106,12 @@ def save_last_werkid(id):
def load_current_version():
- for line in file("../Makefile"):
+ for line in file("../defines.make"):
if line.startswith("VERSION"):
version = line.split("=", 1)[1].strip()
return version
- bail_out("Failed to read VERSION from Makefile")
+ bail_out("Failed to read VERSION from defines.make")
def check_modified():
Module: check_mk
Branch: master
Commit: 997d99a5f1b98cc5ef6ef83eb27bc4cb7a235feb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=997d99a5f1b98c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 10 17:51:24 2018 +0200
6558 View actions: Default expiration time can now be configured
The global setting "View action defaults" can now be used to configure a default
expiration time.
Please note that once you set a default value other than 0, all acknowledgements
created in the future will have an expiration time unless the user changes the
expiration time to 0 manually.
Change-Id: I64c23ebcc9a75bd456752711a9364e222f65ee6f
---
.werks/6558 | 15 +++++++++++++++
cmk/gui/plugins/views/commands.py | 2 +-
cmk/gui/plugins/wato/check_mk_configuration.py | 5 +++++
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/.werks/6558 b/.werks/6558
new file mode 100644
index 0000000..06d0b53
--- /dev/null
+++ b/.werks/6558
@@ -0,0 +1,15 @@
+Title: View actions: Default expiration time of acknowledgements can now be configured
+Level: 1
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1536594441
+Class: feature
+
+The global setting "View action defaults" can now be used to configure a default
+expiration time for acknowledgements.
+
+Please note that once you set a global default value other than 0, all acknowledgements
+created in the future will have an expiration time unless the user overrides the
+expiration time with 0 manually when setting an acknowledgement.
diff --git a/cmk/gui/plugins/views/commands.py b/cmk/gui/plugins/views/commands.py
index 0cfbc16..b7ecc5b 100644
--- a/cmk/gui/plugins/views/commands.py
+++ b/cmk/gui/plugins/views/commands.py
@@ -485,7 +485,7 @@ def render_acknowledgement():
label=_('persistent comment'))
html.hr()
- _vs_expire().render_input("_ack_expire", 0)
+ _vs_expire().render_input("_ack_expire", config.view_action_defaults.get("ack_expire", 0))
html.help(_("Note: Expiration of acknowledgements only works when using the Check_MK Micro Core."))
html.hr()
html.write_text(_("Comment") + ": ")
diff --git a/cmk/gui/plugins/wato/check_mk_configuration.py b/cmk/gui/plugins/wato/check_mk_configuration.py
index fb8df4d..dc57153 100644
--- a/cmk/gui/plugins/wato/check_mk_configuration.py
+++ b/cmk/gui/plugins/wato/check_mk_configuration.py
@@ -935,6 +935,11 @@ register_configvar(group,
("ack_persistent", Checkbox(
title = _("Persistent comment"), label = _("Enable"), default_value = False,
)),
+ ("ack_expire", Age(
+ title = _("Expire acknowledgement after"),
+ display = ["days", "hours", "minutes"],
+ default_value = 0,
+ )),
],
optional_keys = [],
),