123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import {IconCheckmark, IconFire, IconPause, IconTimer, IconWarning} from 'sentry/icons';
- import {Aliases} from 'sentry/utils/theme';
- import {StatsBucket} from 'sentry/views/monitors/components/overviewTimeline/types';
- import {CheckInStatus, MonitorStatus} from 'sentry/views/monitors/types';
- // Orders the status in terms of precedence for showing to the user
- export const CHECKIN_STATUS_PRECEDENT = [
- CheckInStatus.OK,
- CheckInStatus.MISSED,
- CheckInStatus.TIMEOUT,
- CheckInStatus.ERROR,
- ] satisfies Array<keyof StatsBucket>;
- export const statusIconColorMap: Record<
- MonitorStatus,
- {color: keyof Aliases; icon: React.ReactNode}
- > = {
- ok: {
- icon: <IconCheckmark color="successText" />,
- color: 'successText',
- },
- error: {
- icon: <IconFire color="errorText" />,
- color: 'errorText',
- },
- timeout: {
- icon: <IconFire color="errorText" />,
- color: 'errorText',
- },
- missed_checkin: {
- icon: <IconWarning color="warningText" />,
- color: 'warningText',
- },
- active: {
- icon: <IconTimer color="subText" />,
- color: 'subText',
- },
- disabled: {
- icon: <IconPause color="subText" size="xs" />,
- color: 'subText',
- },
- };
|