{{ define "title" }}{{ .Workflow }} · Pipeline {{ .Pipeline.Id }} · {{ .RepoInfo.FullName }} · Tangled{{ end }} {{ define "extrameta" }} {{ $title := "Pipelines"}} {{ $url := printf "https://tangled.org/%s/pipelines" .RepoInfo.FullName }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContentLayout" }}
{{ template "sidebar" . }}
{{ template "repoContent" . }}
{{ template "fragments/workflow-timers" }} {{ end }} {{ define "repoContent" }} {{ with (index .Pipeline.Statuses .Workflow).Latest }} {{ if .Error }}
{{ i "triangle-alert" "size-4 shrink-0 mt-0.5" }}
{{- .ErrorMessage -}}
{{- with .ErrorDetails }}
{{- . -}}
{{- end }}
{{ end }} {{ end }} {{ template "logs" . }} {{ end }} {{ define "sidebar" }} {{ $active := .Workflow }} {{ with .Pipeline }} {{ $id := .Id }} {{ $pipeline := . }}
{{ range $name, $all := .Statuses }} {{ $lastStatus := $all.Latest }} {{ $status := $lastStatus.Status }} {{ $kind := $status.String }}
{{ $name }} {{ i "arrow-up-right" "size-4 shrink-0 text-gray-900 dark:text-gray-100" }}
{{ template "repo/fragments/shortTimeAgo" $lastStatus.Created }}
{{ template "repo/pipelines/fragments/workflowSymbol" $all }}
{{ $kind }}
{{ template "workflowActions" (dict "Root" $ "Pipeline" $pipeline "Name" $name "Kind" $kind "Status" $status) }}
{{ end }}
{{ template "sidebarActions" $ }}
{{ end }} {{ end }} {{ define "workflowActions" }} {{ $root := .Root }} {{ $status := .Status }} {{ $kind := .Kind }} {{ if and $root.RepoInfo.Roles.IsPushAllowed (ne $kind "success") }}
{{ if not $status.IsFinish }} {{ end }}
{{ end }} {{ end }} {{ define "sidebarActions" }}
{{ with .SSHLogCommand }} {{ end }} {{ if .RepoInfo.Roles.IsPushAllowed }}
{{ if .Pipeline.InProgress }} {{ end }}
{{ end }}
{{ end }} {{ define "logs" }}
{{ end }}