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/26 15:04:50 UTC

[incubator-apisix-dashboard] branch feature-upstream created (now 3646b73)

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

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


      at 3646b73  added URL support for upstream

This branch includes the following new commits:

     new 3646b73  added URL support for upstream

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-apisix-dashboard] 01/01: added URL support for upstream

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3646b734ed313f70580224c9b1a68d5acb23b584
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Tue Nov 26 23:04:31 2019 +0800

    added URL support for upstream
---
 src/views/schema/upstream/edit.vue | 5 +++--
 src/views/schema/upstream/list.vue | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/views/schema/upstream/edit.vue b/src/views/schema/upstream/edit.vue
index 769c576..ab3e16d 100644
--- a/src/views/schema/upstream/edit.vue
+++ b/src/views/schema/upstream/edit.vue
@@ -82,12 +82,12 @@
         class="node-item"
       >
         <el-form-item
-          :rules="[{required: true, pattern: /((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/g, type: 'string'}]"
+          :rules="[{required: true, pattern: IPAndURLRegexp, type: 'string'}]"
           :prop="'nodes.' + index + '.ip'"
         >
           <el-input
             v-model="item.ip"
-            placeholder="IP"
+            placeholder="IP/HOST"
           />
         </el-form-item>
         <el-form-item
@@ -151,6 +151,7 @@ import { TagsViewModule } from '@/store/modules/tags-view'
   name: 'RouterEdit'
 })
 export default class extends Vue {
+  private IPAndURLRegexp = /^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?|^((http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/g
   private form = {
     type: null,
     key: null,
diff --git a/src/views/schema/upstream/list.vue b/src/views/schema/upstream/list.vue
index 42cc329..cad2d5f 100644
--- a/src/views/schema/upstream/list.vue
+++ b/src/views/schema/upstream/list.vue
@@ -54,7 +54,7 @@
       >
         <template v-if="item.key === 'nodes'">
           <el-table-column
-            label="IP"
+            label="IP/HOST"
             width="150"
             prop="ip"
             class-name="status-col"