U Release v2.3.0

pull/103/head v2.3.0
vapao 2020-05-30 18:56:24 +08:00
parent d78f0a2b66
commit c27ed428b4
5 changed files with 15 additions and 6 deletions

View File

@ -121,7 +121,7 @@ AUTHENTICATION_EXCLUDES = (
re.compile('/apis/.*'),
)
SPUG_VERSION = 'v2.2.6'
SPUG_VERSION = 'v2.3.0'
# override default config
try:

View File

@ -8,4 +8,4 @@ import _http from './http';
export * from './functools';
export * from './router';
export const http = _http;
export const VERSION = 'v2.2.6';
export const VERSION = 'v2.3.0';

View File

@ -184,7 +184,7 @@ class Ext1Form extends React.Component {
<Input placeholder="请输入备注信息"/>
)}
</Form.Item>
<Form.Item required label="发布目标主机">
<Form.Item required label="发布目标主机" help="通过点击主机名称自由选择本次发布的主机。">
{info['app_host_ids'].map(id => (
<Tag.CheckableTag key={id} checked={host_ids.includes(id)} onChange={() => this.handleChange(id)}>
{lds.get(hostStore.idMap, `${id}.name`)}({lds.get(hostStore.idMap, `${id}.hostname`)}:{lds.get(hostStore.idMap, `${id}.port`)})

View File

@ -76,7 +76,7 @@ class Ext2Form extends React.Component {
<Input placeholder="请输入申请标题"/>
)}
</Form.Item>
<Form.Item label="环境变量SPUG_RELEASE" help="可以在自定义脚本中引用该变量,用于设置本次发布相关的动态变量,在脚本中通过 $SPUG_RELEASE 来使用该值">
<Form.Item label="环境变量SPUG_RELEASE" help="可以在自定义脚本中引用该变量,用于设置本次发布相关的动态变量,在脚本中通过 $SPUG_RELEASE 来使用该值">
{getFieldDecorator('extra', {initialValue: info['extra']})(
<Input placeholder="请输入环境变量 SPUG_RELEASE 的值"/>
)}
@ -86,7 +86,7 @@ class Ext2Form extends React.Component {
<Input placeholder="请输入备注信息"/>
)}
</Form.Item>
<Form.Item required label="发布目标主机">
<Form.Item required label="发布目标主机" help="通过点击主机名称自由选择本次发布的主机。">
{info['app_host_ids'].map(id => (
<Tag.CheckableTag key={id} checked={host_ids.includes(id)} onChange={v => this.handleChange(id, v)}>
{lds.get(hostStore.idMap, `${id}.name`)}({lds.get(hostStore.idMap, `${id}.hostname`)}:{lds.get(hostStore.idMap, `${id}.port`)})

View File

@ -23,6 +23,10 @@ class TaskIndex extends React.Component {
}
}
componentDidMount() {
store.hosts = []
}
handleSubmit = () => {
this.setState({loading: true});
const host_ids = store.hosts.map(item => item.id);
@ -38,7 +42,12 @@ class TaskIndex extends React.Component {
<Form>
<Form.Item label="执行主机">
{store.hosts.map(item => (
<Tag color="#108ee9" key={item.id}>{item.name}({item.hostname}:{item.port})</Tag>
<Tag
closable
color="#108ee9"
key={item.id}
onClose={() => store.hosts = store.hosts.filter(x => x.id !== item.id)}>
{item.name}({item.hostname}:{item.port})</Tag>
))}
</Form.Item>
<Button icon="plus" onClick={store.switchHost}>从主机列表中选择</Button>