Browse Source

Merge branch 'dev-check' of https://gitlink.org.cn/ci4s/ci4sManagement-cloud into dev-check

pull/268/head
chenzhihang 8 months ago
parent
commit
85c8a3e6dc
6 changed files with 36 additions and 45 deletions
  1. +1
    -3
      react-ui/src/pages/Dataset/components/ResourceItem/index.tsx
  2. +1
    -0
      react-ui/src/pages/Dataset/config.tsx
  3. +6
    -13
      react-ui/src/pages/Experiment/components/AddExperimentModal/index.tsx
  4. +1
    -4
      react-ui/src/pages/Experiment/components/ViewParamsModal/index.tsx
  5. +25
    -23
      react-ui/src/pages/ModelDeployment/VersionInfo/index.tsx
  6. +2
    -2
      react-ui/src/pages/Pipeline/components/GlobalParamsDrawer/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; // 完整的更新时间
}

// 数据集数据


+ 6
- 13
react-ui/src/pages/Experiment/components/AddExperimentModal/index.tsx View File

@@ -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.
</Radio.Group>
);
}
if (isSensitive && Number(isSensitive) === 1) {
return <Input.Password placeholder="请输入值" visibilityToggle={false} allowClear />;
}
// if (isSensitive && Number(isSensitive) === 1) {
// return <Input.Password placeholder="请输入值" visibilityToggle={false} allowClear />;
// }
return <Input placeholder="请输入值" allowClear />;
};

@@ -202,11 +202,7 @@ function AddExperimentModal({
</Select>
</Form.Item>
{globalParam.length > 0 && (
<Form.Item
label="运行参数"
tooltip="展示关联的流水线的参数,脱敏的参数以xxxx展示"
{...tailLayout}
>
<Form.Item label="运行参数" tooltip="展示关联的流水线的参数" {...tailLayout}>
<div className={styles.global_param_item}>
<Form.List name="global_param">
{(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'])}
</Form.Item>
))
}


+ 1
- 4
react-ui/src/pages/Experiment/components/ViewParamsModal/index.tsx View File

@@ -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'])}
</Form.Item>
))
}


+ 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({


+ 2
- 2
react-ui/src/pages/Pipeline/components/GlobalParamsDrawer/index.tsx View File

@@ -148,7 +148,7 @@ const GlobalParamsDrawer = forwardRef(
>
{getParamComponent(type)}
</Form.Item>
{type !== 3 && (
{/* {type !== 3 && (
<Form.Item
{...restField}
name={[name, 'is_sensitive']}
@@ -161,7 +161,7 @@ const GlobalParamsDrawer = forwardRef(
<Radio value={0}>否</Radio>
</Radio.Group>
</Form.Item>
)}
)} */}
</>
);
}}


Loading…
Cancel
Save