@@ -92,6 +92,16 @@ const ReservoirArtifactDetailPage = React.lazy(
9292) ;
9393
9494const SchedulerPage = React . lazy ( ( ) => import ( './pages/SchedulerPage' ) ) ;
95+ // Deployment pages
96+ const DeploymentListPage = React . lazy (
97+ ( ) => import ( './pages/DeploymentListPage' ) ,
98+ ) ;
99+ const DeploymentDetailPage = React . lazy (
100+ ( ) => import ( './pages/DeploymentDetailPage' ) ,
101+ ) ;
102+ const DeploymentLauncherPage = React . lazy (
103+ ( ) => import ( './pages/DeploymentLauncherPage' ) ,
104+ ) ;
95105
96106interface CustomHandle {
97107 title ?: string ;
@@ -301,6 +311,58 @@ const router = createBrowserRouter([
301311 } ,
302312 ] ,
303313 } ,
314+ {
315+ path : '/deployment' ,
316+ handle : { labelKey : 'webui.menu.Deployment' } ,
317+ children : [
318+ {
319+ path : '' ,
320+ Component : ( ) => {
321+ const { t } = useTranslation ( ) ;
322+ useSuspendedBackendaiClient ( ) ;
323+ return (
324+ < BAIErrorBoundary >
325+ < Suspense
326+ fallback = {
327+ < BAICard title = { t ( 'webui.menu.Deployment' ) } loading />
328+ }
329+ >
330+ < DeploymentListPage />
331+ </ Suspense >
332+ </ BAIErrorBoundary >
333+ ) ;
334+ } ,
335+ } ,
336+ {
337+ path : '/deployment/start' ,
338+ handle : { labelKey : 'deployment.launcher.CreateNewDeployment' } ,
339+ element : (
340+ < BAIErrorBoundary >
341+ < Suspense
342+ fallback = {
343+ < BAIFlex direction = "column" style = { { maxWidth : 700 } } >
344+ < Skeleton active />
345+ </ BAIFlex >
346+ }
347+ >
348+ < DeploymentLauncherPage />
349+ </ Suspense >
350+ </ BAIErrorBoundary >
351+ ) ,
352+ } ,
353+ {
354+ path : '/deployment/:deploymentId' ,
355+ handle : { labelKey : 'deployment.DeploymentDetail' } ,
356+ element : (
357+ < BAIErrorBoundary >
358+ < Suspense fallback = { < Skeleton active /> } >
359+ < DeploymentDetailPage />
360+ </ Suspense >
361+ </ BAIErrorBoundary >
362+ ) ,
363+ } ,
364+ ] ,
365+ } ,
304366 {
305367 path : '/service' ,
306368 handle : { labelKey : 'webui.menu.Serving' } ,
@@ -556,7 +618,11 @@ const router = createBrowserRouter([
556618] ) ;
557619
558620const App : FC = ( ) => {
559- return < RouterProvider router = { router } /> ;
621+ return (
622+ < DefaultProvidersForReactRoot >
623+ < RouterProvider router = { router } />
624+ </ DefaultProvidersForReactRoot >
625+ ) ;
560626} ;
561627
562628export default App ;
0 commit comments