From 3d429ec3cac4a7fe953b9e9e77215c58f4c9d6f0 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Tue, 24 Oct 2023 21:31:13 -0500 Subject: [PATCH 1/3] fix sled instances prefetch --- app/routes.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/routes.tsx b/app/routes.tsx index 0a5690202..dd197af75 100644 --- a/app/routes.tsx +++ b/app/routes.tsx @@ -156,7 +156,11 @@ export const routes = createRoutesFromElements( loader={SledPage.loader} handle={{ crumb: 'Sleds' }} > - } /> + } + loader={SledInstancesTab.loader} + /> } From 29d32611637d5a3fb73610e639738a68784b3d01 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Tue, 31 Oct 2023 12:10:53 -0500 Subject: [PATCH 2/3] do the same for /system/inventory and /system/inventory/sleds --- app/layouts/SystemLayout.tsx | 2 +- app/routes.tsx | 1 + app/util/path-builder.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/layouts/SystemLayout.tsx b/app/layouts/SystemLayout.tsx index 09e062b2f..fc60e679a 100644 --- a/app/layouts/SystemLayout.tsx +++ b/app/layouts/SystemLayout.tsx @@ -65,7 +65,7 @@ export default function SystemLayout() { const systemLinks = [ { value: 'Silos', path: pb.silos() }, { value: 'Utilization', path: pb.systemUtilization() }, - { value: 'Inventory', path: pb.sledInventory() }, + { value: 'Inventory', path: pb.inventory() }, ] // filter out the entry for the path we're currently on .filter((i) => i.path !== pathname) diff --git a/app/routes.tsx b/app/routes.tsx index dd197af75..9e6196138 100644 --- a/app/routes.tsx +++ b/app/routes.tsx @@ -147,6 +147,7 @@ export const routes = createRoutesFromElements( loader={InventoryPage.loader} handle={{ crumb: 'Inventory' }} > + } loader={SledsTab.loader} /> } loader={SledsTab.loader} /> } loader={DisksTab.loader} /> diff --git a/app/util/path-builder.ts b/app/util/path-builder.ts index 87ea4161d..bf4b40509 100644 --- a/app/util/path-builder.ts +++ b/app/util/path-builder.ts @@ -80,6 +80,7 @@ export const pb = { systemNetworking: () => '/system/networking', systemSettings: () => '/system/settings', + inventory: () => '/system/inventory', rackInventory: () => '/system/inventory/racks', sledInventory: () => '/system/inventory/sleds', diskInventory: () => '/system/inventory/disks', From fb94e0878ad2c3a20dd3e5f5449a686374bc4961 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Tue, 31 Oct 2023 12:26:21 -0500 Subject: [PATCH 3/3] forgot to update snapshot test for urls --- app/util/path-builder.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/util/path-builder.spec.ts b/app/util/path-builder.spec.ts index 86563bc90..d61bcca8a 100644 --- a/app/util/path-builder.spec.ts +++ b/app/util/path-builder.spec.ts @@ -37,6 +37,7 @@ test('path builder', () => { "instancePage": "/projects/p/instances/i/storage", "instanceStorage": "/projects/p/instances/i/storage", "instances": "/projects/p/instances", + "inventory": "/system/inventory", "nics": "/projects/p/instances/i/network-interfaces", "profile": "/settings/profile", "project": "/projects/p",