1
0
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:
Michael Abashian 2016-10-03 10:39:50 -04:00 committed by GitHub
commit 3dc07859bc

View File

@ -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) {