|
|
|
@@ -6,6 +6,7 @@ |
|
|
|
import FullScreenFrame from '@/components/FullScreenFrame'; |
|
|
|
import KFIcon from '@/components/KFIcon'; |
|
|
|
import PageTitle from '@/components/PageTitle'; |
|
|
|
import { ServiceRunStatus } from '@/enums'; |
|
|
|
import { getServiceVersionInfoReq } from '@/services/modelDeployment'; |
|
|
|
import { to } from '@/utils/promise'; |
|
|
|
import { useParams } from '@umijs/max'; |
|
|
|
@@ -50,18 +51,6 @@ function ServiceVersionInfo() { |
|
|
|
icon: <KFIcon type="icon-jibenxinxi" />, |
|
|
|
children: <VersionBasicInfo info={versionInfo} />, |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: ModelDeploymentTabKey.Predict, |
|
|
|
label: '预测', |
|
|
|
icon: <KFIcon type="icon-yuce" />, |
|
|
|
children: ( |
|
|
|
<div style={{ height: '100%', width: '100%' }}> |
|
|
|
{versionInfo?.page_path && ( |
|
|
|
<FullScreenFrame url={versionInfo?.page_path}></FullScreenFrame> |
|
|
|
)} |
|
|
|
</div> |
|
|
|
), |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: ModelDeploymentTabKey.Guide, |
|
|
|
label: '调用指南', |
|
|
|
@@ -76,6 +65,21 @@ function ServiceVersionInfo() { |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
if (versionInfo?.run_state === ServiceRunStatus.Running) { |
|
|
|
tabItems.splice(1, 0, { |
|
|
|
key: ModelDeploymentTabKey.Predict, |
|
|
|
label: '预测', |
|
|
|
icon: <KFIcon type="icon-yuce" />, |
|
|
|
children: ( |
|
|
|
<div style={{ height: '100%', width: '100%' }}> |
|
|
|
{versionInfo?.page_path && ( |
|
|
|
<FullScreenFrame url={versionInfo?.page_path}></FullScreenFrame> |
|
|
|
)} |
|
|
|
</div> |
|
|
|
), |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|
<div className={styles['service-version-info']}> |
|
|
|
<PageTitle title="服务版本详情"></PageTitle> |
|
|
|
|