selectCheckInData.tsx 394 B

12345678910111213
  1. import type {CheckInBucket} from 'sentry/components/checkInTimeline/types';
  2. import type {CheckInStatus, MonitorBucket} from '../types';
  3. export function selectCheckInData(
  4. stats: MonitorBucket[],
  5. env: string
  6. ): Array<CheckInBucket<CheckInStatus>> {
  7. return stats.map(([ts, envs]) => [
  8. ts,
  9. envs[env] ?? {in_progress: 0, ok: 0, error: 0, missed: 0, timeout: 0, unknown: 0},
  10. ]);
  11. }