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

validate_pipeline_popover.vue « popovers « components « pipeline_editor « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4730a5212279845420f497ba34df43bc4346278b (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
<script>
import { GlLink, GlPopover, GlOutsideDirective as Outside, GlSprintf } from '@gitlab/ui';
import { __, s__ } from '~/locale';
import { VALIDATE_TAB_FEEDBACK_URL } from '../../constants';

export const i18n = {
  feedbackLink: __('Provide Feedback'),
  popoverContent: s__(
    'PipelineEditor|Pipeline behavior will be simulated including the %{codeStart}rules%{codeEnd} %{codeStart}only%{codeEnd} %{codeStart}except%{codeEnd} and %{codeStart}needs%{codeEnd} job dependencies. %{linkStart}Learn more%{linkEnd}',
  ),
  title: s__('PipelineEditor|Validate pipeline under simulated conditions'),
};

export default {
  name: 'ValidatePipelinePopover',
  directives: { Outside },
  components: {
    GlLink,
    GlPopover,
    GlSprintf,
  },
  inject: ['simulatePipelineHelpPagePath'],
  data() {
    return {
      showPopover: false,
    };
  },
  methods: {
    dismiss() {
      this.showPopover = false;
    },
  },
  i18n,
  VALIDATE_TAB_FEEDBACK_URL,
};
</script>

<template>
  <gl-popover
    :show.sync="showPopover"
    target="validate-pipeline-help"
    triggers="hover focus"
    placement="top"
  >
    <p class="gl-my-3 gl-font-weight-bold">{{ $options.i18n.title }}</p>
    <p>
      <gl-sprintf :message="$options.i18n.popoverContent">
        <template #code="{ content }">
          <code>{{ content }}</code>
        </template>
        <template #link="{ content }">
          <gl-link
            class="gl-font-sm"
            target="_blank"
            :href="simulatePipelineHelpPagePath"
            data-testid="help-link"
            >{{ content }}</gl-link
          >
        </template>
      </gl-sprintf>
    </p>
    <p class="gl-text-right gl-mb-3">
      <gl-link
        class="gl-font-sm"
        target="_blank"
        :href="$options.VALIDATE_TAB_FEEDBACK_URL"
        data-testid="feedback-link"
        >{{ $options.i18n.feedbackLink }}</gl-link
      >
    </p>
  </gl-popover>
</template>