queuesLandingPage.tsx 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import {Fragment} from 'react';
  2. import FeatureBadge from 'sentry/components/badge/featureBadge';
  3. import {Breadcrumbs} from 'sentry/components/breadcrumbs';
  4. import ButtonBar from 'sentry/components/buttonBar';
  5. import FeedbackWidgetButton from 'sentry/components/feedback/widget/feedbackWidgetButton';
  6. import * as Layout from 'sentry/components/layouts/thirds';
  7. import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
  8. import {EnvironmentPageFilter} from 'sentry/components/organizations/environmentPageFilter';
  9. import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
  10. import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
  11. import {t} from 'sentry/locale';
  12. import useOrganization from 'sentry/utils/useOrganization';
  13. import {normalizeUrl} from 'sentry/utils/withDomainRequired';
  14. import * as ModuleLayout from 'sentry/views/performance/moduleLayout';
  15. import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
  16. import {MODULE_TITLE, RELEASE_LEVEL} from 'sentry/views/performance/queues/settings';
  17. function QueuesLandingPage() {
  18. const organization = useOrganization();
  19. return (
  20. <Fragment>
  21. <Layout.Header>
  22. <Layout.HeaderContent>
  23. <Breadcrumbs
  24. crumbs={[
  25. {
  26. label: t('Performance'),
  27. to: normalizeUrl(`/organizations/${organization.slug}/performance/`),
  28. preservePageFilters: true,
  29. },
  30. {
  31. label: MODULE_TITLE,
  32. },
  33. ]}
  34. />
  35. <Layout.Title>
  36. {MODULE_TITLE}
  37. <FeatureBadge type={RELEASE_LEVEL} />
  38. </Layout.Title>
  39. </Layout.HeaderContent>
  40. <Layout.HeaderActions>
  41. <ButtonBar gap={1}>
  42. <FeedbackWidgetButton />
  43. </ButtonBar>
  44. </Layout.HeaderActions>
  45. </Layout.Header>
  46. <Layout.Body>
  47. <Layout.Main fullWidth>
  48. <ModuleLayout.Layout>
  49. <ModuleLayout.Full>
  50. <PageFilterBar condensed>
  51. <ProjectPageFilter />
  52. <EnvironmentPageFilter />
  53. <DatePageFilter />
  54. </PageFilterBar>
  55. </ModuleLayout.Full>
  56. </ModuleLayout.Layout>
  57. </Layout.Main>
  58. </Layout.Body>
  59. </Fragment>
  60. );
  61. }
  62. function LandingPageWithProviders() {
  63. return (
  64. <ModulePageProviders
  65. title={[t('Performance'), MODULE_TITLE].join(' — ')}
  66. baseURL="/performance/queues"
  67. features="performance-queues-view"
  68. >
  69. <QueuesLandingPage />
  70. </ModulePageProviders>
  71. );
  72. }
  73. export default LandingPageWithProviders;