Worker group add IP format verification (#1131)

* Dependency workflow add dependency correction value

* Download workflow instance map width adjustment and change "desc" field to "description"

* The third-party library that builds the dependency is recommended to be placed in 'devDependencies'

* Tree chart and Gantt chart style modification

* The workflow instance can be deleted only when its status is success, failure, stop and pause.

* change desc to description

* Maximum width of tooltip is set to 500px, note the copyright number of login page

* Delete copyright number

* No tenant in the list of selected tenants the default is default, and the status not shown in the repair page

* repair

* Repair security center module prompt

* Remove blank character during verification

* Remove blank character during verification

* Non admin users cannot create users, tenants, alarm groups, queues and worker groups

* Remove CI windows detection

* The value of loadaverage should be two decimal places

* Add license

* delete docs

* update package.json

* delete LICENSE

* Display icon when there is no data in process definition

* Worker group add IP format verification
This commit is contained in:
break60 2019-10-31 10:19:32 +08:00 committed by qiaozhanwei
parent d1f3a9a928
commit 3d10a7a6ce
3 changed files with 19 additions and 3 deletions

View File

@ -33,7 +33,7 @@
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name">IP</template>
<template slot="name"><b>*</b>IP</template>
<template slot="content">
<x-input
:autosize="{ minRows: 4, maxRows: 6 }"
@ -76,6 +76,16 @@
this._submit()
}
},
checkIsIps(ips) {
let reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
let valdata = ips.split(',');
for(let i=0;i<valdata.length;i++){
if(reg.test(valdata[i])== false){
return false;
}
}
return true
},
_verification () {
// group name
if (!this.name) {
@ -86,6 +96,10 @@
this.$message.warning(`${i18n.$t('IP address cannot be empty')}`)
return false
}
if(!this.checkIsIps(this.ipList)) {
this.$message.warning(`${i18n.$t('Please enter the correct IP')}`)
return false
}
return true
},
_submit () {

View File

@ -495,5 +495,6 @@ export default {
'Please Enter Http Condition': 'Please Enter Http Condition',
'There is no data for this period of time': 'There is no data for this period of time',
'IP address cannot be empty': 'IP address cannot be empty',
'Please enter the correct IP': 'Please enter the correct IP',
'Please generate token': 'Please generate token'
}

View File

@ -432,8 +432,8 @@ export default {
'Token manage': '令牌管理',
'Create token': '创建令牌',
'Edit token': '编辑令牌',
'Please enter the IP address separated by commas': '请输入IP地址多个用逗号隔开',
'Note: Multiple IP addresses have been comma separated': '注意多个IP地址以逗号分割',
'Please enter the IP address separated by commas': '请输入IP地址多个用英文逗号隔开',
'Note: Multiple IP addresses have been comma separated': '注意多个IP地址以英文逗号分割',
'Failure time': '失效时间',
'User': '用户',
'Please enter token': '请输入令牌',
@ -500,5 +500,6 @@ export default {
'Please Enter Http Condition': '请填写校验内容',
'There is no data for this period of time': '该时间段无数据',
'IP address cannot be empty': 'IP地址不能为空',
'Please enter the correct IP': '请输入正确的IP',
'Please generate token': '请生成Token'
}