Module: check_mk
Branch: master
Commit: 7076d5194550a5ede88bd70e26a8515830fba809
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7076d5194550a5…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Apr 3 13:05:00 2014 +0200
FIX host diag page: fixed problem with update of diagnose subwindows
The subwindows in the host diagnostic page did not get updated properly, because of an
incorrect transaction handling.
---
.werks/781 | 9 +++++++++
ChangeLog | 3 +++
web/htdocs/js/wato.js | 4 ++--
web/htdocs/wato.py | 6 +++---
4 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/.werks/781 b/.werks/781
new file mode 100644
index 0000000..17dc7f4
--- /dev/null
+++ b/.werks/781
@@ -0,0 +1,9 @@
+Title: host diag page: fixed problem with update of diagnose subwindows
+Level: 2
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i3
+Date: 1396522971
+
+The subwindows in the host diagnostic page did not get updated properly, because of an
incorrect transaction handling.
diff --git a/ChangeLog b/ChangeLog
index 9411296..79373b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled
by filter)
+ WATO:
+ * 0781 FIX: host diag page: fixed problem with update of diagnose subwindows...
+
Livestatus:
* 0747 FIX: livestatus table hostsbygroup: fixed bug with group_authorization
strict...
diff --git a/web/htdocs/js/wato.js b/web/htdocs/js/wato.js
index 0180c71..7cbafc6 100644
--- a/web/htdocs/js/wato.js
+++ b/web/htdocs/js/wato.js
@@ -799,7 +799,7 @@ function handle_host_diag_result(ident, response_text) {
retry.style.display = 'inline';
}
-function start_host_diag_test(ident, hostname) {
+function start_host_diag_test(ident, hostname, transid) {
var log = document.getElementById(ident + '_log');
var img = document.getElementById(ident + '_img');
var retry = document.getElementById(ident + '_retry');
@@ -817,6 +817,6 @@ function start_host_diag_test(ident, hostname) {
img.src = "images/icon_loading.gif";
log.innerHTML = "...";
get_url("wato_ajax_diag_host.py?host=" + escape(hostname) +
"&_test=" + escape(ident)
- + '&_transid=-1' + vars,
+ + '&_transid=' + transid + vars,
handle_host_diag_result, ident);
}
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 438031f..f15f138 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2690,13 +2690,13 @@ def mode_diag_host(phase):
html.write('<table class="data test"><tr
class="data odd0">')
html.write('<td class="icons"><div>')
html.write('<img class="icon" id="%s_img"
src="">' % ident)
- html.write('<a
href="javascript:start_host_diag_test(\'%s\',
\'%s\');">'
+ html.write('<a
href="javascript:start_host_diag_test(\'%s\', \'%s\',
\'%s\');">'
'<img class="icon retry" id="%s_retry"
src="images/icon_retry_disabled.gif" title="%s"></a>' %
- (ident, hostname, ident, _('Retry this test')))
+ (ident, hostname, html.fresh_transid(), ident, _('Retry this
test')))
html.write('</div></td>')
html.write('<td><div class="log"
id="%s_log"></div>' % ident)
html.write('</tr></table>')
- html.javascript('start_host_diag_test("%s",
"%s")' % (ident, hostname))
+ html.javascript('start_host_diag_test("%s", "%s",
"%s")' % (ident, hostname, html.fresh_transid()))
html.write('</td></tr></table>')
html.write('</div>')