From c2b11dca802978c7d3d3533e396577b5d1dbe2d2 Mon Sep 17 00:00:00 2001
From: gitdallas <5322142+gitdallas@users.noreply.github.com>
Date: Fri, 10 May 2024 12:20:04 -0500
Subject: [PATCH 1/3] feat(mr): mr settings scaffolding
Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>
---
backend/src/types.ts | 1 +
backend/src/utils/constants.ts | 1 +
docs/dashboard-config.md | 3 ++
frontend/src/__mocks__/mockDashboardConfig.ts | 3 ++
frontend/src/app/AppRoutes.tsx | 4 ++
frontend/src/concepts/areas/const.ts | 5 ++
frontend/src/concepts/areas/types.ts | 1 +
frontend/src/k8sTypes.ts | 1 +
.../ModelRegistrySettings.tsx | 50 +++++++++++++++++++
frontend/src/utilities/NavData.tsx | 10 ++++
...dhdashboardconfigs.opendatahub.io.crd.yaml | 2 +
.../odh-dashboard-config.yaml | 1 +
.../odhdashboardconfig.yaml | 1 +
13 files changed, 83 insertions(+)
create mode 100644 frontend/src/pages/modelRegistrySettings/ModelRegistrySettings.tsx
diff --git a/backend/src/types.ts b/backend/src/types.ts
index b487889eeb..2110f1c232 100644
--- a/backend/src/types.ts
+++ b/backend/src/types.ts
@@ -18,6 +18,7 @@ export type DashboardConfig = K8sResourceCommon & {
disableInfo: boolean;
disableSupport: boolean;
disableClusterManager: boolean;
+ disableModelRegistryManager: boolean;
disableTracking: boolean;
disableBYONImageStream: boolean;
disableISVBadges: boolean;
diff --git a/backend/src/utils/constants.ts b/backend/src/utils/constants.ts
index 4d39f675f1..412ee4c71e 100644
--- a/backend/src/utils/constants.ts
+++ b/backend/src/utils/constants.ts
@@ -43,6 +43,7 @@ export const blankDashboardCR: DashboardConfig = {
disableInfo: false,
disableSupport: false,
disableClusterManager: false,
+ disableModelRegistryManager: false,
disableTracking: true,
disableBYONImageStream: false,
disableISVBadges: false,
diff --git a/docs/dashboard-config.md b/docs/dashboard-config.md
index 7edd859781..e1d6092b52 100644
--- a/docs/dashboard-config.md
+++ b/docs/dashboard-config.md
@@ -14,6 +14,7 @@ The following are a list of features that are supported, along with there defaul
| disableInfo | false | Removes the information panel in Explore Application section |
| disableSupport | false | Disables components related to support. |
| disableClusterManager | false | Disables cluster management section for admins |
+| disableModelRegistryManager | false | Disables model registry management section for admins |
| disableTracking | true | Disables telemetry UI data. Note for this feature to work you need woopra and segement.io configured |
| disableBYONImageStream | false | Disables custom notebook images that are created via image streams |
| disableISVBadges | false | Removes the badge that indicate if a product is ISV or not. |
@@ -46,6 +47,7 @@ spec:
disableInfo: false
disableSupport: false
disableClusterManager: false
+ disableModelRegistryManager: false
disableTracking: true
disableBYONImageStream: false
disableISVBadges: false
@@ -142,6 +144,7 @@ spec:
enablement: true
disableBYONImageStream: false
disableClusterManager: false
+ disableModelRegistryManager: false
disableISVBadges: false
disableInfo: false
disableSupport: false
diff --git a/frontend/src/__mocks__/mockDashboardConfig.ts b/frontend/src/__mocks__/mockDashboardConfig.ts
index e66920a0e2..378d9410e6 100644
--- a/frontend/src/__mocks__/mockDashboardConfig.ts
+++ b/frontend/src/__mocks__/mockDashboardConfig.ts
@@ -4,6 +4,7 @@ type MockDashboardConfigType = {
disableInfo?: boolean;
disableSupport?: boolean;
disableClusterManager?: boolean;
+ disableModelRegistryManager?: boolean;
disableTracking?: boolean;
disableBYONImageStream?: boolean;
disableISVBadges?: boolean;
@@ -30,6 +31,7 @@ export const mockDashboardConfig = ({
disableInfo = false,
disableSupport = false,
disableClusterManager = false,
+ disableModelRegistryManager = false,
disableTracking = false,
disableBYONImageStream = false,
disableISVBadges = false,
@@ -66,6 +68,7 @@ export const mockDashboardConfig = ({
disableInfo,
disableSupport,
disableClusterManager,
+ disableModelRegistryManager,
disableTracking,
disableBYONImageStream,
disableISVBadges,
diff --git a/frontend/src/app/AppRoutes.tsx b/frontend/src/app/AppRoutes.tsx
index a085876382..412cb0cdcb 100644
--- a/frontend/src/app/AppRoutes.tsx
+++ b/frontend/src/app/AppRoutes.tsx
@@ -53,6 +53,9 @@ const ClusterSettingsPage = React.lazy(() => import('../pages/clusterSettings/Cl
const CustomServingRuntimeRoutes = React.lazy(
() => import('../pages/modelServing/customServingRuntimes/CustomServingRuntimeRoutes'),
);
+const ModelRegistrySettingsPage = React.lazy(
+ () => import('../pages/modelRegistrySettings/ModelRegistrySettings'),
+);
const GroupSettingsPage = React.lazy(() => import('../pages/groupSettings/GroupSettings'));
const LearningCenterPage = React.lazy(() => import('../pages/learningCenter/LearningCenter'));
const BYONImagesPage = React.lazy(() => import('../pages/BYONImages/BYONImages'));
@@ -127,6 +130,7 @@ const AppRoutes: React.FC = () => {
} />
} />
} />
+ } />
} />
>
)}
diff --git a/frontend/src/concepts/areas/const.ts b/frontend/src/concepts/areas/const.ts
index 4a13cbbdc7..0e24efbcef 100644
--- a/frontend/src/concepts/areas/const.ts
+++ b/frontend/src/concepts/areas/const.ts
@@ -10,6 +10,11 @@ export const SupportedAreasStateMap: SupportedAreasState = {
[SupportedArea.CLUSTER_SETTINGS]: {
featureFlags: ['disableClusterManager'],
},
+ [SupportedArea.MODEL_REGISTRY_SETTINGS]: {
+ featureFlags: ['disableModelRegistryManager'],
+ requiredComponents: [StackComponent.MODEL_REGISTRY],
+ requiredCapabilities: [StackCapability.SERVICE_MESH, StackCapability.SERVICE_MESH_AUTHZ],
+ },
[SupportedArea.CUSTOM_RUNTIMES]: {
featureFlags: ['disableCustomServingRuntimes'],
reliantAreas: [SupportedArea.MODEL_SERVING],
diff --git a/frontend/src/concepts/areas/types.ts b/frontend/src/concepts/areas/types.ts
index bbfad94248..64254390f4 100644
--- a/frontend/src/concepts/areas/types.ts
+++ b/frontend/src/concepts/areas/types.ts
@@ -34,6 +34,7 @@ export enum SupportedArea {
/* Admin areas */
BYON = 'bring-your-own-notebook',
CLUSTER_SETTINGS = 'cluster-settings',
+ MODEL_REGISTRY_SETTINGS = 'model-registry-settings',
USER_MANAGEMENT = 'user-management',
ACCELERATOR_PROFILES = 'accelerator-profiles',
diff --git a/frontend/src/k8sTypes.ts b/frontend/src/k8sTypes.ts
index 2d3d3aedd6..ea7288f355 100644
--- a/frontend/src/k8sTypes.ts
+++ b/frontend/src/k8sTypes.ts
@@ -1196,6 +1196,7 @@ export type DashboardCommonConfig = {
disableInfo: boolean;
disableSupport: boolean;
disableClusterManager: boolean;
+ disableModelRegistryManager: boolean;
disableTracking: boolean;
disableBYONImageStream: boolean;
disableISVBadges: boolean;
diff --git a/frontend/src/pages/modelRegistrySettings/ModelRegistrySettings.tsx b/frontend/src/pages/modelRegistrySettings/ModelRegistrySettings.tsx
new file mode 100644
index 0000000000..b9d0cdbc9c
--- /dev/null
+++ b/frontend/src/pages/modelRegistrySettings/ModelRegistrySettings.tsx
@@ -0,0 +1,50 @@
+import React from 'react';
+import { useNavigate } from 'react-router-dom';
+import {
+ Button,
+ EmptyState,
+ EmptyStateActions,
+ EmptyStateBody,
+ EmptyStateFooter,
+ EmptyStateHeader,
+ EmptyStateIcon,
+ EmptyStateVariant,
+} from '@patternfly/react-core';
+import { PlusCircleIcon } from '@patternfly/react-icons';
+import ApplicationsPage from '~/pages/ApplicationsPage';
+
+const ModelRegistrySettings: React.FC = () => {
+ const navigate = useNavigate();
+
+ return (
+
+
+ }
+ headingLevel="h5"
+ />
+
+ You can create model registries for specific users or projects.
+
+
+
+
+
+
+
+
+ );
+};
+
+export default ModelRegistrySettings;
diff --git a/frontend/src/utilities/NavData.tsx b/frontend/src/utilities/NavData.tsx
index 82dbc9f26e..e318608f18 100644
--- a/frontend/src/utilities/NavData.tsx
+++ b/frontend/src/utilities/NavData.tsx
@@ -150,6 +150,15 @@ const useCustomRuntimesNav = (): NavDataHref[] =>
},
]);
+const useModelRegisterySettingsNav = (): NavDataHref[] =>
+ useAreaCheck(SupportedArea.MODEL_REGISTRY_SETTINGS, [
+ {
+ id: 'settings-model-registry',
+ label: 'Model registry settings',
+ href: '/modelRegistrySettings',
+ },
+ ]);
+
const useUserManagementNav = (): NavDataHref[] =>
useAreaCheck(SupportedArea.USER_MANAGEMENT, [
{
@@ -174,6 +183,7 @@ const useSettingsNav = (): NavDataGroup[] => {
...useClusterSettingsNav(),
...useAcceleratorProfilesNav(),
...useCustomRuntimesNav(),
+ ...useModelRegisterySettingsNav(),
...useUserManagementNav(),
];
diff --git a/manifests/crd/odhdashboardconfigs.opendatahub.io.crd.yaml b/manifests/crd/odhdashboardconfigs.opendatahub.io.crd.yaml
index 8a1b8dbe6f..580bab4b3e 100644
--- a/manifests/crd/odhdashboardconfigs.opendatahub.io.crd.yaml
+++ b/manifests/crd/odhdashboardconfigs.opendatahub.io.crd.yaml
@@ -33,6 +33,8 @@ spec:
type: boolean
disableClusterManager:
type: boolean
+ disableModelRegistryManager:
+ type: boolean
disableTracking:
type: boolean
disableBYONImageStream:
diff --git a/manifests/overlays/odhdashboardconfig/odh-dashboard-config.yaml b/manifests/overlays/odhdashboardconfig/odh-dashboard-config.yaml
index ef5b2b03f6..0f9ad040ed 100644
--- a/manifests/overlays/odhdashboardconfig/odh-dashboard-config.yaml
+++ b/manifests/overlays/odhdashboardconfig/odh-dashboard-config.yaml
@@ -8,6 +8,7 @@ spec:
dashboardConfig:
disableBYONImageStream: false
disableClusterManager: false
+ disableModelRegistryManager: false
disableISVBadges: false
disableInfo: false
disableSupport: false
diff --git a/manifests/overlays/odhdashboardconfig/odhdashboardconfig.yaml b/manifests/overlays/odhdashboardconfig/odhdashboardconfig.yaml
index aa15f080f5..de420af5b4 100644
--- a/manifests/overlays/odhdashboardconfig/odhdashboardconfig.yaml
+++ b/manifests/overlays/odhdashboardconfig/odhdashboardconfig.yaml
@@ -8,6 +8,7 @@ spec:
dashboardConfig:
disableBYONImageStream: false
disableClusterManager: false
+ disableModelRegistryManager: false
disableISVBadges: false
disableInfo: false
disableSupport: false
From ff74fe15ae5b5cc57a91cd54528718b73a2c55e1 Mon Sep 17 00:00:00 2001
From: gitdallas <5322142+gitdallas@users.noreply.github.com>
Date: Mon, 13 May 2024 12:40:54 -0500
Subject: [PATCH 2/3] feat(mr): undo separate disableModelRegistryManager flag
Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>
---
backend/src/types.ts | 1 -
backend/src/utils/constants.ts | 1 -
docs/dashboard-config.md | 3 ---
frontend/src/__mocks__/mockDashboardConfig.ts | 3 ---
frontend/src/concepts/areas/const.ts | 2 +-
frontend/src/k8sTypes.ts | 1 -
manifests/crd/odhdashboardconfigs.opendatahub.io.crd.yaml | 2 --
.../overlays/odhdashboardconfig/odh-dashboard-config.yaml | 1 -
manifests/overlays/odhdashboardconfig/odhdashboardconfig.yaml | 1 -
9 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/backend/src/types.ts b/backend/src/types.ts
index 2110f1c232..b487889eeb 100644
--- a/backend/src/types.ts
+++ b/backend/src/types.ts
@@ -18,7 +18,6 @@ export type DashboardConfig = K8sResourceCommon & {
disableInfo: boolean;
disableSupport: boolean;
disableClusterManager: boolean;
- disableModelRegistryManager: boolean;
disableTracking: boolean;
disableBYONImageStream: boolean;
disableISVBadges: boolean;
diff --git a/backend/src/utils/constants.ts b/backend/src/utils/constants.ts
index 412ee4c71e..4d39f675f1 100644
--- a/backend/src/utils/constants.ts
+++ b/backend/src/utils/constants.ts
@@ -43,7 +43,6 @@ export const blankDashboardCR: DashboardConfig = {
disableInfo: false,
disableSupport: false,
disableClusterManager: false,
- disableModelRegistryManager: false,
disableTracking: true,
disableBYONImageStream: false,
disableISVBadges: false,
diff --git a/docs/dashboard-config.md b/docs/dashboard-config.md
index e1d6092b52..7edd859781 100644
--- a/docs/dashboard-config.md
+++ b/docs/dashboard-config.md
@@ -14,7 +14,6 @@ The following are a list of features that are supported, along with there defaul
| disableInfo | false | Removes the information panel in Explore Application section |
| disableSupport | false | Disables components related to support. |
| disableClusterManager | false | Disables cluster management section for admins |
-| disableModelRegistryManager | false | Disables model registry management section for admins |
| disableTracking | true | Disables telemetry UI data. Note for this feature to work you need woopra and segement.io configured |
| disableBYONImageStream | false | Disables custom notebook images that are created via image streams |
| disableISVBadges | false | Removes the badge that indicate if a product is ISV or not. |
@@ -47,7 +46,6 @@ spec:
disableInfo: false
disableSupport: false
disableClusterManager: false
- disableModelRegistryManager: false
disableTracking: true
disableBYONImageStream: false
disableISVBadges: false
@@ -144,7 +142,6 @@ spec:
enablement: true
disableBYONImageStream: false
disableClusterManager: false
- disableModelRegistryManager: false
disableISVBadges: false
disableInfo: false
disableSupport: false
diff --git a/frontend/src/__mocks__/mockDashboardConfig.ts b/frontend/src/__mocks__/mockDashboardConfig.ts
index 378d9410e6..e66920a0e2 100644
--- a/frontend/src/__mocks__/mockDashboardConfig.ts
+++ b/frontend/src/__mocks__/mockDashboardConfig.ts
@@ -4,7 +4,6 @@ type MockDashboardConfigType = {
disableInfo?: boolean;
disableSupport?: boolean;
disableClusterManager?: boolean;
- disableModelRegistryManager?: boolean;
disableTracking?: boolean;
disableBYONImageStream?: boolean;
disableISVBadges?: boolean;
@@ -31,7 +30,6 @@ export const mockDashboardConfig = ({
disableInfo = false,
disableSupport = false,
disableClusterManager = false,
- disableModelRegistryManager = false,
disableTracking = false,
disableBYONImageStream = false,
disableISVBadges = false,
@@ -68,7 +66,6 @@ export const mockDashboardConfig = ({
disableInfo,
disableSupport,
disableClusterManager,
- disableModelRegistryManager,
disableTracking,
disableBYONImageStream,
disableISVBadges,
diff --git a/frontend/src/concepts/areas/const.ts b/frontend/src/concepts/areas/const.ts
index 0e24efbcef..5d8922cb14 100644
--- a/frontend/src/concepts/areas/const.ts
+++ b/frontend/src/concepts/areas/const.ts
@@ -11,7 +11,7 @@ export const SupportedAreasStateMap: SupportedAreasState = {
featureFlags: ['disableClusterManager'],
},
[SupportedArea.MODEL_REGISTRY_SETTINGS]: {
- featureFlags: ['disableModelRegistryManager'],
+ featureFlags: ['disableModelRegistry'],
requiredComponents: [StackComponent.MODEL_REGISTRY],
requiredCapabilities: [StackCapability.SERVICE_MESH, StackCapability.SERVICE_MESH_AUTHZ],
},
diff --git a/frontend/src/k8sTypes.ts b/frontend/src/k8sTypes.ts
index ea7288f355..2d3d3aedd6 100644
--- a/frontend/src/k8sTypes.ts
+++ b/frontend/src/k8sTypes.ts
@@ -1196,7 +1196,6 @@ export type DashboardCommonConfig = {
disableInfo: boolean;
disableSupport: boolean;
disableClusterManager: boolean;
- disableModelRegistryManager: boolean;
disableTracking: boolean;
disableBYONImageStream: boolean;
disableISVBadges: boolean;
diff --git a/manifests/crd/odhdashboardconfigs.opendatahub.io.crd.yaml b/manifests/crd/odhdashboardconfigs.opendatahub.io.crd.yaml
index 580bab4b3e..8a1b8dbe6f 100644
--- a/manifests/crd/odhdashboardconfigs.opendatahub.io.crd.yaml
+++ b/manifests/crd/odhdashboardconfigs.opendatahub.io.crd.yaml
@@ -33,8 +33,6 @@ spec:
type: boolean
disableClusterManager:
type: boolean
- disableModelRegistryManager:
- type: boolean
disableTracking:
type: boolean
disableBYONImageStream:
diff --git a/manifests/overlays/odhdashboardconfig/odh-dashboard-config.yaml b/manifests/overlays/odhdashboardconfig/odh-dashboard-config.yaml
index 0f9ad040ed..ef5b2b03f6 100644
--- a/manifests/overlays/odhdashboardconfig/odh-dashboard-config.yaml
+++ b/manifests/overlays/odhdashboardconfig/odh-dashboard-config.yaml
@@ -8,7 +8,6 @@ spec:
dashboardConfig:
disableBYONImageStream: false
disableClusterManager: false
- disableModelRegistryManager: false
disableISVBadges: false
disableInfo: false
disableSupport: false
diff --git a/manifests/overlays/odhdashboardconfig/odhdashboardconfig.yaml b/manifests/overlays/odhdashboardconfig/odhdashboardconfig.yaml
index de420af5b4..aa15f080f5 100644
--- a/manifests/overlays/odhdashboardconfig/odhdashboardconfig.yaml
+++ b/manifests/overlays/odhdashboardconfig/odhdashboardconfig.yaml
@@ -8,7 +8,6 @@ spec:
dashboardConfig:
disableBYONImageStream: false
disableClusterManager: false
- disableModelRegistryManager: false
disableISVBadges: false
disableInfo: false
disableSupport: false
From 39b76936b5f5acc7e59cfa4db3ef2d95969d712b Mon Sep 17 00:00:00 2001
From: gitdallas <5322142+gitdallas@users.noreply.github.com>
Date: Mon, 13 May 2024 17:15:21 -0500
Subject: [PATCH 3/3] feat(mr): remove separate MODEL_REGISTRY_SETTINGS area
Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>
---
frontend/src/concepts/areas/const.ts | 6 +-----
frontend/src/concepts/areas/types.ts | 1 -
frontend/src/utilities/NavData.tsx | 2 +-
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/frontend/src/concepts/areas/const.ts b/frontend/src/concepts/areas/const.ts
index 5d8922cb14..499668efe7 100644
--- a/frontend/src/concepts/areas/const.ts
+++ b/frontend/src/concepts/areas/const.ts
@@ -10,11 +10,6 @@ export const SupportedAreasStateMap: SupportedAreasState = {
[SupportedArea.CLUSTER_SETTINGS]: {
featureFlags: ['disableClusterManager'],
},
- [SupportedArea.MODEL_REGISTRY_SETTINGS]: {
- featureFlags: ['disableModelRegistry'],
- requiredComponents: [StackComponent.MODEL_REGISTRY],
- requiredCapabilities: [StackCapability.SERVICE_MESH, StackCapability.SERVICE_MESH_AUTHZ],
- },
[SupportedArea.CUSTOM_RUNTIMES]: {
featureFlags: ['disableCustomServingRuntimes'],
reliantAreas: [SupportedArea.MODEL_SERVING],
@@ -82,5 +77,6 @@ export const SupportedAreasStateMap: SupportedAreasState = {
[SupportedArea.MODEL_REGISTRY]: {
featureFlags: ['disableModelRegistry'],
requiredComponents: [StackComponent.MODEL_REGISTRY],
+ requiredCapabilities: [StackCapability.SERVICE_MESH, StackCapability.SERVICE_MESH_AUTHZ],
},
};
diff --git a/frontend/src/concepts/areas/types.ts b/frontend/src/concepts/areas/types.ts
index 64254390f4..bbfad94248 100644
--- a/frontend/src/concepts/areas/types.ts
+++ b/frontend/src/concepts/areas/types.ts
@@ -34,7 +34,6 @@ export enum SupportedArea {
/* Admin areas */
BYON = 'bring-your-own-notebook',
CLUSTER_SETTINGS = 'cluster-settings',
- MODEL_REGISTRY_SETTINGS = 'model-registry-settings',
USER_MANAGEMENT = 'user-management',
ACCELERATOR_PROFILES = 'accelerator-profiles',
diff --git a/frontend/src/utilities/NavData.tsx b/frontend/src/utilities/NavData.tsx
index e318608f18..f8926a7072 100644
--- a/frontend/src/utilities/NavData.tsx
+++ b/frontend/src/utilities/NavData.tsx
@@ -151,7 +151,7 @@ const useCustomRuntimesNav = (): NavDataHref[] =>
]);
const useModelRegisterySettingsNav = (): NavDataHref[] =>
- useAreaCheck(SupportedArea.MODEL_REGISTRY_SETTINGS, [
+ useAreaCheck(SupportedArea.MODEL_REGISTRY, [
{
id: 'settings-model-registry',
label: 'Model registry settings',