mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
Merge pull request #3641 from mabashian/3536-inventory-update-redirect
Stay on project/inventory manage pages when a sync is initiated
This commit is contained in:
commit
3dc07859bc
@ -130,12 +130,20 @@ export default
|
||||
goToJobDetails('managementJobStdout');
|
||||
}
|
||||
else if(_.has(data, 'project_update')) {
|
||||
if($state.current.name !== 'projects') {
|
||||
// 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')) {
|
||||
goToJobDetails('scmUpdateStdout');
|
||||
}
|
||||
}
|
||||
else if(_.has(data, 'inventory_update')) {
|
||||
goToJobDetails('inventorySyncStdout');
|
||||
// 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('inventoryManage')) {
|
||||
goToJobDetails('inventorySyncStdout');
|
||||
}
|
||||
}
|
||||
}
|
||||
if(scope.clearDialog) {
|
||||
|
Loading…
Reference in New Issue
Block a user