This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-rocketbot-ui.git


The following commit(s) were added to refs/heads/master by this push:
     new 06dbf75  Feat: Add initial topology & .env (#274)
06dbf75 is described below

commit 06dbf750fe8bfa4d65c201a70ddac69ceb1b6b63
Author: Allen Wang <[email protected]>
AuthorDate: Wed Mar 18 22:07:35 2020 +0800

    Feat: Add initial topology & .env (#274)
    
    * Feat: add init topo
    
    * update
    
    * add ignore
    
    * add ignore
---
 src/store/modules/topology/group/index.ts          | 3 +++
 src/views/components/topology/topo-group/index.vue | 8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/store/modules/topology/group/index.ts 
b/src/store/modules/topology/group/index.ts
index 1054815..0da3323 100644
--- a/src/store/modules/topology/group/index.ts
+++ b/src/store/modules/topology/group/index.ts
@@ -37,6 +37,9 @@ const initState: State = {
 // getters
 const getters = {
   services(state: State) {
+    if (!state.groups.length) {
+      return [];
+    }
     if (state.groupId === 'all') {
       return [];
     }
diff --git a/src/views/components/topology/topo-group/index.vue 
b/src/views/components/topology/topo-group/index.vue
index e4e3242..9b4c396 100644
--- a/src/views/components/topology/topo-group/index.vue
+++ b/src/views/components/topology/topo-group/index.vue
@@ -75,7 +75,13 @@ language governing permissions and * limitations under the 
License. */
     }
     private initGroupTopo() {
       let serviceOld = localStorage.getItem('topology-group-history') || '';
-      if (!this.rocketTopoGroup.groups.length) { return; }
+      if (!this.rocketTopoGroup.groups.length) {
+        this.handleSelectGroup(serviceOld);
+        this.GET_TOPO({
+          duration: this.durationTime,
+        });
+        return;
+      }
       if (
         !this.rocketTopoGroup.groups
         .some((i: {

Reply via email to