| @@ -0,0 +1,9 @@ | |||||
| .disabled-input { | |||||
| padding: 4px 11px; | |||||
| color: rgba(0, 0, 0, 0.25); | |||||
| font-size: @font-size-input; | |||||
| background-color: rgba(0, 0, 0, 0.04); | |||||
| border: 1px solid #d9d9d9; | |||||
| border-radius: 6px; | |||||
| cursor: not-allowed; | |||||
| } | |||||
| @@ -0,0 +1,20 @@ | |||||
| import { Typography } from 'antd'; | |||||
| import styles from './index.less'; | |||||
| type DisabledInputProps = { | |||||
| value?: any; | |||||
| valuePropName?: string; | |||||
| }; | |||||
| function DisabledInput({ value, valuePropName }: DisabledInputProps) { | |||||
| const data = valuePropName ? value[valuePropName] : value; | |||||
| return ( | |||||
| <div className={styles['disabled-input']}> | |||||
| <Typography.Text ellipsis={{ tooltip: data }} style={{ color: 'inherit' }}> | |||||
| {data} | |||||
| </Typography.Text> | |||||
| </div> | |||||
| ); | |||||
| } | |||||
| export default DisabledInput; | |||||
| @@ -41,7 +41,7 @@ export const getParamComponent = (paramType: number, isSensitive?: number): JSX. | |||||
| ); | ); | ||||
| } | } | ||||
| if (isSensitive && Number(isSensitive) === 1) { | if (isSensitive && Number(isSensitive) === 1) { | ||||
| return <Input.Password visibilityToggle={false} allowClear />; | |||||
| return <Input.Password placeholder="请输入值" visibilityToggle={false} allowClear />; | |||||
| } | } | ||||
| return <Input placeholder="请输入值" allowClear />; | return <Input placeholder="请输入值" allowClear />; | ||||
| }; | }; | ||||
| @@ -33,7 +33,7 @@ | |||||
| } | } | ||||
| .status { | .status { | ||||
| width: 200px; | |||||
| width: 160px; | |||||
| } | } | ||||
| .operation { | .operation { | ||||
| @@ -54,7 +54,7 @@ | |||||
| .statusBox { | .statusBox { | ||||
| display: flex; | display: flex; | ||||
| align-items: center; | align-items: center; | ||||
| width: 200px; | |||||
| width: 160px; | |||||
| .statusIcon { | .statusIcon { | ||||
| visibility: visible; | visibility: visible; | ||||
| @@ -161,6 +161,9 @@ function ExperimentInstanceComponent({ | |||||
| <Checkbox | <Checkbox | ||||
| checked={isSingleChecked(item.id)} | checked={isSingleChecked(item.id)} | ||||
| onChange={() => checkSingle(item.id)} | onChange={() => checkSingle(item.id)} | ||||
| disabled={ | |||||
| item.status === ExperimentStatus.Running || item.status === ExperimentStatus.Pending | |||||
| } | |||||
| ></Checkbox> | ></Checkbox> | ||||
| </div> | </div> | ||||
| <a | <a | ||||
| @@ -406,7 +406,7 @@ function Experiment() { | |||||
| title: '最近五次运行状态', | title: '最近五次运行状态', | ||||
| dataIndex: 'status_list', | dataIndex: 'status_list', | ||||
| key: 'status_list', | key: 'status_list', | ||||
| width: 200, | |||||
| width: 160, | |||||
| render: (text) => { | render: (text) => { | ||||
| const newText = text && text.replace(/\s+/g, '').split(','); | const newText = text && text.replace(/\s+/g, '').split(','); | ||||
| return ( | return ( | ||||