mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix double slash in share link (#46757)
This commit is contained in:
parent
db5988d82e
commit
18c1c6ca6a
@ -62,8 +62,10 @@ export const RuleDetailsActionButtons: FC<Props> = ({ rule, rulesSource }) => {
|
||||
|
||||
const buildShareUrl = () => {
|
||||
if (isCloudRulesSource(rulesSource)) {
|
||||
const { appUrl, appSubUrl } = config;
|
||||
const baseUrl = appSubUrl !== '' ? `${appUrl}${appSubUrl}/` : config.appUrl;
|
||||
const ruleUrl = `${encodeURIComponent(rulesSource.name)}/${encodeURIComponent(rule.name)}`;
|
||||
return `${config.appUrl}${config.appSubUrl}/alerting/${ruleUrl}/find`;
|
||||
return `${baseUrl}alerting/${ruleUrl}/find`;
|
||||
}
|
||||
|
||||
return window.location.href.split('?')[0];
|
||||
|
Loading…
Reference in New Issue
Block a user