Skip to content

Commit f5eb8fe

Browse files
committed
feat(FR-1416): migrate serving page to deployment page
1 parent 3d1596f commit f5eb8fe

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

react/src/pages/EndpointDetailPage.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import {
4343
WarningOutlined,
4444
} from '@ant-design/icons';
4545
import {
46+
Alert,
4647
App,
4748
Button,
4849
Card,
@@ -506,6 +507,14 @@ const EndpointDetailPage: React.FC<EndpointDetailPageProps> = () => {
506507

507508
return (
508509
<BAIFlex direction="column" align="stretch" gap="sm">
510+
{baiClient.supports('deployment') && (
511+
<Alert
512+
message={t('serving.ServingSunsetDesc')}
513+
showIcon
514+
closable
515+
type="warning"
516+
/>
517+
)}
509518
<BAIFlex direction="row" justify="between">
510519
<Typography.Title level={3} style={{ margin: 0 }}>
511520
{endpoint?.name || ''}

react/src/pages/ServingPage.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@ import { ServingPageQuery } from '../__generated__/ServingPageQuery.graphql';
22
import BAIFetchKeyButton from '../components/BAIFetchKeyButton';
33
import BAIRadioGroup from '../components/BAIRadioGroup';
44
import EndpointList from '../components/EndpointList';
5-
import { useUpdatableState, useWebUINavigate } from '../hooks';
5+
import {
6+
useSuspendedBackendaiClient,
7+
useUpdatableState,
8+
useWebUINavigate,
9+
} from '../hooks';
610
import { useCurrentUserRole } from '../hooks/backendai';
711
import { useBAIPaginationOptionStateOnSearchParam } from '../hooks/reactPaginationQueryOptions';
812
import { useCurrentProjectValue } from '../hooks/useCurrentProject';
913
import { useDeferredQueryParams } from '../hooks/useDeferredQueryParams';
10-
import { Button, Skeleton, theme } from 'antd';
14+
import { Alert, Button, Skeleton, theme } from 'antd';
1115
import {
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={

resources/i18n/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,6 +1499,9 @@
14991499
"Variable": "Variable",
15001500
"ViewAllHistory": "View All History"
15011501
},
1502+
"serving": {
1503+
"ServingSunsetDesc": "This Serving page has been deprecated. For maintenance and troubleshooting, refer to the Deployment page."
1504+
},
15021505
"session": {
15031506
"Agent": "Agent",
15041507
"AgentId": "Agent ID",

0 commit comments

Comments
 (0)