feat: 时间范围按 hub 的保留天数生成,延迟图也可看更长的窗口 - #19
Merged
Merged
Conversation
- 档位取保留期以内的 1、6 小时和 1、7、30、90 天,再加上保留期本身;hub 没有 history_days 时按 7 天 - 延迟图与资源图用同一组档位 - 刻度间距增加 14 天一档,更宽的窗口落在每月 1 日;刻度全在零点时只写日期 - 手机上档位按钮收窄,保留一年的 7 个档位在 360 宽的屏幕上排成一行 Closes #11
This was referenced Sep 29, 2026
保留 92 天时不再同时出现 90 天和 92 天两个几乎一样的档位;用例补上默认 30 天
一天及以上的刻度按固定毫秒排,窗口跨过夏令时切换后落在 23:00 或 01:00,只写日期的标签退回带时刻;每个刻度改为取最近的本地零点。用例在纽约时区覆盖 3 月与 11 月的切换
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
时间范围原来固定为 1 小时到 7 天,延迟图只到 24 小时,hub 保留 30 天、90 天时更早的历史看不到(#11)。
/api/me的history_days,hub 没有这个字段时按 7 天npm test(新增档位、按月刻度、日期标签、纽约时区跨 3 月与 11 月夏令时的用例)在 UTC、上海、纽约、柏林、悉尼、豪勋爵岛时区下通过,lint、build 通过;预览环境写入 90 天历史,1280、390、375、360、320 宽与深浅色下实测资源和延迟的 7 天、30 天、90 天、1 年窗口。
需要 hub monitor-probe/monitor#81 提供 history_days;文档 monitor-probe/monitor-document#33。
Closes #11