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

root_graph_layout.vue « components « graph « pipeline_details « ci « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7c07591d0de81ab115c30cf50ae089aa59df4a51 (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
44
45
46
47
48
49
50
51
52
53
54
55
<script>
import { GlCard } from '@gitlab/ui';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';

export default {
  components: {
    GlCard,
  },
  mixins: [glFeatureFlagMixin()],
  props: {
    stageClasses: {
      type: String,
      required: false,
      default: '',
    },
    jobClasses: {
      type: String,
      required: false,
      default: '',
    },
  },
  computed: {
    isNewPipelineGraph() {
      return this.glFeatures.newPipelineGraph;
    },
  },
};
</script>
<template>
  <div>
    <gl-card
      v-if="isNewPipelineGraph"
      class="gl-rounded-lg"
      header-class="gl-rounded-lg gl-px-0 gl-py-0 gl-bg-white gl-border-b-0"
      body-class="gl-pt-2 gl-pb-0 gl-px-2"
    >
      <template #header>
        <slot name="stages"></slot>
      </template>

      <slot name="jobs"></slot>
    </gl-card>
    <template v-else>
      <div class="gl-display-flex gl-align-items-center gl-w-full" :class="stageClasses">
        <slot name="stages"> </slot>
      </div>
      <div
        class="gl-display-flex gl-flex-direction-column gl-align-items-center gl-w-full"
        :class="jobClasses"
      >
        <slot name="jobs"> </slot>
      </div>
    </template>
  </div>
</template>