monitorHeader.tsx 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. import TimeSince from 'sentry/components/timeSince';
  2. import {t} from 'sentry/locale';
  3. import MonitorHeaderActions from './monitorHeaderActions';
  4. import MonitorIcon from './monitorIcon';
  5. type Props = React.ComponentProps<typeof MonitorHeaderActions>;
  6. const MonitorHeader = ({monitor, orgId, onUpdate}: Props) => (
  7. <div className="release-details">
  8. <div className="row">
  9. <div className="col-sm-6 col-xs-10">
  10. <h3>{monitor.name}</h3>
  11. <div className="release-meta">{monitor.id}</div>
  12. </div>
  13. <div className="col-sm-2 hidden-xs">
  14. <h6 className="nav-header">{t('Last Check-in')}</h6>
  15. {monitor.lastCheckIn && <TimeSince date={monitor.lastCheckIn} />}
  16. </div>
  17. <div className="col-sm-2 hidden-xs">
  18. <h6 className="nav-header">{t('Next Check-in')}</h6>
  19. {monitor.nextCheckIn && <TimeSince date={monitor.nextCheckIn} />}
  20. </div>
  21. <div className="col-sm-2">
  22. <h6 className="nav-header">{t('Status')}</h6>
  23. <MonitorIcon status={monitor.status} size={16} />
  24. </div>
  25. </div>
  26. <MonitorHeaderActions orgId={orgId} monitor={monitor} onUpdate={onUpdate} />
  27. </div>
  28. );
  29. export default MonitorHeader;