diff --git a/src/views/detections/overview/DetectionPerformanceEventAppOverview.vue b/src/views/detections/overview/DetectionPerformanceEventAppOverview.vue
index d96596e1..260746e1 100644
--- a/src/views/detections/overview/DetectionPerformanceEventAppOverview.vue
+++ b/src/views/detections/overview/DetectionPerformanceEventAppOverview.vue
@@ -79,7 +79,7 @@ export default {
return {
eventSeverityColor,
basicInfo: {},
- metricList:[[1435781430781, "1"], [1435781431781, "5"],[1435781432781, "5"], [1435781433781, "3"],[1435781434781, "4"], [1435781435781, "5"]],
+ metricList:[],
}
},
computed: {
@@ -112,14 +112,18 @@ export default {
})
this.queryMetric().then(responses => {
responses && (this.metricList = responses.values)
- this.initChart()
+ if(this.metricList.length>0){
+ this.initChart()
+ }else {
+ let chartDom = document.getElementById('detectionMetricChartDomain')
+ chartDom.innerHTML = '-'
+ }
}).catch(error => {
console.log(error)
}).finally(() => {
setTimeout(() => {
try {
this.$nextTick(() => {
- console.log(this.metricChart)
this.metricChart && this.metricChart.resize()
})
} catch (e) {}
@@ -147,7 +151,6 @@ export default {
}
this.chartOptionMetric && this.metricChart.setOption(this.chartOptionMetric)
- console.log(this.chartOptionMetric)
},
queryMetric() {
diff --git a/src/views/detections/overview/DetectionPerformanceEventDomainOverview.vue b/src/views/detections/overview/DetectionPerformanceEventDomainOverview.vue
index 008f2b04..08c28c47 100644
--- a/src/views/detections/overview/DetectionPerformanceEventDomainOverview.vue
+++ b/src/views/detections/overview/DetectionPerformanceEventDomainOverview.vue
@@ -108,7 +108,7 @@
return {
eventSeverityColor,
basicInfo: {},
- metricList:[[1435781430781, "1"], [1435781431781, "5"],[1435781432781, "5"], [1435781433781, "3"],[1435781434781, "4"], [1435781435781, "5"]],
+ metricList:[],
metricChart: null,
searchStartTime:null,
searchEndTime:null
@@ -171,14 +171,18 @@
this.queryMetric().then(responses => {
responses && (this.metricList = responses.values)
- this.initChart()
+ if(this.metricList.length>0){
+ this.initChart()
+ }else {
+ let chartDom = document.getElementById('detectionMetricChartDomain')
+ chartDom.innerHTML = '-'
+ }
}).catch(error => {
console.log(error)
}).finally(() => {
setTimeout(() => {
try {
this.$nextTick(() => {
- console.log(this.metricChart)
this.metricChart && this.metricChart.resize()
})
} catch (e) {}
@@ -206,7 +210,6 @@
}
this.chartOptionMetric && this.metricChart.setOption(this.chartOptionMetric)
- console.log(this.chartOptionMetric)
},
queryMetric() {
diff --git a/src/views/detections/overview/DetectionPerformanceEventIpOverview.vue b/src/views/detections/overview/DetectionPerformanceEventIpOverview.vue
index c84e80f1..02ca3efa 100644
--- a/src/views/detections/overview/DetectionPerformanceEventIpOverview.vue
+++ b/src/views/detections/overview/DetectionPerformanceEventIpOverview.vue
@@ -98,7 +98,7 @@ export default {
data () {
return {
basicInfo: {},
- metricList:[[1435781430781, "1"], [1435781431781, "5"],[1435781432781, "5"], [1435781433781, "3"],[1435781434781, "4"], [1435781435781, "5"]],
+ metricList:[],
metricChart: null,
searchStartTime:null,
searchEndTime:null
@@ -134,14 +134,18 @@ export default {
})
this.queryMetric().then(responses => {
responses && (this.metricList = responses.values)
- this.initChart()
+ if(this.metricList.length>0){
+ this.initChart()
+ }else {
+ let chartDom = document.getElementById('detectionMetricChartDomain')
+ chartDom.innerHTML = '-'
+ }
}).catch(error => {
console.log(error)
}).finally(() => {
setTimeout(() => {
try {
this.$nextTick(() => {
- console.log(this.metricChart)
this.metricChart && this.metricChart.resize()
})
} catch (e) {}
@@ -170,7 +174,6 @@ export default {
}
this.chartOptionMetric && this.metricChart.setOption(this.chartOptionMetric)
- console.log(this.chartOptionMetric)
},
queryMetric() {