Add server monitoring and database backup pages

New sidebar sections wired to the backend's new admin APIs:
- Monitoring: live request/error-rate/latency stats plus a recent-requests
  table, polling every 8s.
- Backups: create/list/download database backups (auth'd blob download
  since the endpoint requires a Bearer token, not a plain link).
This commit is contained in:
2026-09-19 22:17:44 +03:30
parent 7cf6c78c77
commit 3480eac2b0
4 changed files with 413 additions and 1 deletions
+12 -1
View File
@@ -2,7 +2,16 @@
import Link from "next/link";
import { usePathname, useRouter } from "next/navigation";
import { LayoutGrid, ListTree, MessageCircleQuestion, LogOut, Heart, UserCheck } from "lucide-react";
import {
LayoutGrid,
ListTree,
MessageCircleQuestion,
LogOut,
Heart,
UserCheck,
Activity,
Database,
} from "lucide-react";
import { cn } from "@/lib/utils";
import { useAuth } from "@/lib/auth-context";
@@ -11,6 +20,8 @@ const navItems = [
{ href: "/users", label: "کاربران در انتظار تایید", icon: UserCheck },
{ href: "/categories", label: "دسته‌بندی‌ها و گزینه‌ها", icon: ListTree },
{ href: "/questions", label: "سوالات پروفایل", icon: MessageCircleQuestion },
{ href: "/monitoring", label: "مانیتورینگ سرور", icon: Activity },
{ href: "/backups", label: "بک‌آپ دیتابیس", icon: Database },
];
export function Sidebar() {