Module: check_mk
Branch: master
Commit: cdae4c97ea8cf4949a657a42e4e94296f525994d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cdae4c97ea8cf4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Apr 12 21:17:54 2018 +0200
5974 FIX Fixed possible exception on background job detail page
When a detail page can not access job information (e.g. the job does not exist anymore),
the error message was not displayed correctly.
Change-Id: Ieb195d86da68dfe2b65ae65df939f44c80a1d0b8
---
.werks/5974 | 12 ++++++++++++
web/htdocs/gui_background_job.py | 4 ++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/5974 b/.werks/5974
new file mode 100644
index 0000000..22d8a88
--- /dev/null
+++ b/.werks/5974
@@ -0,0 +1,12 @@
+Title: Fixed possible exception on background job detail page
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1523560619
+
+When a detail page can not access job information (e.g. the job does not exist anymore),
+the error message was not displayed correctly.
diff --git a/web/htdocs/gui_background_job.py b/web/htdocs/gui_background_job.py
index e667175..d8e93cf 100644
--- a/web/htdocs/gui_background_job.py
+++ b/web/htdocs/gui_background_job.py
@@ -269,7 +269,7 @@ class GUIBackgroundJobManager(background_job.BackgroundJobManager):
def show_job_details(self, job_id = None, job_snapshot = None):
job_info = self._get_job_infos([job_id])
if not job_info:
- raise MKGeneralException("Background job with id <i>%s/i> not
found" % job_id)
+ raise MKGeneralException("Background job with id <i>%s</i>
not found" % job_id)
job_id, job_status = job_info.items()[0]
html.write(JobRenderer.render_job_details(job_id, job_status))
@@ -281,7 +281,7 @@ class GUIBackgroundJobManager(background_job.BackgroundJobManager):
job_id, job_status = job_info.items()[0]
html.write(JobRenderer.render_job_details(job_id, job_status))
else:
- raise MKGeneralException("Background job with id <i>%s/i> not
found" % job_id)
+ raise MKGeneralException("Background job with id <i>%s</i>
not found" % job_snapshot.get_job_id())