diff --git a/src/app/[orgId]/settings/sites/components/SitesTable.tsx b/src/app/[orgId]/settings/sites/components/SitesTable.tsx
index fd9dc41c..86d389ff 100644
--- a/src/app/[orgId]/settings/sites/components/SitesTable.tsx
+++ b/src/app/[orgId]/settings/sites/components/SitesTable.tsx
@@ -9,7 +9,7 @@ import {
DropdownMenuTrigger,
} from "@app/components/ui/dropdown-menu";
import { Button } from "@app/components/ui/button";
-import { ArrowRight, ArrowUpDown, MoreHorizontal } from "lucide-react";
+import { ArrowRight, ArrowUpDown, Check, MoreHorizontal, X } from "lucide-react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { AxiosResponse } from "axios";
@@ -29,6 +29,7 @@ export type SiteRow = {
mbOut: string;
orgId: string;
type: "newt" | "wireguard";
+ online: boolean;
};
type SitesTableProps = {
@@ -168,6 +169,42 @@ export default function SitesTable({ sites, orgId }: SitesTableProps) {
}
},
},
+ {
+ accessorKey: "online",
+ header: ({ column }) => {
+ return (
+
+ );
+ },
+ cell: ({ row }) => {
+ const originalRow = row.original;
+ console.log(originalRow.online);
+
+ if (originalRow.online) {
+ return (
+
+
+ Online
+
+ );
+ } else {
+ return (
+
+
+ Offline
+
+ );
+ }
+ },
+ },
{
id: "actions",
cell: ({ row }) => {
diff --git a/src/app/[orgId]/settings/sites/page.tsx b/src/app/[orgId]/settings/sites/page.tsx
index 63c1d7b5..6e7b2d37 100644
--- a/src/app/[orgId]/settings/sites/page.tsx
+++ b/src/app/[orgId]/settings/sites/page.tsx
@@ -41,6 +41,7 @@ export default async function SitesPage(props: SitesPageProps) {
mbOut: formatSize(site.megabytesOut || 0),
orgId: params.orgId,
type: site.type as any,
+ online: site.online,
};
});