Add relaunch component to Completed Jobs list

This commit is contained in:
Marliana Lara 2017-11-14 12:26:34 -05:00
parent 69ada03b7b
commit 6654cc35f7
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
3 changed files with 4 additions and 3 deletions

View File

@ -12,7 +12,7 @@ const atRelaunch = {
function atRelaunchCtrl (RelaunchJob, InitiatePlaybookRun, strings, $scope) {
const vm = this;
const scope = $scope.$parent;
const { job } = $scope.$parent;
const job = _.get(scope, 'job') || _.get(scope, 'completed_job');
vm.$onInit = () => {
vm.showRelaunch = !(job.type === 'system_job') && job.summary_fields.user_capabilities.start;

View File

@ -76,7 +76,8 @@ export default ['i18n', function(i18n) {
ngClick: 'relaunchJob($event, completed_job.id)',
awToolTip: i18n._('Relaunch using the same parameters'),
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": {
mode: 'all',

View File

@ -92,7 +92,7 @@ export default ['i18n', function(i18n) {
dataPlacement: "top"
},
submit: {
icon: 'icon-launch',
icon: 'icon-rocket',
mode: 'all',
ngClick: 'relaunchJob($event, job.id)',
awToolTip: i18n._('Relaunch using the same parameters'),