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

+53
View File
@@ -104,6 +104,59 @@ type breakdownRowDTO struct {
OK int `json:"ok"`
}
// registryTrendDTO is GET /admin/registry/trend: the checks of one direction
// (and protocol) per target (group "target", egress) or site (group "site",
// ingress) in each finalized run, oldest run first. From and To echo the period
// (YYYY-MM-DD, empty = open); Truncated says that older runs than Runs were left
// out. A series has a point only for the runs where its key has checks; Total
// counts checks, OK the successful ones.
type registryTrendDTO struct {
Group string `json:"group"`
Direction string `json:"direction"`
Protocol string `json:"protocol"`
From string `json:"from"`
To string `json:"to"`
Truncated bool `json:"truncated"`
Runs []trendRunDTO `json:"runs"`
Series []trendSeriesDTO `json:"series"`
}
// registryAlwaysPassDTO is GET /admin/registry/always-pass: of the Addresses that
// have checks of the direction (and protocol) in the Runs of the period, how
// many never failed one. From and To echo the period; FirstRunAt and LastRunAt
// are the start of the oldest and the newest run (null without runs).
type registryAlwaysPassDTO struct {
Direction string `json:"direction"`
Protocol string `json:"protocol"`
From string `json:"from"`
To string `json:"to"`
Truncated bool `json:"truncated"`
Runs int `json:"runs"`
FirstRunAt *time.Time `json:"first_run_at"`
LastRunAt *time.Time `json:"last_run_at"`
Addresses int `json:"addresses"`
AlwaysPass int `json:"always_pass"`
}
type trendRunDTO struct {
ID int64 `json:"id"`
StartedAt time.Time `json:"started_at"`
FinalizedAt *time.Time `json:"finalized_at"`
Addresses int `json:"addresses"`
}
type trendSeriesDTO struct {
Key string `json:"key"`
Label string `json:"label"`
Points []trendPointDTO `json:"points"`
}
type trendPointDTO struct {
RunID int64 `json:"run_id"`
Total int `json:"total"`
OK int `json:"ok"`
}
// registryDTO is one row of the durable per-address registry — see
// db.RegistrySummary.
type registryDTO struct {