diff --git a/react-ui/src/pages/Dataset/components/ResourceItem/index.tsx b/react-ui/src/pages/Dataset/components/ResourceItem/index.tsx index a9025a98..e3d4d3bb 100644 --- a/react-ui/src/pages/Dataset/components/ResourceItem/index.tsx +++ b/react-ui/src/pages/Dataset/components/ResourceItem/index.tsx @@ -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 (
onClick(item)}> diff --git a/react-ui/src/pages/Dataset/config.tsx b/react-ui/src/pages/Dataset/config.tsx index af1993b9..4799c75c 100644 --- a/react-ui/src/pages/Dataset/config.tsx +++ b/react-ui/src/pages/Dataset/config.tsx @@ -164,6 +164,7 @@ export interface ResourceData { train_task?: TrainTask; // 训练任务 praises_count: number; // 点赞数 praised: boolean; // 是否点赞 + full_last_update_time: string; // 完整的更新时间 } // 数据集数据 diff --git a/react-ui/src/pages/Experiment/components/AddExperimentModal/index.tsx b/react-ui/src/pages/Experiment/components/AddExperimentModal/index.tsx index 6ac6bd41..2a15a8e7 100644 --- a/react-ui/src/pages/Experiment/components/AddExperimentModal/index.tsx +++ b/react-ui/src/pages/Experiment/components/AddExperimentModal/index.tsx @@ -30,7 +30,7 @@ interface Workflow { } // 根据参数设置输入组件 -export const getParamComponent = (paramType: number, isSensitive?: number): JSX.Element => { +export const getParamComponent = (paramType: number): JSX.Element => { // 防止后台返回不是 number 类型 if (Number(paramType) === 3) { return ( @@ -40,9 +40,9 @@ export const getParamComponent = (paramType: number, isSensitive?: number): JSX. ); } - if (isSensitive && Number(isSensitive) === 1) { - return ; - } + // if (isSensitive && Number(isSensitive) === 1) { + // return ; + // } return ; }; @@ -202,11 +202,7 @@ function AddExperimentModal({ {globalParam.length > 0 && ( - +
{(fields) => @@ -219,10 +215,7 @@ function AddExperimentModal({ name={[name, 'param_value']} rules={getParamRules(globalParam[name]['param_type'], true)} > - {getParamComponent( - globalParam[name]['param_type'], - globalParam[name]['is_sensitive'], - )} + {getParamComponent(globalParam[name]['param_type'])} )) } diff --git a/react-ui/src/pages/Experiment/components/ViewParamsModal/index.tsx b/react-ui/src/pages/Experiment/components/ViewParamsModal/index.tsx index 8bd49817..3ad671a4 100644 --- a/react-ui/src/pages/Experiment/components/ViewParamsModal/index.tsx +++ b/react-ui/src/pages/Experiment/components/ViewParamsModal/index.tsx @@ -47,10 +47,7 @@ function ParamsModal({ open, onCancel, globalParam = [] }: ParamsModalProps) { name={[name, 'param_value']} label={getParamLabel(globalParam[name])} > - {getParamComponent( - globalParam[name]['param_type'], - globalParam[name]['is_sensitive'], - )} + {getParamComponent(globalParam[name]['param_type'])} )) } diff --git a/react-ui/src/pages/ModelDeployment/VersionInfo/index.tsx b/react-ui/src/pages/ModelDeployment/VersionInfo/index.tsx index 0729631d..ad59fd23 100644 --- a/react-ui/src/pages/ModelDeployment/VersionInfo/index.tsx +++ b/react-ui/src/pages/ModelDeployment/VersionInfo/index.tsx @@ -52,30 +52,32 @@ function ServiceVersionInfo() { }, ]; - if (versionInfo?.run_state === ServiceRunStatus.Running && versionInfo?.page_path) { - tabItems.push({ - key: ModelDeploymentTabKey.Predict, - label: '预测', - icon: , - children: ( -
- -
- ), - }); - } + if (versionInfo?.run_state === ServiceRunStatus.Running) { + if (versionInfo?.page_path) { + tabItems.push({ + key: ModelDeploymentTabKey.Predict, + label: '预测', + icon: , + children: ( +
+ +
+ ), + }); + } - if (versionInfo?.doc_path) { - tabItems.push({ - key: ModelDeploymentTabKey.Guide, - label: '调用指南', - icon: , - children: ( -
- -
- ), - }); + if (versionInfo?.doc_path) { + tabItems.push({ + key: ModelDeploymentTabKey.Guide, + label: '调用指南', + icon: , + children: ( +
+ +
+ ), + }); + } } tabItems.push({ diff --git a/react-ui/src/pages/Pipeline/components/GlobalParamsDrawer/index.tsx b/react-ui/src/pages/Pipeline/components/GlobalParamsDrawer/index.tsx index 669f21aa..da764698 100644 --- a/react-ui/src/pages/Pipeline/components/GlobalParamsDrawer/index.tsx +++ b/react-ui/src/pages/Pipeline/components/GlobalParamsDrawer/index.tsx @@ -148,7 +148,7 @@ const GlobalParamsDrawer = forwardRef( > {getParamComponent(type)} - {type !== 3 && ( + {/* {type !== 3 && ( - )} + )} */} ); }}