/** * Copyright (c) OpenSpug Organization. https://github.com/openspug/spug * Copyright (c) * Released under the MIT License. */ import React from 'react'; import { observer } from 'mobx-react'; import { Form, Row, Col, Button, Radio, Icon, message } from "antd"; import { LinkButton } from 'components'; import Editor from 'react-ace'; import 'ace-builds/src-noconflict/mode-text'; import 'ace-builds/src-noconflict/mode-sh'; import 'ace-builds/src-noconflict/theme-tomorrow'; import store from './store'; import http from 'libs/http'; import styles from './index.module.css'; @observer class Ext1Setup3 extends React.Component { constructor(props) { super(props); this.state = { loading: false, full: '' } } handleSubmit = () => { this.setState({loading: true}); const info = store.deploy; info['app_id'] = store.app_id; info['extend'] = '1'; info['host_ids'] = info['host_ids'].filter(x => x); http.post('/api/app/deploy/', info) .then(() => { message.success('保存成功'); store.loadDeploys(store.app_id); store.ext1Visible = false }, () => this.setState({loading: false})) }; FilterLabel = (props) => (
文件过滤: store.deploy['filter_rule']['type'] = e.target.value}> 包含 排除 {this.state.full === '1' ? ( this.setState({full: ''})}>退出全屏 ) : ( this.setState({full: '1'})}>全屏 )}
); NormalLabel = (props) => (
{props.title}: {this.state.full ? ( this.setState({full: ''})}>退出全屏 ) : ( this.setState({full: props.id})}>全屏 )}
); render() { const info = store.deploy; const {full} = this.state; return ( }> info['filter_rule']['data'] = v} style={{border: '1px solid #e8e8e8'}}/> }> info['hook_pre_server'] = v} style={{border: '1px solid #e8e8e8'}}/> }> info['hook_pre_host'] = v} style={{border: '1px solid #e8e8e8'}}/>
基础设置
检出代码
版本切换
}> info['custom_envs'] = v} style={{border: '1px solid #e8e8e8'}}/> }> info['hook_post_server'] = v} style={{border: '1px solid #e8e8e8'}}/> }> info['hook_post_host'] = v} style={{border: '1px solid #e8e8e8'}}/>
) } } export default Ext1Setup3