Skip to content

Commit cbdd3ae

Browse files
committed
Patch the url
1 parent fa2e20a commit cbdd3ae

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

public/app/plugins/panel/alertGroups/AlertGroup.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ export const AlertGroup = ({ alertManagerSourceName, group, expandAll }: Props)
4242
start: new Date(alert.startsAt),
4343
end: Date.now(),
4444
});
45+
46+
// LOGZ.IO CHANGE :: DEV-46517 - fix "see source button"
47+
if (alert.generatorURL) {
48+
const url = new URL(alert.generatorURL);
49+
alert.generatorURL = url.hash.replace(/^#/, '/grafana-app');
50+
}
51+
// LOGZ.IO CHANGE :: DEV-46517 - fix "see source button" end
4552

4653
return (
4754
<div data-testid={'alert-group-alert'} className={styles.alert} key={`${alert.fingerprint}-${index}`}>
@@ -75,9 +82,8 @@ export const AlertGroup = ({ alertManagerSourceName, group, expandAll }: Props)
7582
Silence
7683
</LinkButton>
7784
)}
78-
{ /* LOGZ.IO CHANGE :: DEV-46517 - add link target to _top */ }
7985
{alert.generatorURL && (
80-
<LinkButton target="_top" className={styles.button} href={alert.generatorURL} icon={'chart-line'} size={'sm'}>
86+
<LinkButton className={styles.button} href={alert.generatorURL} icon={'chart-line'} size={'sm'}>
8187
See source
8288
</LinkButton>
8389
)}

0 commit comments

Comments
 (0)