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

pipelines_status_badge.vue « pipelines_list « components « pipelines « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e765a8cd86ce8f064d4d117a04fa9ff7f27514ff (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
38
39
40
41
42
43
<script>
import { CHILD_VIEW } from '~/pipelines/constants';
import CiBadge from '~/vue_shared/components/ci_badge_link.vue';
import PipelinesTimeago from './time_ago.vue';

export default {
  components: {
    CiBadge,
    PipelinesTimeago,
  },
  props: {
    pipeline: {
      type: Object,
      required: true,
    },
    viewType: {
      type: String,
      required: true,
    },
  },
  computed: {
    pipelineStatus() {
      return this.pipeline?.details?.status ?? {};
    },
    isChildView() {
      return this.viewType === CHILD_VIEW;
    },
  },
};
</script>

<template>
  <div>
    <ci-badge
      class="gl-mb-3"
      :status="pipelineStatus"
      :show-text="!isChildView"
      :icon-classes="'gl-vertical-align-middle!'"
      data-qa-selector="pipeline_commit_status"
    />
    <pipelines-timeago class="gl-mt-3" :pipeline="pipeline" />
  </div>
</template>