Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sled instances prefetch #1802

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/layouts/SystemLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion app/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export const routes = createRoutesFromElements(
loader={InventoryPage.loader}
handle={{ crumb: 'Inventory' }}
>
<Route index element={<Navigate to="sleds" replace />} loader={SledsTab.loader} />
<Route path="sleds" element={<SledsTab />} loader={SledsTab.loader} />
<Route path="disks" element={<DisksTab />} loader={DisksTab.loader} />
</Route>
Expand All @@ -156,7 +157,11 @@ export const routes = createRoutesFromElements(
loader={SledPage.loader}
handle={{ crumb: 'Sleds' }}
>
<Route index element={<Navigate to="instances" replace />} />
<Route
index
element={<Navigate to="instances" replace />}
loader={SledInstancesTab.loader}
/>
<Route
path="instances"
element={<SledInstancesTab />}
Expand Down
1 change: 1 addition & 0 deletions app/util/path-builder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions app/util/path-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading