fix: detection个别接口字段变更

This commit is contained in:
chenjinsong
2024-10-10 10:52:31 +08:00
parent 68b430f589
commit f8ffc31cd5
2 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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) {