import { css } from '@emotion/css'; import React, { FC, useState } from 'react'; import { GrafanaTheme2 } from '@grafana/data'; import { Card, Link, useStyles2, useTheme2 } from '@grafana/ui'; import LabelsField from './LabelsField'; import { RuleEditorSection } from './RuleEditorSection'; export const NotificationsStep: FC = () => { const [hideFlowChart, setHideFlowChart] = useState(false); const styles = useStyles2(getStyles); const theme = useTheme2(); return (
setHideFlowChart(!hideFlowChart)}> {`${!hideFlowChart ? 'Hide' : 'Show'} flow chart`}
{!hideFlowChart && ( notification policy flow chart )}
Root route – default for all alerts Without custom labels, your alert will be routed through the root route. To view and edit the root route, go to notification policies or contact your admin in case you are using non-Grafana alert management.
); }; const getStyles = (theme: GrafanaTheme2) => ({ contentWrapper: css` display: flex; align-items: center; `, hideButton: css` color: ${theme.colors.text.secondary}; cursor: pointer; margin-bottom: ${theme.spacing(1)}; `, card: css` max-width: 500px; `, flowChart: css` margin-right: ${theme.spacing(3)}; `, });