Module: check_mk
Branch: master
Commit: f9e4d3e63cbc356f377761b8d3045a06cbfb7645
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f9e4d3e63cbc35…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Sep 25 16:21:29 2014 +0200
Updated bug entries #2184
---
.bugs/2184 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.bugs/2184 b/.bugs/2184
new file mode 100644
index 0000000..9f39b7c
--- /dev/null
+++ b/.bugs/2184
@@ -0,0 +1,12 @@
+Title: SNMP Community in host properties not shown on IE?
+Component: wato
+State: open
+Date: 2014-09-25 16:13:09
+Targetversion: future
+Class: bug
+
+A host that is tagged as SNMP host is opened in WATO. Nevertheless
+the attribute SNMP Community is not visible. In Firefox it is
+visible. Looks like some JS problem with IE...
+
+Switching back and forth the tag seems not help.
Module: check_mk
Branch: master
Commit: ec5872b98ca1711c250785649c9076c3aed1f213
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ec5872b98ca171…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Sep 25 12:13:54 2014 +0200
#1119 FIX WATO create rule: No longer raises an incorrect permission warning when creating a new rule
A normal monitoring user which had only permissions to a given subfolder
could not create a new rule when the rule formular was created with the
main directory as rule path.<br><br>
For example, if the user pressed "Create in folder: 'Main directory'" and
switched the actual rule folder to his subfolder afterwards.<br>
This resulted in a permission warning stating that the user has no permission to
write into the 'Main directory'.
---
.werks/1119 | 16 ++++++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 3 ++-
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/.werks/1119 b/.werks/1119
new file mode 100644
index 0000000..8b76c4b
--- /dev/null
+++ b/.werks/1119
@@ -0,0 +1,16 @@
+Title: WATO create rule: No longer raises an incorrect permission warning when creating a new rule
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.5i6
+Date: 1411639616
+Class: fix
+
+A normal monitoring user which had only permissions to a given subfolder
+could not create a new rule when the rule formular was created with the
+main directory as rule path.<br><br>
+
+For example, if the user pressed "Create in folder: 'Main directory'" and
+switched the actual rule folder to his subfolder afterwards.<br>
+This resulted in a permission warning stating that the user has no permission to
+write into the 'Main directory'.
diff --git a/ChangeLog b/ChangeLog
index 49e9399..e7fe90d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -127,6 +127,7 @@
* 1101 FIX: WATO check parameter: renamed 'Nominal Voltages' to 'Voltage Levels..'
* 1396 FIX: Fix default setting of Enable sounds in views...
* 1109 FIX: WATO active checks: passwords no longer shown as plain text....
+ * 1119 FIX: WATO create rule: No longer raises an incorrect permission warning when creating a new rule...
Notifications:
* 1151 Add variables (HOST/SERVICE)ACK(AUTHOR/COMMENT) to notification context...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index afab772..12088e8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -14291,7 +14291,8 @@ def mode_edit_rule(phase, new = False):
new_rule_folder = g_folders[html.var("new_rule_folder")]
# Check permissions on folders
- check_folder_permissions(folder, "write", True)
+ if not new:
+ check_folder_permissions(folder, "write", True)
check_folder_permissions(new_rule_folder, "write", True)
# VALUE
Module: check_mk
Branch: master
Commit: 0fa1ffedc2f919c9cda1719f96d962f90edc6ab2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0fa1ffedc2f919…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Sep 24 17:58:38 2014 +0200
#1405 Checkbox for settings downtimes on the hosts of the selected services
In the Multisite command box for setting downtimes on services there is now
a new checkbox called <i>Schedule downtimes on the affected hosts instead
of their services</i>. When you check this then the scheduled downtimes
are set on the hosts of the selected services rather then on the services
themselves. Note: When a host is in scheduled downtime then all its services
are considered to be in a scheduled downtime, as well. There is no need to
set a downtime on these.
---
.werks/1405 | 16 ++++++++++++++++
ChangeLog | 1 +
web/htdocs/views.py | 11 +++++++----
web/plugins/views/commands.py | 16 +++++++++++++++-
4 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/.werks/1405 b/.werks/1405
new file mode 100644
index 0000000..6709ad5
--- /dev/null
+++ b/.werks/1405
@@ -0,0 +1,16 @@
+Title: Checkbox for settings downtimes on the hosts of the selected services
+Level: 2
+Component: multisite
+Compatible: compat
+Version: 1.2.5i6
+Date: 1411574194
+Class: feature
+
+In the Multisite command box for setting downtimes on services there is now
+a new checkbox called <i>Schedule downtimes on the affected hosts instead
+of their services</i>. When you check this then the scheduled downtimes
+are set on the hosts of the selected services rather then on the services
+themselves. Note: When a host is in scheduled downtime then all its services
+are considered to be in a scheduled downtime, as well. There is no need to
+set a downtime on these.
+
diff --git a/ChangeLog b/ChangeLog
index 75f6489..49e9399 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -105,6 +105,7 @@
* 1066 Implemented Dashboard Designer...
* 1392 WATO Folder filter: show only the paths a user is allowed to see
* 1398 Allow to spread times of next check when rescheduling...
+ * 1405 Checkbox for settings downtimes on the hosts of the selected services...
* 1067 FIX: Fixed login problem in LDAP connector when no user filter specified...
* 1094 FIX: sidebar snaping 'Tree of folders': fixed exception
* 1154 FIX: Availability: Fixed unwanted redirect to edit annotation page after editing availability options...
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index d264da8..e3717ed 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2007,13 +2007,16 @@ def do_actions(view, what, action_rows, backurl):
return False
count = 0
+ already_executed = set([])
for nr, row in enumerate(action_rows):
core_commands, title, executor = core_command(what, row, nr, len(action_rows))
for command in core_commands:
- if type(command) == unicode:
- command = command.encode("utf-8")
- executor(command, row["site"])
- count += 1
+ if command not in already_executed:
+ if type(command) == unicode:
+ command = command.encode("utf-8")
+ executor(command, row["site"])
+ already_executed.add(command)
+ count += 1
message = None
if command:
diff --git a/web/plugins/views/commands.py b/web/plugins/views/commands.py
index b92a10d..3439e96 100644
--- a/web/plugins/views/commands.py
+++ b/web/plugins/views/commands.py
@@ -365,10 +365,12 @@ def command_downtime(cmdtag, spec, row):
down_to = time.time() + minutes * 60
title = _("<b>schedule an immediate downtime for the next %d minutes</b> on" % minutes)
+
elif html.var("_down_adhoc"):
minutes = config.adhoc_downtime.get("duration",0)
down_to = time.time() + minutes * 60
title = _("<b>schedule an immediate downtime for the next %d minutes</b> on" % minutes)
+
elif html.var("_down_custom"):
down_from = html.get_datetime_input("_down_from")
down_to = html.get_datetime_input("_down_to")
@@ -381,6 +383,9 @@ def command_downtime(cmdtag, spec, row):
time.asctime(time.localtime(down_to)))
elif html.var("_down_remove"):
+ if html.var("_on_hosts"):
+ raise MKUserError("_on_hosts", _("The checkbox for setting host downtimes does not work when removing downtimes."))
+
downtime_ids = []
if cmdtag == "HOST":
prefix = "host_"
@@ -412,6 +417,10 @@ def command_downtime(cmdtag, spec, row):
if html.var("_include_childs"): # only for hosts
specs = [ spec ] + get_child_hosts(row["site"], [spec], recurse = not not html.var("_include_childs_recurse"))
+ elif html.var("_on_hosts"): # set on hosts instead of services
+ specs = [ spec.split(";")[0] ]
+ title += " the hosts of"
+ cmdtag = "HOST"
else:
specs = [ spec ]
@@ -420,6 +429,7 @@ def command_downtime(cmdtag, spec, row):
+ comment) for spec in specs]
return commands, title
+
def get_child_hosts(site, hosts, recurse):
hosts = set(hosts)
html.live.set_only_sites([site])
@@ -437,6 +447,7 @@ def get_child_hosts(site, hosts, recurse):
new_childs.update(rec_childs)
return list(new_childs)
+
def paint_downtime_buttons(what):
html.write(_('Downtime Comment')+": ")
@@ -472,11 +483,14 @@ def paint_downtime_buttons(what):
html.checkbox("_down_flexible", False, label=_('flexible with max. duration')+" ")
html.time_input("_down_duration", 2, 0)
html.write(" "+_('(HH:MM)'))
+ html.write("<hr>")
if what == "host":
- html.write("<hr>")
html.checkbox("_include_childs", False, label=_('Also set downtime on child hosts'))
html.write(" ")
html.checkbox("_include_childs_recurse", False, label=_('Do this recursively'))
+ else:
+ html.checkbox("_on_hosts", False, label=_('Schedule downtimes on the affected <b>hosts</b> instead of their services'))
+
multisite_commands.append({