Skip to content

Commit a960b19

Browse files
authored
Add models and labels routes (#4604)
1 parent 8dc8a99 commit a960b19

File tree

4 files changed

+65
-2
lines changed

4 files changed

+65
-2
lines changed

ui/src/layout.tsx

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
import { Flex, Grid, Item, TabList, TabPanels, Tabs, View } from '@geti/ui';
5+
import { Tag } from '@geti/ui/icons';
56
import { Outlet, useLocation } from 'react-router';
67

78
import { ReactComponent as BuildIcon } from './assets/icons/build-icon.svg';
89
import { ReactComponent as LiveFeedIcon } from './assets/icons/live-feed-icon.svg';
10+
import { ReactComponent as Webhook } from './assets/icons/webhook.svg';
911
import { paths } from './router';
1012

13+
const iconStyles = {
14+
width: 'var(--spectrum-global-dimension-size-200)',
15+
height: 'var(--spectrum-global-dimension-size-200)',
16+
};
17+
1118
const Header = () => {
1219
return (
1320
<View backgroundColor={'gray-300'} gridArea={'header'}>
@@ -29,7 +36,7 @@ const Header = () => {
2936
href={paths.inference.index({})}
3037
>
3138
<Flex alignItems='center' gap='size-100'>
32-
<LiveFeedIcon />
39+
<LiveFeedIcon style={iconStyles} />
3340
Inference
3441
</Flex>
3542
</Item>
@@ -39,10 +46,30 @@ const Header = () => {
3946
href={paths.dataset.index({})}
4047
>
4148
<Flex alignItems='center' gap='size-100'>
42-
<BuildIcon />
49+
<BuildIcon style={iconStyles} />
4350
Dataset
4451
</Flex>
4552
</Item>
53+
<Item
54+
textValue='Models page to visualise your models'
55+
key={paths.models.index({})}
56+
href={paths.models.index({})}
57+
>
58+
<Flex alignItems='center' gap='size-100'>
59+
<Webhook style={iconStyles} />
60+
Models
61+
</Flex>
62+
</Item>
63+
<Item
64+
textValue='Labels page to visualise your labels'
65+
key={paths.labels.index({})}
66+
href={paths.labels.index({})}
67+
>
68+
<Flex alignItems='center' gap='size-100'>
69+
<Tag style={iconStyles} />
70+
Labels
71+
</Flex>
72+
</Item>
4673
</TabList>
4774
</Flex>
4875
</View>
@@ -81,6 +108,12 @@ export const Layout = () => {
81108
<Item textValue='dataset' key={paths.dataset.index({})}>
82109
<Outlet />
83110
</Item>
111+
<Item textValue='models' key={paths.models.index({})}>
112+
<Outlet />
113+
</Item>
114+
<Item textValue='labels' key={paths.labels.index({})}>
115+
<Outlet />
116+
</Item>
84117
</TabPanels>
85118
</View>
86119
</Grid>

ui/src/router.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ import { Layout } from './layout';
1515
import { Dataset } from './routes/dataset/dataset.component';
1616
import { SelectedDataProvider } from './routes/dataset/provider';
1717
import { Inference } from './routes/inference/inference';
18+
import { Labels } from './routes/labels/labels';
19+
import { Models } from './routes/models/models';
1820
import { CreateProject } from './routes/project/create-project';
1921
import { EditProject } from './routes/project/edit-project';
2022

2123
const root = path('/');
2224
const project = root.path('/project');
2325
const inference = root.path('/inference');
2426
const dataset = root.path('/dataset');
27+
const models = root.path('/models');
28+
const labels = root.path('/labels');
2529

2630
export const paths = {
2731
root,
@@ -36,6 +40,12 @@ export const paths = {
3640
dataset: {
3741
index: dataset,
3842
},
43+
models: {
44+
index: models,
45+
},
46+
labels: {
47+
index: labels,
48+
},
3949
};
4050

4151
export const router = createBrowserRouter([
@@ -92,6 +102,14 @@ export const router = createBrowserRouter([
92102
</ZoomProvider>
93103
),
94104
},
105+
{
106+
path: paths.models.index.pattern,
107+
element: <Models />,
108+
},
109+
{
110+
path: paths.labels.index.pattern,
111+
element: <Labels />,
112+
},
95113
],
96114
},
97115
]);

ui/src/routes/labels/labels.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Copyright (C) 2025 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
export const Labels = () => {
5+
return <div>Labels</div>;
6+
};

ui/src/routes/models/models.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Copyright (C) 2025 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
export const Models = () => {
5+
return <div>Models</div>;
6+
};

0 commit comments

Comments
 (0)