fix: 修正dns下钻后折线图的url

This commit is contained in:
chenjinsong
2022-10-18 19:14:08 +08:00
parent c1dd39fb66
commit add13f463d
3 changed files with 8 additions and 3 deletions

View File

@@ -220,7 +220,8 @@ export const api = {
recentEvents: '/interface/dnsInsight/recentEvents',
activeMaliciousDomain: '/interface/dnsInsight/activeMaliciousDomain',
totalTrafficAnalysis: '/interface/dns/overview/totalTrafficAnalysis',
eventChart: '/interface/dnsInsight/eventChart'
eventChart: '/interface/dnsInsight/eventChart',
drilldownTrafficAnalysis: '/interface/dns/overview/drilldown/trafficAnalysis'
}
}

View File

@@ -1,5 +1,5 @@
<template>
<div v-if="activeTab !== 709 && activeTab !== 710" class="panel-chart__no-data">No data</div>
<div v-if="activeTab !== 709 && activeTab !== 710" class="panel-chart__no-data">{{ $t('npm.noData') }}</div>
<div v-else class="panel-chart__no-data all-clear">
<div class="no-recent-alerts">
<i class="el-icon-circle-check"></i>

View File

@@ -189,7 +189,11 @@ export default {
params.q = this.queryCondition
}
this.toggleLoading(true)
get(api.dnsInsight.totalTrafficAnalysis, params).then((res) => {
let url = api.dnsInsight.totalTrafficAnalysis
if (this.queryCondition) {
url = api.dnsInsight.drilldownTrafficAnalysis
}
get(url, params).then((res) => {
if (res.code === 200) {
this.isNoData = res.data.result.length === 0
res.data.result.forEach((t, i) => {