From 1cc80986edceec30c0e6662ee6e45f2ea0445008 Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Mon, 22 Jul 2024 09:59:53 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=E5=BA=94=E7=94=A8=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=20&=20=E5=AE=9E=E9=AA=8C=E5=AF=B9=E6=AF=94=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/config/routes.ts | 2 +- react-ui/src/assets/img/robot.png | Bin 1789 -> 1777 bytes .../FullScreenFrame}/index.less | 4 ++-- .../src/components/FullScreenFrame/index.tsx | 18 ++++++++++++++++++ react-ui/src/pages/Application/index.tsx | 9 +++++++++ .../DatasetAnnotation/index.tsx | 8 ++------ .../src/pages/Experiment/Comparison/index.tsx | 7 +++++-- react-ui/src/pages/Tool/Swagger/index.tsx | 2 +- react-ui/src/pages/Workspace/index.less | 1 + react-ui/src/pages/Workspace/index.tsx | 2 +- .../services/developmentEnvironment/index.ts | 3 +-- 11 files changed, 41 insertions(+), 15 deletions(-) rename react-ui/src/{pages/DatasetPreparation/DatasetAnnotation => components/FullScreenFrame}/index.less (70%) create mode 100644 react-ui/src/components/FullScreenFrame/index.tsx create mode 100644 react-ui/src/pages/Application/index.tsx diff --git a/react-ui/config/routes.ts b/react-ui/config/routes.ts index c93f43a5..0c027b80 100644 --- a/react-ui/config/routes.ts +++ b/react-ui/config/routes.ts @@ -229,7 +229,7 @@ export default [ name: '应用开发', path: '', key: 'appsDeployment', - component: './missingPage.jsx', + component: './Application', }, ], }, diff --git a/react-ui/src/assets/img/robot.png b/react-ui/src/assets/img/robot.png index e91be9ac1d1a3b443719ca963cb959685b057580..c1379ef35055ce861d41a5ae240da54982d6dac2 100644 GIT binary patch delta 1748 zcmY+=c|6n!AHebNZ_GH7&69PEqoy8Lt{6u|8imc344!e!Fmlvd8gfjIn!&VU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!F+h))06DX-+d06>W&q^bb` zq?A{3UjU%Q5mMCv08+{;xv#gD!=^;HW~u=InsH@DL%cf!fDGN5xugexbPRhlO-4gz z3UnuLHJurrETKSm^1;jz-g}pjt2G-TV|oC9^F5u`R5)yVhCGP@fPd&`&Wptg!+#)Y2Qn= zT6miweFFd>s3pF%-SzbNRR92iw6jXze|vAlCIEn-v=gN4#W%)80RRM2PAhfa^scBR z0Dsm9+@s{ztx8F92w6LXlgzF+A&-kokw+_`ocj^72q zw0Xn2L14i@^#3+`lE$4~x_-Os(RIDf-Ft~It^E(BrRl(GQqP9~0000 + {url && } + + ); +} + +export default FullScreenFrame; diff --git a/react-ui/src/pages/Application/index.tsx b/react-ui/src/pages/Application/index.tsx new file mode 100644 index 00000000..77f70208 --- /dev/null +++ b/react-ui/src/pages/Application/index.tsx @@ -0,0 +1,9 @@ +import FullScreenFrame from '@/components/FullScreenFrame'; +import { useState } from 'react'; + +function Application() { + const [iframeUrl] = useState('http://172.20.32.181:30080/'); + return ; +} + +export default Application; diff --git a/react-ui/src/pages/DatasetPreparation/DatasetAnnotation/index.tsx b/react-ui/src/pages/DatasetPreparation/DatasetAnnotation/index.tsx index a1f017e6..090d941e 100644 --- a/react-ui/src/pages/DatasetPreparation/DatasetAnnotation/index.tsx +++ b/react-ui/src/pages/DatasetPreparation/DatasetAnnotation/index.tsx @@ -1,7 +1,7 @@ +import FullScreenFrame from '@/components/FullScreenFrame'; import { getLabelStudioUrl } from '@/services/developmentEnvironment'; import { to } from '@/utils/promise'; import { useEffect, useState } from 'react'; -import styles from './index.less'; function DatasetAnnotation() { const [iframeUrl, setIframeUrl] = useState(''); @@ -14,11 +14,7 @@ function DatasetAnnotation() { setIframeUrl(res.data); } }; - return ( -
- {iframeUrl && } -
- ); + return ; } export default DatasetAnnotation; diff --git a/react-ui/src/pages/Experiment/Comparison/index.tsx b/react-ui/src/pages/Experiment/Comparison/index.tsx index 29bbc388..e11a0166 100644 --- a/react-ui/src/pages/Experiment/Comparison/index.tsx +++ b/react-ui/src/pages/Experiment/Comparison/index.tsx @@ -93,8 +93,7 @@ function ExperimentComparison() { type: 'checkbox', fixed: 'left', selectedRowKeys, - onChange: (selectedRowKeys: React.Key[], selectedRows: any[]) => { - // console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows); + onChange: (selectedRowKeys: React.Key[]) => { setSelectedRowKeys(selectedRowKeys); }, }; @@ -159,6 +158,8 @@ function ExperimentComparison() { align: 'center', render: tableCellRender(true), ellipsis: { showTitle: false }, + sorter: (a, b) => a.params[name] - b.params[name], + showSorterTooltip: false, })), }, { @@ -176,6 +177,8 @@ function ExperimentComparison() { align: 'center', render: tableCellRender(true), ellipsis: { showTitle: false }, + sorter: (a, b) => a.metrics[name] - b.metrics[name], + showSorterTooltip: false, })), }, ]; diff --git a/react-ui/src/pages/Tool/Swagger/index.tsx b/react-ui/src/pages/Tool/Swagger/index.tsx index adcc9680..934120a8 100644 --- a/react-ui/src/pages/Tool/Swagger/index.tsx +++ b/react-ui/src/pages/Tool/Swagger/index.tsx @@ -18,7 +18,7 @@ const CacheInfo: React.FC = () => { }); return ( -
+