From e89037dd7757d90570036250b1a74e714f6b2411 Mon Sep 17 00:00:00 2001 From: "Keith J. Grant" Date: Tue, 9 Nov 2021 10:16:00 -0800 Subject: [PATCH 1/2] reduce duplicate fetches after saving inventory group --- .../Inventory/InventoryGroupEdit/InventoryGroupEdit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.js b/awx/ui/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.js index 545862ee62..3db2d80829 100644 --- a/awx/ui/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.js +++ b/awx/ui/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.js @@ -13,14 +13,14 @@ function InventoryGroupEdit({ inventoryGroup }) { const handleSubmit = async (values) => { try { await GroupsAPI.update(groupId, values); - history.push(`/inventories/inventory/${id}/groups/${groupId}`); + history.push(`/inventories/inventory/${id}/groups/${groupId}/details`); } catch (err) { setError(err); } }; const handleCancel = () => { - history.push(`/inventories/inventory/${id}/groups/${groupId}`); + history.push(`/inventories/inventory/${id}/groups/${groupId}/details`); }; return ( From f63003f982dc399e21b460010955c18b6e840cb6 Mon Sep 17 00:00:00 2001 From: "Keith J. Grant" Date: Tue, 9 Nov 2021 10:59:58 -0800 Subject: [PATCH 2/2] don't navigate to inventory group details on edit cancel --- .../screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.js b/awx/ui/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.js index 3db2d80829..5c0a34796a 100644 --- a/awx/ui/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.js +++ b/awx/ui/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.js @@ -20,7 +20,7 @@ function InventoryGroupEdit({ inventoryGroup }) { }; const handleCancel = () => { - history.push(`/inventories/inventory/${id}/groups/${groupId}/details`); + history.push(`/inventories/inventory/${id}/groups/${groupId}`); }; return (