mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 18:26:40 +00:00
Merge branch 'main' of https://github.com/fosrl/pangolin
This commit is contained in:
@@ -12,7 +12,7 @@ export const sites = sqliteTable("sites", {
|
|||||||
orgId: text("orgId").references(() => orgs.orgId, {
|
orgId: text("orgId").references(() => orgs.orgId, {
|
||||||
onDelete: "cascade",
|
onDelete: "cascade",
|
||||||
}),
|
}),
|
||||||
niceId: text("niceId"),
|
niceId: text("niceId").notNull(),
|
||||||
exitNode: integer("exitNode").references(() => exitNodes.exitNodeId, {
|
exitNode: integer("exitNode").references(() => exitNodes.exitNodeId, {
|
||||||
onDelete: "set null",
|
onDelete: "set null",
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -176,13 +176,13 @@ sh get-docker.sh`;
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{form.watch("method") === "wg" && !isLoading ? (
|
{form.watch("method") === "wg" && !isLoading ? (
|
||||||
<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">{wgConfig}</code>
|
<code className="text-white whitespace-pre-wrap font-mono">{wgConfig}</code>
|
||||||
</pre>
|
</pre>
|
||||||
) : form.watch("method") === "wg" && isLoading ? (
|
) : form.watch("method") === "wg" && isLoading ? (
|
||||||
<p>Loading WireGuard configuration...</p>
|
<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>
|
<code className="text-white whitespace-pre-wrap">{newtConfig}</code>
|
||||||
</pre>
|
</pre>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -22,22 +22,6 @@ export type SiteRow = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const columns: ColumnDef<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",
|
accessorKey: "name",
|
||||||
header: ({ column }) => {
|
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",
|
accessorKey: "mbIn",
|
||||||
header: "MB In",
|
header: "MB In",
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ export default async function Page({ params }: SitesPageProps) {
|
|||||||
|
|
||||||
const siteRows: SiteRow[] = sites.map((site) => {
|
const siteRows: SiteRow[] = sites.map((site) => {
|
||||||
return {
|
return {
|
||||||
id: site.siteId.toString(),
|
|
||||||
name: site.name,
|
name: site.name,
|
||||||
|
id: site.niceId.toString(),
|
||||||
mbIn: site.megabytesIn || 0,
|
mbIn: site.megabytesIn || 0,
|
||||||
mbOut: site.megabytesOut || 0,
|
mbOut: site.megabytesOut || 0,
|
||||||
orgId: params.orgId,
|
orgId: params.orgId,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
--chart-4: 23.33 8.82% 60%;
|
--chart-4: 23.33 8.82% 60%;
|
||||||
--chart-5: 24 8.98% 67.25%;
|
--chart-5: 24 8.98% 67.25%;
|
||||||
|
|
||||||
--radius: 0.5rem;
|
--radius: 0.25rem;
|
||||||
}
|
}
|
||||||
.dark {
|
.dark {
|
||||||
--background: 0 0% 10.98%;
|
--background: 0 0% 10.98%;
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
--card: 0 0% 8.63%;
|
--card: 0 0% 8.63%;
|
||||||
--card-foreground: 24 9.09% 89.22%;
|
--card-foreground: 24 9.09% 89.22%;
|
||||||
|
|
||||||
--popover: 0 0% 4.71%;
|
--popover: 0 0% 10.98%;
|
||||||
--popover-foreground: 24 9.09% 89.22%;
|
--popover-foreground: 24 9.09% 89.22%;
|
||||||
|
|
||||||
--secondary: 23.33 28.13% 12.55%;
|
--secondary: 23.33 28.13% 12.55%;
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
--chart-4: 23.33 23.68% 14.9%;
|
--chart-4: 23.33 23.68% 14.9%;
|
||||||
--chart-5: 24 23.81% 12.35%;
|
--chart-5: 24 23.81% 12.35%;
|
||||||
|
|
||||||
--radius: 0.5rem;
|
--radius: 0.25rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user