mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 18:21:03 -03:30
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:
@@ -44,7 +44,10 @@ function HostDetail({ host, i18n, onUpdateHost }) {
|
|||||||
try {
|
try {
|
||||||
await HostsAPI.destroy(id);
|
await HostsAPI.destroy(id);
|
||||||
setIsloading(false);
|
setIsloading(false);
|
||||||
history.push(`/inventories/inventory/${inventoryId}/hosts`);
|
const url = pathname.startsWith('/inventories')
|
||||||
|
? `/inventories/inventory/${inventoryId}/hosts/`
|
||||||
|
: `/hosts`;
|
||||||
|
history.push(url);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setDeletionError(err);
|
setDeletionError(err);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user