CN-265 Traffic Summary APP分析统计图表、domain图表问题修复
This commit is contained in:
@@ -119,7 +119,7 @@ import entityDetailMixin from './entityDetailMixin'
|
||||
import { unitTypes } from '@/utils/constants'
|
||||
import unitConvert from '@/utils/unit-convert'
|
||||
import Chart from '@/views/charts/Chart'
|
||||
import _ from "lodash";
|
||||
import _ from 'lodash'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
|
||||
@@ -220,7 +220,7 @@ import entityDetailMixin from './entityDetailMixin'
|
||||
import { unitTypes } from '@/utils/constants'
|
||||
import unitConvert from '@/utils/unit-convert'
|
||||
import Chart from '@/views/charts/Chart'
|
||||
import _ from "lodash";
|
||||
import _ from 'lodash'
|
||||
export default {
|
||||
name: 'Domain',
|
||||
components: {
|
||||
|
||||
@@ -111,7 +111,7 @@ import { api } from '@/utils/api'
|
||||
import { unitTypes } from '@/utils/constants'
|
||||
import unitConvert from '@/utils/unit-convert'
|
||||
import Chart from '@/views/charts/Chart'
|
||||
import _ from "lodash";
|
||||
import _ from 'lodash'
|
||||
|
||||
export default {
|
||||
name: 'Ip',
|
||||
|
||||
@@ -81,24 +81,24 @@ export default {
|
||||
switch (this.entityData.entityType) {
|
||||
case ('ip'): {
|
||||
params = {
|
||||
startTime: this.timeFilter.startTime?parseInt(this.timeFilter.startTime / 1000): Math.floor(now / 1000 - 3600),
|
||||
endTime: this.timeFilter.endTime?parseInt(this.timeFilter.endTime / 1000):Math.floor(now / 1000),
|
||||
startTime: this.timeFilter.startTime ? parseInt(this.timeFilter.startTime / 1000) : Math.floor(now / 1000 - 3600),
|
||||
endTime: this.timeFilter.endTime ? parseInt(this.timeFilter.endTime / 1000) : Math.floor(now / 1000),
|
||||
ip: this.entityData.ipAddr
|
||||
}
|
||||
break
|
||||
}
|
||||
case ('domain'): {
|
||||
params = {
|
||||
startTime: this.timeFilter.startTime?parseInt(this.timeFilter.startTime / 1000): Math.floor(now / 1000 - 3600),
|
||||
endTime: this.timeFilter.endTime?parseInt(this.timeFilter.endTime / 1000):Math.floor(now / 1000),
|
||||
startTime: this.timeFilter.startTime ? parseInt(this.timeFilter.startTime / 1000) : Math.floor(now / 1000 - 3600),
|
||||
endTime: this.timeFilter.endTime ? parseInt(this.timeFilter.endTime / 1000) : Math.floor(now / 1000),
|
||||
domain: this.entityData.domainName
|
||||
}
|
||||
break
|
||||
}
|
||||
case ('app'): {
|
||||
params = {
|
||||
startTime: this.timeFilter.startTime?parseInt(this.timeFilter.startTime / 1000): Math.floor(now / 1000 - 3600),
|
||||
endTime: this.timeFilter.endTime?parseInt(this.timeFilter.endTime / 1000):Math.floor(now / 1000),
|
||||
startTime: this.timeFilter.startTime ? parseInt(this.timeFilter.startTime / 1000) : Math.floor(now / 1000 - 3600),
|
||||
endTime: this.timeFilter.endTime ? parseInt(this.timeFilter.endTime / 1000) : Math.floor(now / 1000),
|
||||
appName: this.entityData.appName
|
||||
}
|
||||
break
|
||||
@@ -177,7 +177,7 @@ export default {
|
||||
return {
|
||||
...seriesTemplate,
|
||||
name: this.$t('entities.sentThroughput'), // 'bytes_sent_rate',//legendMapping[`ip_${r.legend}`],
|
||||
data: r.values.map(v => [Number(v[0])* 1000, Number(v[1]), unitTypes.byte]),
|
||||
data: r.values.map(v => [Number(v[0]) * 1000, Number(v[1]), unitTypes.byte]),
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#69b072',
|
||||
@@ -205,7 +205,7 @@ export default {
|
||||
return {
|
||||
...seriesTemplate,
|
||||
name: this.$t('entities.receivedThroughput'), // legendMapping[`ip_${r.legend}`],
|
||||
data: r.values.map(v => [Number(v[0])* 1000, Number(v[1]), unitTypes.byte]),
|
||||
data: r.values.map(v => [Number(v[0]) * 1000, Number(v[1]), unitTypes.byte]),
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#7899c6',
|
||||
@@ -239,7 +239,7 @@ export default {
|
||||
}
|
||||
}).finally(() => {
|
||||
this.$nextTick(() => {
|
||||
if(chartOption){
|
||||
if (chartOption) {
|
||||
const myChart = echarts.init(document.getElementById(`entityListChart${this.entityName}`))
|
||||
myChart.setOption(chartOption)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user