mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 02:17:37 -02:30
Merge pull request #6856 from mabashian/4987-relaunch-redirect
Remain on jobs list when relaunching jobs
This commit is contained in:
@@ -146,42 +146,40 @@ export default
|
|||||||
$state.go(state, {id: job}, {reload:true});
|
$state.go(state, {id: job}, {reload:true});
|
||||||
};
|
};
|
||||||
|
|
||||||
if(_.has(data, 'job')) {
|
if($state.includes('jobs')) {
|
||||||
goTojobResults('jobResult');
|
|
||||||
} else if(base === 'jobs'){
|
|
||||||
if(scope.clearDialog) {
|
|
||||||
scope.clearDialog();
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
} else if(data.type && data.type === 'workflow_job') {
|
|
||||||
job = data.id;
|
|
||||||
goTojobResults('workflowResults');
|
|
||||||
}
|
}
|
||||||
else if(_.has(data, 'ad_hoc_command')) {
|
|
||||||
goTojobResults('adHocJobStdout');
|
else {
|
||||||
}
|
if(_.has(data, 'job')) {
|
||||||
else if(_.has(data, 'system_job')) {
|
goTojobResults('jobResult');
|
||||||
goTojobResults('managementJobStdout');
|
} else if(data.type && data.type === 'workflow_job') {
|
||||||
}
|
job = data.id;
|
||||||
else if(_.has(data, 'project_update')) {
|
goTojobResults('workflowResults');
|
||||||
// If we are on the projects list or any child state of that list
|
}
|
||||||
// then we want to stay on that page. Otherwise go to the stdout
|
else if(_.has(data, 'ad_hoc_command')) {
|
||||||
// view.
|
goTojobResults('adHocJobStdout');
|
||||||
if(!$state.includes('projects')) {
|
}
|
||||||
goTojobResults('scmUpdateStdout');
|
else if(_.has(data, 'system_job')) {
|
||||||
|
goTojobResults('managementJobStdout');
|
||||||
|
}
|
||||||
|
else if(_.has(data, 'project_update')) {
|
||||||
|
// If we are on the projects list or any child state of that list
|
||||||
|
// then we want to stay on that page. Otherwise go to the stdout
|
||||||
|
// view.
|
||||||
|
if(!$state.includes('projects')) {
|
||||||
|
goTojobResults('scmUpdateStdout');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(_.has(data, 'inventory_update')) {
|
||||||
|
// If we are on the inventory manage page or any child state of that
|
||||||
|
// page then we want to stay on that page. Otherwise go to the stdout
|
||||||
|
// view.
|
||||||
|
if(!$state.includes('inventories.edit')) {
|
||||||
|
goTojobResults('inventorySyncStdout');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(_.has(data, 'inventory_update')) {
|
|
||||||
// If we are on the inventory manage page or any child state of that
|
|
||||||
// page then we want to stay on that page. Otherwise go to the stdout
|
|
||||||
// view.
|
|
||||||
if(!$state.includes('inventories.edit')) {
|
|
||||||
goTojobResults('inventorySyncStdout');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(scope.clearDialog) {
|
|
||||||
scope.clearDialog();
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.error(function(data, status) {
|
.error(function(data, status) {
|
||||||
|
|||||||
Reference in New Issue
Block a user