From 5c2f02c4a1fe1a34c86f1b4279a7d62c6d6d6265 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 9 Sep 2023 08:35:53 +0200 Subject: [PATCH] Harmonize pipeline status information and add a review link to the approval (#2345) Ref: https://github.com/woodpecker-ci/woodpecker/discussions/2162#discussioncomment-6666864 Adds a `PipelineInfo` view to harmonize pipeline status information and add a review link to the approval view. ![image](https://github.com/woodpecker-ci/woodpecker/assets/3391958/41062b5f-0f15-4c3c-b72c-e22092804072) ![image](https://github.com/woodpecker-ci/woodpecker/assets/3391958/4cfb1bc8-8bfd-4217-bce3-c9a1378f58ee) ![image](https://github.com/woodpecker-ci/woodpecker/assets/3391958/f3b22a07-464e-4d29-85f0-de122bce1bbe) --------- Co-authored-by: Lauris BH Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> --- web/components.d.ts | 1 + web/src/assets/locales/en.json | 3 +- .../components/repo/pipeline/PipelineInfo.vue | 9 ++++ web/src/views/repo/pipeline/Pipeline.vue | 42 +++++++++++++------ .../views/repo/pipeline/PipelineWrapper.vue | 7 ++-- 5 files changed, 44 insertions(+), 18 deletions(-) create mode 100644 web/src/components/repo/pipeline/PipelineInfo.vue diff --git a/web/components.d.ts b/web/components.d.ts index 55c5721b6..050a8c050 100644 --- a/web/components.d.ts +++ b/web/components.d.ts @@ -83,6 +83,7 @@ declare module '@vue/runtime-core' { Panel: typeof import('./src/components/layout/Panel.vue')['default'] PipelineFeedItem: typeof import('./src/components/pipeline-feed/PipelineFeedItem.vue')['default'] PipelineFeedSidebar: typeof import('./src/components/pipeline-feed/PipelineFeedSidebar.vue')['default'] + PipelineInfo: typeof import('./src/components/repo/pipeline/PipelineInfo.vue')['default'] PipelineItem: typeof import('./src/components/repo/pipeline/PipelineItem.vue')['default'] PipelineList: typeof import('./src/components/repo/pipeline/PipelineList.vue')['default'] PipelineLog: typeof import('./src/components/repo/pipeline/PipelineLog.vue')['default'] diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index 2aa2bb630..d80dd5d4a 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -255,7 +255,8 @@ "log_auto_scroll_off": "Turn off automatic scrolling" }, "protected": { - "awaits": "This pipeline is awaiting approval by some maintainer!", + "review": "Review changes", + "awaits": "This pipeline is awaiting approval by a maintainer!", "approve": "Approve", "decline": "Decline", "declined": "This pipeline has been declined!", diff --git a/web/src/components/repo/pipeline/PipelineInfo.vue b/web/src/components/repo/pipeline/PipelineInfo.vue new file mode 100644 index 000000000..f890f66ae --- /dev/null +++ b/web/src/components/repo/pipeline/PipelineInfo.vue @@ -0,0 +1,9 @@ + diff --git a/web/src/views/repo/pipeline/Pipeline.vue b/web/src/views/repo/pipeline/Pipeline.vue index 0f92948d6..ae460e373 100644 --- a/web/src/views/repo/pipeline/Pipeline.vue +++ b/web/src/views/repo/pipeline/Pipeline.vue @@ -9,15 +9,26 @@ />
-
- {{ $t('repo.pipeline.execution_error') }} - {{ error }} -
+ + +
+ {{ $t('repo.pipeline.execution_error') }}: + {{ error }} +
+
-
- -

{{ $t('repo.pipeline.protected.awaits') }}

-
+ + + {{ $t('repo.pipeline.protected.awaits') }} +
+
-
+ -
- -

{{ $t('repo.pipeline.protected.declined') }}

-
+ + +

{{ $t('repo.pipeline.protected.declined') }}

+
findStep(pipeline.value.workflows || [], selectedStepId.value || -1)); const error = computed(() => pipeline.value?.error || selectedStep.value?.error); diff --git a/web/src/views/repo/pipeline/PipelineWrapper.vue b/web/src/views/repo/pipeline/PipelineWrapper.vue index c71629552..4b0e80201 100644 --- a/web/src/views/repo/pipeline/PipelineWrapper.vue +++ b/web/src/views/repo/pipeline/PipelineWrapper.vue @@ -11,8 +11,8 @@