summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/integrations
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-20 13:49:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-20 13:49:51 +0000
commit71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch)
tree6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /app/assets/javascripts/integrations
parenta7253423e3403b8c08f8a161e5937e1488f5f407 (diff)
downloadgitlab-ce-71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e.tar.gz
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/integrations')
-rw-r--r--app/assets/javascripts/integrations/constants.js16
-rw-r--r--app/assets/javascripts/integrations/edit/components/integration_form.vue22
-rw-r--r--app/assets/javascripts/integrations/index/components/integrations_table.vue14
3 files changed, 33 insertions, 19 deletions
diff --git a/app/assets/javascripts/integrations/constants.js b/app/assets/javascripts/integrations/constants.js
index b956bdf067d..5d08520bb5c 100644
--- a/app/assets/javascripts/integrations/constants.js
+++ b/app/assets/javascripts/integrations/constants.js
@@ -58,19 +58,21 @@ export const integrationTriggerEvents = {
export const integrationTriggerEventTitles = {
[integrationTriggerEvents.PUSH]: s__('IntegrationEvents|A push is made to the repository'),
[integrationTriggerEvents.ISSUE]: s__(
- 'IntegrationEvents|An issue is created, updated, or closed',
+ 'IntegrationEvents|An issue is created, closed, or reopened',
),
[integrationTriggerEvents.CONFIDENTIAL_ISSUE]: s__(
- 'IntegrationEvents|A confidential issue is created, updated, or closed',
+ 'IntegrationEvents|A confidential issue is created, closed, or reopened',
),
[integrationTriggerEvents.MERGE_REQUEST]: s__(
- 'IntegrationEvents|A merge request is created, updated, or merged',
+ 'IntegrationEvents|A merge request is created, merged, closed, or reopened',
),
- [integrationTriggerEvents.NOTE]: s__('IntegrationEvents|A comment is added on an issue'),
+ [integrationTriggerEvents.NOTE]: s__('IntegrationEvents|A comment is added'),
[integrationTriggerEvents.CONFIDENTIAL_NOTE]: s__(
- 'IntegrationEvents|A comment is added on a confidential issue',
+ 'IntegrationEvents|An internal note or comment on a confidential issue is added',
+ ),
+ [integrationTriggerEvents.TAG_PUSH]: s__(
+ 'IntegrationEvents|A tag is pushed to the repository or removed',
),
- [integrationTriggerEvents.TAG_PUSH]: s__('IntegrationEvents|A tag is pushed to the repository'),
[integrationTriggerEvents.PIPELINE]: s__('IntegrationEvents|A pipeline status changes'),
[integrationTriggerEvents.WIKI_PAGE]: s__('IntegrationEvents|A wiki page is created or updated'),
[integrationTriggerEvents.DEPLOYMENT]: s__(
@@ -88,7 +90,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/edit/components/integration_form.vue b/app/assets/javascripts/integrations/edit/components/integration_form.vue
index 1e58b604bf7..d671ec33bcb 100644
--- a/app/assets/javascripts/integrations/edit/components/integration_form.vue
+++ b/app/assets/javascripts/integrations/edit/components/integration_form.vue
@@ -208,6 +208,17 @@ export default {
data-testid="redirect-to-field"
/>
+ <div v-if="shouldUpgradeSlack" class="gl-mb-6">
+ <gl-alert
+ :dismissible="false"
+ :title="$options.slackUpgradeInfo.title"
+ :primary-button-link="customState.upgradeSlackUrl"
+ :primary-button-text="$options.slackUpgradeInfo.btnText"
+ class="gl-mb-5"
+ >{{ $options.slackUpgradeInfo.text }}</gl-alert
+ >
+ </div>
+
<override-dropdown
v-if="defaultState !== null"
:inherit-from-id="defaultState.id"
@@ -241,17 +252,6 @@ export default {
</div>
</section>
- <div v-if="shouldUpgradeSlack" class="gl-border-t">
- <gl-alert
- :dismissible="false"
- :title="$options.slackUpgradeInfo.title"
- :primary-button-link="customState.upgradeSlackUrl"
- :primary-button-text="$options.slackUpgradeInfo.btnText"
- class="gl-mb-8 gl-mt-5"
- >{{ $options.slackUpgradeInfo.text }}</gl-alert
- >
- </div>
-
<template v-if="hasSections">
<integration-form-section
v-for="(section, index) in customState.sections"
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"