mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
refactor(ui): use external/system badge where applicable [EE-6952] (#11475)
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:arm64 platform:linux]) (push) Waiting to run
Test / test-client (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
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:arm64 platform:linux]) (push) Waiting to run
Test / test-client (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
This commit is contained in:
parent
0b62456236
commit
3cad13388c
9 changed files with 49 additions and 76 deletions
|
@ -4,6 +4,7 @@ import KubernetesApplicationHelper from '@/kubernetes/helpers/application';
|
|||
import KubernetesNamespaceHelper from '@/kubernetes/helpers/namespaceHelper';
|
||||
|
||||
import { Link } from '@@/Link';
|
||||
import { ExternalBadge } from '@@/Badge/ExternalBadge';
|
||||
|
||||
import { KubernetesStack } from '../../types';
|
||||
|
||||
|
@ -26,18 +27,18 @@ export function SubRows({
|
|||
>
|
||||
<td />
|
||||
<td colSpan={span - 1}>
|
||||
<Link
|
||||
to="kubernetes.applications.application"
|
||||
params={{ name: app.Name, namespace: app.ResourcePool }}
|
||||
>
|
||||
{app.Name}
|
||||
</Link>
|
||||
{KubernetesNamespaceHelper.isSystemNamespace(app.ResourcePool) &&
|
||||
KubernetesApplicationHelper.isExternalApplication(app) && (
|
||||
<span className="space-left label label-primary image-tag">
|
||||
external
|
||||
</span>
|
||||
)}
|
||||
<div className="flex gap-2">
|
||||
<Link
|
||||
to="kubernetes.applications.application"
|
||||
params={{ name: app.Name, namespace: app.ResourcePool }}
|
||||
>
|
||||
{app.Name}
|
||||
</Link>
|
||||
{KubernetesNamespaceHelper.isSystemNamespace(app.ResourcePool) &&
|
||||
KubernetesApplicationHelper.isExternalApplication(app) && (
|
||||
<ExternalBadge />
|
||||
)}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
|
|
|
@ -6,6 +6,7 @@ import KubernetesNamespaceHelper from '@/kubernetes/helpers/namespaceHelper';
|
|||
import { buildExpandColumn } from '@@/datatables/expand-column';
|
||||
import { Link } from '@@/Link';
|
||||
import { Icon } from '@@/Icon';
|
||||
import { SystemBadge } from '@@/Badge/SystemBadge';
|
||||
|
||||
import { KubernetesStack } from '../../types';
|
||||
|
||||
|
@ -23,7 +24,7 @@ export const columns = [
|
|||
cell: ({ getValue }) => {
|
||||
const value = getValue();
|
||||
return (
|
||||
<>
|
||||
<div className="flex gap-2">
|
||||
<Link
|
||||
to="kubernetes.resourcePools.resourcePool"
|
||||
params={{ id: value }}
|
||||
|
@ -31,11 +32,9 @@ export const columns = [
|
|||
{value}
|
||||
</Link>
|
||||
{KubernetesNamespaceHelper.isSystemNamespace(value) && (
|
||||
<span className="label label-info image-tag label-margins">
|
||||
system
|
||||
</span>
|
||||
<SystemBadge />
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue