SnapshotListPage.tsx 978 B

1234567891011121314151617181920212223242526272829303132
  1. import React, { FC } from 'react';
  2. import { MapStateToProps, connect } from 'react-redux';
  3. import { NavModel } from '@grafana/data';
  4. import Page from 'app/core/components/Page/Page';
  5. import { getNavModel } from 'app/core/selectors/navModel';
  6. import { StoreState } from 'app/types';
  7. import { GrafanaRouteComponentProps } from '../../core/navigation/types';
  8. import { SnapshotListTable } from './components/SnapshotListTable';
  9. interface ConnectedProps {
  10. navModel: NavModel;
  11. }
  12. interface Props extends ConnectedProps, GrafanaRouteComponentProps {}
  13. export const SnapshotListPage: FC<Props> = ({ navModel, location }) => {
  14. return (
  15. <Page navModel={navModel}>
  16. <Page.Contents>
  17. <SnapshotListTable />
  18. </Page.Contents>
  19. </Page>
  20. );
  21. };
  22. const mapStateToProps: MapStateToProps<ConnectedProps, {}, StoreState> = (state: StoreState) => ({
  23. navModel: getNavModel(state.navIndex, 'snapshots'),
  24. });
  25. export default connect(mapStateToProps)(SnapshotListPage);