debian-mirror-gitlab/app/assets/javascripts/incidents_settings/constants.js

84 lines
2.7 KiB
JavaScript
Raw Normal View History

2020-07-28 23:09:34 +05:30
import { __, s__ } from '~/locale';
/* Integration tabs constants */
export const INTEGRATION_TABS_CONFIG = [
{
title: s__('IncidentSettings|Alert integration'),
component: 'AlertsSettingsForm',
active: true,
},
{
title: s__('IncidentSettings|PagerDuty integration'),
component: 'PagerDutySettingsForm',
active: true,
},
{
title: s__('IncidentSettings|Grafana integration'),
component: '',
active: false,
},
];
export const I18N_INTEGRATION_TABS = {
headerText: s__('IncidentSettings|Incidents'),
expandBtnLabel: __('Expand'),
subHeaderText: s__(
'IncidentSettings|Set up integrations with external tools to help better manage incidents.',
),
};
/* Alerts integration settings constants */
export const I18N_ALERT_SETTINGS_FORM = {
saveBtnLabel: __('Save changes'),
introText: __('Action to take when receiving an alert. %{docsLink}'),
introLinkText: __('More information.'),
2021-02-22 17:27:13 +05:30
createIncident: {
label: __('Create an incident. Incidents are created for each alert triggered.'),
2020-07-28 23:09:34 +05:30
},
2021-02-22 17:27:13 +05:30
incidentTemplate: {
label: __('Incident template (optional)'),
2020-07-28 23:09:34 +05:30
},
sendEmail: {
2021-04-17 20:07:23 +05:30
label: __('Send a single email notification to Owners and Maintainers for new alerts.'),
2020-07-28 23:09:34 +05:30
},
2020-11-24 15:15:51 +05:30
autoCloseIncidents: {
2021-06-08 01:23:25 +05:30
label: __(
'Automatically close associated incident when a recovery alert notification resolves an alert',
),
2020-11-24 15:15:51 +05:30
},
2020-07-28 23:09:34 +05:30
};
export const NO_ISSUE_TEMPLATE_SELECTED = { key: '', name: __('No template selected') };
export const TAKING_INCIDENT_ACTION_DOCS_LINK =
2020-10-24 23:57:45 +05:30
'/help/operations/metrics/alerts#trigger-actions-from-alerts';
2020-07-28 23:09:34 +05:30
export const ISSUE_TEMPLATES_DOCS_LINK =
2021-04-17 20:07:23 +05:30
'/help/user/project/description_templates#create-an-issue-template';
2020-07-28 23:09:34 +05:30
/* PagerDuty integration settings constants */
export const I18N_PAGERDUTY_SETTINGS_FORM = {
introText: s__(
2021-02-22 17:27:13 +05:30
'PagerDutySettings|Create a GitLab incident for each PagerDuty incident by %{linkStart}configuring a webhook in PagerDuty%{linkEnd}',
2020-07-28 23:09:34 +05:30
),
activeToggle: {
label: s__('PagerDutySettings|Active'),
},
webhookUrl: {
label: s__('PagerDutySettings|Webhook URL'),
resetWebhookUrl: s__('PagerDutySettings|Reset webhook URL'),
copyToClipboard: __('Copy'),
updateErrMsg: s__('PagerDutySettings|Failed to update Webhook URL'),
updateSuccessMsg: s__('PagerDutySettings|Webhook URL update was successful'),
restKeyInfo: s__(
"PagerDutySettings|Resetting the webhook URL for this project will require updating this integration's settings in PagerDuty.",
),
},
saveBtnLabel: __('Save changes'),
};
export const CONFIGURE_PAGERDUTY_WEBHOOK_DOCS_LINK = 'https://support.pagerduty.com/docs/webhooks';
/* common constants */
export const ERROR_MSG = __('There was an error saving your changes.');