package web
// The CI pages: the runs of a repository, a run with its jobs, a job with its
// steps and its log (actions.go). A state is always a word as well as a
// symbol and a colour.
// CheckIcon is the symbol of a state: a mark in the colour of its kind, with
// the state as its text for a screen reader.
templ CheckIcon(kind, state string) {
}
templ Actions(l Layout, p ActionsPage) {
@Shell(l, nil) {
if len(p.Runs) == 0 {
no runs yet: a push that matches a workflow of .github/workflows starts one.
}
if p.CancelAction != "" || p.RerunAction != "" {
Actions
if p.CancelAction != "" {
}
if p.RerunAction != "" {
}
if p.CanRerunFailed {
}
}
}
// JobHead is the title of the job page with its state and its error, replaced
// by the live updates. total is the number of lines the log holds.
templ JobHead(j JobRow, total int64) {
}
}
// LogLine is a line of the log. Group and error markers of the runner show as
// headings and errors, never as raw text.
templ LogLine(ln LogLineView) {
}
// CommitChecks is the combined state of the checks of a commit, as a mark
// with a count, linking to the page that explains it.
templ CommitChecks(c ChecksSummary) {
if c.Total > 0 {
@CheckIcon(c.Kind, c.State)
{ c.Label }
}
}
// MRChecks is the checks section of the rail of a merge request.
templ MRChecks(c ChecksSection) {
Checks { itoa(len(c.Rows)) }
if len(c.Rows) == 0 {
no checks
} else {
for _, r := range c.Rows {
@CheckIcon(r.Kind, r.State)
if r.Href != "" {
{ r.Name }
} else {
{ r.Name }
}
{ r.State }
if r.Waiting {
waiting for a runner
}