| @@ -229,7 +229,7 @@ export default [ | |||||
| name: '应用开发', | name: '应用开发', | ||||
| path: '', | path: '', | ||||
| key: 'appsDeployment', | key: 'appsDeployment', | ||||
| component: './missingPage.jsx', | |||||
| component: './Application', | |||||
| }, | }, | ||||
| ], | ], | ||||
| }, | }, | ||||
| @@ -1,8 +1,8 @@ | |||||
| .container { | |||||
| .kf-full-screen-frame { | |||||
| width: 100%; | width: 100%; | ||||
| height: 100%; | height: 100%; | ||||
| .frame { | |||||
| &__iframe { | |||||
| width: 100%; | width: 100%; | ||||
| height: 100%; | height: 100%; | ||||
| border: none; | border: none; | ||||
| @@ -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 ( | |||||
| <div className={classNames('kf-full-screen-frame', className ?? '')} style={style}> | |||||
| {url && <iframe src={url} className="kf-full-screen-frame__iframe"></iframe>} | |||||
| </div> | |||||
| ); | |||||
| } | |||||
| export default FullScreenFrame; | |||||
| @@ -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 <FullScreenFrame url={iframeUrl}></FullScreenFrame>; | |||||
| } | |||||
| export default Application; | |||||
| @@ -1,7 +1,7 @@ | |||||
| import FullScreenFrame from '@/components/FullScreenFrame'; | |||||
| import { getLabelStudioUrl } from '@/services/developmentEnvironment'; | import { getLabelStudioUrl } from '@/services/developmentEnvironment'; | ||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import { useEffect, useState } from 'react'; | import { useEffect, useState } from 'react'; | ||||
| import styles from './index.less'; | |||||
| function DatasetAnnotation() { | function DatasetAnnotation() { | ||||
| const [iframeUrl, setIframeUrl] = useState(''); | const [iframeUrl, setIframeUrl] = useState(''); | ||||
| @@ -14,11 +14,7 @@ function DatasetAnnotation() { | |||||
| setIframeUrl(res.data); | setIframeUrl(res.data); | ||||
| } | } | ||||
| }; | }; | ||||
| return ( | |||||
| <div className={styles.container}> | |||||
| {iframeUrl && <iframe src={iframeUrl} className={styles.frame}></iframe>} | |||||
| </div> | |||||
| ); | |||||
| return <FullScreenFrame url={iframeUrl} />; | |||||
| } | } | ||||
| export default DatasetAnnotation; | export default DatasetAnnotation; | ||||
| @@ -93,8 +93,7 @@ function ExperimentComparison() { | |||||
| type: 'checkbox', | type: 'checkbox', | ||||
| fixed: 'left', | fixed: 'left', | ||||
| selectedRowKeys, | selectedRowKeys, | ||||
| onChange: (selectedRowKeys: React.Key[], selectedRows: any[]) => { | |||||
| // console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows); | |||||
| onChange: (selectedRowKeys: React.Key[]) => { | |||||
| setSelectedRowKeys(selectedRowKeys); | setSelectedRowKeys(selectedRowKeys); | ||||
| }, | }, | ||||
| }; | }; | ||||
| @@ -159,6 +158,8 @@ function ExperimentComparison() { | |||||
| align: 'center', | align: 'center', | ||||
| render: tableCellRender(true), | render: tableCellRender(true), | ||||
| ellipsis: { showTitle: false }, | ellipsis: { showTitle: false }, | ||||
| sorter: (a, b) => a.params[name] - b.params[name], | |||||
| showSorterTooltip: false, | |||||
| })), | })), | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -176,6 +177,8 @@ function ExperimentComparison() { | |||||
| align: 'center', | align: 'center', | ||||
| render: tableCellRender(true), | render: tableCellRender(true), | ||||
| ellipsis: { showTitle: false }, | ellipsis: { showTitle: false }, | ||||
| sorter: (a, b) => a.metrics[name] - b.metrics[name], | |||||
| showSorterTooltip: false, | |||||
| })), | })), | ||||
| }, | }, | ||||
| ]; | ]; | ||||
| @@ -18,7 +18,7 @@ const CacheInfo: React.FC = () => { | |||||
| }); | }); | ||||
| return ( | return ( | ||||
| <div style={{}}> | |||||
| <div> | |||||
| <iframe | <iframe | ||||
| style={{ width: '100%', border: '0px', height: '100%' }} | style={{ width: '100%', border: '0px', height: '100%' }} | ||||
| src={`/api/swagger-ui/index.html`} | src={`/api/swagger-ui/index.html`} | ||||
| @@ -49,6 +49,7 @@ | |||||
| position: fixed; | position: fixed; | ||||
| right: 30px; | right: 30px; | ||||
| bottom: 20px; | bottom: 20px; | ||||
| z-index: 999; | |||||
| width: 64px; | width: 64px; | ||||
| height: 64px; | height: 64px; | ||||
| background-color: white; | background-color: white; | ||||
| @@ -71,7 +71,7 @@ function Workspace() { | |||||
| <AssetsManagement></AssetsManagement> | <AssetsManagement></AssetsManagement> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <Draggable onStart={handleStart} onStop={handleStop} onDrag={handleDrag}> | |||||
| <Draggable onStart={handleStart} onStop={handleStop} onDrag={handleDrag} bounds="body"> | |||||
| <img | <img | ||||
| className={styles['workspace__robot-img']} | className={styles['workspace__robot-img']} | ||||
| src={require('@/assets/img/robot.png')} | src={require('@/assets/img/robot.png')} | ||||
| @@ -7,10 +7,9 @@ export function getJupyterUrl() { | |||||
| } | } | ||||
| // 查询 labelStudio url | // 查询 labelStudio url | ||||
| export function getLabelStudioUrl(params: any) { | |||||
| export function getLabelStudioUrl() { | |||||
| return request(`/api/mmp/labelStudio/getURL`, { | return request(`/api/mmp/labelStudio/getURL`, { | ||||
| method: 'GET', | method: 'GET', | ||||
| params, | |||||
| }); | }); | ||||
| } | } | ||||