1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

fix(kube): use https when port is 443 in various tables [EE-6592] (#11444)
Some checks failed
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
ci / build_images (map[arch:arm platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:s390x platform:linux version:]) (push) Has been cancelled
/ triage (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Test / test-client (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:linux]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
Test / test-server (map[arch:arm64 platform:linux]) (push) Has been cancelled
ci / build_manifests (push) Has been cancelled

This commit is contained in:
Matt Hook 2024-04-04 13:47:39 +13:00 committed by GitHub
parent 5fb5ea7ae0
commit cea9969463
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 87 additions and 32 deletions

View file

@ -3,6 +3,7 @@ import { CellContext } from '@tanstack/react-table';
import { ContainerGroup } from '@/react/azure/types';
import { getPorts } from '@/react/azure/utils';
import { getSchemeFromPort } from '@/react/common/network-utils';
import { Icon } from '@@/Icon';
@ -27,10 +28,17 @@ function PortsCell({
return '-';
}
return ports.map((port) => (
<a className="image-tag" href={`http://${ip}:${port.host}`} key={port.host}>
<Icon icon={ExternalLink} className="mr-1" />
{ip}:{port.host}
</a>
));
return ports.map((port) => {
const scheme = getSchemeFromPort(port.host);
return (
<a
className="image-tag"
href={`${scheme}://${ip}:${port.host}`}
key={port.host}
>
<Icon icon={ExternalLink} className="mr-1" />
{ip}:{port.host}
</a>
);
});
}