Add resource niceId

This commit is contained in:
Owen
2025-09-08 17:37:30 -07:00
parent 64722617c1
commit a947a74194
7 changed files with 84 additions and 29 deletions

View File

@@ -66,6 +66,7 @@ import { Alert, AlertDescription } from "@app/components/ui/alert";
export type ResourceRow = {
id: number;
nice: string | null;
name: string;
orgId: string;
domain: string;
@@ -75,6 +76,7 @@ export type ResourceRow = {
proxyPort: number | null;
enabled: boolean;
domainId?: string;
ssl: boolean;
};
export type InternalResourceRow = {
@@ -336,12 +338,28 @@ export default function ResourcesTable({
);
}
},
{
accessorKey: "nice",
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() =>
column.toggleSorting(column.getIsSorted() === "asc")
}
>
{t("resource")}
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
}
},
{
accessorKey: "protocol",
header: t("protocol"),
cell: ({ row }) => {
const resourceRow = row.original;
return <span>{resourceRow.protocol.toUpperCase()}</span>;
return <span>{resourceRow.http ? (resourceRow.ssl ? "HTTPS" : "HTTP") : resourceRow.protocol.toUpperCase()}</span>;
}
},
{