mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 15:58:45 -03:30
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:
@@ -130,12 +130,20 @@ export default
|
|||||||
goToJobDetails('managementJobStdout');
|
goToJobDetails('managementJobStdout');
|
||||||
}
|
}
|
||||||
else if(_.has(data, 'project_update')) {
|
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');
|
goToJobDetails('scmUpdateStdout');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(_.has(data, 'inventory_update')) {
|
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) {
|
if(scope.clearDialog) {
|
||||||
|
|||||||
Reference in New Issue
Block a user