diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-07 12:07:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-07 12:07:25 +0300 |
commit | 929712792964c31c895cb83ebf0862da038c57a0 (patch) | |
tree | 030e74b85ebcc922e08e1d1f1da267c64dc85655 /app/assets | |
parent | 97815325b875a7bde0793cb0777e36b275ae1c6c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
4 files changed, 23 insertions, 4 deletions
diff --git a/app/assets/javascripts/pipelines/components/jobs/failed_jobs_table.vue b/app/assets/javascripts/pipelines/components/jobs/failed_jobs_table.vue index ec7000120f1..f84ae13180d 100644 --- a/app/assets/javascripts/pipelines/components/jobs/failed_jobs_table.vue +++ b/app/assets/javascripts/pipelines/components/jobs/failed_jobs_table.vue @@ -3,10 +3,11 @@ import { GlButton, GlLink, GlTableLite } from '@gitlab/ui'; import SafeHtml from '~/vue_shared/directives/safe_html'; import { __, s__ } from '~/locale'; import { createAlert } from '~/alert'; +import Tracking from '~/tracking'; import { redirectTo } from '~/lib/utils/url_utility'; // eslint-disable-line import/no-deprecated import CiBadgeLink from '~/vue_shared/components/ci_badge_link.vue'; import RetryFailedJobMutation from '../../graphql/mutations/retry_failed_job.mutation.graphql'; -import { DEFAULT_FIELDS } from '../../constants'; +import { DEFAULT_FIELDS, TRACKING_CATEGORIES } from '../../constants'; export default { fields: DEFAULT_FIELDS, @@ -20,6 +21,7 @@ export default { directives: { SafeHtml, }, + mixins: [Tracking.mixin()], props: { failedJobs: { type: Array, @@ -28,6 +30,8 @@ export default { }, methods: { async retryJob(id) { + this.track('click_retry', { label: TRACKING_CATEGORIES.failed }); + try { const { data: { diff --git a/app/assets/javascripts/pipelines/components/pipeline_tabs.vue b/app/assets/javascripts/pipelines/components/pipeline_tabs.vue index e14644ae0d5..35dde6379dd 100644 --- a/app/assets/javascripts/pipelines/components/pipeline_tabs.vue +++ b/app/assets/javascripts/pipelines/components/pipeline_tabs.vue @@ -1,12 +1,14 @@ <script> import { GlBadge, GlTabs, GlTab } from '@gitlab/ui'; import { __ } from '~/locale'; +import Tracking from '~/tracking'; import { failedJobsTabName, jobsTabName, needsTabName, pipelineTabName, testReportTabName, + TRACKING_CATEGORIES, } from '../constants'; export default { @@ -31,6 +33,7 @@ export default { GlTab, GlTabs, }, + mixins: [Tracking.mixin()], inject: ['defaultTabValue', 'failedJobsCount', 'totalJobCount', 'testsCount'], data() { return { @@ -56,6 +59,16 @@ export default { this.$router.push({ name: tabName }); }, + failedJobsTabClick() { + this.track('click_tab', { label: TRACKING_CATEGORIES.failed }); + + this.navigateTo(this.$options.tabNames.failures); + }, + testsTabClick() { + this.track('click_tab', { label: TRACKING_CATEGORIES.tests }); + + this.navigateTo(this.$options.tabNames.tests); + }, }, }; </script> @@ -100,7 +113,7 @@ export default { :active="isActive($options.tabNames.failures)" data-testid="failed-jobs-tab" lazy - @click="navigateTo($options.tabNames.failures)" + @click="failedJobsTabClick" > <template #title> <span class="gl-mr-2">{{ $options.i18n.tabs.failedJobsTitle }}</span> @@ -112,7 +125,7 @@ export default { :active="isActive($options.tabNames.tests)" data-testid="tests-tab" lazy - @click="navigateTo($options.tabNames.tests)" + @click="testsTabClick" > <template #title> <span class="gl-mr-2">{{ $options.i18n.tabs.testsTitle }}</span> diff --git a/app/assets/javascripts/pipelines/constants.js b/app/assets/javascripts/pipelines/constants.js index a6dd835bb15..d43e29dfae4 100644 --- a/app/assets/javascripts/pipelines/constants.js +++ b/app/assets/javascripts/pipelines/constants.js @@ -109,6 +109,8 @@ export const TRACKING_CATEGORIES = { table: 'pipelines_table_component', tabs: 'pipelines_filter_tabs', search: 'pipelines_filtered_search', + failed: 'pipeline_failed_jobs_tab', + tests: 'pipeline_tests_tab', }; // Pipeline Mini Graph diff --git a/app/assets/javascripts/vue_shared/issuable/show/components/issuable_header.vue b/app/assets/javascripts/vue_shared/issuable/show/components/issuable_header.vue index 1b7fecfde98..27276e55b13 100644 --- a/app/assets/javascripts/vue_shared/issuable/show/components/issuable_header.vue +++ b/app/assets/javascripts/vue_shared/issuable/show/components/issuable_header.vue @@ -192,7 +192,7 @@ export default { > <gl-button icon="chevron-double-lg-left" - class="gutter-toggle gl-display-block gl-sm-display-none!" + class="gl-ml-auto gl-display-block gl-sm-display-none!" :aria-label="__('Expand sidebar')" @click="handleRightSidebarToggleClick" /> |