mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-18 19:06:38 +00:00
list targes in frontend
This commit is contained in:
@@ -420,7 +420,7 @@ export default function ResourcesTable({
|
|||||||
},
|
},
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const resourceRow = row.original as ResourceRow & {
|
const resourceRow = row.original as ResourceRow & {
|
||||||
targets?: { host: string; port: number }[];
|
targets?: { ip: string; port: number }[];
|
||||||
};
|
};
|
||||||
|
|
||||||
const targets = resourceRow.targets ?? [];
|
const targets = resourceRow.targets ?? [];
|
||||||
@@ -446,12 +446,10 @@ export default function ResourcesTable({
|
|||||||
|
|
||||||
<DropdownMenuContent align="start" className="min-w-[200px]">
|
<DropdownMenuContent align="start" className="min-w-[200px]">
|
||||||
{targets.map((target, idx) => {
|
{targets.map((target, idx) => {
|
||||||
const key = `${resourceRow.id}:${target.host}:${target.port}`;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenuItem key={idx} className="flex items-center gap-2">
|
<DropdownMenuItem key={idx} className="flex items-center gap-2">
|
||||||
<CopyToClipboard
|
<CopyToClipboard
|
||||||
text={`${target.host}:${target.port}`}
|
text={`${target.ip}:${target.port}`}
|
||||||
isLink={false}
|
isLink={false}
|
||||||
/>
|
/>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
|||||||
Reference in New Issue
Block a user