Commit c20990cf authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '342438-follow-up-from-define-integration-form-events-as-constants' into 'master'

Consolidate constants files in `~/integrations`

See merge request gitlab-org/gitlab!71883
parents 4eaa23f6 8a9f1af2
import { s__ } from '~/locale';
export const TEST_INTEGRATION_EVENT = 'testIntegration';
export const SAVE_INTEGRATION_EVENT = 'saveIntegration';
export const GET_JIRA_ISSUE_TYPES_EVENT = 'getJiraIssueTypes';
export const TOGGLE_INTEGRATION_EVENT = 'toggleIntegration';
export const VALIDATE_INTEGRATION_FORM_EVENT = 'validateIntegrationForm';
export const integrationLevels = {
GROUP: 'group',
INSTANCE: 'instance',
};
export const defaultIntegrationLevel = integrationLevels.INSTANCE;
export const overrideDropdownDescriptions = {
[integrationLevels.GROUP]: s__(
'Integrations|Default settings are inherited from the group level.',
),
[integrationLevels.INSTANCE]: s__(
'Integrations|Default settings are inherited from the instance level.',
),
};
......@@ -2,8 +2,11 @@
import { GlButton, GlModalDirective, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import { mapState, mapActions, mapGetters } from 'vuex';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { TEST_INTEGRATION_EVENT, SAVE_INTEGRATION_EVENT } from '~/integrations/constants';
import { integrationLevels } from '../constants';
import {
TEST_INTEGRATION_EVENT,
SAVE_INTEGRATION_EVENT,
integrationLevels,
} from '~/integrations/constants';
import eventHub from '../event_hub';
import ActiveCheckbox from './active_checkbox.vue';
......
......@@ -2,7 +2,7 @@
import { GlDropdown, GlDropdownItem, GlLink } from '@gitlab/ui';
import { mapState } from 'vuex';
import { s__ } from '~/locale';
import { defaultIntegrationLevel, overrideDropdownDescriptions } from '../constants';
import { defaultIntegrationLevel, overrideDropdownDescriptions } from '~/integrations/constants';
const dropdownOptions = [
{
......
import { s__ } from '~/locale';
export const integrationLevels = {
GROUP: 'group',
INSTANCE: 'instance',
};
export const defaultIntegrationLevel = integrationLevels.INSTANCE;
export const overrideDropdownDescriptions = {
[integrationLevels.GROUP]: s__(
'Integrations|Default settings are inherited from the group level.',
),
[integrationLevels.INSTANCE]: s__(
'Integrations|Default settings are inherited from the instance level.',
),
};
......@@ -11,7 +11,7 @@ import JiraTriggerFields from '~/integrations/edit/components/jira_trigger_field
import OverrideDropdown from '~/integrations/edit/components/override_dropdown.vue';
import ResetConfirmationModal from '~/integrations/edit/components/reset_confirmation_modal.vue';
import TriggerFields from '~/integrations/edit/components/trigger_fields.vue';
import { integrationLevels } from '~/integrations/edit/constants';
import { integrationLevels } from '~/integrations/constants';
import { createStore } from '~/integrations/edit/store';
describe('IntegrationForm', () => {
......
......@@ -2,7 +2,7 @@ import { GlDropdown, GlLink } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import OverrideDropdown from '~/integrations/edit/components/override_dropdown.vue';
import { integrationLevels, overrideDropdownDescriptions } from '~/integrations/edit/constants';
import { integrationLevels, overrideDropdownDescriptions } from '~/integrations/constants';
import { createStore } from '~/integrations/edit/store';
describe('OverrideDropdown', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment