Module: check_mk
Branch: master
Commit: 1d4adc91034ddd96903b062a05b0313971de9d19
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1d4adc91034ddd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 6 10:01:24 2018 +0100
Improved output of background baking messages
Change-Id: Iaeaa51e8e03a25dadbe222defbc084d3f3a218b2
---
web/htdocs/background_job.py | 4 ++++
web/htdocs/gui_background_job.py | 5 +++++
web/htdocs/wato.py | 4 ++--
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/background_job.py b/web/htdocs/background_job.py
index 457a2f5..c4ee6ed 100644
--- a/web/htdocs/background_job.py
+++ b/web/htdocs/background_job.py
@@ -311,6 +311,10 @@ class BackgroundJob(object):
return self._job_id
+ def get_title(self):
+ return self._jobstatus.get_status().get("title", _("Background
job"))
+
+
def get_work_dir(self):
return self._work_dir
diff --git a/web/htdocs/gui_background_job.py b/web/htdocs/gui_background_job.py
index 9e98bd4..91d363c 100644
--- a/web/htdocs/gui_background_job.py
+++ b/web/htdocs/gui_background_job.py
@@ -135,6 +135,11 @@ class
GUIBackgroundJobSnapshottedFunctions(background_job.BackgroundJob):
return super(GUIBackgroundJobSnapshottedFunctions, self).get_job_id()
+ def get_title(self):
+ return super(GUIBackgroundJobSnapshottedFunctions, self).get_title()
+
+
+
class GUIBackgroundJob(GUIBackgroundJobSnapshottedFunctions,
background_job.BackgroundJob):
_background_process_class = GUIBackgroundProcess
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 9a5c0a5..1c88e4e 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1591,7 +1591,7 @@ def mode_bulk_rename_host(phase):
html.context_button(_("Folder"),
watolib.folder_preserving_link([("mode", "folder")]),
"back")
host_renaming_job = RenameHostsBackgroundJob()
if host_renaming_job.is_available():
- html.context_button(_("Previous results"), html.makeuri([
+ html.context_button(_("Last result"), html.makeuri([
("mode", "background_job_details"),
("job_id", host_renaming_job.get_job_id()),
("back_url", html.makeuri([])),
@@ -1858,7 +1858,7 @@ def mode_rename_host(phase):
host_renaming_job = RenameHostsBackgroundJob()
if host_renaming_job.is_available():
- html.context_button(_("Previous results"), html.makeuri([
+ html.context_button(_("Last result"), html.makeuri([
("mode", "background_job_details"),
("job_id", host_renaming_job.get_job_id()),
("back_url", html.makeuri([])),