log2trace-ui - v1.0.0-RC1
    Preparing search index...

    Class Template

    Static factory of HTML strings used by <trace-visualizer>.

    Every method returns a self-contained HTML fragment built with template literals — there is no DOM manipulation here. The component sets these strings on its shadow root's innerHTML. All CSS class names come from styles.css.ts so vanilla-extract can compile them; raw class strings are never used.

    Most methods are low-level fragments composed by other methods on this class and are marked @internal to keep the generated docs focused. The handful of higher-level entry points worth calling directly are:

    Index

    Constructors

    Methods

    • Markup for the empty state shown when no trace data is available.

      Returns string

      A self-contained HTML fragment with the empty-state message.

    • Markup for the error placeholder shown when a fetch or parse fails.

      Parameters

      • message: string

        Pre-formatted human-readable error description.

      Returns string

      A self-contained HTML fragment with the error text rendered safely.

    • Markup for the placeholder shown while data is being fetched.

      Returns string

      A self-contained HTML fragment with a loading indicator.

    • Build the HTML for the right-hand detail panel of a single span.

      The panel shows three collapsible sections — overview (service, status, kind, duration, IDs), attributes (filtered to exclude log2trace.* housekeeping keys), and per-event detail. Empty sections are omitted.

      Parameters

      Returns string

      A self-contained HTML fragment ready to insert into the detail-panel slot.

    • Build the complete waterfall markup for a trace.

      Composes the timeline, span labels, span bars, optional legend, optional filter bar, and zoom controls into a single fragment. The component sets the result on its shadow root.

      Parameters

      • tree: TraceTree

        The trace tree to render, typically from TraceTree.build.

      • config: DisplayConfig

        Resolved display config from resolveDisplayDefaults (from config.ts).

      • filterBarHtml: string = ''

        Optional pre-rendered filter bar markup (produced by the internal filter helpers); pass empty string when no filters are configured.

      • filteredSpans: FlatSpan[] | null = null

        When local filters are active, the already filtered span list to render in place of tree.flatten().

      Returns string

      A self-contained HTML fragment for the full visualization.