Skip to content

Commit

Permalink
Append grafana-app prefix to new tab urls
Browse files Browse the repository at this point in the history
  • Loading branch information
copyhold authored Dec 26, 2024
1 parent 0d9cfc4 commit 0e5c976
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ const AnnotationValue = ({ annotationKey, value, valueLink }: Props) => {

if (valueLink) {
// LOGZ.IO GRAFANA CHANGE :: DEV-47446 - open external links in new tab with valid url
const href = value.match(/grafana-app/) ? value : `/grafana-app${value}`;
const href = valueLink.match(/grafana-app/) ? valueLink : `/grafana-app${valueLink}`;
return (
<TextLink href={valueLink} external>
<TextLink href={href} external>
{value}
</TextLink>
);
Expand Down

0 comments on commit 0e5c976

Please sign in to comment.