The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/app/features/notifications/NotificationsPage.tsx

37 lines
1.0 KiB

import React from 'react';
import { connect, ConnectedProps } from 'react-redux';
import { config } from '@grafana/runtime';
import Page from '../../core/components/Page/Page';
import { GrafanaRouteComponentProps } from '../../core/navigation/types';
import { getNavModel } from '../../core/selectors/navModel';
import { StoreState } from '../../types';
import { StoredNotifications } from './StoredNotifications';
const mapStateToProps = (state: StoreState) => ({
navModel: getNavModel(state.navIndex, 'notifications'),
});
const connector = connect(mapStateToProps, undefined);
interface OwnProps extends GrafanaRouteComponentProps {}
type Props = OwnProps & ConnectedProps<typeof connector>;
export const NotificationsPage = ({ navModel }: Props) => {
if (!config.featureToggles.persistNotifications) {
return null;
}
return (
<Page navModel={navModel}>
<Page.Contents>
<StoredNotifications />
</Page.Contents>
</Page>
);
};
export default connect(mapStateToProps)(NotificationsPage);