A web update

pull/22/head
雷二猛 2019-12-14 15:14:39 +08:00
parent bc843ef8ca
commit 9c829a63e6
2 changed files with 3 additions and 2 deletions

View File

@ -24,7 +24,7 @@ class AddSelect extends React.Component {
store.record = {
is_audit: false,
host_ids: [undefined],
actions: [{}]
actions: [{target: 'server'}]
}
};

View File

@ -20,6 +20,7 @@ class Ext2Setup3 extends React.Component {
handleSubmit = () => {
this.setState({loading: true});
store.record['extend'] = '2';
store.record['actions'] = store.record['actions'].filter(x => x.title && x.data);
http.post('/api/app/', store.record)
.then(res => {
message.success('保存成功');
@ -65,7 +66,7 @@ class Ext2Setup3 extends React.Component {
</div>
))}
<Form.Item wrapperCol={{span: 14, offset: 6}}>
<Button type="dashed" block onClick={() => actions.push({})}>
<Button type="dashed" block onClick={() => actions.push({target: 'server'})}>
<Icon type="plus"/>添加执行动作
</Button>
</Form.Item>