diff --git a/react/src/App.tsx b/react/src/App.tsx index 7772d6636d..d7b9966abe 100644 --- a/react/src/App.tsx +++ b/react/src/App.tsx @@ -88,6 +88,9 @@ const ReservoirArtifactDetailPage = React.lazy( const SchedulerPage = React.lazy(() => import('./pages/SchedulerPage')); // Deployment pages +// const DeploymentListPage = React.lazy( +// () => import('./pages/Deployments/DeploymentListPage'), +// ); const DeploymentListPage = React.lazy( () => import('./pages/DeploymentListPage'), ); @@ -521,49 +524,6 @@ const router = createBrowserRouter([ handle: { labelKey: 'webui.menu.ResourcePolicy' }, Component: ResourcePolicyPage, }, - { - path: '/reservoir', - handle: { labelKey: 'webui.menu.Reservoir' }, - children: [ - { - path: '', - Component: () => { - const baiClient = useSuspendedBackendaiClient(); - return baiClient?.supports('reservoir') ? ( - - - - - } - > - - - - ) : ( - - ); - }, - }, - { - path: '/reservoir/:artifactId', - Component: () => { - const baiClient = useSuspendedBackendaiClient(); - return baiClient?.supports('reservoir') ? ( - - }> - - - - ) : ( - - ); - }, - handle: { labelKey: 'webui.menu.ArtifactDetails' }, - }, - ], - }, { path: '/settings', element: ( diff --git a/react/src/components/MainLayout/WebUISider.tsx b/react/src/components/MainLayout/WebUISider.tsx index dc53decbee..bfcba30fd0 100644 --- a/react/src/components/MainLayout/WebUISider.tsx +++ b/react/src/components/MainLayout/WebUISider.tsx @@ -19,6 +19,7 @@ import { CloudUploadOutlined, ControlOutlined, DashboardOutlined, + DeploymentUnitOutlined, FileDoneOutlined, HddOutlined, InfoCircleOutlined, @@ -185,12 +186,20 @@ const WebUISider: React.FC = (props) => { key: 'job', group: 'workload', }, - { + !baiClient.supports('deployment') && { label: {t('webui.menu.Serving')}, icon: , key: 'serving', group: 'service', }, + baiClient.supports('deployment') && { + label: ( + {t('webui.menu.Deployment')} + ), + icon: , + key: 'deployment', + group: 'service', + }, { label: {t('data.ModelStore')}, icon: , diff --git a/react/src/pages/DeploymentDetailPage.tsx b/react/src/pages/DeploymentDetailPage.tsx index 6198e74b4a..86a0dccca1 100644 --- a/react/src/pages/DeploymentDetailPage.tsx +++ b/react/src/pages/DeploymentDetailPage.tsx @@ -89,7 +89,7 @@ const DeploymentDetailPage: React.FC = () => { const { deployment } = useLazyLoadQuery( graphql` query DeploymentDetailPageQuery($deploymentId: ID!) { - deployment(id: $deploymentId) { + deployment(id: $deploymentId) @since(version: "25.14.0") { id @required(action: THROW) metadata { name diff --git a/react/src/pages/DeploymentListPage.tsx b/react/src/pages/DeploymentListPage.tsx index 8afb058e9f..2d3b8ee31e 100644 --- a/react/src/pages/DeploymentListPage.tsx +++ b/react/src/pages/DeploymentListPage.tsx @@ -53,7 +53,7 @@ const DeploymentListPage: React.FC = () => { const deployments = useLazyLoadQuery( graphql` query DeploymentListPageQuery($filter: DeploymentFilter, $first: Int) { - deployments(filter: $filter, first: $first) { + deployments(filter: $filter, first: $first) @since(version: "25.14.0") { edges { node { id diff --git a/src/components/backend-ai-webui.ts b/src/components/backend-ai-webui.ts index e039046124..540332faee 100644 --- a/src/components/backend-ai-webui.ts +++ b/src/components/backend-ai-webui.ts @@ -138,7 +138,6 @@ export default class BackendAIWebUI extends connect(store)(LitElement) { @property({ type: Number }) minibarWidth = 88; @property({ type: Number }) sidebarWidth = 250; @property({ type: Number }) sidepanelWidth = 250; - @property({ type: Object }) supports = Object(); @property({ type: Array }) availablePages = [ 'start', 'dashboard', @@ -627,6 +626,14 @@ export default class BackendAIWebUI extends connect(store)(LitElement) { page: 'agent-summary', available: !this.isHideAgents, }, + { + page: 'serving', + available: !globalThis.backendaiclient.supports('deployment'), + }, + { + page: 'deployment', + available: !!globalThis.backendaiclient.supports('deployment'), + }, ]; if (this._page === 'start') { diff --git a/src/lib/backend.ai-client-esm.ts b/src/lib/backend.ai-client-esm.ts index a0aa3fc62b..8be1bd85af 100644 --- a/src/lib/backend.ai-client-esm.ts +++ b/src/lib/backend.ai-client-esm.ts @@ -820,6 +820,9 @@ class Client { if (this.isManagerVersionCompatibleWith('25.12.0')) { this._features['reservoir'] = true; } + if (this.isManagerVersionCompatibleWith('25.14.0')) { + this._features['deployment'] = true; + } } /**