From 90204e3210f2e24d30b6611daf3b3c57aacc720c Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Thu, 13 Mar 2025 09:41:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=9A=84=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/config/routes.ts | 77 ++++++++++--------- .../ModelDeployment/CreateVersion/index.tsx | 2 +- .../Workspace/components/QuickStart/index.tsx | 2 +- 3 files changed, 41 insertions(+), 40 deletions(-) diff --git a/react-ui/config/routes.ts b/react-ui/config/routes.ts index e9363f91..b2c41f14 100644 --- a/react-ui/config/routes.ts +++ b/react-ui/config/routes.ts @@ -291,60 +291,61 @@ export default [ }, ], }, - ], - }, - { - name: '模型部署', - path: '/modelDeployment', - routes: [ { name: '模型部署', - path: '', - component: './ModelDeployment/List', - }, - { - name: '创建推理服务', - path: 'createService', - component: './ModelDeployment/CreateService', - }, - { - name: '编辑推理服务', - path: 'editService/:serviceId', - component: './ModelDeployment/CreateService', - }, - { - name: '服务详情', - path: 'serviceInfo/:serviceId', + path: 'modelDeployment', routes: [ { - name: '服务详情', + name: '模型部署', path: '', - component: './ModelDeployment/ServiceInfo', + component: './ModelDeployment/List', }, { - name: '新增服务版本', - path: 'createVersion', - component: './ModelDeployment/CreateVersion', + name: '创建推理服务', + path: 'createService', + component: './ModelDeployment/CreateService', }, { - name: '更新服务版本', - path: 'updateVersion', - component: './ModelDeployment/CreateVersion', + name: '编辑推理服务', + path: 'editService/:serviceId', + component: './ModelDeployment/CreateService', }, { - name: '重启服务版本', - path: 'restartVersion', - component: './ModelDeployment/CreateVersion', - }, - { - name: '服务版本详情', - path: 'versionInfo/:id', - component: './ModelDeployment/VersionInfo', + name: '服务详情', + path: 'serviceInfo/:serviceId', + routes: [ + { + name: '服务详情', + path: '', + component: './ModelDeployment/ServiceInfo', + }, + { + name: '新增服务版本', + path: 'createVersion', + component: './ModelDeployment/CreateVersion', + }, + { + name: '更新服务版本', + path: 'updateVersion', + component: './ModelDeployment/CreateVersion', + }, + { + name: '重启服务版本', + path: 'restartVersion', + component: './ModelDeployment/CreateVersion', + }, + { + name: '服务版本详情', + path: 'versionInfo/:id', + component: './ModelDeployment/VersionInfo', + }, + ], }, ], }, ], }, + { name: '应用开发', path: '/appsDeployment', diff --git a/react-ui/src/pages/ModelDeployment/CreateVersion/index.tsx b/react-ui/src/pages/ModelDeployment/CreateVersion/index.tsx index 430eae87..86f21f4e 100644 --- a/react-ui/src/pages/ModelDeployment/CreateVersion/index.tsx +++ b/react-ui/src/pages/ModelDeployment/CreateVersion/index.tsx @@ -168,7 +168,7 @@ function CreateServiceVersion() { if (lastPage === CreateServiceVersionFrom.ServiceInfo) { navigate(-1); } else { - navigate(`/modelDeployment/serviceInfo/${serviceId}`, { replace: true }); + navigate(`/dataset/modelDeployment/serviceInfo/${serviceId}`, { replace: true }); } } }; diff --git a/react-ui/src/pages/Workspace/components/QuickStart/index.tsx b/react-ui/src/pages/Workspace/components/QuickStart/index.tsx index 621efead..d155dae9 100644 --- a/react-ui/src/pages/Workspace/components/QuickStart/index.tsx +++ b/react-ui/src/pages/Workspace/components/QuickStart/index.tsx @@ -92,7 +92,7 @@ function QuickStart() { buttonTop={20} x={left + 4 * (192 + space) + 60 + space} y={263} - onClick={() => navigate('/modelDeployment')} + onClick={() => navigate('/dataset/modelDeployment')} />
Date: Thu, 13 Mar 2025 09:43:16 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=9E=E9=AA=8C?= =?UTF-8?q?=E6=8A=BD=E5=B1=89=E6=99=83=E5=8A=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/src/app.tsx | 2 +- react-ui/src/pages/Experiment/Info/index.less | 6 ------ .../pages/Experiment/components/ExperimentDrawer/index.less | 3 ++- .../pages/Experiment/components/ExperimentDrawer/index.tsx | 3 +-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/react-ui/src/app.tsx b/react-ui/src/app.tsx index 857d2650..26dfa334 100644 --- a/react-ui/src/app.tsx +++ b/react-ui/src/app.tsx @@ -250,7 +250,7 @@ export const antd: RuntimeAntdConfig = (memo) => { }; memo.theme.cssVar = true; - // memo.theme.hashed = false; + memo.theme.hashed = false; memo.appConfig = { message: { diff --git a/react-ui/src/pages/Experiment/Info/index.less b/react-ui/src/pages/Experiment/Info/index.less index f6df0cb6..70b27284 100644 --- a/react-ui/src/pages/Experiment/Info/index.less +++ b/react-ui/src/pages/Experiment/Info/index.less @@ -30,10 +30,4 @@ background-image: url(@/assets/img/pipeline-canvas-bg.png); background-size: 100% 100%; } - - :global { - .ant-drawer-mask { - background: transparent !important; - } - } } diff --git a/react-ui/src/pages/Experiment/components/ExperimentDrawer/index.less b/react-ui/src/pages/Experiment/components/ExperimentDrawer/index.less index c1f1b7ef..e524a987 100644 --- a/react-ui/src/pages/Experiment/components/ExperimentDrawer/index.less +++ b/react-ui/src/pages/Experiment/components/ExperimentDrawer/index.less @@ -1,4 +1,5 @@ .experiment-drawer { + line-height: var(--ant-line-height); :global { .ant-drawer-body { overflow-y: hidden; @@ -12,7 +13,7 @@ } &__tabs { - height: calc(100% - 170px); + height: calc(100% - 169px); :global { .ant-tabs-nav { padding-left: 24px; diff --git a/react-ui/src/pages/Experiment/components/ExperimentDrawer/index.tsx b/react-ui/src/pages/Experiment/components/ExperimentDrawer/index.tsx index cdcaea19..58077267 100644 --- a/react-ui/src/pages/Experiment/components/ExperimentDrawer/index.tsx +++ b/react-ui/src/pages/Experiment/components/ExperimentDrawer/index.tsx @@ -95,10 +95,9 @@ const ExperimentDrawer = ({ return ( } onClose={onClose} open={open} From 87d376d757f186c7da51e822a3f0c2b2733baa42 Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Thu, 13 Mar 2025 09:43:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E6=A0=87?= =?UTF-8?q?=E6=B3=A8=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/src/pages/Dataset/config.tsx | 3 ++- .../pages/HyperParameter/components/ParameterInfo/index.tsx | 2 +- react-ui/src/utils/format.ts | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/react-ui/src/pages/Dataset/config.tsx b/react-ui/src/pages/Dataset/config.tsx index d24586a6..61c63531 100644 --- a/react-ui/src/pages/Dataset/config.tsx +++ b/react-ui/src/pages/Dataset/config.tsx @@ -25,9 +25,10 @@ export enum ResourceType { } export enum DataSource { - AtuoExport = 'auto_export', // 自动导出 + AutoExport = 'auto_export', // 自动导出 HandExport = 'hand_export', // 手动导出 Create = 'add', // 新增 + LabelStudioExport = 'label_studio_export', // LabelStudio 导出 } type ResourceTypeInfo = { diff --git a/react-ui/src/pages/HyperParameter/components/ParameterInfo/index.tsx b/react-ui/src/pages/HyperParameter/components/ParameterInfo/index.tsx index d946a080..337f43f7 100644 --- a/react-ui/src/pages/HyperParameter/components/ParameterInfo/index.tsx +++ b/react-ui/src/pages/HyperParameter/components/ParameterInfo/index.tsx @@ -34,7 +34,7 @@ function ParameterInfo({ info }: ParameterInfoProps) { } return info.points_to_evaluate.map((item, index) => ({ ...item, - id: index, + id: index, // 作为 key,这个数组不会变化 })); }, [info]); diff --git a/react-ui/src/utils/format.ts b/react-ui/src/utils/format.ts index 7d37fbf5..9c1d327d 100644 --- a/react-ui/src/utils/format.ts +++ b/react-ui/src/utils/format.ts @@ -98,8 +98,10 @@ export const formatSource = (source?: string) => { return '用户上传'; } else if (source === DataSource.HandExport) { return '手动导入'; - } else if (source === DataSource.AtuoExport) { + } else if (source === DataSource.AutoExport) { return '实验自动导入'; + } else if (source === DataSource.LabelStudioExport) { + return '数据标注导入'; } return source; };