From d1f4ef3cb7ff63c92dc17589a05848938251c7f1 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 21 Dec 2021 06:13:16 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../javascripts/integrations/constants.js | 3 + .../components/integration_overrides.vue | 7 ++ .../overrides/components/integration_tabs.vue | 52 +++++++++++++++ .../integrations/overrides/index.js | 5 +- app/helpers/integrations_helper.rb | 3 +- .../shared/integrations/overrides.html.haml | 3 +- .../components/integration_overrides_spec.js | 16 +++++ .../components/integration_tabs_spec.js | 64 +++++++++++++++++++ spec/helpers/integrations_helper_spec.rb | 14 ++++ 9 files changed, 163 insertions(+), 4 deletions(-) create mode 100644 app/assets/javascripts/integrations/overrides/components/integration_tabs.vue create mode 100644 spec/frontend/integrations/overrides/components/integration_tabs_spec.js diff --git a/app/assets/javascripts/integrations/constants.js b/app/assets/javascripts/integrations/constants.js index 84656bd41bb..7d32fafdf92 100644 --- a/app/assets/javascripts/integrations/constants.js +++ b/app/assets/javascripts/integrations/constants.js @@ -23,3 +23,6 @@ export const I18N_FETCH_TEST_SETTINGS_DEFAULT_ERROR_MESSAGE = s__( ); export const I18N_DEFAULT_ERROR_MESSAGE = __('Something went wrong on our end.'); export const I18N_SUCCESSFUL_CONNECTION_MESSAGE = s__('Integrations|Connection successful.'); + +export const settingsTabTitle = __('Settings'); +export const overridesTabTitle = s__('Integrations|Projects using custom settings'); diff --git a/app/assets/javascripts/integrations/overrides/components/integration_overrides.vue b/app/assets/javascripts/integrations/overrides/components/integration_overrides.vue index 3fc554c5371..f2d3e6489ee 100644 --- a/app/assets/javascripts/integrations/overrides/components/integration_overrides.vue +++ b/app/assets/javascripts/integrations/overrides/components/integration_overrides.vue @@ -11,6 +11,8 @@ import { __, s__ } from '~/locale'; import ProjectAvatar from '~/vue_shared/components/project_avatar.vue'; import UrlSync from '~/vue_shared/components/url_sync.vue'; +import IntegrationTabs from './integration_tabs.vue'; + const DEFAULT_PAGE = 1; export default { @@ -23,6 +25,7 @@ export default { GlAlert, ProjectAvatar, UrlSync, + IntegrationTabs, }, props: { overridesPath: { @@ -46,6 +49,9 @@ export default { }; }, computed: { + overridesCount() { + return this.isLoading ? null : this.totalItems; + }, showPagination() { return this.totalItems > this.$options.DEFAULT_PER_PAGE && this.overrides.length > 0; }, @@ -100,6 +106,7 @@ export default {