Skip to content

Commit c565272

Browse files
committed
Fix: Broken image links for container images
Whilst testing the react router change, I observed that links to container images on docker.io, ghcr and others resulted in a broken URL that didn't resolve to anywhere. It is likely that this functionality never worked as the image URL was never resolved back to its upstream counterpart as implemented in the `convertImage` function. This change is necessary to ensure container images link out to the correct location to engineers can better understand the continers running inside their cluster workloads. This change addresses the need by: wrapping container image links in the `convertImage` function
1 parent 48087dd commit c565272

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ui/components/ImageAutomation/repositories/ImageAutomationRepoDetails.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useGetObject } from "../../../hooks/objects";
55
import { Kind } from "../../../lib/api/core/types.pb";
66
import { ImageRepository } from "../../../lib/objects";
77
import { V2Routes } from "../../../lib/types";
8+
import { convertImage } from "../../../lib/utils";
89
import Button from "../../Button";
910
import ClusterDashboardLink from "../../ClusterDashboardLink";
1011
import Interval from "../../Interval";
@@ -68,7 +69,7 @@ function ImageAutomationRepoDetails({
6869
{
6970
rowkey: "Image",
7071
children: (
71-
<Link newTab={true} to={data.obj?.spec?.image}>
72+
<Link newTab={true} href={convertImage(data.obj?.spec?.image)}>
7273
{data.obj?.spec?.image}
7374
</Link>
7475
),

0 commit comments

Comments
 (0)