|
|
|
@@ -61,6 +61,7 @@ const ResourceInfo = ({ resourceType }: ResourceInfoProps) => { |
|
|
|
const config = resourceConfig[resourceType]; |
|
|
|
const typeName = config.name; // 数据集/模型 |
|
|
|
const { message } = App.useApp(); |
|
|
|
const [noVersions, setNoVersions] = useState(false); |
|
|
|
|
|
|
|
// 获取详情 |
|
|
|
const getResourceDetail = useCallback( |
|
|
|
@@ -104,6 +105,7 @@ const ResourceInfo = ({ resourceType }: ResourceInfoProps) => { |
|
|
|
setVersion(res.data[0].name); |
|
|
|
} |
|
|
|
} else { |
|
|
|
setNoVersions(true); |
|
|
|
setVersion(undefined); |
|
|
|
getResourceDetail(undefined); |
|
|
|
} |
|
|
|
@@ -351,14 +353,14 @@ const ResourceInfo = ({ resourceType }: ResourceInfoProps) => { |
|
|
|
删除版本 |
|
|
|
</Button> |
|
|
|
</Flex> |
|
|
|
) : ( |
|
|
|
) : noVersions ? ( |
|
|
|
<Typography.Paragraph |
|
|
|
className={styles['resource-info__top__desc']} |
|
|
|
ellipsis={{ tooltip: info.description }} |
|
|
|
> |
|
|
|
{info.description ?? '暂无描述'} |
|
|
|
</Typography.Paragraph> |
|
|
|
)} |
|
|
|
) : null} |
|
|
|
</div> |
|
|
|
<div className={styles['resource-info__bottom']}> |
|
|
|
{version ? ( |
|
|
|
@@ -368,7 +370,7 @@ const ResourceInfo = ({ resourceType }: ResourceInfoProps) => { |
|
|
|
{activeTab === ResourceInfoTabKeys.Evolution && <GraphLegend />} |
|
|
|
</div> |
|
|
|
</> |
|
|
|
) : ( |
|
|
|
) : noVersions ? ( |
|
|
|
<KFEmpty |
|
|
|
style={{ height: '100%' }} |
|
|
|
type={EmptyType.NoData} |
|
|
|
@@ -378,7 +380,7 @@ const ResourceInfo = ({ resourceType }: ResourceInfoProps) => { |
|
|
|
buttonTitle="创建版本" |
|
|
|
onButtonClick={showAddVersionModal} |
|
|
|
/> |
|
|
|
)} |
|
|
|
) : null} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
|