add niceId col back to table but hide by default

This commit is contained in:
miloschwartz
2025-12-03 15:27:58 -05:00
parent 357f297a3e
commit 9be5a01173
2 changed files with 46 additions and 0 deletions

View File

@@ -334,6 +334,28 @@ export default function ProxyResourcesTable({
); );
} }
}, },
{
id: "niceId",
accessorKey: "nice",
friendlyName: t("niceId"),
enableHiding: true,
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() =>
column.toggleSorting(column.getIsSorted() === "asc")
}
>
{t("niceId")}
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
},
cell: ({ row }) => {
return <span>{row.original.nice || "-"}</span>;
}
},
{ {
accessorKey: "protocol", accessorKey: "protocol",
friendlyName: t("protocol"), friendlyName: t("protocol"),
@@ -558,6 +580,7 @@ export default function ProxyResourcesTable({
defaultSort={defaultSort} defaultSort={defaultSort}
enableColumnVisibility={true} enableColumnVisibility={true}
persistColumnVisibility="proxy-resources" persistColumnVisibility="proxy-resources"
columnVisibility={{ niceId: false }}
stickyLeftColumn="name" stickyLeftColumn="name"
stickyRightColumn="actions" stickyRightColumn="actions"
/> />

View File

@@ -125,6 +125,28 @@ export default function SitesTable({ sites, orgId }: SitesTableProps) {
); );
} }
}, },
{
id: "niceId",
accessorKey: "nice",
friendlyName: t("niceId"),
enableHiding: true,
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() =>
column.toggleSorting(column.getIsSorted() === "asc")
}
>
{t("niceId")}
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
},
cell: ({ row }) => {
return <span>{row.original.nice || "-"}</span>;
}
},
{ {
accessorKey: "online", accessorKey: "online",
friendlyName: t("online"), friendlyName: t("online"),
@@ -413,6 +435,7 @@ export default function SitesTable({ sites, orgId }: SitesTableProps) {
onRefresh={refreshData} onRefresh={refreshData}
isRefreshing={isRefreshing} isRefreshing={isRefreshing}
columnVisibility={{ columnVisibility={{
niceId: false,
nice: false, nice: false,
exitNode: false, exitNode: false,
address: false address: false