@@ -2,12 +2,16 @@ import { ServingPageQuery } from '../__generated__/ServingPageQuery.graphql';
22import BAIFetchKeyButton from '../components/BAIFetchKeyButton' ;
33import BAIRadioGroup from '../components/BAIRadioGroup' ;
44import EndpointList from '../components/EndpointList' ;
5- import { useUpdatableState , useWebUINavigate } from '../hooks' ;
5+ import {
6+ useSuspendedBackendaiClient ,
7+ useUpdatableState ,
8+ useWebUINavigate ,
9+ } from '../hooks' ;
610import { useCurrentUserRole } from '../hooks/backendai' ;
711import { useBAIPaginationOptionStateOnSearchParam } from '../hooks/reactPaginationQueryOptions' ;
812import { useCurrentProjectValue } from '../hooks/useCurrentProject' ;
913import { useDeferredQueryParams } from '../hooks/useDeferredQueryParams' ;
10- import { Button , Skeleton , theme } from 'antd' ;
14+ import { Alert , Button , Skeleton , theme } from 'antd' ;
1115import {
1216 filterOutEmpty ,
1317 BAIFlex ,
@@ -27,6 +31,7 @@ const ServingPage: React.FC = () => {
2731 const currentUserRole = useCurrentUserRole ( ) ;
2832 const webuiNavigate = useWebUINavigate ( ) ;
2933 const currentProject = useCurrentProjectValue ( ) ;
34+ const baiClient = useSuspendedBackendaiClient ( ) ;
3035
3136 const [ queryParams , setQuery ] = useDeferredQueryParams ( {
3237 order : withDefault ( StringParam , '-created_at' ) ,
@@ -100,6 +105,14 @@ const ServingPage: React.FC = () => {
100105
101106 return (
102107 < BAIFlex direction = "column" align = "stretch" gap = { 'md' } >
108+ { baiClient . supports ( 'deployment' ) && (
109+ < Alert
110+ message = { t ( 'serving.ServingSunsetDesc' ) }
111+ showIcon
112+ closable
113+ type = "warning"
114+ />
115+ ) }
103116 < BAICard
104117 title = { t ( 'webui.menu.Serving' ) }
105118 extra = {
0 commit comments