Browse Source

fix: 最近更新时间

pull/247/head
cp3hnu 10 months ago
parent
commit
ef9a78b167
3 changed files with 27 additions and 26 deletions
  1. +1
    -3
      react-ui/src/pages/Dataset/components/ResourceItem/index.tsx
  2. +1
    -0
      react-ui/src/pages/Dataset/config.tsx
  3. +25
    -23
      react-ui/src/pages/ModelDeployment/VersionInfo/index.tsx

+ 1
- 3
react-ui/src/pages/Dataset/components/ResourceItem/index.tsx View File

@@ -14,9 +14,7 @@ type ResourceItemProps = {
};

function ResourceItem({ item, isPublic, onClick, onRemove }: ResourceItemProps) {
const timeAgo = `更新于${
item.update_time ? formatDate(item.update_time, 'YYYY-MM-DD') : item.time_ago ?? ''
}`;
const timeAgo = `最近更新:${formatDate(item.full_last_update_time, 'YYYY-MM-DD HH:mm')}`;
const create_by = item.create_by ?? '';
return (
<div className={styles['resource-item']} onClick={() => onClick(item)}>


+ 1
- 0
react-ui/src/pages/Dataset/config.tsx View File

@@ -164,6 +164,7 @@ export interface ResourceData {
train_task?: TrainTask; // 训练任务
praises_count: number; // 点赞数
praised: boolean; // 是否点赞
full_last_update_time: string; // 完整的更新时间
}

// 数据集数据


+ 25
- 23
react-ui/src/pages/ModelDeployment/VersionInfo/index.tsx View File

@@ -52,30 +52,32 @@ function ServiceVersionInfo() {
},
];

if (versionInfo?.run_state === ServiceRunStatus.Running && versionInfo?.page_path) {
tabItems.push({
key: ModelDeploymentTabKey.Predict,
label: '预测',
icon: <KFIcon type="icon-yuce" />,
children: (
<div style={{ height: '100%', width: '100%' }}>
<FullScreenFrame url={versionInfo?.page_path}></FullScreenFrame>
</div>
),
});
}
if (versionInfo?.run_state === ServiceRunStatus.Running) {
if (versionInfo?.page_path) {
tabItems.push({
key: ModelDeploymentTabKey.Predict,
label: '预测',
icon: <KFIcon type="icon-yuce" />,
children: (
<div style={{ height: '100%', width: '100%' }}>
<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>
),
});
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>
),
});
}
}

tabItems.push({


Loading…
Cancel
Save