index.tsx 902 B

123456789101112131415161718192021222324252627282930
  1. import * as React from 'react';
  2. import styled from '@emotion/styled';
  3. import Feature from 'app/components/acl/feature';
  4. import GlobalSelectionHeader from 'app/components/organizations/globalSelectionHeader';
  5. import {PageContent} from 'app/styles/organization';
  6. import withGlobalSelection from 'app/utils/withGlobalSelection';
  7. const Body = styled('div')`
  8. background-color: ${p => p.theme.backgroundSecondary};
  9. flex-direction: column;
  10. flex: 1;
  11. `;
  12. const MonitorsContainer: React.FC = ({children}) => (
  13. <Feature features={['monitors']} renderDisabled>
  14. <GlobalSelectionHeader
  15. showEnvironmentSelector={false}
  16. showDateSelector={false}
  17. resetParamsOnChange={['cursor']}
  18. >
  19. <PageContent>
  20. <Body>{children}</Body>
  21. </PageContent>
  22. </GlobalSelectionHeader>
  23. </Feature>
  24. );
  25. export default withGlobalSelection(MonitorsContainer);
  26. export {MonitorsContainer};