fix: 修复Detection模块下的echarts报警问题
This commit is contained in:
@@ -38,10 +38,8 @@ export const entityListLineOption = {
|
||||
type: 'line',
|
||||
legendHoverLink: false,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
lineStyle: {
|
||||
width: 2
|
||||
}
|
||||
lineStyle: {
|
||||
width: 2
|
||||
}
|
||||
},
|
||||
data: [],
|
||||
|
||||
@@ -108,10 +108,8 @@ export default {
|
||||
type: 'line',
|
||||
legendHoverLink: false,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
color: '#69b072',
|
||||
@@ -130,10 +128,8 @@ export default {
|
||||
type: 'line',
|
||||
legendHoverLink: false,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
color: '#7899c6',
|
||||
|
||||
@@ -219,11 +219,9 @@ export const singleValueLine = {
|
||||
type: 'line',
|
||||
legendHoverLink: false,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#81C9FF',
|
||||
lineStyle: {
|
||||
width: 2
|
||||
}
|
||||
color: '#81C9FF',
|
||||
lineStyle: {
|
||||
width: 2
|
||||
}
|
||||
},
|
||||
data: [],
|
||||
@@ -272,10 +270,8 @@ export const entityListLine = {
|
||||
type: 'line',
|
||||
legendHoverLink: false,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
lineStyle: {
|
||||
width: 2
|
||||
}
|
||||
lineStyle: {
|
||||
width: 2
|
||||
}
|
||||
},
|
||||
data: [],
|
||||
|
||||
@@ -326,7 +326,11 @@ export default {
|
||||
|
||||
// eventSeverityTrendOption.xAxis.data = dataMap.get('info').map(v => rTime(v[0]))
|
||||
eventSeverityTrendOption.xAxis.data = xData
|
||||
const detectionChart = echarts.init(chartDom)
|
||||
let detectionChart = echarts.getInstanceByDom(chartDom)
|
||||
if (detectionChart) {
|
||||
echarts.dispose(detectionChart)
|
||||
}
|
||||
detectionChart = echarts.init(chartDom)
|
||||
this.chartInit.push(shallowRef(detectionChart))
|
||||
detectionChart.setOption(eventSeverityTrendOption)
|
||||
// this.isEventSeverityNoData = false
|
||||
@@ -353,7 +357,11 @@ export default {
|
||||
return { value: d.count, name: d.eventSeverity, itemStyle: { color: getSeverityColor(d.eventSeverity) } }
|
||||
})
|
||||
const chartDom = document.getElementById(`eventSeverityPie${this.pageType}`)
|
||||
const detectionChart = echarts.init(chartDom)
|
||||
let detectionChart = echarts.getInstanceByDom(chartDom)
|
||||
if (detectionChart) {
|
||||
echarts.dispose(detectionChart)
|
||||
}
|
||||
detectionChart = echarts.init(chartDom)
|
||||
this.chartInit.push(shallowRef(detectionChart))
|
||||
detectionChart.setOption(eventSeverityOption)
|
||||
const vm = this
|
||||
@@ -380,7 +388,11 @@ export default {
|
||||
count: r.count
|
||||
}))
|
||||
const chartDom = document.getElementById(`detectionCategoryPer${this.pageType}`)
|
||||
const detectionChart = echarts.init(chartDom)
|
||||
let detectionChart = echarts.getInstanceByDom(chartDom)
|
||||
if (detectionChart) {
|
||||
echarts.dispose(detectionChart)
|
||||
}
|
||||
detectionChart = echarts.init(chartDom)
|
||||
this.chartInit.push(shallowRef(detectionChart))
|
||||
const securityTypeOption = this.$_.cloneDeep(pieForSeverity)
|
||||
securityTypeOption.series[0].data = data.map(d => {
|
||||
@@ -408,7 +420,11 @@ export default {
|
||||
count: r.count
|
||||
}))
|
||||
const chartDom = document.getElementById(`detectionCategoryPer${this.pageType}`)
|
||||
const detectionChart = echarts.init(chartDom)
|
||||
let detectionChart = echarts.getInstanceByDom(chartDom)
|
||||
if (detectionChart) {
|
||||
echarts.dispose(detectionChart)
|
||||
}
|
||||
detectionChart = echarts.init(chartDom)
|
||||
this.chartInit.push(shallowRef(detectionChart))
|
||||
const securityTypeOption = this.$_.cloneDeep(pieForSeverity)
|
||||
securityTypeOption.series[0].data = data.map(d => {
|
||||
@@ -440,7 +456,11 @@ export default {
|
||||
this.filterData[this.pageType][4].showIndex = showIndex
|
||||
|
||||
const chartDom = document.getElementById(`detectionActiveAttacker${this.pageType}`)
|
||||
const detectionChart = echarts.init(chartDom)
|
||||
let detectionChart = echarts.getInstanceByDom(chartDom)
|
||||
if (detectionChart) {
|
||||
echarts.dispose(detectionChart)
|
||||
}
|
||||
detectionChart = echarts.init(chartDom)
|
||||
this.chartInit.push(shallowRef(detectionChart))
|
||||
const offenderIpOption = this.$_.cloneDeep(activeAttackBar)
|
||||
data.sort(reverseSortBy('count'))
|
||||
@@ -496,7 +516,11 @@ export default {
|
||||
this.statisticsActiveAttackData = data
|
||||
if (!this.$_.isEmpty(data)) {
|
||||
const chartDom = document.getElementById(`detectionActiveAttacker${this.pageType}`)
|
||||
const detectionChart = echarts.init(chartDom)
|
||||
let detectionChart = echarts.getInstanceByDom(chartDom)
|
||||
if (detectionChart) {
|
||||
echarts.dispose(detectionChart)
|
||||
}
|
||||
detectionChart = echarts.init(chartDom)
|
||||
this.chartInit.push(shallowRef(detectionChart))
|
||||
const option = this.$_.cloneDeep(activeAttackBar)
|
||||
data.sort(reverseSortBy('count'))
|
||||
|
||||
@@ -207,8 +207,8 @@ export const pieForSeverity = {
|
||||
return `${param.name}: ${param.value}`
|
||||
}
|
||||
},
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
@@ -267,11 +267,9 @@ export const activeAttackBar = {
|
||||
barWidth: 5,
|
||||
barMaxHeight: 20,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: function (params) {
|
||||
const colorList = ['#d1bd50', '#c9d150', '#fddd52', '#ffb65a', '#fe845d']
|
||||
return colorList[params.dataIndex]
|
||||
}
|
||||
color: function (params) {
|
||||
const colorList = ['#d1bd50', '#c9d150', '#fddd52', '#ffb65a', '#fe845d']
|
||||
return colorList[params.dataIndex]
|
||||
}
|
||||
},
|
||||
data: [],
|
||||
|
||||
@@ -136,10 +136,8 @@ export default {
|
||||
type: 'line',
|
||||
legendHoverLink: false,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
color: '#69b072',
|
||||
@@ -158,10 +156,8 @@ export default {
|
||||
type: 'line',
|
||||
legendHoverLink: false,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
color: '#7899c6',
|
||||
@@ -469,10 +465,8 @@ export default {
|
||||
type: 'line',
|
||||
legendHoverLink: false,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
color: '#69b072',
|
||||
|
||||
@@ -223,10 +223,8 @@ export default {
|
||||
type: 'line',
|
||||
legendHoverLink: false,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
color: '#69b072',
|
||||
@@ -240,10 +238,8 @@ export default {
|
||||
type: 'line',
|
||||
legendHoverLink: false,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
color: '#7899c6',
|
||||
|
||||
Reference in New Issue
Block a user