summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/integrations/constants.js
blob: b9975eed716452c4743beeb005637e40715b6ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { s__, __ } from '~/locale';

export const integrationLevels = {
  PROJECT: 'project',
  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.',
  ),
};

export const I18N_FETCH_TEST_SETTINGS_DEFAULT_ERROR_MESSAGE = s__(
  'Integrations|Connection failed. Please check your settings.',
);
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');

export const integrationFormSections = {
  CONNECTION: 'connection',
  JIRA_TRIGGER: 'jira_trigger',
  JIRA_ISSUES: 'jira_issues',
};

export const integrationFormSectionComponents = {
  [integrationFormSections.CONNECTION]: 'IntegrationSectionConnection',
  [integrationFormSections.JIRA_TRIGGER]: 'IntegrationSectionJiraTrigger',
  [integrationFormSections.JIRA_ISSUES]: 'IntegrationSectionJiraIssues',
};

export const billingPlans = {
  PREMIUM: 'premium',
  ULTIMATE: 'ultimate',
};

export const billingPlanNames = {
  [billingPlans.PREMIUM]: s__('BillingPlans|Premium'),
  [billingPlans.ULTIMATE]: s__('BillingPlans|Ultimate'),
};