docs: 节点的公开备注;登录后接口返回私有备注 - #36
Merged
Merged
Conversation
stqfdyr
force-pushed
the
docs/public-remark
branch
from
October 2, 2026 12:39
f0e03c8 to
c10bb48
Compare
stqfdyr
added a commit
to monitor-probe/monitor
that referenced
this pull request
Oct 2, 2026
节点新增 `public_remark`:站长写给访客看的一行说明,和 `remark` 并列,出现在公开视图里,供第三方主题使用。 - 面板编辑弹窗里「公开备注」与「私有备注」(原「备注」)并排一行,弹窗高度不变;节点列表不显示 - 最多 100 字、一行,去掉首尾空白;超长或含控制字符时拒绝,不截断。公开帧每 2 秒整帧推给每个访客,每台节点的公开视图约 1 KB,100 个汉字多 300 字节 - 不进批量修改 - 数据库 schema 12,新增一列,带默认值 - 私有备注不变:登录后 `/api/nodes`、`/api/ws` 本来就返回 `remark` ## 测试 - `cargo fmt --check`、`cargo clippy --all-targets -- -D warnings`、`cargo test`(133 个)通过;面板 lint、test、build 通过 - `scripts/e2e.sh` 本次 hub × agent 1.1.0 通过 - 新测试:100 字通过,101 字与含换行被拒;首尾空白去掉后出现在公开视图,公开视图仍无 `remark`;批量修改拒收 `public_remark` - 浏览器实测编辑弹窗:保存、回显、超长报错,1280 与 390 宽、深浅色;匿名 `/api/nodes` 带上 `public_remark` 配套:文档 monitor-probe/monitor-document#36 Closes #80
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.
public_remark的取值与旧 hub 的兼容;「匿名拿不到什么」补上站长登录后/api/nodes、/api/ws返回完整视图(admin为true),主题可借此显示remarklint、build(含站内链接检查)通过。
配套:monitor-probe/monitor#89