ddm.tsx 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import styled from '@emotion/styled';
  2. import ButtonBar from 'sentry/components/buttonBar';
  3. import FeatureBadge from 'sentry/components/featureBadge';
  4. import {FeatureFeedback} from 'sentry/components/featureFeedback';
  5. import * as Layout from 'sentry/components/layouts/thirds';
  6. import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
  7. import {EnvironmentPageFilter} from 'sentry/components/organizations/environmentPageFilter';
  8. import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
  9. import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
  10. import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
  11. import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionTooltip';
  12. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  13. import {t} from 'sentry/locale';
  14. import {space} from 'sentry/styles/space';
  15. import useOrganization from 'sentry/utils/useOrganization';
  16. import {MetricScratchpad} from 'sentry/views/ddm/scratchpad';
  17. import {ScratchpadSelector} from 'sentry/views/ddm/scratchpadSelector';
  18. import {TraceTable} from 'sentry/views/ddm/traceTable';
  19. function DDM() {
  20. const organization = useOrganization();
  21. return (
  22. <SentryDocumentTitle title={t('DDM')} orgSlug={organization.slug}>
  23. <PageFiltersContainer disablePersistence>
  24. <Layout.Page>
  25. <Layout.Header>
  26. <Layout.HeaderContent>
  27. <Layout.Title>
  28. {t('DDM')}
  29. <PageHeadingQuestionTooltip
  30. docsUrl="https://docs.sentry.io"
  31. title={t('Delightful Developer Metrics.')}
  32. />
  33. <FeatureBadge type="alpha" />
  34. </Layout.Title>
  35. </Layout.HeaderContent>
  36. <Layout.HeaderActions>
  37. <ButtonBar gap={1}>
  38. <FeatureFeedback featureName="DDM" buttonProps={{size: 'sm'}} />
  39. </ButtonBar>
  40. </Layout.HeaderActions>
  41. </Layout.Header>
  42. <Layout.Body>
  43. <Layout.Main fullWidth>
  44. <PaddedContainer>
  45. <PageFilterBar condensed>
  46. <ProjectPageFilter />
  47. <EnvironmentPageFilter />
  48. <DatePageFilter />
  49. </PageFilterBar>
  50. <ScratchpadSelector />
  51. </PaddedContainer>
  52. <MetricScratchpad />
  53. <TraceTable />
  54. </Layout.Main>
  55. </Layout.Body>
  56. </Layout.Page>
  57. </PageFiltersContainer>
  58. </SentryDocumentTitle>
  59. );
  60. }
  61. export const PaddedContainer = styled('div')`
  62. margin-bottom: ${space(2)};
  63. display: grid;
  64. grid-template: 1fr / 1fr max-content;
  65. gap: ${space(1)};
  66. @media (max-width: ${props => props.theme.breakpoints.small}) {
  67. grid-template: 1fr 1fr / 1fr;
  68. }
  69. `;
  70. export default DDM;