2020-05-07 11:09:29 -04:00
|
|
|
import { s__ } from '~/locale';
|
|
|
|
|
2020-05-12 08:09:47 -04:00
|
|
|
export const ALERTS_SEVERITY_LABELS = {
|
|
|
|
CRITICAL: s__('AlertManagement|Critical'),
|
|
|
|
HIGH: s__('AlertManagement|High'),
|
|
|
|
MEDIUM: s__('AlertManagement|Medium'),
|
|
|
|
LOW: s__('AlertManagement|Low'),
|
|
|
|
INFO: s__('AlertManagement|Info'),
|
|
|
|
UNKNOWN: s__('AlertManagement|Unknown'),
|
|
|
|
};
|
|
|
|
|
2020-05-07 11:09:29 -04:00
|
|
|
export const ALERTS_STATUS_TABS = [
|
|
|
|
{
|
|
|
|
title: s__('AlertManagement|Open'),
|
2020-05-27 20:08:37 -04:00
|
|
|
status: 'OPEN',
|
|
|
|
filters: ['TRIGGERED', 'ACKNOWLEDGED'],
|
2020-05-07 11:09:29 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: s__('AlertManagement|Triggered'),
|
2020-05-27 20:08:37 -04:00
|
|
|
status: 'TRIGGERED',
|
|
|
|
filters: 'TRIGGERED',
|
2020-05-07 11:09:29 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: s__('AlertManagement|Acknowledged'),
|
2020-05-27 20:08:37 -04:00
|
|
|
status: 'ACKNOWLEDGED',
|
|
|
|
filters: 'ACKNOWLEDGED',
|
2020-05-07 11:09:29 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: s__('AlertManagement|Resolved'),
|
2020-05-27 20:08:37 -04:00
|
|
|
status: 'RESOLVED',
|
|
|
|
filters: 'RESOLVED',
|
2020-05-07 11:09:29 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: s__('AlertManagement|All alerts'),
|
2020-05-27 20:08:37 -04:00
|
|
|
status: 'ALL',
|
|
|
|
filters: ['TRIGGERED', 'ACKNOWLEDGED', 'RESOLVED'],
|
2020-05-07 11:09:29 -04:00
|
|
|
},
|
|
|
|
];
|
2020-05-26 11:08:17 -04:00
|
|
|
|
|
|
|
/* eslint-disable @gitlab/require-i18n-strings */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tracks snowplow event when user views alerts list
|
|
|
|
*/
|
|
|
|
export const trackAlertListViewsOptions = {
|
|
|
|
category: 'Alert Management',
|
|
|
|
action: 'view_alerts_list',
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tracks snowplow event when user views alert details
|
|
|
|
*/
|
|
|
|
export const trackAlertsDetailsViewsOptions = {
|
|
|
|
category: 'Alert Management',
|
|
|
|
action: 'view_alert_details',
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tracks snowplow event when alert status is updated
|
|
|
|
*/
|
|
|
|
export const trackAlertStatusUpdateOptions = {
|
|
|
|
category: 'Alert Management',
|
|
|
|
action: 'update_alert_status',
|
|
|
|
label: 'Status',
|
|
|
|
};
|
2020-06-01 11:08:16 -04:00
|
|
|
|
2020-08-25 05:52:44 -04:00
|
|
|
export const DEFAULT_PAGE_SIZE = 20;
|