mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 12:25:22 +02:00
fix(published-ports): fix published port link and into a new component [EE-6592] (#11656)
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:s390x platform:linux version:]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
Test / test-client (push) Waiting to run
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:s390x platform:linux version:]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
Test / test-client (push) Waiting to run
This commit is contained in:
parent
4f4c685085
commit
39fce3e29b
3 changed files with 65 additions and 68 deletions
|
@ -1,11 +1,8 @@
|
|||
import { ExternalLink } from 'lucide-react';
|
||||
import { CellContext } from '@tanstack/react-table';
|
||||
|
||||
import { ServiceViewModel } from '@/docker/models/service';
|
||||
import { useCurrentEnvironment } from '@/react/hooks/useCurrentEnvironment';
|
||||
import { getSchemeFromPort } from '@/react/common/network-utils';
|
||||
|
||||
import { Icon } from '@@/Icon';
|
||||
import { PublishedPortLink } from '@/react/docker/components/ImageStatus/PublishedPortLink';
|
||||
|
||||
import { columnHelper } from './helper';
|
||||
|
||||
|
@ -37,24 +34,13 @@ function Cell({
|
|||
return '-';
|
||||
}
|
||||
|
||||
const { PublicURL: publicUrl } = environmentQuery.data;
|
||||
|
||||
return ports
|
||||
.filter((port) => port.PublishedPort)
|
||||
.map((port) => {
|
||||
const scheme = getSchemeFromPort(port.TargetPort);
|
||||
|
||||
return (
|
||||
<a
|
||||
key={`${publicUrl}:${port.PublishedPort}`}
|
||||
className="image-tag vertical-center"
|
||||
href={`${scheme}://${publicUrl}:${port.PublishedPort}`}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<Icon icon={ExternalLink} />
|
||||
{port.PublishedPort}:{port.TargetPort}
|
||||
</a>
|
||||
);
|
||||
});
|
||||
.map((port) => (
|
||||
<PublishedPortLink
|
||||
hostPort={port.PublishedPort}
|
||||
containerPort={port.TargetPort}
|
||||
hostURL={environmentQuery.data.PublicURL}
|
||||
/>
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue