diff --git a/CHANGELOG.md b/CHANGELOG.md
index a32208041b0..f9b3f6610bb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -121,6 +121,7 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https:
- Disable autotosectionlabel plugin in documentation and add required labels [PR #942]
- webui: improve log message keyword highlighting [PR #937]
- webui: change retention/expiration column to only show retention on volume tables [PR #943]
+- webui: introduce confirmation dialog on rerun and cancel job actions [PR #951]
### Deprecated
@@ -270,4 +271,5 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https:
[PR #942]: https://github.com/bareos/bareos/pull/942
[PR #943]: https://github.com/bareos/bareos/pull/943
[PR #944]: https://github.com/bareos/bareos/pull/944
+[PR #951]: https://github.com/bareos/bareos/pull/951
[unreleased]: https://github.com/bareos/bareos/tree/master
diff --git a/webui/module/Job/src/Job/Controller/JobController.php b/webui/module/Job/src/Job/Controller/JobController.php
index 53dff961788..bdc08a8b419 100644
--- a/webui/module/Job/src/Job/Controller/JobController.php
+++ b/webui/module/Job/src/Job/Controller/JobController.php
@@ -128,6 +128,8 @@ public function indexAction()
);
} else {
$result = $this->getJobModel()->rerunJob($this->bsock, $jobid);
+ $jobid = rtrim( substr( $result, strrpos($result, "=") + 1 ) );
+ return $this->redirect()->toRoute('job', array('action' => 'details', 'id' => $jobid));
}
}
catch(Exception $e) {
diff --git a/webui/public/js/bootstrap-table-formatter.js b/webui/public/js/bootstrap-table-formatter.js
index b74d8f61835..62404c55ce3 100644
--- a/webui/public/js/bootstrap-table-formatter.js
+++ b/webui/public/js/bootstrap-table-formatter.js
@@ -533,9 +533,9 @@ function scheduleActionButtonsFormatter(value, row, index, basePath) {
function jobActionButtonsFormatter(value, row, index, basePath) {
let jobDetailsButton = '';
- let jobRerunButton = '';
+ let jobRerunButton = '';
let jobRestoreButton = '';
- let jobCancelButton = '';
+ let jobCancelButton = '';
switch(row.jobstatus) {
case 'T':
diff --git a/webui/tests/selenium/webui-selenium-test.py b/webui/tests/selenium/webui-selenium-test.py
index 8a2b04c4d54..0fff1514c72 100755
--- a/webui/tests/selenium/webui-selenium-test.py
+++ b/webui/tests/selenium/webui-selenium-test.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# BAREOS - Backup Archiving REcovery Open Sourced
#
-# Copyright (C) 2018-2020 Bareos GmbH & Co. KG
+# Copyright (C) 2018-2021 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
@@ -403,6 +403,8 @@ def test_rerun_job(self):
self.wait_and_click(By.XPATH, '//tr[@data-index="0"]/td[1]/a')
# Press on rerun button
self.wait_and_click(By.CSS_SELECTOR, "span.glyphicon.glyphicon-repeat")
+ # Accept confirmation dialog
+ self.driver.switch_to.alert.accept()
if self.profile == "readonly":
self.wait_and_click(By.LINK_TEXT, "Back")
else: