Documentation
¶
Overview ¶
templ: version: v0.3.1020
Index ¶
- func Card(label string) templ.Component
- func Dot(status string) templ.Component
- func Duration(d *time.Duration) string
- func Empty(msg, hint string) templ.Component
- func ErrorButton(runID string) templ.Component
- func ErrorDialog(runID, workflow, status, message string) templ.Component
- func Metric(label, value, nota string, matiz string) templ.Component
- func Rosca(i postgres.Indicators) templ.Component
- func RunsChart(buckets []postgres.Bucket) templ.Component
- func State(status string) templ.Component
- func Tag(text, rota string) templ.Component
- func Timestamp(t *time.Time) string
- func UTCStamp(t *time.Time) string
- func When(t *time.Time) string
- type Arc
- type Bar
- type Brand
- type GridLine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Card ¶ added in v0.7.0
Card is the base panel: a light surface, a thin border, a warm wide shadow.
func Dot ¶ added in v0.7.0
Dot is the minimal version, for dense tables where the label is already in the column.
func Duration ¶ added in v0.7.0
Duration picks the unit by order of magnitude. "0.4s" says more than "400ms" in a column whose neighbour takes minutes.
func Empty ¶ added in v0.7.0
Empty communicates the absence of data without looking like an error. An empty table with no explanation sends the operator looking for a defect where there is none.
func ErrorButton ¶ added in v0.7.0
--------------------------------------------------------------------------- Err em dialogo
The error used to occupy a whole row below the run, inside the table. With a real stack trace that pushed the rest of the list off the screen and mixed two things — the list and the detail. Now the row holds a button, and the text lives in a native <dialog>: ESC closes it, the backdrop dims and the focus stays trapped inside it without a line of JavaScript of ours. ---------------------------------------------------------------------------
func ErrorDialog ¶ added in v0.7.0
func Metric ¶ added in v0.7.0
Metric is one of the four numbers at the top of the Overview. The large serif number is what sets the editorial tone — in sans it would become just another dashboard.
func Rosca ¶
func Rosca(i postgres.Indicators) templ.Component
Rosca resume a mesma janela em proporcao. O total no centro evita a leitura only relative: 95% of twenty runs is not 95% of two thousand.
func RunsChart ¶ added in v0.7.0
RunsChart draws one stacked column per hour, with the average-duration line on top — the two readings the Overview screen has to cross: "how many" and "quanto tempo".
func State ¶ added in v0.7.0
State desenha o estado de um Run.
The colours are desaturated on purpose: a dashboard's pure green and red fight the parchment and shout louder than the information. The shape carries meaning too — the dot is filled for what has finished and ringed for what is still alive — so it does not depend on colour alone.
func Timestamp ¶ added in v0.7.0
Timestamp is the full date, for audit columns, in the timezone of WHOEVER FORMATS -- which is the process's TZ, not the reader's.
The marker is not decoration. It used to render "2026-03-10 22:00:00" and stop there, and the same instant reads 22:00 on a machine at UTC-3 and 01:00 in a pod at UTC. Two people comparing one failure at three in the morning disagreed about when it happened, with nothing on the screen to reconcile them. notify/slack.go had already learned this and appends MST for the same reason; the screen had not.
For a value that IS UTC by contract -- a slot, an auto param -- use UTCStamp: local time there would make the screen disagree with the $BREVIS_AUTO_* variable the step actually reads.
func UTCStamp ¶ added in v0.10.1
UTCStamp is the full date in UTC, for values that are UTC by contract.
The slot and the auto params are stored, injected and read in UTC -- a step gets `2026-03-11T01:00:00Z` in $BREVIS_AUTO_ADJUSTED_AT. Rendering those in the server's local time made the screen show `2026-03-10 22:00:00` beside a `date` of `2026-03-11`: one day apart, in the same grid, with nothing saying why, and a third answer for anyone who checked the environment.
The screen agreeing with the contract is worth more than the screen agreeing with the clock of whoever ran the deployment.