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 2019/11/09 16:51:59 UTC

[incubator-apisix-dashboard] branch master updated: fix configuration not show when route uri and host from old format (#77)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7e6c6e0  fix configuration not show when route uri and host from old format (#77)
7e6c6e0 is described below

commit 7e6c6e05e0971bc6b4933fddfea1d805514fe7d7
Author: Lien <li...@users.noreply.github.com>
AuthorDate: Sun Nov 10 00:51:49 2019 +0800

    fix configuration not show when route uri and host from old format (#77)
---
 src/views/schema/routes/edit.vue | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/views/schema/routes/edit.vue b/src/views/schema/routes/edit.vue
index 1f82989..ae0e8bc 100644
--- a/src/views/schema/routes/edit.vue
+++ b/src/views/schema/routes/edit.vue
@@ -326,11 +326,13 @@ export default class extends Vue {
 
   private async getData() {
     const { id } = this.$route.params
-    const {
+    let {
       node: {
         value: {
+          uri = '',
           uris = [],
           hosts = [],
+          host = '',
           remote_addr = '',
           upstream_id = '',
           service_id = '',
@@ -341,6 +343,14 @@ export default class extends Vue {
       }
     } = await getRouter(id) as any
 
+    if (hosts.length === 0 && host.length > 0) {
+      hosts.push(host)
+    }
+
+    if (uris.length === 0 && uri.length > 0) {
+      uris.push(uri)
+    }
+
     this.form = {
       uris,
       hosts,