mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 00:38:45 -03:30
Add relaunch component to Completed Jobs list
This commit is contained in:
@@ -12,7 +12,7 @@ const atRelaunch = {
|
|||||||
function atRelaunchCtrl (RelaunchJob, InitiatePlaybookRun, strings, $scope) {
|
function atRelaunchCtrl (RelaunchJob, InitiatePlaybookRun, strings, $scope) {
|
||||||
const vm = this;
|
const vm = this;
|
||||||
const scope = $scope.$parent;
|
const scope = $scope.$parent;
|
||||||
const { job } = $scope.$parent;
|
const job = _.get(scope, 'job') || _.get(scope, 'completed_job');
|
||||||
|
|
||||||
vm.$onInit = () => {
|
vm.$onInit = () => {
|
||||||
vm.showRelaunch = !(job.type === 'system_job') && job.summary_fields.user_capabilities.start;
|
vm.showRelaunch = !(job.type === 'system_job') && job.summary_fields.user_capabilities.start;
|
||||||
|
|||||||
@@ -76,7 +76,8 @@ export default ['i18n', function(i18n) {
|
|||||||
ngClick: 'relaunchJob($event, completed_job.id)',
|
ngClick: 'relaunchJob($event, completed_job.id)',
|
||||||
awToolTip: i18n._('Relaunch using the same parameters'),
|
awToolTip: i18n._('Relaunch using the same parameters'),
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
ngShow: "!completed_job.type == 'system_job' || completed_job.summary_fields.user_capabilities.start"
|
ngShow: "!completed_job.type == 'system_job' || completed_job.summary_fields.user_capabilities.start",
|
||||||
|
relaunch: true
|
||||||
},
|
},
|
||||||
"delete": {
|
"delete": {
|
||||||
mode: 'all',
|
mode: 'all',
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export default ['i18n', function(i18n) {
|
|||||||
dataPlacement: "top"
|
dataPlacement: "top"
|
||||||
},
|
},
|
||||||
submit: {
|
submit: {
|
||||||
icon: 'icon-launch',
|
icon: 'icon-rocket',
|
||||||
mode: 'all',
|
mode: 'all',
|
||||||
ngClick: 'relaunchJob($event, job.id)',
|
ngClick: 'relaunchJob($event, job.id)',
|
||||||
awToolTip: i18n._('Relaunch using the same parameters'),
|
awToolTip: i18n._('Relaunch using the same parameters'),
|
||||||
|
|||||||
Reference in New Issue
Block a user