content.tsx 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import styled from '@emotion/styled';
  2. import type {Location} from 'history';
  3. import * as Layout from 'sentry/components/layouts/thirds';
  4. import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
  5. import {EnvironmentPageFilter} from 'sentry/components/organizations/environmentPageFilter';
  6. import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
  7. import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
  8. import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
  9. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  10. import {t} from 'sentry/locale';
  11. import {space} from 'sentry/styles/space';
  12. import useOrganization from 'sentry/utils/useOrganization';
  13. import {ExploreCharts} from './charts';
  14. import {ExploreTables} from './tables';
  15. import {ExploreToolbar} from './toolbar';
  16. interface ExploreContentProps {
  17. location: Location;
  18. }
  19. export function ExploreContent({}: ExploreContentProps) {
  20. const organization = useOrganization();
  21. return (
  22. <SentryDocumentTitle title={t('Explore')} orgSlug={organization.slug}>
  23. <PageFiltersContainer>
  24. <Layout.Page>
  25. <Layout.Header>
  26. <Layout.HeaderContent>
  27. <StyledTitle>{t('Explore')}</StyledTitle>
  28. <PageFilterBar condensed>
  29. <ProjectPageFilter />
  30. <EnvironmentPageFilter />
  31. <DatePageFilter />
  32. </PageFilterBar>
  33. {/* TODO: search bar */}
  34. </Layout.HeaderContent>
  35. </Layout.Header>
  36. <StyledBody>
  37. <StyledSide>
  38. <ExploreToolbar />
  39. </StyledSide>
  40. <StyledMain fullWidth>
  41. <ExploreCharts />
  42. <ExploreTables />
  43. </StyledMain>
  44. </StyledBody>
  45. </Layout.Page>
  46. </PageFiltersContainer>
  47. </SentryDocumentTitle>
  48. );
  49. }
  50. const StyledTitle = styled(Layout.Title)`
  51. margin-bottom: ${space(2)};
  52. `;
  53. const StyledBody = styled(Layout.Body)`
  54. @media (min-width: ${p => p.theme.breakpoints.large}) {
  55. display: grid;
  56. grid-template-columns: 275px minmax(100px, auto);
  57. align-content: start;
  58. gap: ${p => (!p.noRowGap ? `${space(3)}` : `0 ${space(3)}`)};
  59. }
  60. `;
  61. const StyledMain = styled(Layout.Main)`
  62. grid-column: 2/3;
  63. `;
  64. const StyledSide = styled(Layout.Side)`
  65. grid-column: 1/2;
  66. `;