list.tsx 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import {Fragment} from 'react';
  2. import {LinkButton} from 'sentry/components/button';
  3. import {Flex} from 'sentry/components/container/flex';
  4. import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
  5. import SearchBar from 'sentry/components/searchBar';
  6. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  7. import {ActionsProvider} from 'sentry/components/workflowEngine/layout/actions';
  8. import ListLayout from 'sentry/components/workflowEngine/layout/list';
  9. import {useWorkflowEngineFeatureGate} from 'sentry/components/workflowEngine/useWorkflowEngineFeatureGate';
  10. import {IconAdd} from 'sentry/icons';
  11. import {t} from 'sentry/locale';
  12. import {space} from 'sentry/styles/space';
  13. import AutomationListTable from 'sentry/views/automations/components/automationListTable';
  14. export default function AutomationsList() {
  15. useWorkflowEngineFeatureGate({redirect: true});
  16. return (
  17. <SentryDocumentTitle title={t('Automations')} noSuffix>
  18. <ActionsProvider actions={<Actions />}>
  19. <ListLayout>
  20. <TableHeader />
  21. <AutomationListTable automations={[]} />
  22. </ListLayout>
  23. </ActionsProvider>
  24. </SentryDocumentTitle>
  25. );
  26. }
  27. function TableHeader() {
  28. return (
  29. <Flex gap={space(2)}>
  30. <ProjectPageFilter />
  31. <div style={{flexGrow: 1}}>
  32. <SearchBar placeholder={t('Search for events, users, tags, and more')} />
  33. </div>
  34. </Flex>
  35. );
  36. }
  37. function Actions() {
  38. return (
  39. <Fragment>
  40. <LinkButton to="/automations/new/" priority="primary" icon={<IconAdd isCircled />}>
  41. {t('Create Automation')}
  42. </LinkButton>
  43. </Fragment>
  44. );
  45. }