Registry: trend chart, always-pass indicator, subnet columns in the address list dialog

- Registry: "Динамика по запускам" chart (Chart.js 4.5.1, vendored) over finalized
  runs per target or site, % or count, subnet and calendar period filters;
  GET /admin/registry/trend
- Registry: clickable "Всегда проходили" indicator with the address list and CSV;
  GET /admin/registry/always-pass and /always-pass/list
- Address list dialog: "Подсеть" and "Метка подсети" columns from the
  administrator's subnet list (shared db.SubnetMatcher), per-subnet summary chips
  with a client-side filter; "прочие" renamed to "вне списка подсетей"
- Rebuild control-api and admin-dashboard binaries; plans and summaries in
  docs/changes, README, API and USAGE updated

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-08 13:15:02 +03:00
1 parent c13139cd41
commit 1536723196
50 files changed
+3560 -154

No files matched your search

+15
View File
@@ -466,6 +466,21 @@ func TestScaleSmoke6440(t *testing.T) {
if bd, err = d.RegistryBreakdown(ctx, RegistryFilter{Level: LevelEgress, Family: "https"}); err != nil || bd.Addresses != 100 || len(bd.Rows) != 6 {
t.Fatalf("breakdown, newest cycle: %+v err=%v", bd, err)
}
// The trend of the run, finalized for the purpose: the same 3 sites, with the whole registry as the subnet.
if _, err := d.ExecContext(ctx, `UPDATE check_runs SET state = ? WHERE id = ?`, RunFinalized, runID); err != nil {
t.Fatalf("finalize run: %v", err)
}
tr, err := d.RegistryTrend(ctx, RegistryFilter{Subnet: "10.0.0.0/8", Level: LevelIngress, Family: "tcp"}, nil, nil)
if err != nil || len(tr.Runs) != 1 || tr.Runs[0].Addresses != 100 || len(tr.Points) != 3 || tr.Points[0].Total != 600 {
t.Fatalf("trend: %+v err=%v", tr, err)
}
ap, err := d.RegistryAlwaysPass(ctx, RegistryFilter{Subnet: "10.0.0.0/8", Level: LevelIngress, Family: "tcp"}, nil, nil)
if err != nil || ap.Runs != 1 || ap.Addresses != 100 || ap.Passed != 0 {
t.Fatalf("always pass: %+v err=%v", ap, err)
}
if l, n, err := d.RegistryAlwaysPassList(ctx, RegistryFilter{Subnet: "10.0.0.0/8", Level: LevelIngress, Family: "tcp"}, nil, nil); err != nil || n != 1 || len(l) != ap.Passed {
t.Fatalf("always pass list: len=%d runs=%d err=%v", len(l), n, err)
}
registryDur := time.Since(start)
start = time.Now()