From 2bd48632f6a1efbb665867f83e98a77956623b0b Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 22:11:04 +0200 Subject: [PATCH] [v10.2.x] Alerting: Use correct URL for modify export (#78232) Alerting: Use correct URL for modify export (#77714) (cherry picked from commit 901a6bfa697be4434d49ac3ada7e0ecd7ab24a6b) Co-authored-by: Gilles De Mey --- .../unified/components/rules/RuleActionsButtons.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/public/app/features/alerting/unified/components/rules/RuleActionsButtons.tsx b/public/app/features/alerting/unified/components/rules/RuleActionsButtons.tsx index 80e42a858de..4325ec0174b 100644 --- a/public/app/features/alerting/unified/components/rules/RuleActionsButtons.tsx +++ b/public/app/features/alerting/unified/components/rules/RuleActionsButtons.tsx @@ -5,7 +5,6 @@ import { useLocation } from 'react-router-dom'; import { GrafanaTheme2 } from '@grafana/data'; import { Stack } from '@grafana/experimental'; -import { locationService } from '@grafana/runtime'; import { Button, ClipboardButton, @@ -148,13 +147,9 @@ export const RuleActionsButtons = ({ rule, rulesSource }: Props) => { - locationService.push( - createUrl(`/alerting/${encodeURIComponent(ruleId.stringifyIdentifier(identifier))}/modify-export`, { - returnTo: location.pathname + location.search, - }) - ) - } + url={createUrl(`/alerting/${encodeURIComponent(ruleId.stringifyIdentifier(identifier))}/modify-export`, { + returnTo: location.pathname + location.search, + })} /> ); }