fix: 1.npm地图分数补充占位复2.npm下钻3级菜单接口请求错误修复
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="panel__header">
|
||||
<div class="panel__title">{{panelName?panelName:(panel.i18n ? $t(panel.i18n) : panel.name)}}
|
||||
<div v-if="showScore" class="score">
|
||||
<div class="circle-icon" v-if="score <= 2" :class="{'data-score-red': score <= 2}" ></div>
|
||||
<div class="circle-icon" v-if="score <= 2 || score === '-'" :class="{'data-score-red': score <= 2 || score === '-'}" ></div>
|
||||
<div class="circle-icon" v-else-if="score <= 4" :class="{'data-score-yellow': score <= 4}" ></div>
|
||||
<div class="circle-icon" v-else-if="score <= 6" :class="{'data-score-green': score <= 6}" ></div>
|
||||
Score:{{score}}
|
||||
@@ -184,7 +184,7 @@ export default {
|
||||
return chart
|
||||
})
|
||||
})
|
||||
if (this.$route.path === '/panel/networkAppPerformance' && this.queryCondition) {
|
||||
if (this.$route.path === '/panel/networkAppPerformance' && (this.queryCondition || this.networkOverviewBeforeTab)) {
|
||||
this.scoreCalculation()
|
||||
}
|
||||
},
|
||||
@@ -255,7 +255,7 @@ export default {
|
||||
|
||||
const queryCondition = ref(query.queryCondition || '')
|
||||
const dimensionType = ref(query.dimensionType || '')
|
||||
|
||||
const networkOverviewBeforeTab = ref(query.networkOverviewBeforeTab || '')
|
||||
return {
|
||||
panelType,
|
||||
panel,
|
||||
@@ -264,7 +264,8 @@ export default {
|
||||
metric,
|
||||
path,
|
||||
queryCondition,
|
||||
dimensionType
|
||||
dimensionType,
|
||||
networkOverviewBeforeTab
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -342,7 +343,7 @@ export default {
|
||||
} else {
|
||||
condition = this.queryCondition
|
||||
}
|
||||
const type = this.dimensionType
|
||||
const type = this.dimensionType || this.networkOverviewBeforeTab
|
||||
const params = {
|
||||
startTime: getSecond(this.timeFilter.startTime),
|
||||
endTime: getSecond(this.timeFilter.endTime),
|
||||
@@ -354,9 +355,9 @@ export default {
|
||||
} 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'`
|
||||
params.q = `client_city='${condition.split(/'(.*?)'/)[1]}'`
|
||||
} else if (type === 'serverCity') {
|
||||
params.q = `server_city='${condition.split(/'(.*?)'/)[1]}' and side='server'`
|
||||
params.q = `server_city='${condition.split(/'(.*?)'/)[1]}'`
|
||||
} else {
|
||||
params.q = condition
|
||||
}
|
||||
@@ -376,7 +377,8 @@ export default {
|
||||
params.type = type
|
||||
}
|
||||
}
|
||||
if (type && condition) {
|
||||
if ((type && condition) || type) {
|
||||
params.type = params.type || type
|
||||
get(api.npm.overview.networkAnalysis, params).then(res => {
|
||||
if (res.code === 200) {
|
||||
const data = {
|
||||
|
||||
@@ -162,7 +162,7 @@ export default {
|
||||
},
|
||||
loadMarkerData (imageSeries, data) {
|
||||
imageSeries.data = data.map(r => ({
|
||||
score: r.score,
|
||||
score: r.score || '–',
|
||||
name: r.province || r.country,
|
||||
throughput: valueToRangeValue(r.throughBitsRate, unitTypes.bps).join(' '),
|
||||
id: r.serverId,
|
||||
|
||||
@@ -26,10 +26,12 @@ export default {
|
||||
const queryCondition = ref(query.queryCondition || '')
|
||||
const dimensionType = ref(query.dimensionType || '')
|
||||
const tabIndex = ref(query.tabIndex)
|
||||
const networkOverviewBeforeTab = ref(query.networkOverviewBeforeTab || '')
|
||||
return {
|
||||
queryCondition,
|
||||
dimensionType,
|
||||
tabIndex
|
||||
tabIndex,
|
||||
networkOverviewBeforeTab
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -65,7 +67,7 @@ export default {
|
||||
} else {
|
||||
condition = this.queryCondition
|
||||
}
|
||||
const type = this.dimensionType
|
||||
const type = this.dimensionType || this.networkOverviewBeforeTab
|
||||
const params = {
|
||||
startTime: getSecond(this.timeFilter.startTime),
|
||||
endTime: getSecond(this.timeFilter.endTime),
|
||||
@@ -82,9 +84,9 @@ export default {
|
||||
} 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'`
|
||||
params.q = `client_city='${condition.split(/'(.*?)'/)[1]}'`
|
||||
} else if (type === 'serverCity') {
|
||||
params.q = `server_city='${condition.split(/'(.*?)'/)[1]}' and side='server'`
|
||||
params.q = `server_city='${condition.split(/'(.*?)'/)[1]}'`
|
||||
} else {
|
||||
params.q = condition
|
||||
}
|
||||
@@ -104,7 +106,8 @@ export default {
|
||||
params.type = type
|
||||
}
|
||||
}
|
||||
if (type && condition) {
|
||||
if ((type && condition) || type) {
|
||||
params.type = params.type || type
|
||||
this.toggleLoading(true)
|
||||
get(api.npm.overview.networkAnalysis, params).then(res => {
|
||||
if (res.code === 200) {
|
||||
@@ -141,7 +144,7 @@ export default {
|
||||
} else {
|
||||
condition = this.queryCondition
|
||||
}
|
||||
const type = this.dimensionType
|
||||
const type = this.dimensionType || this.networkOverviewBeforeTab
|
||||
const params = {
|
||||
startTime: getSecond(this.timeFilter.startTime),
|
||||
endTime: getSecond(this.timeFilter.endTime),
|
||||
@@ -158,9 +161,9 @@ export default {
|
||||
} 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'`
|
||||
params.q = `client_city='${condition.split(/'(.*?)'/)[1]}'`
|
||||
} else if (type === 'serverCity') {
|
||||
params.q = `server_city='${condition.split(/'(.*?)'/)[1]}' and side='server'`
|
||||
params.q = `server_city='${condition.split(/'(.*?)'/)[1]}'`
|
||||
} else {
|
||||
params.q = condition
|
||||
}
|
||||
@@ -180,7 +183,8 @@ export default {
|
||||
params.type = type
|
||||
}
|
||||
}
|
||||
if (type && condition) {
|
||||
if ((type && condition) || type) {
|
||||
params.type = params.type || type
|
||||
this.toggleLoading(true)
|
||||
get(api.npm.overview.networkAnalysis, params).then(res => {
|
||||
if (res.code === 200) {
|
||||
@@ -196,6 +200,23 @@ export default {
|
||||
}).finally(() => {
|
||||
this.toggleLoading(false)
|
||||
})
|
||||
} else if (!type && !condition && this.networkOverviewBeforeTab) {
|
||||
this.toggleLoading(true)
|
||||
params.type = this.networkOverviewBeforeTab
|
||||
get(api.npm.overview.networkAnalysis, params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.npmNetworkLastCycleData = res.data.result
|
||||
let timer = null
|
||||
if (timer) {
|
||||
clearTimeout(timer)
|
||||
}
|
||||
timer = setTimeout(() => {
|
||||
this.npmNetworkQuantity(this.npmNetworkCycleData, this.npmNetworkLastCycleData, 0)
|
||||
}, 300)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.toggleLoading(false)
|
||||
})
|
||||
} else {
|
||||
const tcp = get(api.npm.overview.tcpSessionDelay, params)
|
||||
const http = get(api.npm.overview.httpResponseDelay, params)
|
||||
|
||||
@@ -162,9 +162,9 @@ export default {
|
||||
} 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'`
|
||||
params.q = `client_city='${condition.split(/'(.*?)'/)[1]}'`
|
||||
} else if (type === 'serverCity') {
|
||||
params.q = `server_city='${condition.split(/'(.*?)'/)[1]}' and side='server'`
|
||||
params.q = `server_city='${condition.split(/'(.*?)'/)[1]}'`
|
||||
} else {
|
||||
params.q = condition
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user