Merge remote-tracking branch 'origin/dev-3.1' into dev-3.1.1_theme
# Conflicts: # nezha-fronted/src/components/cli/webSSH.vue # nezha-fronted/src/components/common/alert/alertLabel2.vue # nezha-fronted/src/components/common/detailView/list/asset/assetDetail.vue # nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue # nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue # nezha-fronted/src/components/common/rightBox/moduleBox.vue # nezha-fronted/src/components/page/config/system.vue # nezha-fronted/src/components/page/monitor/project/index.vue
This commit is contained in:
@@ -17,7 +17,7 @@ export const agent = {
|
||||
label: 'Per-datacenter',
|
||||
value: 2,
|
||||
text: 'Per-datacenter'
|
||||
},
|
||||
}
|
||||
// {
|
||||
// label: 'Loki',
|
||||
// value: 11,
|
||||
|
||||
@@ -86,6 +86,21 @@ export function noSpecialChar (rule, value, callback) {
|
||||
}, 100)
|
||||
}
|
||||
|
||||
export function latlng (rule, value, callback) {
|
||||
const lngReg = /^[\-\+]?(0?\d{1,2}\.\d{1,7}|1[0-7]?\d{1}\.\d{1,7}|180\.0{1,7})$/
|
||||
const latReg = /^[\-\+]?([1-8]?\d{1}\.\d{1,7}|90\.0{1,7})$/
|
||||
setTimeout(() => {
|
||||
const lnglat = value.split(',')
|
||||
if (!lnglat || lnglat.length !== 2) {
|
||||
callback(new Error(vm.$t('tip.lnglatError')))
|
||||
} else if (!lngReg.test(lnglat[0]) || !latReg.test(lnglat[1])) {
|
||||
callback(new Error(vm.$t('tip.lnglatError')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}, 100)
|
||||
}
|
||||
|
||||
export function integer (rule, value, callback) {
|
||||
setTimeout(() => {
|
||||
if (isNaN(Number(value))) {
|
||||
|
||||
Reference in New Issue
Block a user