feat: per-message ETSI 103707/103120 viewer + human datetime history#9
Merged
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/etsi103120modules 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/receiverpath.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/1ldf_www_controller:message_etsi/1+ routeGET /www/message/:messageid/:formatHistory tab — human datetime input
Replaced the raw "ms since epoch" field with a
datetime-localpicker (calendar + time, seconds).submit_history/1converts to integer ms (UTC) vialdf_format:datetime_to_ms/1.Also fixes a latent bug: chatli's
get_historydoesinteger_to_binary(Timestamp), which crashed on the string the old text field sent.Tests / checks
ldf_format_testseunit (6 tests): pretty-print, prolog, escaping, datetime→ms with/without seconds, empty.rebar3 fmt --check,xref,dialyzer,eunitall clean.