Skip to content

Commit c1ebd8d

Browse files
committed
take inventory switches tab back out, DB is empty
1 parent 2a13902 commit c1ebd8d

File tree

7 files changed

+1
-70
lines changed

7 files changed

+1
-70
lines changed

app/pages/system/inventory/InventoryPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export function InventoryPage() {
4343
<RouteTabs fullWidth>
4444
<Tab to={pb.sledInventory()}>Sleds</Tab>
4545
<Tab to={pb.diskInventory()}>Disks</Tab>
46-
<Tab to={pb.switchInventory()}>Switches</Tab>
4746
</RouteTabs>
4847
</>
4948
)

app/pages/system/inventory/SwitchesTab.tsx

Lines changed: 0 additions & 36 deletions
This file was deleted.

app/routes.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ import { InventoryPage } from './pages/system/inventory/InventoryPage'
8383
import * as SledInstances from './pages/system/inventory/sled/SledInstancesTab'
8484
import * as SledPage from './pages/system/inventory/sled/SledPage'
8585
import * as SledsTab from './pages/system/inventory/SledsTab'
86-
import * as SwitchesTab from './pages/system/inventory/SwitchesTab'
8786
import * as IpPool from './pages/system/networking/IpPoolPage'
8887
import * as IpPools from './pages/system/networking/IpPoolsPage'
8988
import * as SiloImages from './pages/system/SiloImagesPage'
@@ -165,7 +164,6 @@ export const routes = createRoutesFromElements(
165164
<Route index element={<Navigate to="sleds" replace />} loader={SledsTab.loader} />
166165
<Route path="sleds" {...SledsTab} handle={{ crumb: 'Sleds' }} />
167166
<Route path="disks" {...DisksTab} handle={{ crumb: 'Disks' }} />
168-
<Route path="switches" {...SwitchesTab} handle={{ crumb: 'Switches' }} />
169167
</Route>
170168
<Route path="inventory" handle={{ crumb: 'Inventory' }}>
171169
<Route path="sleds" handle={{ crumb: 'Sleds' }}>

app/util/__snapshots__/path-builder.spec.ts.snap

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -581,16 +581,6 @@ exports[`breadcrumbs 2`] = `
581581
"path": "/settings/ssh-keys",
582582
},
583583
],
584-
"switchInventory (/system/inventory/switches)": [
585-
{
586-
"label": "Inventory",
587-
"path": "/system/inventory/sleds",
588-
},
589-
{
590-
"label": "Switches",
591-
"path": "/system/inventory/switches",
592-
},
593-
],
594584
"systemUtilization (/system/utilization)": [
595585
{
596586
"label": "Utilization",

app/util/path-builder.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ test('path builder', () => {
8787
"sshKeyEdit": "/settings/ssh-keys/ss/edit",
8888
"sshKeys": "/settings/ssh-keys",
8989
"sshKeysNew": "/settings/ssh-keys-new",
90-
"switchInventory": "/system/inventory/switches",
9190
"systemUtilization": "/system/utilization",
9291
"vpc": "/projects/p/vpcs/v/firewall-rules",
9392
"vpcEdit": "/projects/p/vpcs/v/edit",

app/util/path-builder.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export const pb = {
104104

105105
sledInventory: () => '/system/inventory/sleds',
106106
diskInventory: () => '/system/inventory/disks',
107-
switchInventory: () => '/system/inventory/switches',
108107
sled: ({ sledId }: PP.Sled) => `/system/inventory/sleds/${sledId}/instances`,
109108
sledInstances: ({ sledId }: PP.Sled) => `/system/inventory/sleds/${sledId}/instances`,
110109

test/e2e/inventory.e2e.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright Oxide Computer Company
77
*/
88

9-
import { physicalDisks, sleds, switches } from '@oxide/api-mocks'
9+
import { physicalDisks, sleds } from '@oxide/api-mocks'
1010

1111
import { expect, expectRowVisible, expectVisible, test } from './utils'
1212

@@ -85,21 +85,3 @@ test('Disk inventory page', async ({ page }) => {
8585
state: 'decommissioned',
8686
})
8787
})
88-
89-
test('Switch inventory page', async ({ page }) => {
90-
await page.goto('/system/inventory/switches')
91-
92-
await expectVisible(page, ['role=heading[name*="Inventory"]'])
93-
94-
const switchesTab = page.getByRole('tab', { name: 'Switches' })
95-
await expect(switchesTab).toBeVisible()
96-
await expect(switchesTab).toHaveClass(/is-selected/)
97-
98-
const table = page.getByRole('table')
99-
await expectRowVisible(table, {
100-
id: switches[0].id,
101-
'part number': '832-0431906',
102-
'serial number': 'BDS02141689',
103-
revision: '1',
104-
})
105-
})

0 commit comments

Comments
 (0)