fix: 修复网络概况 =》 折线图表刷新后基准线重复,tab切换报错
This commit is contained in:
@@ -46,6 +46,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.link-traffic-select.line-select-metric {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
.line-select-metric,.line-select-reference-line {
|
.line-select-metric,.line-select-reference-line {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -126,7 +129,7 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
padding-left: 19px;
|
padding-left: 19px;
|
||||||
}
|
}
|
||||||
.total,.inbound,.outbound,.internal,.through,.other {
|
.total,.inbound,.outbound,.internal,.through,.other,.ingress,.egress {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@@ -137,10 +140,10 @@
|
|||||||
.total {
|
.total {
|
||||||
background: #00A7AB;
|
background: #00A7AB;
|
||||||
}
|
}
|
||||||
.inbound {
|
.inbound,.ingress {
|
||||||
background: #7FA054;
|
background: #7FA054;
|
||||||
}
|
}
|
||||||
.outbound {
|
.outbound,.egress {
|
||||||
background: #35ADDA;
|
background: #35ADDA;
|
||||||
}
|
}
|
||||||
.internal {
|
.internal {
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ export const typeMapping = {
|
|||||||
linkMonitor: {
|
linkMonitor: {
|
||||||
linkBlock: 707,
|
linkBlock: 707,
|
||||||
linkTrafficSankey: 708,
|
linkTrafficSankey: 708,
|
||||||
linkTrafficLine: 710
|
linkTrafficLine: 105
|
||||||
},
|
},
|
||||||
dnsInsight: {
|
dnsInsight: {
|
||||||
dnsTrafficLine: 704,
|
dnsTrafficLine: 106,
|
||||||
dnsEventChart: 711,
|
dnsEventChart: 711,
|
||||||
dnsRecentEvents: 605,
|
dnsRecentEvents: 605,
|
||||||
dnsActiveMaliciousDomain: 604
|
dnsActiveMaliciousDomain: 604
|
||||||
|
|||||||
@@ -172,7 +172,11 @@ export default {
|
|||||||
timeFilter: {
|
timeFilter: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler (n) {
|
handler (n) {
|
||||||
|
if (this.lineTab) {
|
||||||
this.init(this.lineMetric, this.showMarkLine, 'active')
|
this.init(this.lineMetric, this.showMarkLine, 'active')
|
||||||
|
} else {
|
||||||
|
this.init()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -466,34 +470,46 @@ export default {
|
|||||||
const dataIntegrationArray = []
|
const dataIntegrationArray = []
|
||||||
if (stackedLineChartOption.series[0]) {
|
if (stackedLineChartOption.series[0]) {
|
||||||
const totalData = stackedLineChartOption.series[0].data.find(t => t[0] === time) // [time, value]
|
const totalData = stackedLineChartOption.series[0].data.find(t => t[0] === time) // [time, value]
|
||||||
|
if (totalData) {
|
||||||
dataIntegrationArray.push(totalData)
|
dataIntegrationArray.push(totalData)
|
||||||
totalData[2] = 0
|
totalData[2] = 0
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (stackedLineChartOption.series[1]) {
|
if (stackedLineChartOption.series[1]) {
|
||||||
const inboundData = stackedLineChartOption.series[1].data.find(t => t[0] === time)
|
const inboundData = stackedLineChartOption.series[1].data.find(t => t[0] === time)
|
||||||
|
if (inboundData) {
|
||||||
dataIntegrationArray.push(inboundData)
|
dataIntegrationArray.push(inboundData)
|
||||||
inboundData[2] = 1
|
inboundData[2] = 1
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (stackedLineChartOption.series[2]) {
|
if (stackedLineChartOption.series[2]) {
|
||||||
const outboundData = stackedLineChartOption.series[2].data.find(t => t[0] === time)
|
const outboundData = stackedLineChartOption.series[2].data.find(t => t[0] === time)
|
||||||
|
if (outboundData) {
|
||||||
dataIntegrationArray.push(outboundData)
|
dataIntegrationArray.push(outboundData)
|
||||||
outboundData[2] = 2
|
outboundData[2] = 2
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (stackedLineChartOption.series[3]) {
|
if (stackedLineChartOption.series[3]) {
|
||||||
const internalData = stackedLineChartOption.series[3].data.find(t => t[0] === time)
|
const internalData = stackedLineChartOption.series[3].data.find(t => t[0] === time)
|
||||||
|
if (internalData) {
|
||||||
dataIntegrationArray.push(internalData)
|
dataIntegrationArray.push(internalData)
|
||||||
internalData[2] = 3
|
internalData[2] = 3
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (stackedLineChartOption.series[4]) {
|
if (stackedLineChartOption.series[4]) {
|
||||||
const throughData = stackedLineChartOption.series[4].data.find(t => t[0] === time)
|
const throughData = stackedLineChartOption.series[4].data.find(t => t[0] === time)
|
||||||
|
if (throughData) {
|
||||||
dataIntegrationArray.push(throughData)
|
dataIntegrationArray.push(throughData)
|
||||||
throughData[2] = 4
|
throughData[2] = 4
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (stackedLineChartOption.series[5]) {
|
if (stackedLineChartOption.series[5]) {
|
||||||
const otherData = stackedLineChartOption.series[5].data.find(t => t[0] === time)
|
const otherData = stackedLineChartOption.series[5].data.find(t => t[0] === time)
|
||||||
|
if (otherData) {
|
||||||
dataIntegrationArray.push(otherData)
|
dataIntegrationArray.push(otherData)
|
||||||
otherData[2] = 5
|
otherData[2] = 5
|
||||||
}
|
}
|
||||||
|
}
|
||||||
dataIntegrationArray.sort((a, b) => { return a[1] - b[1] })
|
dataIntegrationArray.sort((a, b) => { return a[1] - b[1] })
|
||||||
const sortIndex = dataIntegrationArray.findIndex(a => a[2] === index)
|
const sortIndex = dataIntegrationArray.findIndex(a => a[2] === index)
|
||||||
return this.sizes[sortIndex]
|
return this.sizes[sortIndex]
|
||||||
|
|||||||
Reference in New Issue
Block a user