mirror of https://github.com/openspug/spug
				
				
				
			批量执行模板可取消已选择的主机
							parent
							
								
									29fe6e0742
								
							
						
					
					
						commit
						418d1f6ef7
					
				| 
						 | 
				
			
			@ -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="请输入模板备注信息"/>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -167,7 +167,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>
 | 
			
		||||
| 
						 | 
				
			
			@ -231,6 +231,7 @@ HostSelector.defaultProps = {
 | 
			
		|||
  type: 'text',
 | 
			
		||||
  mode: 'ids',
 | 
			
		||||
  onlyOne: false,
 | 
			
		||||
  nullable: false,
 | 
			
		||||
  onChange: () => null
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue