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/alerting/unified/AlertWarning.tsx

28 lines
779 B

import { css } from '@emotion/css';
import * as React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { Alert, LinkButton, useStyles2 } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
interface AlertWarningProps {
title: string;
children: React.ReactNode;
}
export function AlertWarning({ title, children }: AlertWarningProps) {
return (
<Alert className={useStyles2(warningStyles).warning} severity="warning" title={title}>
<p>{children}</p>
<LinkButton href="alerting/list">
<Trans i18nKey="alerting.alert-warning.to-rule-list">To rule list</Trans>
</LinkButton>
</Alert>
);
}
const warningStyles = (theme: GrafanaTheme2) => ({
warning: css({
margin: theme.spacing(4),
}),
});