fix: npm下钻tab为client ip和server ip接口请求参数调整

This commit is contained in:
@changcode
2022-11-15 11:13:11 +08:00
parent 35fcbab852
commit aee521d5bc
3 changed files with 28 additions and 4 deletions

View File

@@ -349,7 +349,13 @@ export default {
cycle: 0 cycle: 0
} }
if (condition && (typeof condition !== 'object') && type) { if (condition && (typeof condition !== 'object') && type) {
params.q = condition if (type === 'clientIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'`
} else if (type === 'serverIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'`
} else {
params.q = condition
}
params.type = type params.type = type
} else if (condition.length > 1 && type && type === 'ip') { } else if (condition.length > 1 && type && type === 'ip') {
params.q = `${type}='${condition[1]}'` params.q = `${type}='${condition[1]}'`

View File

@@ -77,7 +77,13 @@ export default {
this.side = 'server' this.side = 'server'
} }
if (condition && (typeof condition !== 'object') && type) { if (condition && (typeof condition !== 'object') && type) {
params.q = condition if (type === 'clientIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'`
} else if (type === 'serverIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'`
} else {
params.q = condition
}
params.type = type params.type = type
} else if (condition.length > 1 && type && type === 'ip') { } else if (condition.length > 1 && type && type === 'ip') {
params.q = `${type}='${condition[1]}' and side='${this.side}'` params.q = `${type}='${condition[1]}' and side='${this.side}'`
@@ -143,7 +149,13 @@ export default {
this.side = 'server' this.side = 'server'
} }
if (condition && (typeof condition !== 'object') && type) { if (condition && (typeof condition !== 'object') && type) {
params.q = condition if (type === 'clientIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'`
} else if (type === 'serverIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'`
} else {
params.q = condition
}
params.type = type params.type = type
} else if (condition.length > 1 && type && type === 'ip') { } else if (condition.length > 1 && type && type === 'ip') {
params.q = `${type}='${condition[1]}' and side='${this.side}'` params.q = `${type}='${condition[1]}' and side='${this.side}'`

View File

@@ -157,7 +157,13 @@ export default {
params.type = type params.type = type
} }
if (condition && (typeof condition !== 'object') && type) { if (condition && (typeof condition !== 'object') && type) {
params.q = condition if (type === 'clientIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'`
} else if (type === 'serverIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'`
} else {
params.q = condition
}
} else if (condition.length > 1 && type && type === 'ip') { } else if (condition.length > 1 && type && type === 'ip') {
params.q = `${type}='${condition[1]}' and side='${this.side}'` params.q = `${type}='${condition[1]}' and side='${this.side}'`
} else if (condition.length > 1 && type && type !== 'ip') { } else if (condition.length > 1 && type && type !== 'ip') {