mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-17 06:24:32 +00:00
change column order on sites table
This commit is contained in:
@@ -431,9 +431,6 @@ export default function SiteResourcesOverview({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Left column = whichever side has a greater total; ties default to public first. */
|
|
||||||
const publicOnLeft = publicTotal >= privateTotal;
|
|
||||||
|
|
||||||
const publicColumn = (
|
const publicColumn = (
|
||||||
<OverviewColumn
|
<OverviewColumn
|
||||||
key="public"
|
key="public"
|
||||||
@@ -471,9 +468,8 @@ export default function SiteResourcesOverview({
|
|||||||
return (
|
return (
|
||||||
<SettingsContainer>
|
<SettingsContainer>
|
||||||
<div className="grid gap-6 md:grid-cols-2">
|
<div className="grid gap-6 md:grid-cols-2">
|
||||||
{publicOnLeft
|
{publicColumn}
|
||||||
? [publicColumn, privateColumn]
|
{privateColumn}
|
||||||
: [privateColumn, publicColumn]}
|
|
||||||
</div>
|
</div>
|
||||||
</SettingsContainer>
|
</SettingsContainer>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -307,29 +307,6 @@ export default function SitesTable({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "resources",
|
|
||||||
accessorKey: "resourceCount",
|
|
||||||
friendlyName: t("resources"),
|
|
||||||
header: () => <span className="p-3">{t("resources")}</span>,
|
|
||||||
cell: ({ row }) => {
|
|
||||||
const siteRow = row.original;
|
|
||||||
return (
|
|
||||||
<Button
|
|
||||||
type="button"
|
|
||||||
variant="ghost"
|
|
||||||
size="sm"
|
|
||||||
onClick={() => setResourcesDialogSite(siteRow)}
|
|
||||||
className="flex h-8 items-center gap-2 px-0 font-normal"
|
|
||||||
>
|
|
||||||
<span className="text-sm tabular-nums">
|
|
||||||
{siteRow.resourceCount} {t("resources")}
|
|
||||||
</span>
|
|
||||||
<ChevronDown className="h-3 w-3 shrink-0" />
|
|
||||||
</Button>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
accessorKey: "type",
|
accessorKey: "type",
|
||||||
friendlyName: t("type"),
|
friendlyName: t("type"),
|
||||||
@@ -376,6 +353,29 @@ export default function SitesTable({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "resources",
|
||||||
|
accessorKey: "resourceCount",
|
||||||
|
friendlyName: t("resources"),
|
||||||
|
header: () => <span className="p-3">{t("resources")}</span>,
|
||||||
|
cell: ({ row }) => {
|
||||||
|
const siteRow = row.original;
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
onClick={() => setResourcesDialogSite(siteRow)}
|
||||||
|
className="flex h-8 items-center gap-2 px-0 font-normal"
|
||||||
|
>
|
||||||
|
<span className="text-sm tabular-nums">
|
||||||
|
{siteRow.resourceCount} {t("resources")}
|
||||||
|
</span>
|
||||||
|
<ChevronDown className="h-3 w-3 shrink-0" />
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
accessorKey: "exitNode",
|
accessorKey: "exitNode",
|
||||||
friendlyName: t("exitNode"),
|
friendlyName: t("exitNode"),
|
||||||
|
|||||||
Reference in New Issue
Block a user