Skip to content

feat: per-message ETSI 103707/103120 viewer + human datetime history#9

Merged
Taure merged 1 commit into
mainfrom
feat/etsi-format-viewer-and-history-datetime
Jun 25, 2026
Merged

feat: per-message ETSI 103707/103120 viewer + human datetime history#9
Taure merged 1 commit into
mainfrom
feat/etsi-format-viewer-and-history-datetime

Conversation

@Taure

@Taure Taure commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Two customer-driven changes to the demo.

Receiver tab — ETSI format viewer

Each intercepted message now has 103707 XML and 103120 XML buttons. Clicking converts that message via the existing etsi103707/etsi103120 modules and shows it pretty-printed inline under the row, with a hide button. 103120 uses the demo defaults (SE / placeholder UUIDs), same as the existing GET /receiver path.

This makes the demo's core purpose visible: showing the same message in both ETSI formats.

  • ldf_format.erl (new) — pretty_xml/1, html_escape/1
  • ldf_www_controller:message_etsi/1 + route GET /www/message/:messageid/:format
  • full message id threaded into each row for a unique Datastar target

History tab — human datetime input

Replaced the raw "ms since epoch" field with a datetime-local picker (calendar + time, seconds). submit_history/1 converts to integer ms (UTC) via ldf_format:datetime_to_ms/1.

Also fixes a latent bug: chatli's get_history does integer_to_binary(Timestamp), which crashed on the string the old text field sent.

Tests / checks

  • New ldf_format_tests eunit (6 tests): pretty-print, prolog, escaping, datetime→ms with/without seconds, empty.
  • Local: rebar3 fmt --check, xref, dialyzer, eunit all clean.

Receiver tab: each intercepted message gets 103707 XML / 103120 XML
buttons that show the message converted to that ETSI format, pretty
printed inline. New ldf_format module (pretty_xml/html_escape) and
ldf_www_controller:message_etsi/1 + GET /www/message/:messageid/:format.

History tab: replace the raw "ms since epoch" field with a datetime-local
picker; submit_history converts it to integer ms via
ldf_format:datetime_to_ms/1. Also fixes chatli get_history crashing on a
string timestamp (it does integer_to_binary/1).
@Taure Taure merged commit 5bf4d1f into main Jun 25, 2026
2 checks passed
@Taure Taure deleted the feat/etsi-format-viewer-and-history-datetime branch June 25, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant