fix issues

pull/330/head
vapao 2021-04-28 19:26:40 +08:00
parent d58925fb63
commit 14536e1176
6 changed files with 14 additions and 5 deletions

View File

@ -51,7 +51,11 @@ export default observer(function Ext1Setup1() {
placeholder="请输入Git仓库地址"/> placeholder="请输入Git仓库地址"/>
</Form.Item> </Form.Item>
<Form.Item label="发布模式"> <Form.Item label="发布模式">
<Radio.Group buttonStyle="solid" value={info.is_parallel} onChange={e => info.is_parallel = e.target.value}> <Radio.Group
buttonStyle="solid"
defaultValue={true}
value={info.is_parallel}
onChange={e => info.is_parallel = e.target.value}>
<Radio.Button value={true}>并行</Radio.Button> <Radio.Button value={true}>并行</Radio.Button>
<Radio.Button value={false}>串行</Radio.Button> <Radio.Button value={false}>串行</Radio.Button>
</Radio.Group> </Radio.Group>

View File

@ -48,7 +48,11 @@ export default observer(function Ext2Setup1() {
<Button type="link" onClick={() => setSelectorVisible(true)}>选择主机</Button> <Button type="link" onClick={() => setSelectorVisible(true)}>选择主机</Button>
</Form.Item> </Form.Item>
<Form.Item label="发布模式"> <Form.Item label="发布模式">
<Radio.Group buttonStyle="solid" value={info.is_parallel} onChange={e => info.is_parallel = e.target.value}> <Radio.Group
buttonStyle="solid"
defaultValue={true}
value={info.is_parallel}
onChange={e => info.is_parallel = e.target.value}>
<Radio.Button value={true}>并行</Radio.Button> <Radio.Button value={true}>并行</Radio.Button>
<Radio.Button value={false}>串行</Radio.Button> <Radio.Button value={false}>串行</Radio.Button>
</Radio.Group> </Radio.Group>

View File

@ -35,6 +35,7 @@ function Ext1Console(props) {
.then(res => { .then(res => {
Object.assign(outputs, res.outputs) Object.assign(outputs, res.outputs)
socket = _makeSocket() socket = _makeSocket()
store.fetchRecords()
}) })
return () => socket && socket.close() return () => socket && socket.close()
} }

View File

@ -128,6 +128,7 @@ class Store {
this.tabs.splice(index, 1) this.tabs.splice(index, 1)
delete this.tabModes[info.id] delete this.tabModes[info.id]
} }
this.fetchRecords()
} else if (index === -1) { } else if (index === -1) {
this.tabModes[info.id] = true this.tabModes[info.id] = true
this.tabs.push(info) this.tabs.push(info)

View File

@ -11,8 +11,7 @@ export default observer(function (props) {
useEffect(() => { useEffect(() => {
if (!store.treeData.length) { if (!store.treeData.length) {
store.fetchRecords() store.initial()
store.fetchGroups()
.then(() => setGroup(store.treeData[0])) .then(() => setGroup(store.treeData[0]))
} else { } else {
setGroup(store.treeData[0]) setGroup(store.treeData[0])

View File

@ -63,7 +63,7 @@ class Store {
initial = () => { initial = () => {
this.isFetching = true; this.isFetching = true;
this.grpFetching = true; this.grpFetching = true;
http.all([http.get('/api/host/'), http.get('/api/host/group/')]) return http.all([http.get('/api/host/'), http.get('/api/host/group/')])
.then(http.spread((res1, res2) => { .then(http.spread((res1, res2) => {
this.records = res1; this.records = res1;
this.records.map(item => this.idMap[item.id] = item); this.records.map(item => this.idMap[item.id] = item);