Repository navigation
fix: 离线时长按 hub 的时钟计算,浏览器时钟不准时照常显示 - #102
Merged
Merged
Conversation
stqfdyr
added a commit
to monitor-probe/monitor-theme-default
that referenced
this pull request
Oct 6, 2026
- 节点卡片的离线时长改读 hub 下发的 `last_seen_ago`(monitor-probe/monitor#102),浏览器时钟快或慢 8 小时时照常显示。 - 没有这个字段的旧 hub 仍按浏览器时钟用 `last_seen` 计算。
stqfdyr
added a commit
to monitor-probe/monitor-theme-serverstatus
that referenced
this pull request
Oct 6, 2026
- 列表展开行与详情页的离线时长改读 hub 下发的 `last_seen_ago`(monitor-probe/monitor#102),浏览器时钟快或慢 8 小时时照常显示。 - 没有这个字段的旧 hub 仍按浏览器时钟用 `last_seen` 计算。
stqfdyr
added a commit
to monitor-probe/themes
that referenced
this pull request
Oct 6, 2026
跟随 monitor-probe/monitor#102:假 hub 的每个节点带 `last_seen_ago`,在线为 0,离线为 5 小时;刚连上还没上报的节点与真 hub 一样回 `last_seen: 0`、`last_seen_ago: null`。
stqfdyr
added a commit
to monitor-probe/monitor-document
that referenced
this pull request
Oct 6, 2026
- 主题开发页加「离线时长」一节:节点数据里的 `last_seen_ago` 是按 hub 的时钟算的秒数,节点离线时显示离线时长用它,不拿 `last_seen` 减浏览器时钟;在线节点同样带这个值,离线时长只在 `online` 为 `false` 时显示。 - 「旧版 hub」表加一行:1.3.2 及更早没有这个字段,按浏览器时钟自己算,`last_seen` 为 0 是从未上报。 - 对应 monitor-probe/monitor#102,随 hub 发版合入。
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.
/api/nodes与/api/ws的每个节点新增last_seen_ago:按 hub 的时钟算的、距最后一次上报的秒数,从未上报为null。last_seen。浏览器快 8 小时(双系统在 UTC+8 的常见情况)时刚离线的节点显示成离线 8 小时、慢 8 小时时离线后头 8 小时不显示时长,两种情况现在都按 hub 的时间显示。