ddm.tsx 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import styled from '@emotion/styled';
  2. import ButtonBar from 'sentry/components/buttonBar';
  3. import EnvironmentPageFilter from 'sentry/components/environmentPageFilter';
  4. import FeatureBadge from 'sentry/components/featureBadge';
  5. import {FeatureFeedback} from 'sentry/components/featureFeedback';
  6. import * as Layout from 'sentry/components/layouts/thirds';
  7. import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
  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 MetricDashboard from 'sentry/views/ddm/metricWidget';
  17. function DDM() {
  18. const organization = useOrganization();
  19. return (
  20. <SentryDocumentTitle title={t('DDM')} orgSlug={organization.slug}>
  21. <PageFiltersContainer>
  22. <Layout.Page>
  23. <Layout.Header>
  24. <Layout.HeaderContent>
  25. <Layout.Title>
  26. {t('DDM')}
  27. <PageHeadingQuestionTooltip
  28. docsUrl="https://docs.sentry.io"
  29. title={t('Delightful Developer Metrics.')}
  30. />
  31. <FeatureBadge type="alpha" />
  32. </Layout.Title>
  33. </Layout.HeaderContent>
  34. <Layout.HeaderActions>
  35. <ButtonBar gap={1}>
  36. <FeatureFeedback featureName="DDM" buttonProps={{size: 'sm'}} />
  37. </ButtonBar>
  38. </Layout.HeaderActions>
  39. </Layout.Header>
  40. <Layout.Body>
  41. <Layout.Main fullWidth>
  42. <PaddedContainer>
  43. <PageFilterBar condensed>
  44. <ProjectPageFilter />
  45. <EnvironmentPageFilter />
  46. <DatePageFilter />
  47. </PageFilterBar>
  48. </PaddedContainer>
  49. <MetricDashboard />
  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;