mirror of
https://github.com/fosrl/pangolin.git
synced 2025-06-21 04:45:41 +02:00
pick first port on select container
This commit is contained in:
parent
9177eaba22
commit
cd54e7dd38
1 changed files with 13 additions and 10 deletions
|
@ -346,16 +346,19 @@ const DockerContainersTable: FC<{
|
||||||
{
|
{
|
||||||
id: "actions",
|
id: "actions",
|
||||||
header: "Actions",
|
header: "Actions",
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => {
|
||||||
<Button
|
const ports = getExposedPorts(row.original);
|
||||||
variant="default"
|
return (
|
||||||
size="sm"
|
<Button
|
||||||
onClick={() => onContainerSelect(row.original)}
|
variant="default"
|
||||||
disabled={row.original.state !== "running"}
|
size="sm"
|
||||||
>
|
onClick={() => onContainerSelect(row.original, ports[0])}
|
||||||
Select
|
disabled={row.original.state !== "running"}
|
||||||
</Button>
|
>
|
||||||
)
|
Select
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue