Module: check_mk
Branch: master
Commit: 62082da1bc437b98537cd05610c5a4d7cfe60946
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=62082da1bc437b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Nov 15 16:09:13 2011 +0100
FIX: Fix popup help of reschedule icon
---
ChangeLog | 1 +
web/htdocs/js/check_mk.js | 7 +++++--
web/plugins/icons/builtin.py | 12 ++++++------
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2297951..dc3866b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,6 +74,7 @@
* FIX: Snapin 'Performance': fix text align for numbers
* FIX: Disallow setting downtimes that end in the past
* FIX: Fix links to downtime services in dashboard
+ * FIX: Fix popup help of reschedule icon
1.1.12p1:
Core, Setup, etc.:
diff --git a/web/htdocs/js/check_mk.js b/web/htdocs/js/check_mk.js
index 454c138..f9a1b5c 100644
--- a/web/htdocs/js/check_mk.js
+++ b/web/htdocs/js/check_mk.js
@@ -423,13 +423,16 @@ function actionResponseHandler(oImg, code) {
oImg = null;
}
-function performAction(oLink, action, type, site, name1, name2) {
+function performAction(oLink, action, site, host, service) {
var oImg = oLink.childNodes[0];
oImg.src = 'images/icon_reloading.gif';
// Chrome and IE are not animating the gif during sync ajax request
// So better use the async request here
-
get_url('nagios_action.py?action='+action+'&site='+site+'&host='+name1+'&service='+name2,
+ get_url('nagios_action.py?action=' + action +
+ '&site=' + escape(site) +
+ '&host=' + escape(host) +
+ '&service=' + escape(service),
actionResponseHandler, oImg);
oImg = null;
}
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index 44e791a..31cf084 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -408,14 +408,14 @@ def paint_reschedule(what, row, tags, custom_vars):
# Reschedule button
if row[what + "_active_checks_enabled"] == 1 \
and config.may('action.reschedule'):
- name2 = ''
+ servicedesc = ''
if what == 'service':
- name2 = row['service_description']
- return '<a href=\"javascript:void(0);\"
onclick="performAction(this, \'reschedule\', ' \
- '\'%s\', \'%s\', \'%s\',
\'%s\');">' \
+ servicedesc = row['service_description']
+ return '<a href=\"javascript:void(0);\" ' \
+ 'onclick="performAction(this, \'reschedule\',
\'%s\', \'%s\', \'%s\');">' \
'<img class=icon title="%s"
src="images/icon_reload.gif" /></a>' % \
- (_('Reschedule an immediate check of this %s') % what, \
- row["site"], row["host_name"], name2,
what)
+ (row["site"], row["host_name"], servicedesc,
+ (_('Reschedule an immediate check of this %s') % _(what)))
multisite_icons.append({
'columns': [ 'active_checks_enabled' ],