constants.tsx 842 B

1234567891011121314151617181920
  1. import {IconCheckmark, IconFire, IconPause, IconTimer, IconWarning} from 'sentry/icons';
  2. import {StatsBucket} from 'sentry/views/monitors/components/overviewTimeline/types';
  3. import {CheckInStatus, MonitorStatus} from 'sentry/views/monitors/types';
  4. // Orders the status in terms of precedence for showing to the user
  5. export const CHECKIN_STATUS_PRECEDENT = [
  6. CheckInStatus.OK,
  7. CheckInStatus.MISSED,
  8. CheckInStatus.TIMEOUT,
  9. CheckInStatus.ERROR,
  10. ] satisfies Array<keyof StatsBucket>;
  11. export const statusIconMap: Record<MonitorStatus, React.ReactNode> = {
  12. ok: <IconCheckmark color="successText" />,
  13. error: <IconFire color="errorText" />,
  14. timeout: <IconFire color="errorText" />,
  15. missed_checkin: <IconWarning color="warningText" />,
  16. active: <IconTimer color="subText" />,
  17. disabled: <IconPause color="subText" size="xs" />,
  18. };