diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /app/assets/javascripts/pipeline_editor/components/drawer/cards/pipeline_config_reference_card.vue | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'app/assets/javascripts/pipeline_editor/components/drawer/cards/pipeline_config_reference_card.vue')
-rw-r--r-- | app/assets/javascripts/pipeline_editor/components/drawer/cards/pipeline_config_reference_card.vue | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/app/assets/javascripts/pipeline_editor/components/drawer/cards/pipeline_config_reference_card.vue b/app/assets/javascripts/pipeline_editor/components/drawer/cards/pipeline_config_reference_card.vue index 04140434af2..bc9203b9c5b 100644 --- a/app/assets/javascripts/pipeline_editor/components/drawer/cards/pipeline_config_reference_card.vue +++ b/app/assets/javascripts/pipeline_editor/components/drawer/cards/pipeline_config_reference_card.vue @@ -1,8 +1,20 @@ <script> import { GlLink, GlSprintf } from '@gitlab/ui'; import { s__ } from '~/locale'; +import Tracking from '~/tracking'; +import { + CI_EXAMPLES_LINK, + CI_HELP_LINK, + CI_NEEDS_LINK, + CI_YAML_LINK, + pipelineEditorTrackingOptions, +} from '../../../constants'; export default { + CI_EXAMPLES_LINK, + CI_HELP_LINK, + CI_NEEDS_LINK, + CI_YAML_LINK, i18n: { title: s__('PipelineEditorTutorial|⚙️ Pipeline configuration reference'), firstParagraph: s__('PipelineEditorTutorial|Resources to help with your CI/CD configuration:'), @@ -23,7 +35,14 @@ export default { GlLink, GlSprintf, }, + mixins: [Tracking.mixin()], inject: ['ciExamplesHelpPagePath', 'ciHelpPagePath', 'needsHelpPagePath', 'ymlHelpPagePath'], + methods: { + trackHelpPageClick(key) { + const { label, actions } = pipelineEditorTrackingOptions; + this.track(actions.helpDrawerLinks[key], { label }); + }, + }, }; </script> <template> @@ -34,7 +53,11 @@ export default { <li> <gl-sprintf :message="$options.i18n.browseExamples"> <template #link="{ content }"> - <gl-link :href="ciExamplesHelpPagePath" target="_blank"> + <gl-link + :href="ciExamplesHelpPagePath" + target="_blank" + @click="trackHelpPageClick($options.CI_EXAMPLES_LINK)" + > {{ content }} </gl-link> </template> @@ -43,7 +66,11 @@ export default { <li> <gl-sprintf :message="$options.i18n.viewSyntaxRef"> <template #link="{ content }"> - <gl-link :href="ymlHelpPagePath" target="_blank"> + <gl-link + :href="ymlHelpPagePath" + target="_blank" + @click="trackHelpPageClick($options.CI_YAML_LINK)" + > {{ content }} </gl-link> </template> @@ -52,7 +79,11 @@ export default { <li> <gl-sprintf :message="$options.i18n.learnMore"> <template #link="{ content }"> - <gl-link :href="ciHelpPagePath" target="_blank"> + <gl-link + :href="ciHelpPagePath" + target="_blank" + @click="trackHelpPageClick($options.CI_HELP_LINK)" + > {{ content }} </gl-link> </template> @@ -61,7 +92,11 @@ export default { <li> <gl-sprintf :message="$options.i18n.needs"> <template #link="{ content }"> - <gl-link :href="needsHelpPagePath" target="_blank"> + <gl-link + :href="needsHelpPagePath" + target="_blank" + @click="trackHelpPageClick($options.CI_NEEDS_LINK)" + > {{ content }} </gl-link> </template> |