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:11:57 UTC
[incubator-apisix-dashboard] branch master updated: added URL
support for upstream (#80)
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 122ac50 added URL support for upstream (#80)
122ac50 is described below
commit 122ac50bb1fd83396580e1540ce2c9cc6df4732e
Author: 琚致远 <ju...@apache.org>
AuthorDate: Tue Nov 26 23:11:52 2019 +0800
added URL support for upstream (#80)
* added URL support for upstream
* 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..eba61ab 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 = /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})$|^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]))$/
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"