discoverSplitAlert.tsx 786 B

1234567891011121314151617181920212223242526
  1. import {Tooltip} from 'sentry/components/tooltip';
  2. import {IconWarning} from 'sentry/icons';
  3. import {t} from 'sentry/locale';
  4. import {DatasetSource} from 'sentry/utils/discover/types';
  5. import type {Widget} from 'sentry/views/dashboards/types';
  6. interface DiscoverSplitAlertProps {
  7. widget: Widget;
  8. }
  9. export function DiscoverSplitAlert({widget}: DiscoverSplitAlertProps) {
  10. if (widget?.datasetSource !== DatasetSource.FORCED) {
  11. return null;
  12. }
  13. return (
  14. <Tooltip
  15. containerDisplayMode="inline-flex"
  16. title={t(
  17. "We're splitting our datasets up to make it a bit easier to digest. We defaulted this widget to Errors. Edit as you see fit."
  18. )}
  19. >
  20. <IconWarning color="warningText" aria-label={t('Dataset split warning')} />
  21. </Tooltip>
  22. );
  23. }