Alerting: Use correct URL for modify export (#77714)

This commit is contained in:
Gilles De Mey 2023-11-06 15:50:29 +01:00 committed by GitHub
parent a558d287a7
commit 901a6bfa69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) => {
<Menu.Item
label="Modify export"
icon="edit"
onClick={() =>
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,
})}
/>
);
}