{{/* Async action runs: the run card answered to a submission, the runs list and the run page */}} {{ define "run-badge" }} {{- if eq . "running" -}} running {{- else if eq . "succeeded" -}} succeeded {{- else if eq . "failed" -}} failed {{- else if eq . "timed_out" -}} timed out {{- else if eq . "canceled" -}} canceled {{- else -}} {{ . }} {{- end -}} {{ end }} {{/* The polled status header of a run page */}} {{ define "run-status" }}
{{ template "run-badge" .run.Status }} Started {{ .run.Started }} {{ if .run.Ended }} Ended {{ .run.Ended }} {{ end }} Duration {{ .run.Duration }} {{ if .run.Actor }} By {{ .run.Actor }} {{ end }} {{ if gt .run.Version 0 }} Version {{ .run.Version }} {{ end }} {{ if .run.Active }} {{ end }}
{{ if .run.ResultStatus }}
{{ .run.ResultStatus }}
{{ end }} {{ if and .run.Message (ne .run.Status "succeeded") }} {{ if or (eq .run.Status "canceled") (eq .run.Status "timed_out") }}
{{ .run.Message }}
{{ else }} {{ end }} {{ end }}
{{ end }} {{ define "run-page" }} {{ template "header" . }}

Run {{ .run.Id }}

{{ template "run-status" . }} {{ if .run.ArgsList }}
{{ range .run.ArgsList }} {{ end }} {{ range .run.ArgsList }} {{ end }}
{{ .Name }}
{{ .Value }}
{{ end }} {{ if .run.ParamErrors }}
    {{ range $k, $v := .run.ParamErrors }}
  • {{ $k }}: {{ $v }}
  • {{ end }}
{{ end }}
{{ if or .run.IsStream .run.Active }}

Output

{{ end }}
{{ end }} {{ define "runs-table" }}
{{ if .runs }} {{ range .argColumns }} {{ end }} {{ range .runs }} {{ range .ArgCells }} {{ end }} {{ end }}
Details Status Started Duration By Message{{ . }}
{{/* The drill-down affordance of the console tables: a circled chevron in the brand green */}} {{ template "run-badge" .Status }} {{/* Relative age (relTime, the shared helper) with the exact UTC time as the tooltip, as the console tables do */}} {{ relTime .StartedAt }} {{ .Duration }} {{ .Actor }} {{ if .ResultStatus }} {{ .ResultStatus }} {{ else }} {{ .Message }} {{ end }} {{ . }}
{{ if .more }}
Showing the newest {{ len .runs }} matching runs; narrow the filter to see older ones.
{{ end }} {{ else }}
No runs
{{ end }}
{{ end }} {{ define "runs-page" }} {{ template "header" . }}

Run History

{{/* Filter: name=value matches an arg, a bare word any arg value, the status message or the failure message; several terms must all match */}}
{{ template "runs-table" . }}
{{ template "footer" . }} {{ end }}