PhoenixReplay.Web.Export.Access (PhoenixReplay v0.6.2)

Copy Markdown View Source

Lets the export browser, and nothing else, into PhoenixReplay.Web.Export.Router.

An export signs the recording's id with PhoenixReplay.Export.Runtime.stage_url/3; the stage and the frame take the token in their path and mount only with a valid one for that recording. The secret is made when PhoenixReplay.Web.Export.Endpoint starts, so tokens die with it.

It also points the frame at your endpoint for its stylesheet, and renders the frame in the :frame_layout the :export configuration names, which it puts in the frame's context too.

Summary

Functions

The root layout of exported frames: the :frame_layout the :export configuration names, or the dashboard's frame layout.

Mounts the stage or frame only with a valid token for the recording in the path, and points the frame's stylesheet at your endpoint and its context at the layout it renders in.

The id of the recording the stage was opened for.

Functions

frame_layout(assigns)

@spec frame_layout(map()) :: Phoenix.LiveView.Rendered.t()

The root layout of exported frames: the :frame_layout the :export configuration names, or the dashboard's frame layout.

on_mount(atom, params, session, socket)

@spec on_mount(:default, map(), map(), Phoenix.LiveView.Socket.t()) ::
  {:cont, Phoenix.LiveView.Socket.t()}

Mounts the stage or frame only with a valid token for the recording in the path, and points the frame's stylesheet at your endpoint and its context at the layout it renders in.

recording_id(map)

The id of the recording the stage was opened for.