This commit is contained in:
Milo Schwartz
2024-10-15 23:53:08 -04:00
5 changed files with 24 additions and 24 deletions

View File

@@ -176,13 +176,13 @@ sh get-docker.sh`;
)}
/>
{form.watch("method") === "wg" && !isLoading ? (
<pre className="mt-2 w-full rounded-md bg-slate-950 p-4 overflow-x-auto">
<code className="text-white whitespace-pre-wrap">{wgConfig}</code>
<pre className="mt-2 w-full rounded-md bg-muted p-4 overflow-x-auto">
<code className="text-white whitespace-pre-wrap font-mono">{wgConfig}</code>
</pre>
) : form.watch("method") === "wg" && isLoading ? (
<p>Loading WireGuard configuration...</p>
) : (
<pre className="mt-2 w-full rounded-md bg-slate-950 p-4 overflow-x-auto">
<pre className="mt-2 w-full rounded-md bg-muted p-4 overflow-x-auto">
<code className="text-white whitespace-pre-wrap">{newtConfig}</code>
</pre>
)}

View File

@@ -22,22 +22,6 @@ export type SiteRow = {
};
export const columns: ColumnDef<SiteRow>[] = [
{
accessorKey: "id",
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() =>
column.toggleSorting(column.getIsSorted() === "asc")
}
>
Site
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
},
},
{
accessorKey: "name",
header: ({ column }) => {
@@ -54,6 +38,22 @@ export const columns: ColumnDef<SiteRow>[] = [
);
},
},
{
accessorKey: "id",
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() =>
column.toggleSorting(column.getIsSorted() === "asc")
}
>
Site
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
},
},
{
accessorKey: "mbIn",
header: "MB In",

View File

@@ -22,8 +22,8 @@ export default async function Page({ params }: SitesPageProps) {
const siteRows: SiteRow[] = sites.map((site) => {
return {
id: site.siteId.toString(),
name: site.name,
id: site.niceId.toString(),
mbIn: site.megabytesIn || 0,
mbOut: site.megabytesOut || 0,
orgId: params.orgId,