diff --git a/public/app/features/alerting/unified/components/RuleConditionSection.tsx b/public/app/features/alerting/unified/components/RuleConditionSection.tsx index 854af8c6a6a..e37a3701198 100644 --- a/public/app/features/alerting/unified/components/RuleConditionSection.tsx +++ b/public/app/features/alerting/unified/components/RuleConditionSection.tsx @@ -128,7 +128,6 @@ export function RuleConditionSection() { const base = useStyles2(getStyles); const { watch, setValue, getValues } = useFormContext(); const evaluateFor = watch('evaluateFor') || '0s'; - const queries = watch('queries'); watch('folder'); const [simpleCondition, setSimpleCondition] = useState({ diff --git a/public/app/features/alerting/unified/components/panel-alerts-tab/NewRuleFromPanelButton.tsx b/public/app/features/alerting/unified/components/panel-alerts-tab/NewRuleFromPanelButton.tsx index f944e352c67..4d2bcbd4089 100644 --- a/public/app/features/alerting/unified/components/panel-alerts-tab/NewRuleFromPanelButton.tsx +++ b/public/app/features/alerting/unified/components/panel-alerts-tab/NewRuleFromPanelButton.tsx @@ -2,10 +2,9 @@ import { useState } from 'react'; import { useLocation } from 'react-router-dom-v5-compat'; import { useAsync } from 'react-use'; -import { urlUtil } from '@grafana/data'; import { Trans, t } from '@grafana/i18n'; import { config } from '@grafana/runtime'; -import { Alert, Button, LinkButton } from '@grafana/ui'; +import { Alert, Button } from '@grafana/ui'; import { DashboardModel } from 'app/features/dashboard/state/DashboardModel'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; import { useSelector } from 'app/types/store'; @@ -91,17 +90,13 @@ export const NewRuleFromPanelButton = ({ dashboard, panel, className }: Props) = } return ( - New alert rule - + ); }; diff --git a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/NewAlertRuleButton.tsx b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/NewAlertRuleButton.tsx index 0aeda150293..e4a211e8cf6 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/NewAlertRuleButton.tsx +++ b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/NewAlertRuleButton.tsx @@ -2,11 +2,10 @@ import { useState } from 'react'; import { useLocation } from 'react-router-dom-v5-compat'; import { useAsync } from 'react-use'; -import { urlUtil } from '@grafana/data'; import { Trans, t } from '@grafana/i18n'; import { config } from '@grafana/runtime'; import { VizPanel } from '@grafana/scenes'; -import { Alert, Button, LinkButton } from '@grafana/ui'; +import { Alert, Button } from '@grafana/ui'; import { LogMessages, logInfo } from 'app/features/alerting/unified/Analytics'; import { AlertRuleDrawerForm } from 'app/features/alerting/unified/components/AlertRuleDrawerForm'; import { createPanelAlertRuleNavigation } from 'app/features/alerting/unified/utils/navigation'; @@ -78,17 +77,13 @@ export const ScenesNewRuleFromPanelButton = ({ panel, className }: ScenesNewRule } return ( - New alert rule - + ); };