mirror of https://github.com/openspug/spug
优化批量执行模板可取消已选择的主机
parent
5e87b8763d
commit
393e36e0cf
|
@ -135,7 +135,7 @@ export default observer(function () {
|
|||
<Button type="link" style={{padding: 0}} onClick={() => setParameter({})}>添加参数</Button>
|
||||
</Form.Item>
|
||||
<Form.Item label="目标主机">
|
||||
<HostSelector value={info.host_ids} onChange={ids => info.host_ids = ids}/>
|
||||
<HostSelector nullable value={info.host_ids} onChange={ids => info.host_ids = ids}/>
|
||||
</Form.Item>
|
||||
<Form.Item name="desc" label="备注信息">
|
||||
<Input.TextArea placeholder="请输入模板备注信息"/>
|
||||
|
|
|
@ -146,7 +146,7 @@ function HostSelector(props) {
|
|||
className={styles.modal}
|
||||
title={props.title || '主机列表'}
|
||||
onOk={handleSubmit}
|
||||
okButtonProps={{disabled: selectedRowKeys.length === 0}}
|
||||
okButtonProps={{disabled: selectedRowKeys.length === 0 && !props.nullable}}
|
||||
confirmLoading={loading}
|
||||
onCancel={handleClose}>
|
||||
<Row>
|
||||
|
@ -209,6 +209,7 @@ HostSelector.defaultProps = {
|
|||
value: [],
|
||||
type: 'text',
|
||||
mode: 'ids',
|
||||
nullable: false,
|
||||
onChange: () => null
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue