2

Use Tabulator in IP detail lists

This commit is contained in:
2026-03-12 22:09:16 +01:00
parent 735ae52905
commit a72348b214
2 changed files with 181 additions and 54 deletions

View File

@@ -241,6 +241,18 @@ func TestHandlerServesOverviewAndManualActions(t *testing.T) {
if !strings.Contains(body, `data-ip="203.0.113.10"`) {
t.Fatalf("ip details page did not expose expected data-ip attribute: %s", body)
}
if !strings.Contains(body, `/assets/tabulator/tabulator.min.js`) || !strings.Contains(body, `/assets/tabulator/tabulator_midnight.min.css`) {
t.Fatalf("ip details page should load local tabulator assets")
}
if !strings.Contains(body, `id="decisions-table"`) || !strings.Contains(body, `id="events-table"`) || !strings.Contains(body, `id="backend-table"`) {
t.Fatalf("ip details page should expose tabulator mount points for all detail lists")
}
if !strings.Contains(body, `function upsertDetailTable(key, targetId, columns, rows, emptyText, options)`) {
t.Fatalf("ip details page should use Tabulator for detail lists")
}
if strings.Contains(body, `id="decisions-body"`) || strings.Contains(body, `id="events-body"`) || strings.Contains(body, `id="backend-body"`) {
t.Fatalf("ip details page should no longer render raw table body placeholders")
}
if strings.Contains(body, `const ip = "\"203.0.113.10\"";`) {
t.Fatalf("ip details page still renders a doubly quoted IP")
}