mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
* Migration: snapshots list * chore: converted SnapshotListPage to functional component * fix: dependencies for doRemoveSnapshot
31 lines
904 B
TypeScript
31 lines
904 B
TypeScript
import React, { FC } from 'react';
|
|
import { MapStateToProps, connect } from 'react-redux';
|
|
import { NavModel } from '@grafana/data';
|
|
import Page from 'app/core/components/Page/Page';
|
|
import { getUrl } from 'app/core/selectors/location';
|
|
import { StoreState } from 'app/types';
|
|
import { SnapshotListTable } from './components/SnapshotListTable';
|
|
import { getDashboardNavModel } from './state/selectors';
|
|
|
|
interface Props {
|
|
navModel: NavModel;
|
|
url: string;
|
|
}
|
|
|
|
export const SnapshotListPage: FC<Props> = ({ navModel, url }) => {
|
|
return (
|
|
<Page navModel={navModel}>
|
|
<Page.Contents>
|
|
<SnapshotListTable url={url} />
|
|
</Page.Contents>
|
|
</Page>
|
|
);
|
|
};
|
|
|
|
const mapStateToProps: MapStateToProps<Props, {}, StoreState> = (state: StoreState) => ({
|
|
navModel: getDashboardNavModel(state),
|
|
url: getUrl(state.location),
|
|
});
|
|
|
|
export default connect(mapStateToProps)(SnapshotListPage);
|