import { Suspense, lazy } from 'react'; import { Drawer, LoadingPlaceholder, Stack, TextLink } from '@grafana/ui'; import { t } from '../../../../core/internationalization'; import { createRelativeUrl } from '../utils/url'; const AlertRulesDrawerContent = lazy( () => import(/* webpackChunkName: "alert-rules-drawer-content" */ './AlertRulesDrawerContent') ); interface Props { dashboardUid: string; onDismiss: () => void; } export function AlertRulesDrawer({ dashboardUid, onDismiss }: Props) { return ( } onClose={onDismiss} size="lg"> }> ); } function DrawerSubtitle({ dashboardUid }: { dashboardUid: string }) { const searchParams = new URLSearchParams({ search: `dashboard:${dashboardUid}` }); return (
{t('dashboard.alert-rules-drawer.subtitle', 'Alert rules related to this dashboard')}
{t('dashboard.alert-rules-drawer.redirect-link', 'List in Grafana Alerting')}
); }