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 e91be9ac..c1379ef3 100644 Binary files a/react-ui/src/assets/img/robot.png and b/react-ui/src/assets/img/robot.png differ diff --git a/react-ui/src/pages/DatasetPreparation/DatasetAnnotation/index.less b/react-ui/src/components/FullScreenFrame/index.less similarity index 70% rename from react-ui/src/pages/DatasetPreparation/DatasetAnnotation/index.less rename to react-ui/src/components/FullScreenFrame/index.less index d0d8b09b..e7a68498 100644 --- a/react-ui/src/pages/DatasetPreparation/DatasetAnnotation/index.less +++ b/react-ui/src/components/FullScreenFrame/index.less @@ -1,8 +1,8 @@ -.container { +.kf-full-screen-frame { width: 100%; height: 100%; - .frame { + &__iframe { width: 100%; height: 100%; border: none; diff --git a/react-ui/src/components/FullScreenFrame/index.tsx b/react-ui/src/components/FullScreenFrame/index.tsx new file mode 100644 index 00000000..f93fcfae --- /dev/null +++ b/react-ui/src/components/FullScreenFrame/index.tsx @@ -0,0 +1,18 @@ +import classNames from 'classnames'; +import './index.less'; + +type FullScreenFrameProps = { + url: string; + className?: string; + style?: React.CSSProperties; +}; + +function FullScreenFrame({ url, className, style }: FullScreenFrameProps) { + return ( +
+ {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 ( -
+