diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-23 21:11:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-23 21:11:12 +0300 |
commit | cfc8827f6bf9573b02401b1908728da3aed96698 (patch) | |
tree | 30180d04062db3e56d1cc3772888ff4f15e56c10 /app/assets/javascripts/integrations | |
parent | a8b96c3072b3bd4d45e6364931042b350bf7fa2e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/integrations')
-rw-r--r-- | app/assets/javascripts/integrations/constants.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/integrations/index/components/integrations_table.vue | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/app/assets/javascripts/integrations/constants.js b/app/assets/javascripts/integrations/constants.js index b956bdf067d..bd7c38e96fe 100644 --- a/app/assets/javascripts/integrations/constants.js +++ b/app/assets/javascripts/integrations/constants.js @@ -88,7 +88,7 @@ export const billingPlanNames = { [billingPlans.ULTIMATE]: s__('BillingPlans|Ultimate'), }; -const INTEGRATION_TYPE_SLACK = 'slack'; +export const INTEGRATION_TYPE_SLACK = 'slack'; const INTEGRATION_TYPE_SLACK_APPLICATION = 'gitlab_slack_application'; const INTEGRATION_TYPE_MATTERMOST = 'mattermost'; diff --git a/app/assets/javascripts/integrations/index/components/integrations_table.vue b/app/assets/javascripts/integrations/index/components/integrations_table.vue index 439c243f418..62f0fe4d6bf 100644 --- a/app/assets/javascripts/integrations/index/components/integrations_table.vue +++ b/app/assets/javascripts/integrations/index/components/integrations_table.vue @@ -1,7 +1,9 @@ <script> import { GlIcon, GlLink, GlTable, GlTooltipDirective } from '@gitlab/ui'; +import { INTEGRATION_TYPE_SLACK } from '~/integrations/constants'; import { sprintf, s__, __ } from '~/locale'; import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; +import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; export default { components: { @@ -13,6 +15,7 @@ export default { directives: { GlTooltip: GlTooltipDirective, }, + mixins: [glFeatureFlagsMixin()], props: { integrations: { type: Array, @@ -55,6 +58,15 @@ export default { }, ]; }, + filteredIntegrations() { + if (this.glFeatures.integrationSlackAppNotifications) { + return this.integrations.filter( + (integration) => + !(integration.name === INTEGRATION_TYPE_SLACK && integration.active === false), + ); + } + return this.integrations; + }, }, methods: { getStatusTooltipTitle(integration) { @@ -67,7 +79,7 @@ export default { </script> <template> - <gl-table :items="integrations" :fields="fields" :empty-text="emptyText" show-empty fixed> + <gl-table :items="filteredIntegrations" :fields="fields" :empty-text="emptyText" show-empty fixed> <template #cell(active)="{ item }"> <gl-icon v-if="item.active" |