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

pipelines_ci_templates.vue « empty_state « 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: a629721340265b44f0a27302c4855e060339b0a8 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<script>
import { GlButton, GlCard, GlSprintf } from '@gitlab/ui';
import { mergeUrlParams } from '~/lib/utils/url_utility';
import { STARTER_TEMPLATE_NAME, I18N } from '~/ci/pipeline_editor/constants';
import Tracking from '~/tracking';
import CiTemplates from './ci_templates.vue';

export default {
  components: {
    GlButton,
    GlCard,
    GlSprintf,
    CiTemplates,
  },
  mixins: [Tracking.mixin()],
  STARTER_TEMPLATE_NAME,
  I18N,
  inject: ['pipelineEditorPath'],
  data() {
    return {
      gettingStartedTemplateUrl: mergeUrlParams(
        { template: STARTER_TEMPLATE_NAME },
        this.pipelineEditorPath,
      ),
      tracker: null,
    };
  },
  methods: {
    trackEvent(template) {
      this.track('template_clicked', {
        label: template,
      });
    },
  },
};
</script>
<template>
  <div>
    <h2 class="gl-font-size-h2 gl-text-gray-900">{{ $options.I18N.title }}</h2>

    <h2 class="gl-font-lg gl-text-gray-900">{{ $options.I18N.learnBasics.title }}</h2>
    <p class="gl-text-gray-800 gl-mb-6">
      <gl-sprintf :message="$options.I18N.learnBasics.subtitle">
        <template #code="{ content }">
          <code>{{ content }}</code>
        </template>
      </gl-sprintf>
    </p>

    <div class="gl-lg-w-25p gl-lg-pr-5 gl-mb-8">
      <gl-card>
        <div class="gl-flex-direction-row">
          <div class="gl-py-5"><gl-emoji class="gl-font-size-h2-xl" data-name="wave" /></div>
          <div class="gl-mb-3">
            <strong class="gl-text-gray-800 gl-mb-2">
              {{ $options.I18N.learnBasics.gettingStarted.title }}
            </strong>
          </div>
          <p class="gl-font-sm">{{ $options.I18N.learnBasics.gettingStarted.description }}</p>
        </div>

        <gl-button
          category="primary"
          variant="confirm"
          :href="gettingStartedTemplateUrl"
          data-testid="test-template-link"
          @click="trackEvent($options.STARTER_TEMPLATE_NAME)"
        >
          {{ $options.I18N.learnBasics.gettingStarted.cta }}
        </gl-button>
      </gl-card>
    </div>

    <h2 class="gl-font-lg gl-text-gray-900">{{ $options.I18N.templates.title }}</h2>
    <p class="gl-text-gray-800 gl-mb-6">{{ $options.I18N.templates.subtitle }}</p>

    <ci-templates />
  </div>
</template>