2020-05-24 23:13:21 +05:30
|
|
|
import { s__ } from '~/locale';
|
|
|
|
|
|
|
|
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'),
|
|
|
|
};
|
|
|
|
|
|
|
|
export const ALERTS_STATUS_TABS = [
|
|
|
|
{
|
|
|
|
title: s__('AlertManagement|Open'),
|
2020-06-23 00:09:42 +05:30
|
|
|
status: 'OPEN',
|
|
|
|
filters: ['TRIGGERED', 'ACKNOWLEDGED'],
|
2020-05-24 23:13:21 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
title: s__('AlertManagement|Triggered'),
|
2020-06-23 00:09:42 +05:30
|
|
|
status: 'TRIGGERED',
|
|
|
|
filters: 'TRIGGERED',
|
2020-05-24 23:13:21 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
title: s__('AlertManagement|Acknowledged'),
|
2020-06-23 00:09:42 +05:30
|
|
|
status: 'ACKNOWLEDGED',
|
|
|
|
filters: 'ACKNOWLEDGED',
|
2020-05-24 23:13:21 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
title: s__('AlertManagement|Resolved'),
|
2020-06-23 00:09:42 +05:30
|
|
|
status: 'RESOLVED',
|
|
|
|
filters: 'RESOLVED',
|
2020-05-24 23:13:21 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
title: s__('AlertManagement|All alerts'),
|
2020-06-23 00:09:42 +05:30
|
|
|
status: 'ALL',
|
|
|
|
filters: ['TRIGGERED', 'ACKNOWLEDGED', 'RESOLVED'],
|
2020-05-24 23:13:21 +05:30
|
|
|
},
|
|
|
|
];
|
2020-06-23 00:09:42 +05:30
|
|
|
|
|
|
|
/* 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',
|
|
|
|
};
|