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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
2.5 KiB
JavaScript
Raw Normal View History

2021-01-03 14:25:43 +05:30
import { s__ } from '~/locale';
2020-10-24 23:57:45 +05:30
export const I18N = {
errorMsg: s__('IncidentManagement|There was an error displaying the incidents.'),
noIncidents: s__('IncidentManagement|No incidents to display.'),
unassigned: s__('IncidentManagement|Unassigned'),
createIncidentBtnLabel: s__('IncidentManagement|Create incident'),
unPublished: s__('IncidentManagement|Unpublished'),
2022-05-07 20:08:51 +05:30
noEscalationStatus: s__('IncidentManagement|None'),
2020-10-24 23:57:45 +05:30
emptyState: {
title: s__('IncidentManagement|Display your incidents in a dedicated view'),
2020-11-24 15:15:51 +05:30
emptyClosedTabTitle: s__('IncidentManagement|There are no closed incidents'),
2020-10-24 23:57:45 +05:30
description: s__(
2021-12-11 22:18:48 +05:30
'IncidentManagement|All alerts promoted to incidents are automatically displayed within the list. You can also create a new incident using the button below.',
),
cannotCreateIncidentDescription: s__(
'IncidentManagement|All alerts promoted to incidents are automatically displayed within the list.',
2020-10-24 23:57:45 +05:30
),
},
};
export const INCIDENT_STATUS_TABS = [
{
title: s__('IncidentManagement|Open'),
status: 'OPENED',
filters: 'opened',
},
{
title: s__('IncidentManagement|Closed'),
status: 'CLOSED',
filters: 'closed',
},
{
title: s__('IncidentManagement|All'),
status: 'ALL',
filters: 'all',
},
];
2022-05-07 20:08:51 +05:30
export const ESCALATION_STATUSES = {
TRIGGERED: s__('AlertManagement|Triggered'),
ACKNOWLEDGED: s__('AlertManagement|Acknowledged'),
RESOLVED: s__('AlertManagement|Resolved'),
};
2020-10-24 23:57:45 +05:30
2021-01-03 14:25:43 +05:30
export const TH_CREATED_AT_TEST_ID = { 'data-testid': 'incident-management-created-at-sort' };
export const TH_SEVERITY_TEST_ID = { 'data-testid': 'incident-management-severity-sort' };
2022-06-21 17:19:12 +05:30
export const TH_ESCALATION_STATUS_TEST_ID = { 'data-testid': 'incident-management-status-sort' };
2021-01-03 14:25:43 +05:30
export const TH_INCIDENT_SLA_TEST_ID = { 'data-testid': 'incident-management-sla' };
export const TH_PUBLISHED_TEST_ID = { 'data-testid': 'incident-management-published-sort' };
export const INCIDENT_DETAILS_PATH = 'incident';
2023-06-20 00:43:36 +05:30
const category = 'Incident Management'; // eslint-disable-line @gitlab/require-i18n-strings
2021-01-03 14:25:43 +05:30
/**
* Tracks snowplow event when user clicks create new incident
*/
export const trackIncidentCreateNewOptions = {
2023-06-20 00:43:36 +05:30
category,
2021-01-03 14:25:43 +05:30
action: 'create_incident_button_clicks',
};
/**
* Tracks snowplow event when user views incidents list
*/
export const trackIncidentListViewsOptions = {
2023-06-20 00:43:36 +05:30
category,
2021-01-03 14:25:43 +05:30
action: 'view_incidents_list',
};
/**
* Tracks snowplow event when user views incident details
*/
export const trackIncidentDetailsViewsOptions = {
2023-06-20 00:43:36 +05:30
category,
2021-01-03 14:25:43 +05:30
action: 'view_incident_details',
};