Skip to content

Commit

Permalink
U Release v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vapao committed May 30, 2020
1 parent d78f0a2 commit c27ed42
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spug_api/spug/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
re.compile('/apis/.*'),
)

SPUG_VERSION = 'v2.2.6'
SPUG_VERSION = 'v2.3.0'

# override default config
try:
Expand Down
2 changes: 1 addition & 1 deletion spug_web/src/libs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion spug_web/src/pages/deploy/request/Ext1Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)})
Expand Down
4 changes: 2 additions & 2 deletions spug_web/src/pages/deploy/request/Ext2Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 的值"/>
)}
Expand All @@ -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`)})
Expand Down
11 changes: 10 additions & 1 deletion spug_web/src/pages/exec/task/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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>
Expand Down

0 comments on commit c27ed42

Please sign in to comment.