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

49 lines
958 B
JavaScript
Raw Normal View History

2019-07-07 11:18:12 +05:30
import { __ } from '~/locale';
2019-10-12 21:52:04 +05:30
export const sidebarAnimationDuration = 300; // milliseconds.
2019-07-07 11:18:12 +05:30
export const chartHeight = 300;
export const graphTypes = {
deploymentData: 'scatter',
};
2019-12-04 20:38:33 +05:30
export const symbolSizes = {
default: 14,
};
2019-07-07 11:18:12 +05:30
export const lineTypes = {
default: 'solid',
};
export const timeWindows = {
thirtyMinutes: __('30 minutes'),
threeHours: __('3 hours'),
eightHours: __('8 hours'),
oneDay: __('1 day'),
threeDays: __('3 days'),
oneWeek: __('1 week'),
};
2019-07-31 22:56:46 +05:30
2019-12-04 20:38:33 +05:30
export const dateFormats = {
timeOfDay: 'h:MM TT',
default: 'dd mmm yyyy, h:MMTT',
};
2019-10-12 21:52:04 +05:30
export const secondsIn = {
thirtyMinutes: 60 * 30,
threeHours: 60 * 60 * 3,
eightHours: 60 * 60 * 8,
oneDay: 60 * 60 * 24 * 1,
threeDays: 60 * 60 * 24 * 3,
oneWeek: 60 * 60 * 24 * 7 * 1,
2019-07-31 22:56:46 +05:30
};
2019-10-12 21:52:04 +05:30
export const timeWindowsKeyNames = Object.keys(secondsIn).reduce(
(otherTimeWindows, timeWindow) => ({
...otherTimeWindows,
[timeWindow]: timeWindow,
}),
{},
);