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",
friendlyName: t("protocol"),
@@ -558,6 +580,7 @@ export default function ProxyResourcesTable({
defaultSort={defaultSort}
enableColumnVisibility={true}
persistColumnVisibility="proxy-resources"
columnVisibility={{ niceId: false }}
stickyLeftColumn="name"
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",
friendlyName: t("online"),
@@ -413,6 +435,7 @@ export default function SitesTable({ sites, orgId }: SitesTableProps) {
onRefresh={refreshData}
isRefreshing={isRefreshing}
columnVisibility={{
niceId: false,
nice: false,
exitNode: false,
address: false