ReturnToPrevious: Add this functionality to the "Go to panel" button on Alert rules (#83630)

Add RTP to the 'Go to panel' button
This commit is contained in:
Laura Fernández
2024-02-29 12:19:59 +01:00
committed by GitHub
parent 2a429cd7db
commit f0822e0aef
@@ -160,8 +160,11 @@ export const RuleDetailsActionButtons = ({ rule, rulesSource, isViewMode }: Prop
key="panel"
variant="primary"
icon="apps"
target="_blank"
target={isReturnToPreviousEnabled ? undefined : '_blank'}
href={`d/${encodeURIComponent(dashboardUID)}?viewPanel=${encodeURIComponent(panelId)}`}
onClick={() => {
setReturnToPrevious(rule.name);
}}
>
Go to panel
</LinkButton>