1
0

refactor: ICMP checker type 从 ping 统一改为 icmp,修复前端 UI 细节

- ICMP checker 的 type/configKey/YAML 配置键/接口属性名从 ping 改为 icmp
- IcmpChecker 添加 platform 构造函数注入,修复 Windows 测试兼容性
- 前端 target 表格延迟列优化:标题简化为「延迟」,单位下移到单元格,宽度 80px
- Drawer 概览页 Descriptions 添加 tableLayout=auto 收窄 label 宽度
- 同步更新 README.md、DEVELOPMENT.md、probes.example.yaml、JSON Schema 和全部测试
This commit is contained in:
2026-05-20 00:02:23 +08:00
parent 375dd3492b
commit 9b53c746f6
23 changed files with 239 additions and 224 deletions

View File

@@ -121,16 +121,16 @@ describe("createTargetTableColumns", () => {
rowIndex: 0,
});
expect(element.props.children).toBe("9999+");
expect(element.props.children).toEqual(["9999+", " ms"]);
expect(element.props.className).toContain("latency-value");
});
test("延迟列标题为 延迟(ms)", () => {
test("延迟列标题为 延迟", () => {
const latencyColumn = getColumn(createTargetTableColumns(["http"]), "latestCheck.durationMs");
expect(latencyColumn.title).toBe("延迟(ms)");
expect(latencyColumn.title).toBe("延迟");
});
test("延迟列正常值包含 ms 单位", () => {
test("延迟列正常值包含 ms 单位", () => {
const latencyColumn = getColumn(createTargetTableColumns(["http"]), "latestCheck.durationMs");
const renderCell = latencyColumn.cell as (params: PrimaryTableCellParams<TargetStatus>) => {
props: { children: string; className: string };
@@ -150,7 +150,7 @@ describe("createTargetTableColumns", () => {
}),
rowIndex: 0,
});
expect(element.props.children).toBe("123");
expect(element.props.children).toEqual(["123", " ms"]);
});
test("名称列无排序配置", () => {