DurableDashboard.Components.Workflow.LogLine (DurableDashboard v0.1.0-rc)

Copy Markdown View Source

A single dense, Grafana-style log line — the shared visual unit used by both the page-level LogsTab and the step inspector's logs tab so they render identically. Stateless Phoenix.Component.

Each entry is a map with "level", "message", "timestamp", optional "source", "metadata", and "__step__" (the originating step name, only meaningful on the page-level tab).

The collapsed line shows a one-liner; clicking expands a clean key/value fields table plus the message. A message that embeds structured data — pure JSON or an Elixir map (%{...}, including the common "label: #{inspect(map)}" form) — is pretty-printed with syntax highlighting via Core.json.

Summary

Functions

level_class(_)

meta_labels(entry)

parse_message(msg)

Classify a log message for rendering:

  • {:term, term} — the whole message is a JSON value or Elixir literal
  • {:prefix_term, prefix, term} — a text prefix followed by a %{...} Elixir map (the "label: #{inspect(map)}" shape)
  • :text — plain text, render raw

rest_fields(entry)

row(assigns)

Attributes

  • entry (:map) (required)
  • show_step (:boolean) - Defaults to true.