Skip to content

Commit

Permalink
Patch the url
Browse files Browse the repository at this point in the history
  • Loading branch information
copyhold committed Oct 14, 2024
1 parent fa2e20a commit cbdd3ae
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions public/app/plugins/panel/alertGroups/AlertGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ export const AlertGroup = ({ alertManagerSourceName, group, expandAll }: Props)
start: new Date(alert.startsAt),
end: Date.now(),
});

// LOGZ.IO CHANGE :: DEV-46517 - fix "see source button"
if (alert.generatorURL) {
const url = new URL(alert.generatorURL);
alert.generatorURL = url.hash.replace(/^#/, '/grafana-app');
}
// LOGZ.IO CHANGE :: DEV-46517 - fix "see source button" end

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

0 comments on commit cbdd3ae

Please sign in to comment.