mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Fix export with modifications URL when mounted on subpath (#77622)
This commit is contained in:
parent
dc1b4ceb06
commit
3dac37380d
@ -4,7 +4,7 @@ import React, { Fragment, useState } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import { GrafanaTheme2, textUtil, urlUtil } from '@grafana/data';
|
||||
import { config, locationService } from '@grafana/runtime';
|
||||
import { config } from '@grafana/runtime';
|
||||
import {
|
||||
Button,
|
||||
ClipboardButton,
|
||||
@ -238,17 +238,11 @@ export const RuleDetailsActionButtons = ({ rule, rulesSource, isViewMode }: Prop
|
||||
}
|
||||
|
||||
if (isGrafanaRulerRule(rulerRule)) {
|
||||
moreActionsButtons.push(
|
||||
<Menu.Item
|
||||
label="Modify export"
|
||||
icon="edit"
|
||||
onClick={() =>
|
||||
locationService.push(
|
||||
createUrl(`/alerting/${encodeURIComponent(ruleId.stringifyIdentifier(identifier))}/modify-export`)
|
||||
)
|
||||
}
|
||||
/>
|
||||
const modifyUrl = createUrl(
|
||||
`/alerting/${encodeURIComponent(ruleId.stringifyIdentifier(identifier))}/modify-export`
|
||||
);
|
||||
|
||||
moreActionsButtons.push(<Menu.Item label="Modify export" icon="edit" url={modifyUrl} />);
|
||||
}
|
||||
|
||||
if (hasCreateRulePermission && !isFederated) {
|
||||
|
Loading…
Reference in New Issue
Block a user