Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ci/pipelines_page/components/pipeline_status_badge.vue')
-rw-r--r--app/assets/javascripts/ci/pipelines_page/components/pipeline_status_badge.vue37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/assets/javascripts/ci/pipelines_page/components/pipeline_status_badge.vue b/app/assets/javascripts/ci/pipelines_page/components/pipeline_status_badge.vue
new file mode 100644
index 00000000000..20e2c7e9dce
--- /dev/null
+++ b/app/assets/javascripts/ci/pipelines_page/components/pipeline_status_badge.vue
@@ -0,0 +1,37 @@
+<script>
+import { TRACKING_CATEGORIES } from '~/ci/constants';
+import CiBadgeLink from '~/vue_shared/components/ci_badge_link.vue';
+import Tracking from '~/tracking';
+import PipelinesTimeago from './time_ago.vue';
+
+export default {
+ components: {
+ CiBadgeLink,
+ PipelinesTimeago,
+ },
+ mixins: [Tracking.mixin()],
+ props: {
+ pipeline: {
+ type: Object,
+ required: true,
+ },
+ },
+ computed: {
+ pipelineStatus() {
+ return this.pipeline?.details?.status ?? {};
+ },
+ },
+ methods: {
+ trackClick() {
+ this.track('click_ci_status_badge', { label: TRACKING_CATEGORIES.table });
+ },
+ },
+};
+</script>
+
+<template>
+ <div>
+ <ci-badge-link class="gl-mb-3" :status="pipelineStatus" @ciStatusBadgeClick="trackClick" />
+ <pipelines-timeago :pipeline="pipeline" />
+ </div>
+</template>