list.tsx 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. import {Fragment} from 'react';
  2. import {LinkButton} from 'sentry/components/button';
  3. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  4. import {ActionsProvider} from 'sentry/components/workflowEngine/layout/actions';
  5. import ListLayout from 'sentry/components/workflowEngine/layout/list';
  6. import {useWorkflowEngineFeatureGate} from 'sentry/components/workflowEngine/useWorkflowEngineFeatureGate';
  7. import {IconAdd} from 'sentry/icons';
  8. import {t} from 'sentry/locale';
  9. export default function DetectorsList() {
  10. useWorkflowEngineFeatureGate({redirect: true});
  11. return (
  12. <SentryDocumentTitle title={t('Monitors')} noSuffix>
  13. <ActionsProvider actions={<Actions />}>
  14. <ListLayout>
  15. <h2>Monitors</h2>
  16. </ListLayout>
  17. </ActionsProvider>
  18. </SentryDocumentTitle>
  19. );
  20. }
  21. function Actions() {
  22. return (
  23. <Fragment>
  24. <LinkButton to="/monitors/new/" priority="primary" icon={<IconAdd isCircled />}>
  25. {t('Create Monitor')}
  26. </LinkButton>
  27. </Fragment>
  28. );
  29. }