Select Git revision
-
Mark Florian authored
Part of [WAF statistics reporting][1]. This adds the "Show last" filter dropdown to the UI, allowing for statistics over different time ranges to be displayed. [1]: #14707
Mark Florian authoredPart of [WAF statistics reporting][1]. This adds the "Show last" filter dropdown to the UI, allowing for statistics over different time ranges to be displayed. [1]: #14707
61
constants.js 878 B
import { __ } from '~/locale';
export const INVALID_CURRENT_ENVIRONMENT_NAME = '–';
const INTERVALS = {
minute: 'minute',
hour: 'hour',
day: 'day',
};
export const TIME_WINDOWS = {
thirtyMinutes: {
name: __('30 minutes'),
durationInMilliseconds: 30 * 60 * 1000,
interval: INTERVALS.minute,
},
oneHour: {
name: __('1 hour'),
durationInMilliseconds: 60 * 60 * 1000,
interval: INTERVALS.minute,
},
twentyFourHours: {
name: __('24 hours'),
durationInMilliseconds: 24 * 60 * 60 * 1000,
interval: INTERVALS.hour,
},
sevenDays: {
name: __('7 days'),
durationInMilliseconds: 7 * 24 * 60 * 60 * 1000,
interval: INTERVALS.hour,
},
thirtyDays: {
name: __('30 days'),
durationInMilliseconds: 30 * 24 * 60 * 60 * 1000,
interval: INTERVALS.day,
},
};
export const DEFAULT_TIME_WINDOW = 'thirtyDays';