summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/integrations
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /app/assets/javascripts/integrations
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
downloadgitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/assets/javascripts/integrations')
-rw-r--r--app/assets/javascripts/integrations/edit/components/active_toggle.vue37
-rw-r--r--app/assets/javascripts/integrations/edit/components/dynamic_field.vue4
-rw-r--r--app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue2
-rw-r--r--app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue75
-rw-r--r--app/assets/javascripts/integrations/edit/components/override_dropdown.vue6
-rw-r--r--app/assets/javascripts/integrations/edit/components/trigger_fields.vue2
-rw-r--r--app/assets/javascripts/integrations/integration_settings_form.js2
7 files changed, 20 insertions, 108 deletions
diff --git a/app/assets/javascripts/integrations/edit/components/active_toggle.vue b/app/assets/javascripts/integrations/edit/components/active_toggle.vue
index a3087c8958e..e6a96600539 100644
--- a/app/assets/javascripts/integrations/edit/components/active_toggle.vue
+++ b/app/assets/javascripts/integrations/edit/components/active_toggle.vue
@@ -1,8 +1,7 @@
<script>
import { mapGetters } from 'vuex';
-import eventHub from '../event_hub';
-import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { GlFormGroup, GlToggle } from '@gitlab/ui';
+import eventHub from '../event_hub';
export default {
name: 'ActiveToggle',
@@ -10,7 +9,6 @@ export default {
GlFormGroup,
GlToggle,
},
- mixins: [glFeatureFlagsMixin()],
props: {
initialActivated: {
type: Boolean,
@@ -40,28 +38,13 @@ export default {
</script>
<template>
- <div v-if="glFeatures.integrationFormRefactor">
- <gl-form-group :label="__('Enable integration')" label-for="service[active]">
- <gl-toggle
- v-model="activated"
- name="service[active]"
- class="gl-display-block gl-line-height-0"
- :disabled="isInheriting"
- @change="onToggle"
- />
- </gl-form-group>
- </div>
- <div v-else>
- <div class="form-group row" role="group">
- <label for="service[active]" class="col-form-label col-sm-2">{{ __('Active') }}</label>
- <div class="col-sm-10 pt-1">
- <gl-toggle
- v-model="activated"
- name="service[active]"
- :disabled="isInheriting"
- @change="onToggle"
- />
- </div>
- </div>
- </div>
+ <gl-form-group :label="__('Enable integration')" label-for="service[active]">
+ <gl-toggle
+ v-model="activated"
+ name="service[active]"
+ class="gl-display-block gl-line-height-0"
+ :disabled="isInheriting"
+ @change="onToggle"
+ />
+ </gl-form-group>
</template>
diff --git a/app/assets/javascripts/integrations/edit/components/dynamic_field.vue b/app/assets/javascripts/integrations/edit/components/dynamic_field.vue
index 6053d11e6da..090381b8da4 100644
--- a/app/assets/javascripts/integrations/edit/components/dynamic_field.vue
+++ b/app/assets/javascripts/integrations/edit/components/dynamic_field.vue
@@ -1,9 +1,9 @@
<script>
import { mapGetters } from 'vuex';
-import eventHub from '../event_hub';
import { capitalize, lowerCase, isEmpty } from 'lodash';
-import { __, sprintf } from '~/locale';
import { GlFormGroup, GlFormCheckbox, GlFormInput, GlFormSelect, GlFormTextarea } from '@gitlab/ui';
+import eventHub from '../event_hub';
+import { __, sprintf } from '~/locale';
export default {
name: 'DynamicField',
diff --git a/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue b/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue
index 5444cd5a712..5a1f86718b0 100644
--- a/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue
+++ b/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue
@@ -1,5 +1,4 @@
<script>
-import eventHub from '../event_hub';
import {
GlFormGroup,
GlFormCheckbox,
@@ -9,6 +8,7 @@ import {
GlButton,
GlCard,
} from '@gitlab/ui';
+import eventHub from '../event_hub';
export default {
name: 'JiraIssuesFields',
diff --git a/app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue b/app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue
index 1d3354c6651..08f24ce8ab6 100644
--- a/app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue
+++ b/app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue
@@ -1,8 +1,7 @@
<script>
-import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { mapGetters } from 'vuex';
-import { s__ } from '~/locale';
import { GlFormGroup, GlFormCheckbox, GlFormRadio } from '@gitlab/ui';
+import { s__ } from '~/locale';
const commentDetailOptions = [
{
@@ -26,7 +25,6 @@ export default {
GlFormCheckbox,
GlFormRadio,
},
- mixins: [glFeatureFlagsMixin()],
props: {
initialTriggerCommit: {
type: Boolean,
@@ -65,7 +63,7 @@ export default {
</script>
<template>
- <div v-if="glFeatures.integrationFormRefactor">
+ <div>
<gl-form-group
:label="__('Trigger')"
label-for="service[trigger]"
@@ -130,73 +128,4 @@ export default {
</gl-form-radio>
</gl-form-group>
</div>
-
- <div v-else class="form-group row pt-2" role="group">
- <label for="service[trigger]" class="col-form-label col-sm-2 pt-0">{{ __('Trigger') }}</label>
- <div class="col-sm-10">
- <label class="weight-normal mb-2">
- {{
- s__(
- 'Integrations|When a Jira issue is mentioned in a commit or merge request a remote link and comment (if enabled) will be created.',
- )
- }}
- </label>
-
- <input name="service[commit_events]" type="hidden" :value="triggerCommit || false" />
- <gl-form-checkbox v-model="triggerCommit" :disabled="isInheriting">
- {{ __('Commit') }}
- </gl-form-checkbox>
-
- <input
- name="service[merge_requests_events]"
- type="hidden"
- :value="triggerMergeRequest || false"
- />
- <gl-form-checkbox v-model="triggerMergeRequest" :disabled="isInheriting">
- {{ __('Merge request') }}
- </gl-form-checkbox>
-
- <div
- v-show="triggerCommit || triggerMergeRequest"
- class="mt-4"
- data-testid="comment-settings"
- >
- <label>
- {{ s__('Integrations|Comment settings:') }}
- </label>
- <input
- name="service[comment_on_event_enabled]"
- type="hidden"
- :value="enableComments || false"
- />
- <gl-form-checkbox v-model="enableComments" :disabled="isInheriting">
- {{ s__('Integrations|Enable comments') }}
- </gl-form-checkbox>
-
- <div v-show="enableComments" class="mt-4" data-testid="comment-detail">
- <label>
- {{ s__('Integrations|Comment detail:') }}
- </label>
- <input
- v-if="isInheriting"
- name="service[comment_detail]"
- type="hidden"
- :value="commentDetail"
- />
- <gl-form-radio
- v-for="commentDetailOption in commentDetailOptions"
- :key="commentDetailOption.value"
- v-model="commentDetail"
- :value="commentDetailOption.value"
- :disabled="isInheriting"
- >
- {{ commentDetailOption.label }}
- <template #help>
- {{ commentDetailOption.help }}
- </template>
- </gl-form-radio>
- </div>
- </div>
- </div>
- </div>
</template>
diff --git a/app/assets/javascripts/integrations/edit/components/override_dropdown.vue b/app/assets/javascripts/integrations/edit/components/override_dropdown.vue
index 0ae2f267434..accfc26974c 100644
--- a/app/assets/javascripts/integrations/edit/components/override_dropdown.vue
+++ b/app/assets/javascripts/integrations/edit/components/override_dropdown.vue
@@ -1,11 +1,11 @@
<script>
-import { s__ } from '~/locale';
import { GlNewDropdown, GlNewDropdownItem } from '@gitlab/ui';
+import { s__ } from '~/locale';
const dropdownOptions = [
{
value: false,
- text: s__('Integrations|Use instance level settings'),
+ text: s__('Integrations|Use default settings'),
},
{
value: true,
@@ -48,7 +48,7 @@ export default {
<div
class="gl-display-flex gl-justify-content-space-between gl-align-items-baseline gl-py-4 gl-mt-5 gl-mb-6 gl-border-t-1 gl-border-t-solid gl-border-b-1 gl-border-b-solid gl-border-gray-100"
>
- <span>{{ s__('Integrations|This integration has multiple settings available.') }}</span>
+ <span>{{ s__('Integrations|Default settings are inherited from the instance level.') }}</span>
<input name="service[inherit_from_id]" :value="override ? '' : inheritFromId" type="hidden" />
<gl-new-dropdown :text="selected.text">
<gl-new-dropdown-item
diff --git a/app/assets/javascripts/integrations/edit/components/trigger_fields.vue b/app/assets/javascripts/integrations/edit/components/trigger_fields.vue
index bb1e0d9d360..32878c6afa4 100644
--- a/app/assets/javascripts/integrations/edit/components/trigger_fields.vue
+++ b/app/assets/javascripts/integrations/edit/components/trigger_fields.vue
@@ -1,8 +1,8 @@
<script>
import { mapGetters } from 'vuex';
import { startCase } from 'lodash';
-import { __ } from '~/locale';
import { GlFormGroup, GlFormCheckbox, GlFormInput } from '@gitlab/ui';
+import { __ } from '~/locale';
const typeWithPlaceholder = {
SLACK: 'slack',
diff --git a/app/assets/javascripts/integrations/integration_settings_form.js b/app/assets/javascripts/integrations/integration_settings_form.js
index 837409a91ca..1135065b06c 100644
--- a/app/assets/javascripts/integrations/integration_settings_form.js
+++ b/app/assets/javascripts/integrations/integration_settings_form.js
@@ -1,6 +1,6 @@
import $ from 'jquery';
import axios from '../lib/utils/axios_utils';
-import flash from '../flash';
+import { deprecatedCreateFlash as flash } from '../flash';
import { __ } from '~/locale';
import initForm from './edit';
import eventHub from './edit/event_hub';