mirror of https://github.com/openspug/spug
U 常规发布配置项新增小提示
parent
9aea33b52d
commit
fd962bf57d
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { observer } from 'mobx-react';
|
import { observer } from 'mobx-react';
|
||||||
import { Form, Row, Col, Button, Radio, Icon, message } from "antd";
|
import { Form, Row, Col, Button, Radio, Icon, Tooltip, message } from "antd";
|
||||||
import { LinkButton } from 'components';
|
import { LinkButton } from 'components';
|
||||||
import Editor from 'react-ace';
|
import Editor from 'react-ace';
|
||||||
import 'ace-builds/src-noconflict/mode-text';
|
import 'ace-builds/src-noconflict/mode-text';
|
||||||
|
@ -20,6 +20,17 @@ import { cleanCommand } from "../../../libs";
|
||||||
class Ext1Setup3 extends React.Component {
|
class Ext1Setup3 extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
this.helpMap = {
|
||||||
|
'2': <span>
|
||||||
|
Spug 内置了一些全局变量,这些变量可以直接使用,请参考官方文档:
|
||||||
|
<a target="_blank" rel="noopener noreferrer"
|
||||||
|
href="https://spug.dev/docs/deploy-config/#%E5%85%A8%E5%B1%80%E5%8F%98%E9%87%8F">全局变量</a>
|
||||||
|
</span>,
|
||||||
|
'3': '在部署 Spug 的服务器上运行,可以执行任意自定义命令。',
|
||||||
|
'4': '在部署 Spug 的服务器上运行,当前目录为检出后待发布的源代码目录,可执行任意自定义命令。',
|
||||||
|
'5': '在发布的目标主机上运行,当前目录为目标主机上待发布的源代码目录,可执行任意自定义命令。',
|
||||||
|
'6': '在发布的目标主机上运行,当前目录为已发布的应用目录,可执行任意自定义命令。'
|
||||||
|
};
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: false,
|
loading: false,
|
||||||
full: ''
|
full: ''
|
||||||
|
@ -41,14 +52,22 @@ class Ext1Setup3 extends React.Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
FilterLabel = (props) => (
|
FilterLabel = (props) => (
|
||||||
<div style={{display: 'inline-block', height: 39, width: 344}}>
|
<div style={{display: 'inline-block', height: 39, width: 390}}>
|
||||||
<span style={{float: 'left'}}>文件过滤<span style={{margin: '0 8px 0 2px'}}>:</span></span>
|
<span style={{float: 'left'}}>文件过滤<span style={{margin: '0 8px 0 2px'}}>:</span></span>
|
||||||
<Radio.Group
|
<Radio.Group
|
||||||
style={{marginLeft: 20, float: 'left'}}
|
style={{marginLeft: 20, float: 'left'}}
|
||||||
value={props.type}
|
value={props.type}
|
||||||
onChange={e => store.deploy['filter_rule']['type'] = e.target.value}>
|
onChange={e => store.deploy['filter_rule']['type'] = e.target.value}>
|
||||||
<Radio value="contain">包含</Radio>
|
<Radio value="contain">包含
|
||||||
<Radio value="exclude">排除</Radio>
|
<Tooltip title="请输入相对于项目根目录的文件路径,仅将匹配到文件传输至要发布的目标主机。">
|
||||||
|
<Icon type="info-circle" style={{color: '#515151', marginLeft: 8}}/>
|
||||||
|
</Tooltip>
|
||||||
|
</Radio>
|
||||||
|
<Radio value="exclude">排除
|
||||||
|
<Tooltip title="支持模糊匹配,如果路径以 / 开头则基于项目根目录匹配,匹配到文件将不会被传输。">
|
||||||
|
<Icon type="info-circle" style={{color: '#515151', marginLeft: 8}}/>
|
||||||
|
</Tooltip>
|
||||||
|
</Radio>
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
{this.state.full === '1' ? (
|
{this.state.full === '1' ? (
|
||||||
<LinkButton onClick={() => this.setState({full: ''})}>退出全屏</LinkButton>
|
<LinkButton onClick={() => this.setState({full: ''})}>退出全屏</LinkButton>
|
||||||
|
@ -59,12 +78,17 @@ class Ext1Setup3 extends React.Component {
|
||||||
);
|
);
|
||||||
|
|
||||||
NormalLabel = (props) => (
|
NormalLabel = (props) => (
|
||||||
<div style={{display: 'inline-block', height: 39, width: 344}}>
|
<div style={{display: 'inline-block', height: 39, width: 390}}>
|
||||||
<span style={{float: 'left'}}>{props.title}<span style={{margin: '0 8px 0 2px'}}>:</span></span>
|
<span style={{float: 'left'}}>
|
||||||
|
{props.title}<span style={{margin: '0 8px 0 2px'}}>:</span>
|
||||||
|
<Tooltip title={this.helpMap[props.id]}>
|
||||||
|
<Icon type="info-circle" style={{color: '#515151'}}/>
|
||||||
|
</Tooltip>
|
||||||
|
</span>
|
||||||
{this.state.full ? (
|
{this.state.full ? (
|
||||||
<LinkButton onClick={() => this.setState({full: ''})}>退出全屏</LinkButton>
|
<span style={{color: '#1890ff', cursor: 'pointer'}} onClick={() => this.setState({full: ''})}>退出全屏</span>
|
||||||
) : (
|
) : (
|
||||||
<LinkButton type="link" onClick={() => this.setState({full: props.id})}>全屏</LinkButton>
|
<span style={{color: '#1890ff', cursor: 'pointer'}} onClick={() => this.setState({full: props.id})}>全屏</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue