From 8416060fc485fd2460c8f3a0b22d92c96304a320 Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Wed, 16 Nov 2022 11:55:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20npm=E4=B8=8B?= =?UTF-8?q?=E9=92=BBtab=E4=B8=BA=20Client=20Cities=E5=92=8CServer=20Cities?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/charts2/Panel.vue | 4 ++++ src/views/charts2/charts/npm/NpmNetworkQuantity.vue | 9 +++++++++ src/views/charts2/charts/npm/NpmTrafficLine.vue | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/src/views/charts2/Panel.vue b/src/views/charts2/Panel.vue index 725363da..42caf4b8 100644 --- a/src/views/charts2/Panel.vue +++ b/src/views/charts2/Panel.vue @@ -353,6 +353,10 @@ export default { params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'` } else if (type === 'serverIp') { params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'` + } else if (type === 'clientCity') { + params.q = `client_city='${condition.split(/'(.*?)'/)[1]}' and side='client'` + } else if (type === 'serverCity') { + params.q = `server_city='${condition.split(/'(.*?)'/)[1]}' and side='server'` } else { params.q = condition } diff --git a/src/views/charts2/charts/npm/NpmNetworkQuantity.vue b/src/views/charts2/charts/npm/NpmNetworkQuantity.vue index f6d28086..1bf7303f 100644 --- a/src/views/charts2/charts/npm/NpmNetworkQuantity.vue +++ b/src/views/charts2/charts/npm/NpmNetworkQuantity.vue @@ -81,6 +81,10 @@ export default { params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'` } else if (type === 'serverIp') { params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'` + } else if (type === 'clientCity') { + params.q = `client_city='${condition.split(/'(.*?)'/)[1]}' and side='client'` + } else if (type === 'serverCity') { + params.q = `server_city='${condition.split(/'(.*?)'/)[1]}' and side='server'` } else { params.q = condition } @@ -103,6 +107,7 @@ export default { if (type && condition) { this.toggleLoading(true) get(api.npm.overview.networkAnalysis, params).then(res => { + console.log(res) if (res.code === 200) { this.npmNetworkCycleData = res.data.result } @@ -153,6 +158,10 @@ export default { params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'` } else if (type === 'serverIp') { params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'` + } else if (type === 'clientCity') { + params.q = `client_city='${condition.split(/'(.*?)'/)[1]}' and side='client'` + } else if (type === 'serverCity') { + params.q = `server_city='${condition.split(/'(.*?)'/)[1]}' and side='server'` } else { params.q = condition } diff --git a/src/views/charts2/charts/npm/NpmTrafficLine.vue b/src/views/charts2/charts/npm/NpmTrafficLine.vue index 09be9929..f01cc879 100644 --- a/src/views/charts2/charts/npm/NpmTrafficLine.vue +++ b/src/views/charts2/charts/npm/NpmTrafficLine.vue @@ -161,6 +161,10 @@ export default { params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'` } else if (type === 'serverIp') { params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'` + } else if (type === 'clientCity') { + params.q = `client_city='${condition.split(/'(.*?)'/)[1]}' and side='client'` + } else if (type === 'serverCity') { + params.q = `server_city='${condition.split(/'(.*?)'/)[1]}' and side='server'` } else { params.q = condition }