diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-03 12:10:18 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-03 12:10:18 +0300 |
commit | e5f183140340a76754af3beabff0fcd74212a102 (patch) | |
tree | da0dcb2b596037e9ddda171d6ec63393462bae0f /app/assets/javascripts/cycle_analytics | |
parent | 685084aaf40a35358bd7c5135b08dc7e0d3439a7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/cycle_analytics')
-rw-r--r-- | app/assets/javascripts/cycle_analytics/components/path_navigation.vue | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/assets/javascripts/cycle_analytics/components/path_navigation.vue b/app/assets/javascripts/cycle_analytics/components/path_navigation.vue index abdc546632f..c1e33f73b13 100644 --- a/app/assets/javascripts/cycle_analytics/components/path_navigation.vue +++ b/app/assets/javascripts/cycle_analytics/components/path_navigation.vue @@ -5,6 +5,7 @@ import { GlDeprecatedSkeletonLoading as GlSkeletonLoading, GlSafeHtmlDirective as SafeHtml, } from '@gitlab/ui'; +import Tracking from '~/tracking'; import { OVERVIEW_STAGE_ID } from '../constants'; export default { @@ -17,6 +18,7 @@ export default { directives: { SafeHtml, }, + mixins: [Tracking.mixin()], props: { loading: { type: Boolean, @@ -45,6 +47,14 @@ export default { hasStageCount({ stageCount = null }) { return stageCount !== null; }, + onSelectStage($event) { + this.$emit('selected', $event); + this.track('click_path_navigation', { + extra: { + stage_id: $event.id, + }, + }); + }, }, popoverOptions: { triggers: 'hover', @@ -54,7 +64,7 @@ export default { </script> <template> <gl-skeleton-loading v-if="loading" :lines="2" class="h-auto pt-2 pb-1" /> - <gl-path v-else :key="selectedStage.id" :items="stages" @selected="$emit('selected', $event)"> + <gl-path v-else :key="selectedStage.id" :items="stages" @selected="onSelectStage"> <template #default="{ pathItem, pathId }"> <gl-popover v-if="showPopover(pathItem)" |