-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathrouter.ts
70 lines (66 loc) · 1.57 KB
/
router.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import { Model } from '../public/components/model';
import { ModelList } from '../public/components/model_list';
import { Monitoring } from '../public/components/monitoring';
import { RegisterModelForm } from '../public/components/register_model/register_model';
import { ModelVersion } from '../public/components/model_version';
import { routerPaths } from './router_paths';
interface RouteConfig {
path: string;
Component: React.ComponentType<any>;
label: string;
exact?: boolean;
/**
* true: display route in nav bar
*/
nav: boolean;
}
export const ROUTES: RouteConfig[] = [
{
path: routerPaths.overview,
Component: Monitoring,
label: 'Overview',
nav: true,
},
{
path: routerPaths.registerModel,
label: 'Register Model',
Component: RegisterModelForm,
nav: false,
},
{
path: routerPaths.modelList,
label: 'Model Registry',
Component: ModelList,
nav: true,
},
{
path: routerPaths.model,
// TODO: refactor label to be dynamic so that we can display group name in breadcrumb
label: 'Model',
Component: Model,
nav: false,
},
{
path: routerPaths.modelVersion,
label: 'Model Version',
Component: ModelVersion,
nav: false,
},
];
/* export const ROUTES1 = [
{
path: routerPaths.modelList,
Component: ModelList,
label: 'Model List',
icon: 'createSingleMetricJob',
},
{
path: routerPaths.registerModel,
label: 'Register Model',
Component: RegisterModelForm,
},
];*/