From 5dce474eebfff7833a1031f1e171bf1fa3cfa64c Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Wed, 28 Jan 2026 20:30:52 +0200 Subject: [PATCH] appview: rework pipelines listing Improve the general layout and styles. Signed-off-by: Anirudh Oppiliappan --- .../fragments/pipelineSymbolLong.html | 24 ++- .../repo/pipelines/fragments/tooltip.html | 6 +- .../templates/repo/pipelines/pipelines.html | 181 ++++++++++-------- 3 files changed, 119 insertions(+), 92 deletions(-) diff --git a/appview/pages/templates/repo/pipelines/fragments/pipelineSymbolLong.html b/appview/pages/templates/repo/pipelines/fragments/pipelineSymbolLong.html index 80b8bb86..b6e04742 100644 --- a/appview/pages/templates/repo/pipelines/fragments/pipelineSymbolLong.html +++ b/appview/pages/templates/repo/pipelines/fragments/pipelineSymbolLong.html @@ -1,12 +1,24 @@ {{ define "repo/pipelines/fragments/pipelineSymbolLong" }} {{ $pipeline := .Pipeline }} {{ $repoinfo := .RepoInfo }} + {{ $popoverId := printf "pipeline-status-%d" $pipeline.Id }} +
-
- - {{ template "repo/pipelines/fragments/pipelineSymbol" (dict "Pipeline" $pipeline "ShortSummary" true) }} - + + +
{{ template "repo/pipelines/fragments/tooltip" $ }} -
+
-{{ end }} +{{ end }} \ No newline at end of file diff --git a/appview/pages/templates/repo/pipelines/fragments/tooltip.html b/appview/pages/templates/repo/pipelines/fragments/tooltip.html index 1b2c9a94..b3e60699 100644 --- a/appview/pages/templates/repo/pipelines/fragments/tooltip.html +++ b/appview/pages/templates/repo/pipelines/fragments/tooltip.html @@ -2,10 +2,9 @@ {{ $repoinfo := .RepoInfo }} {{ $pipeline := .Pipeline }} {{ $id := $pipeline.Id }} -
- {{ end }} diff --git a/appview/pages/templates/repo/pipelines/pipelines.html b/appview/pages/templates/repo/pipelines/pipelines.html index 7298d04e..1ac2bc6f 100644 --- a/appview/pages/templates/repo/pipelines/pipelines.html +++ b/appview/pages/templates/repo/pipelines/pipelines.html @@ -7,108 +7,125 @@ {{ end }} {{ define "repoContent" }} -
-
- {{ range .Pipelines }} - {{ block "pipeline" (list $ .) }} {{ end }} - {{ else }} - - {{ end }} +
+
+ {{ len .Pipelines }} pipeline run{{ if ne (len .Pipelines) 1 }}s{{ end }}
+
{{ end }} +{{ define "repoAfter" }} +{{ if .Pipelines }} +
+ {{ range .Pipelines }} + {{ template "pipelineCard" (dict "Root" $ "Pipeline" .) }} + {{ end }} +
+{{ else }} +
+
+ {{ i "package" "size-16 text-gray-300 dark:text-gray-700" }} +
+ +
+

+ No pipelines have been run yet +

+

+ Get started by configuring CI/CD for this repository +

+
-{{ define "pipeline" }} - {{ $root := index . 0 }} - {{ $p := index . 1 }} -
- {{ block "pipelineHeader" $ }} {{ end }} +
+
+ 1 +

+ Choose a spindle in your + repository settings +

+
+
+ 2 +

+ Configure your CI/CD + pipeline +

+
+
+ 3 +

+ Trigger a workflow with a push or pull request +

+
+
{{ end }} +{{ end }} -{{ define "pipelineHeader" }} - {{ $root := index . 0 }} - {{ $p := index . 1 }} +{{ define "pipelineCard" }} + {{ $root := .Root }} + {{ $p := .Pipeline }} {{ with $p }} -
-
- {{ .Trigger.Kind.String }} -
+
+
+ +
+ {{ $target := .Trigger.TargetRef }} + {{ $workflows := .Workflows }} -
- {{ $target := .Trigger.TargetRef }} - {{ $workflows := .Workflows }} - {{ $link := "" }} - {{ if .IsResponding }} - {{ $link = printf "/%s/pipelines/%s/workflow/%d" $root.RepoInfo.FullName .Id (index $workflows 0) }} - {{ end }} - {{ if .Trigger.IsPush }} - {{ $target }} - - {{ else if .Trigger.IsPullRequest }} - {{ $sha := deref .Trigger.PRSourceSha }} - - {{ $target }} - {{ i "arrow-left" "size-4" }} - {{ .Trigger.PRSourceBranch }} - - @ - {{ slice $sha 0 8 }} - - - {{ end }} -
+ {{ if .IsResponding }} + + {{ end }} + {{ if .Trigger.IsPush }} + {{ i "git-commit-horizontal" "size-4 text-gray-500 dark:text-gray-400 shrink-0" }} + Push to + {{ $target }} + {{ else if .Trigger.IsPullRequest }} + {{ i "git-pull-request" "size-4 text-gray-500 dark:text-gray-400 shrink-0" }} + Pull request + {{ $target }} + {{ i "arrow-left" "size-3 text-gray-500 dark:text-gray-400" }} + {{ .Trigger.PRSourceBranch }} + {{ end }} + {{ if .IsResponding }} + + {{ end }} +
-
- {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" . "RepoInfo" $root.RepoInfo) }} + +
+ + -
- {{ template "repo/fragments/shortTimeAgo" .Created }} + +
+ {{ template "repo/fragments/time" .Created }}
- {{ $t := .TimeTaken }} -
+ +
+ {{ $t := .TimeTaken }} {{ if $t }} - + + {{ i "clock" "size-3" }} + + {{ else }} - - {{ end }} -
- -
- {{ if $link }} - - {{ i "arrow-up-right" "size-4" }} - - + -- {{ end }}
-
+
+
{{ end }} {{ end }} -- 2.51.2