java.lang.Object
net.i2p.router.web.helpers.ClientSKMDebugHelper
Renders every client ratchet session key manager as one table, with a thead/tbody/tfoot section per client as on the update manager page, so the columns align across all clients. Inbound tag sets, outbound sessions and outbound tag sets share the column grid. Cells that do not apply to a row's kind show an em-dash. The tfoot carries the client's session counters. Clients whose SKM has no ratchet part (plain ElGamal) keep their own tag-status rendering below the table.
Method Summary
All MethodsModifier and TypeMethodDescription(package private) static StringbuildSection(String title, List<String[]> rows, String summary) Build one thead/tbody/tfoot section with the default english columns and no peer rendering.(package private) static StringbuildSection(String title, List<String[]> rows, String summary, String columns, int peerCol, java.util.function.Function<String, String> peerRenderer) Build one thead/tbody/tfoot section.static voidrender(RouterContext ctx, Writer out) Write the consolidated table, one section per distinct client ratchet SKM (unwrapping the muxed variants), plus the legacy status section for each client whose SKM has no ratchet part (plain ElGamal).
Method Details
render
Write the consolidated table, one section per distinct client ratchet SKM (unwrapping the muxed variants), plus the legacy status section for each client whose SKM has no ratchet part (plain ElGamal).- Parameters:
ctx- the router contextout- where to write- Throws:
IOException- if writing to out fails
buildSection
Build one thead/tbody/tfoot section with the default english columns and no peer rendering. Package-visible for testing.- Parameters:
title- the client title htmlrows- unified rows fromRatchetSKM.getDebugRows()summary- the counters line, or null for no tfoot- Returns:
- the section html, never null
buildSection
static String buildSection(String title, List<String[]> rows, String summary, String columns, int peerCol, java.util.function.Function<String, String> peerRenderer) Build one thead/tbody/tfoot section. The title is pre-escaped html. The cell at peerCol is passed through peerRenderer (trusted html, e.g. a router-info reference) instead of being escaped. Package-visible for testing.- Parameters:
title- the client title htmlrows- unified rows fromRatchetSKM.getDebugRows()summary- the counters line, or null for no tfootcolumns- the translated header row htmlpeerCol- index of the peer column, or -1 for nonepeerRenderer- renders the peer cell html, or null to escape it- Returns:
- the section html, never null