mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
fix redirect url after host delete
This commit is contained in:
parent
e971ec993b
commit
a60e7a7855
@ -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…
x
Reference in New Issue
Block a user