feat: add board group models and update related interfaces

This commit is contained in:
Abhimanyu Saharan
2026-02-07 20:29:50 +05:30
parent 7b5ee230f5
commit 88a5075684
170 changed files with 12372 additions and 3697 deletions

View File

@@ -2,7 +2,14 @@
import Link from "next/link";
import { usePathname } from "next/navigation";
import { Activity, BarChart3, Bot, LayoutGrid, Network } from "lucide-react";
import {
Activity,
BarChart3,
Bot,
Folder,
LayoutGrid,
Network,
} from "lucide-react";
import { ApiError } from "@/api/mutator";
import {
@@ -13,14 +20,16 @@ import { cn } from "@/lib/utils";
export function DashboardSidebar() {
const pathname = usePathname();
const healthQuery = useHealthzHealthzGet<healthzHealthzGetResponse, ApiError>({
query: {
refetchInterval: 30_000,
refetchOnMount: "always",
retry: false,
const healthQuery = useHealthzHealthzGet<healthzHealthzGetResponse, ApiError>(
{
query: {
refetchInterval: 30_000,
refetchOnMount: "always",
retry: false,
},
request: { cache: "no-store" },
},
request: { cache: "no-store" },
});
);
const okValue = healthQuery.data?.data?.ok;
const systemStatus: "unknown" | "operational" | "degraded" =
@@ -51,7 +60,7 @@ export function DashboardSidebar() {
"flex items-center gap-3 rounded-lg px-3 py-2.5 text-slate-700 transition",
pathname === "/dashboard"
? "bg-blue-100 text-blue-800 font-medium"
: "hover:bg-slate-100"
: "hover:bg-slate-100",
)}
>
<BarChart3 className="h-4 w-4" />
@@ -63,19 +72,31 @@ export function DashboardSidebar() {
"flex items-center gap-3 rounded-lg px-3 py-2.5 text-slate-700 transition",
pathname.startsWith("/gateways")
? "bg-blue-100 text-blue-800 font-medium"
: "hover:bg-slate-100"
: "hover:bg-slate-100",
)}
>
<Network className="h-4 w-4" />
Gateways
</Link>
<Link
href="/board-groups"
className={cn(
"flex items-center gap-3 rounded-lg px-3 py-2.5 text-slate-700 transition",
pathname.startsWith("/board-groups")
? "bg-blue-100 text-blue-800 font-medium"
: "hover:bg-slate-100",
)}
>
<Folder className="h-4 w-4" />
Board groups
</Link>
<Link
href="/boards"
className={cn(
"flex items-center gap-3 rounded-lg px-3 py-2.5 text-slate-700 transition",
pathname.startsWith("/boards")
? "bg-blue-100 text-blue-800 font-medium"
: "hover:bg-slate-100"
: "hover:bg-slate-100",
)}
>
<LayoutGrid className="h-4 w-4" />
@@ -87,7 +108,7 @@ export function DashboardSidebar() {
"flex items-center gap-3 rounded-lg px-3 py-2.5 text-slate-700 transition",
pathname.startsWith("/activity")
? "bg-blue-100 text-blue-800 font-medium"
: "hover:bg-slate-100"
: "hover:bg-slate-100",
)}
>
<Activity className="h-4 w-4" />
@@ -99,7 +120,7 @@ export function DashboardSidebar() {
"flex items-center gap-3 rounded-lg px-3 py-2.5 text-slate-700 transition",
pathname.startsWith("/agents")
? "bg-blue-100 text-blue-800 font-medium"
: "hover:bg-slate-100"
: "hover:bg-slate-100",
)}
>
<Bot className="h-4 w-4" />
@@ -114,7 +135,7 @@ export function DashboardSidebar() {
"h-2 w-2 rounded-full",
systemStatus === "operational" && "bg-emerald-500",
systemStatus === "degraded" && "bg-rose-500",
systemStatus === "unknown" && "bg-slate-300"
systemStatus === "unknown" && "bg-slate-300",
)}
/>
{statusLabel}