diff --git a/src/mock/detection.js b/src/mock/detection.js index 8d9caf94..0d2c1bed 100644 --- a/src/mock/detection.js +++ b/src/mock/detection.js @@ -316,8 +316,8 @@ if (openMock) { severity: 'high', keyFields: 'domain', keyValues: 'test.com', - thresholdNum: 3, - recordsNum: 5, + thresholdValue: 3, + metricValue: 5, reset: 60, startTime: 169780543432, endTime: 169790486213 diff --git a/src/views/detections/overview/detectionDetailMixin.js b/src/views/detections/overview/detectionDetailMixin.js index c61535d1..bba848dc 100644 --- a/src/views/detections/overview/detectionDetailMixin.js +++ b/src/views/detections/overview/detectionDetailMixin.js @@ -229,8 +229,8 @@ export default { const seriesData = [] const markLineData = [] data.forEach(item => { - seriesData.push([getMillisecond(JSON.parse(item.startTime)), item.recordsNum, getSeverityNumberColor(item.severity)]) - const obj = markLineData.find(d => d.yAxis === item.thresholdNum) + seriesData.push([getMillisecond(JSON.parse(item.startTime)), item.metricValue, getSeverityNumberColor(item.severity)]) + const obj = markLineData.find(d => d.yAxis === item.thresholdValue) if (!obj) { markLineData.push({ yAxis: item.thresholdNum, @@ -255,7 +255,7 @@ export default { }) // 计算折线图左侧宽度 - const maxValue = Math.max(...data.map(obj => obj.recordsNum)) + const maxValue = Math.max(...data.map(obj => obj.metricValue)) if (maxValue >= 1000) { let yAxisLabel = '' // y轴显示的值 if ((maxValue / (1000)) >= 1) {