blob: 20e2c7e9dce11bb12c95759548e9244873525e5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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>
|