|
1 | 1 | import * as React from 'react'; |
2 | 2 | import { Navigate, Outlet, useParams } from 'react-router-dom'; |
3 | | -import { Bullseye, Alert, Divider } from '@patternfly/react-core'; |
| 3 | +import { Bullseye, Alert } from '@patternfly/react-core'; |
4 | 4 | import ApplicationsPage from '~/shared/components/ApplicationsPage'; |
5 | 5 | import { ModelRegistrySelectorContext } from '~/app/context/ModelRegistrySelectorContext'; |
6 | 6 | import { ProjectObjectType, typedEmptyImage } from '~/shared/components/design/utils'; |
7 | 7 | import { ModelRegistryContextProvider } from '~/app/context/ModelRegistryContext'; |
8 | 8 | import TitleWithIcon from '~/shared/components/design/TitleWithIcon'; |
9 | | -import WhosMyAdministrator from '~/shared/components/WhosMyAdministrator'; |
10 | | -import { isMUITheme } from '~/shared/utilities/const'; |
11 | 9 | import KubeflowDocs from '~/shared/components/KubeflowDocs'; |
| 10 | +import { useThemeContext } from '~/app/MUIThemeContext'; |
12 | 11 | import EmptyModelRegistryState from './screens/components/EmptyModelRegistryState'; |
13 | 12 | import InvalidModelRegistry from './screens/InvalidModelRegistry'; |
14 | 13 | import ModelRegistrySelectorNavigator from './screens/ModelRegistrySelectorNavigator'; |
@@ -36,6 +35,7 @@ const ModelRegistryCoreLoader: React.FC<ModelRegistryCoreLoaderProps> = ({ |
36 | 35 | preferredModelRegistry, |
37 | 36 | updatePreferredModelRegistry, |
38 | 37 | } = React.useContext(ModelRegistrySelectorContext); |
| 38 | + const { isMUITheme } = useThemeContext(); |
39 | 39 |
|
40 | 40 | const modelRegistryFromRoute = modelRegistries.find((mr) => mr.name === modelRegistry); |
41 | 41 |
|
@@ -65,16 +65,16 @@ const ModelRegistryCoreLoader: React.FC<ModelRegistryCoreLoaderProps> = ({ |
65 | 65 | emptyStatePage: ( |
66 | 66 | <EmptyModelRegistryState |
67 | 67 | testid="empty-model-registries-state" |
68 | | - title={isMUITheme() ? 'Deploy a model registry' : 'Request access to model registries'} |
| 68 | + title="Deploy a model registry" |
69 | 69 | description={ |
70 | | - isMUITheme() |
| 70 | + isMUITheme |
71 | 71 | ? 'To deploy a new model registry, follow the instructions in the docs below.' |
72 | 72 | : 'To request a new model registry, or to request permission to access an existing model registry, contact your administrator.' |
73 | 73 | } |
74 | 74 | headerIcon={() => ( |
75 | 75 | <img src={typedEmptyImage(ProjectObjectType.registeredModels)} alt="" /> |
76 | 76 | )} |
77 | | - customAction={isMUITheme() ? <KubeflowDocs /> : <WhosMyAdministrator />} |
| 77 | + customAction={<KubeflowDocs />} |
78 | 78 | /> |
79 | 79 | ), |
80 | 80 | headerContent: null, |
@@ -103,19 +103,9 @@ const ModelRegistryCoreLoader: React.FC<ModelRegistryCoreLoaderProps> = ({ |
103 | 103 | return ( |
104 | 104 | <ApplicationsPage |
105 | 105 | title={ |
106 | | - !isMUITheme() ? ( |
107 | | - <TitleWithIcon title="Model Registry" objectType={ProjectObjectType.registeredModels} /> |
108 | | - ) : ( |
109 | | - 'Model Registry' |
110 | | - ) |
111 | | - } |
112 | | - description={ |
113 | | - !isMUITheme() ? ( |
114 | | - 'Select a model registry to view and manage your registered models. Model registries provide a structured and organized way to store, share, version, deploy, and track models.' |
115 | | - ) : ( |
116 | | - <Divider /> |
117 | | - ) |
| 106 | + <TitleWithIcon title="Model Registry" objectType={ProjectObjectType.registeredModels} /> |
118 | 107 | } |
| 108 | + description="Select a model registry to view and manage your registered models. Model registries provide a structured and organized way to store, share, version, deploy, and track models." |
119 | 109 | headerContent={ |
120 | 110 | <ModelRegistrySelectorNavigator |
121 | 111 | getRedirectPath={(modelRegistryName) => modelRegistryUrl(modelRegistryName)} |
|
0 commit comments