fix: wrong display of heatmap's data in alerting message (#157)

* fix: wrong display of heatmap's data in alerting message

* chore: update release notes

---------

Co-authored-by: yaojiping <yaojiping@infini.ltd>
This commit is contained in:
yaojp123 2025-02-21 11:20:37 +08:00 committed by GitHub
parent df33fa006b
commit 1e2f8c2520
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,7 @@ Information about release notes of INFINI Console is provided here.
- Fixed the error when querying empty metric data (#144) - Fixed the error when querying empty metric data (#144)
- Fixed empty host when setup step finishes (#147) - Fixed empty host when setup step finishes (#147)
- Fixed the error of obtaining suggestions of field's value in discover - Fixed the error of obtaining suggestions of field's value in discover
- Fixed the wrong display of heatmap's data in alerting message
### Improvements ### Improvements
- Update agent config with cluster name (#148) - Update agent config with cluster name (#148)

View File

@ -19,6 +19,7 @@ title: "版本历史"
- 修复指标数据为空时的查询错误 (#144) - 修复指标数据为空时的查询错误 (#144)
- 修复初始化结束步骤中主机显示为错误的问题 (#147) - 修复初始化结束步骤中主机显示为错误的问题 (#147)
- 修复数据探索中获取字段值建议的错误 - 修复数据探索中获取字段值建议的错误
- 修复告警消息热图数据显示错误的问题
### Improvements ### Improvements
- 优化下发给 Agent 的配置,增加集群名称 (#148) - 优化下发给 Agent 的配置,增加集群名称 (#148)

View File

@ -41,7 +41,7 @@ export default (props) => {
to = bounds.max; to = bounds.max;
} }
if (!from || !to) return data if (!from || !to) return data
const newData = cloneDeep(data) const newData = cloneDeep(data.sort((a, b) => a.timestamp - b.timestamp))
const fromTimestamp = moment(from).valueOf(); const fromTimestamp = moment(from).valueOf();
const toTimestamp = moment(to).valueOf(); const toTimestamp = moment(to).valueOf();
let start = newData[0].timestamp; let start = newData[0].timestamp;