(cherry picked from commit 18c1c6ca6a)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
This commit is contained in:
co-authored by
Santiago
parent
398cb9fe55
commit
a06f6bf074
@@ -61,8 +61,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];
|
||||
|
||||
Reference in New Issue
Block a user