|
|
@@ -13,7 +13,6 @@ import { useParams } from '@umijs/max'; |
|
|
import { Tabs } from 'antd'; |
|
|
import { Tabs } from 'antd'; |
|
|
import { useEffect, useState } from 'react'; |
|
|
import { useEffect, useState } from 'react'; |
|
|
import ServerLog from '../components/ServerLog'; |
|
|
import ServerLog from '../components/ServerLog'; |
|
|
import UserGuide from '../components/UserGuide'; |
|
|
|
|
|
import VersionBasicInfo from '../components/VersionBasicInfo'; |
|
|
import VersionBasicInfo from '../components/VersionBasicInfo'; |
|
|
import { ServiceVersionData } from '../types'; |
|
|
import { ServiceVersionData } from '../types'; |
|
|
import styles from './index.less'; |
|
|
import styles from './index.less'; |
|
|
@@ -51,35 +50,41 @@ function ServiceVersionInfo() { |
|
|
icon: <KFIcon type="icon-jibenxinxi" />, |
|
|
icon: <KFIcon type="icon-jibenxinxi" />, |
|
|
children: <VersionBasicInfo info={versionInfo} />, |
|
|
children: <VersionBasicInfo info={versionInfo} />, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
key: ModelDeploymentTabKey.Guide, |
|
|
|
|
|
label: '调用指南', |
|
|
|
|
|
icon: <KFIcon type="icon-tiaoyongzhinan" />, |
|
|
|
|
|
children: <UserGuide info={versionInfo}></UserGuide>, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
key: ModelDeploymentTabKey.Log, |
|
|
|
|
|
label: '服务日志', |
|
|
|
|
|
icon: <KFIcon type="icon-fuwurizhi" />, |
|
|
|
|
|
children: <ServerLog info={versionInfo}></ServerLog>, |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
if (versionInfo?.run_state === ServiceRunStatus.Running) { |
|
|
|
|
|
tabItems.splice(1, 0, { |
|
|
|
|
|
|
|
|
if (versionInfo?.run_state === ServiceRunStatus.Running && versionInfo?.page_path) { |
|
|
|
|
|
tabItems.push({ |
|
|
key: ModelDeploymentTabKey.Predict, |
|
|
key: ModelDeploymentTabKey.Predict, |
|
|
label: '预测', |
|
|
label: '预测', |
|
|
icon: <KFIcon type="icon-yuce" />, |
|
|
icon: <KFIcon type="icon-yuce" />, |
|
|
children: ( |
|
|
children: ( |
|
|
<div style={{ height: '100%', width: '100%' }}> |
|
|
<div style={{ height: '100%', width: '100%' }}> |
|
|
{versionInfo?.page_path && ( |
|
|
|
|
|
<FullScreenFrame url={versionInfo?.page_path}></FullScreenFrame> |
|
|
|
|
|
)} |
|
|
|
|
|
|
|
|
<FullScreenFrame url={versionInfo?.page_path}></FullScreenFrame> |
|
|
|
|
|
</div> |
|
|
|
|
|
), |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (versionInfo?.doc_path) { |
|
|
|
|
|
tabItems.push({ |
|
|
|
|
|
key: ModelDeploymentTabKey.Guide, |
|
|
|
|
|
label: '调用指南', |
|
|
|
|
|
icon: <KFIcon type="icon-tiaoyongzhinan" />, |
|
|
|
|
|
children: ( |
|
|
|
|
|
<div style={{ height: '100%', width: '100%' }}> |
|
|
|
|
|
<FullScreenFrame url={versionInfo?.doc_path}></FullScreenFrame> |
|
|
</div> |
|
|
</div> |
|
|
), |
|
|
), |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tabItems.push({ |
|
|
|
|
|
key: ModelDeploymentTabKey.Log, |
|
|
|
|
|
label: '服务日志', |
|
|
|
|
|
icon: <KFIcon type="icon-fuwurizhi" />, |
|
|
|
|
|
children: <ServerLog info={versionInfo}></ServerLog>, |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<div className={styles['service-version-info']}> |
|
|
<div className={styles['service-version-info']}> |
|
|
<PageTitle title="服务版本详情"></PageTitle> |
|
|
<PageTitle title="服务版本详情"></PageTitle> |
|
|
|