You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/08/17 06:29:16 UTC

[apisix-dashboard] branch master-vue updated: fx(Upstream): show info

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

juzhiyuan pushed a commit to branch master-vue
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master-vue by this push:
     new 058c6a0  fx(Upstream): show info
058c6a0 is described below

commit 058c6a041ed0a340bc5d3ed0ee31ccf8c6475cf1
Author: juzhiyuan <ju...@apache.org>
AuthorDate: Mon Aug 17 14:28:50 2020 +0800

    fx(Upstream): show info
---
 src/views/schema/upstream/list.vue | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/views/schema/upstream/list.vue b/src/views/schema/upstream/list.vue
index 97d3749..c240b11 100644
--- a/src/views/schema/upstream/list.vue
+++ b/src/views/schema/upstream/list.vue
@@ -155,6 +155,9 @@ export default class extends Vue {
       }, {
         key: 'nodes',
         width: 'auto'
+      }, {
+        key: 'other',
+        width: 'auto'
       }
     ]
 
@@ -170,13 +173,18 @@ export default class extends Vue {
         realId: id,
         type,
         nodes: item.value.nodes,
+        other: JSON.stringify(item.value.k8s_deployment_info || {}),
         description: desc
       }
     })
 
     let tableData: any[] = []
     const arr = nodes.forEach((item: any) => {
-      Object.entries(item.nodes).forEach(([ipWithPort, weights]) => {
+      if (!item.nodes) {
+        tableData = tableData.concat(item)
+        return
+      }
+      Object.entries(item.nodes || {}).forEach(([ipWithPort, weights]) => {
         // 释放 nodes
         item.nodes = {}
         tableData = tableData.concat({
@@ -194,6 +202,7 @@ export default class extends Vue {
     this.rowspan(0, 'id')
     this.rowspan(1, 'description')
     this.rowspan(2, 'type')
+    this.rowspan(3, 'other')
 
     this.total = nodes.length