From 14536e1176333e0680b5daaf04f7d291517ed4c7 Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 28 Apr 2021 19:26:40 +0800 Subject: [PATCH] fix issues --- spug_web/src/pages/deploy/app/Ext1Setup1.js | 6 +++++- spug_web/src/pages/deploy/app/Ext2Setup1.js | 6 +++++- spug_web/src/pages/deploy/request/Ext1Console.js | 1 + spug_web/src/pages/deploy/request/store.js | 1 + spug_web/src/pages/host/Selector.js | 3 +-- spug_web/src/pages/host/store.js | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/spug_web/src/pages/deploy/app/Ext1Setup1.js b/spug_web/src/pages/deploy/app/Ext1Setup1.js index 4909ed0..882b27f 100644 --- a/spug_web/src/pages/deploy/app/Ext1Setup1.js +++ b/spug_web/src/pages/deploy/app/Ext1Setup1.js @@ -51,7 +51,11 @@ export default observer(function Ext1Setup1() { placeholder="请输入Git仓库地址"/> - info.is_parallel = e.target.value}> + info.is_parallel = e.target.value}> 并行 串行 diff --git a/spug_web/src/pages/deploy/app/Ext2Setup1.js b/spug_web/src/pages/deploy/app/Ext2Setup1.js index b535184..1f37918 100644 --- a/spug_web/src/pages/deploy/app/Ext2Setup1.js +++ b/spug_web/src/pages/deploy/app/Ext2Setup1.js @@ -48,7 +48,11 @@ export default observer(function Ext2Setup1() { - info.is_parallel = e.target.value}> + info.is_parallel = e.target.value}> 并行 串行 diff --git a/spug_web/src/pages/deploy/request/Ext1Console.js b/spug_web/src/pages/deploy/request/Ext1Console.js index a233713..f3c6885 100644 --- a/spug_web/src/pages/deploy/request/Ext1Console.js +++ b/spug_web/src/pages/deploy/request/Ext1Console.js @@ -35,6 +35,7 @@ function Ext1Console(props) { .then(res => { Object.assign(outputs, res.outputs) socket = _makeSocket() + store.fetchRecords() }) return () => socket && socket.close() } diff --git a/spug_web/src/pages/deploy/request/store.js b/spug_web/src/pages/deploy/request/store.js index 660e821..75eba56 100644 --- a/spug_web/src/pages/deploy/request/store.js +++ b/spug_web/src/pages/deploy/request/store.js @@ -128,6 +128,7 @@ class Store { this.tabs.splice(index, 1) delete this.tabModes[info.id] } + this.fetchRecords() } else if (index === -1) { this.tabModes[info.id] = true this.tabs.push(info) diff --git a/spug_web/src/pages/host/Selector.js b/spug_web/src/pages/host/Selector.js index 8f72cc1..0e17696 100644 --- a/spug_web/src/pages/host/Selector.js +++ b/spug_web/src/pages/host/Selector.js @@ -11,8 +11,7 @@ export default observer(function (props) { useEffect(() => { if (!store.treeData.length) { - store.fetchRecords() - store.fetchGroups() + store.initial() .then(() => setGroup(store.treeData[0])) } else { setGroup(store.treeData[0]) diff --git a/spug_web/src/pages/host/store.js b/spug_web/src/pages/host/store.js index 2f8a935..8f3a36b 100644 --- a/spug_web/src/pages/host/store.js +++ b/spug_web/src/pages/host/store.js @@ -63,7 +63,7 @@ class Store { initial = () => { this.isFetching = 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) => { this.records = res1; this.records.map(item => this.idMap[item.id] = item);