Skip to content

[Bug] Traffic data accumulates during page blur, causing chart spike #12067

@pooneyy

Description

@pooneyy

Contact Information

No response

1Panel Version

2.1.2

Problem Description

首页流量监控通过定时采样实时网速,在图标上绘制折线图以展示流量变化。但存在一个BUG:当用户切换到其他标签页或窗口(即页面失去焦点)一段时间后,重新返回时,系统会将离开期间累积的所有网速数据合并计算为返回后的第一个采样点数值,导致该点数据异常偏高,折线图无法真实反映这段时间内的网速波动

Steps to Reproduce

如下图所示,观察时间轴可知,面板的标签页失去焦点持续了一分钟,这一分钟采集到的所有数据的计算到了19:13:22 这一点。

Image

再观察下方两张图,相邻的两点之间间隔了 3 分钟,这期间的所有数据都累积到了 19:27:56 这一点。

Image Image

The expected correct result

No response

Related log output

Additional Information

No response

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions