mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Merge pull request #6117 from keithjgrant/6095-redirect-after-host-delete
Fix redirect after host delete Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
a8a45fca84
@ -44,7 +44,10 @@ function HostDetail({ host, i18n, onUpdateHost }) {
|
||||
try {
|
||||
await HostsAPI.destroy(id);
|
||||
setIsloading(false);
|
||||
history.push(`/inventories/inventory/${inventoryId}/hosts`);
|
||||
const url = pathname.startsWith('/inventories')
|
||||
? `/inventories/inventory/${inventoryId}/hosts/`
|
||||
: `/hosts`;
|
||||
history.push(url);
|
||||
} catch (err) {
|
||||
setDeletionError(err);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user