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:
1 parent
c13139cd41
commit
1536723196
50 files changed
+3560
-154
No files matched your search
+10
-10
@@ -40,7 +40,7 @@ func (an *Analysis) List(kind, class string) (*List, error) {
|
||||
l := &List{Kind: kind, Class: class, Rows: [][]string{}}
|
||||
switch kind {
|
||||
case ListEgressHTTPSAny, ListEgressHTTPSAll:
|
||||
l.Columns = []string{"Адрес", "Подсеть", "Валидатор", "https-проверок", "Проваленные цели"}
|
||||
l.Columns = []string{"Адрес", "Подсеть", "Метка подсети", "Валидатор", "https-проверок", "Проваленные цели"}
|
||||
if kind == ListEgressHTTPSAny {
|
||||
l.Columns[3] = "Провалено https"
|
||||
}
|
||||
@@ -54,12 +54,12 @@ func (an *Analysis) List(kind, class string) (*List, error) {
|
||||
if kind == ListEgressHTTPSAny {
|
||||
count = fmt.Sprintf("%d из %d", a.https.n-a.https.ok, a.https.n)
|
||||
}
|
||||
l.Rows = append(l.Rows, []string{a.res.IPAddress, a.subnet, ShortValidator(a.https.validator), count, strings.Join(targets, ", ")})
|
||||
l.Rows = append(l.Rows, []string{a.res.IPAddress, a.subnet, a.subnetLabel, ShortValidator(a.https.validator), count, strings.Join(targets, ", ")})
|
||||
}
|
||||
case ListIngressSSHAny, ListIngressSSHAll:
|
||||
l.Columns = []string{"Адрес", "Подсеть", "Провалено ssh", "Площадки с провалом", "Ошибка"}
|
||||
l.Columns = []string{"Адрес", "Подсеть", "Метка подсети", "Провалено ssh", "Площадки с провалом", "Ошибка"}
|
||||
if kind == ListIngressSSHAll {
|
||||
l.Columns = []string{"Адрес", "Подсеть", "Площадки с провалом ssh", "Ошибка"}
|
||||
l.Columns = []string{"Адрес", "Подсеть", "Метка подсети", "Площадки с провалом ssh", "Ошибка"}
|
||||
}
|
||||
for _, a := range an.sorted() {
|
||||
if a.ssh.n == 0 || a.ssh.ok == a.ssh.n || (kind == ListIngressSSHAll && a.ssh.ok != 0) {
|
||||
@@ -72,14 +72,14 @@ func (an *Analysis) List(kind, class string) (*List, error) {
|
||||
}
|
||||
sort.Strings(errs)
|
||||
if kind == ListIngressSSHAny {
|
||||
l.Rows = append(l.Rows, []string{a.res.IPAddress, a.subnet, fmt.Sprintf("%d из %d", len(a.ssh.sites), a.ssh.n), strings.Join(sites, ", "), strings.Join(errs, ", ")})
|
||||
l.Rows = append(l.Rows, []string{a.res.IPAddress, a.subnet, a.subnetLabel, fmt.Sprintf("%d из %d", len(a.ssh.sites), a.ssh.n), strings.Join(sites, ", "), strings.Join(errs, ", ")})
|
||||
} else {
|
||||
l.Rows = append(l.Rows, []string{a.res.IPAddress, a.subnet, strings.Join(sites, ", "), strings.Join(errs, ", ")})
|
||||
l.Rows = append(l.Rows, []string{a.res.IPAddress, a.subnet, a.subnetLabel, strings.Join(sites, ", "), strings.Join(errs, ", ")})
|
||||
}
|
||||
}
|
||||
case ListVerdictPass, ListVerdictPartial, ListVerdictFail:
|
||||
verdict := strings.TrimPrefix(kind, "verdict_")
|
||||
l.Columns = []string{"Адрес", "Подсеть", "Валидатор", "Egress", "Ingress", "Проверок в цикле"}
|
||||
l.Columns = []string{"Адрес", "Подсеть", "Метка подсети", "Валидатор", "Egress", "Ingress", "Проверок в цикле"}
|
||||
if kind == ListVerdictPartial {
|
||||
l.Columns = append(l.Columns, "Причина")
|
||||
}
|
||||
@@ -87,7 +87,7 @@ func (an *Analysis) List(kind, class string) (*List, error) {
|
||||
if a.res.Verdict != verdict {
|
||||
continue
|
||||
}
|
||||
row := []string{a.res.IPAddress, a.subnet, orDash(ShortValidator(a.https.validator)), okOf(a.egress), okOf(a.ingress), a.checksCell()}
|
||||
row := []string{a.res.IPAddress, a.subnet, a.subnetLabel, orDash(ShortValidator(a.https.validator)), okOf(a.egress), okOf(a.ingress), a.checksCell()}
|
||||
if kind == ListVerdictPartial {
|
||||
row = append(row, reasonName(a.egress.ok < a.egress.n, a.ingress.ok < a.ingress.n, a.incomplete()))
|
||||
}
|
||||
@@ -97,7 +97,7 @@ func (an *Analysis) List(kind, class string) (*List, error) {
|
||||
if class == "" {
|
||||
return nil, ErrUnknownList("error without class")
|
||||
}
|
||||
l.Columns = []string{"Адрес", "Подсеть", "Площадка", "Валидатор", "Вердикт адреса", "Статус проверки"}
|
||||
l.Columns = []string{"Адрес", "Подсеть", "Метка подсети", "Площадка", "Валидатор", "Вердикт адреса", "Статус проверки"}
|
||||
for _, a := range an.sorted() {
|
||||
fs := append([]failedIngress(nil), a.failedIngress...)
|
||||
sort.SliceStable(fs, func(i, j int) bool { return an.siteIndex(fs[i].site) < an.siteIndex(fs[j].site) })
|
||||
@@ -109,7 +109,7 @@ func (an *Analysis) List(kind, class string) (*List, error) {
|
||||
if f.late {
|
||||
status = "провал, после вердикта"
|
||||
}
|
||||
l.Rows = append(l.Rows, []string{a.res.IPAddress, a.subnet, f.site, ShortValidator(f.validator), a.res.Verdict, status})
|
||||
l.Rows = append(l.Rows, []string{a.res.IPAddress, a.subnet, a.subnetLabel, f.site, ShortValidator(f.validator), a.res.Verdict, status})
|
||||
}
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user