Expand description
General purpose auxiliary routines that do not fit the MVC web service paradigm, tending to minor tasks
Functions§
- decorate_
uri_ encodings - Auto-generates a URI-encoded “foo_uri” entry for each “foo” label associated with a clickable link (for Tera templates)
- group_
thousands - Groups an integer into thousands with commas (
2820484→2,820,484) for human-facing counts (corpus document totals, fleet throughput) that can reach millions. Agents get the raw number; only the rendered HTML is grouped. - iso_utc
- Formats a UTC
chrono::NaiveDateTime(how CorTeX stores every timestamp) as an RFC 3339 / ISO 8601 string with an explicit+00:00offset, e.g.2026-06-15T05:52:00+00:00. This is the machine-readable, zone-unambiguous form emitted in DTO time fields and<time datetime="…">attributes: the browser ([public/js/localtime.js]) rewrites it to the viewer’s local time with the zone code (EST/EDT/…), and agents get a directly parseable timestamp. Replaces the old zone-ambiguous%Y-%m-%d %H:%Mrendering, which silently displayed UTC as if it were local. - report_
timestamp - The “generated at” timestamp shown in report footers: the server’s local date and time to the
minute, suffixed with the time-zone abbreviation — e.g.
Sat, 13 Jun 2026 22:57 EDT. - severity_
highlight - Maps a cortex message severity into a bootstrap class for color highlight
- uri_
escape - TODO: Is this outdated? Maps a regular string into a URI-encoded one
- uri_
unescape - TODO: Is this outdated? Maps a URI-encoded string into its regular plain text form