ddm.tsx 2.6 KB

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