|
|
|
@@ -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> |
|
|
|
)) |
|
|
|
} |
|
|
|
|