mirror of
https://github.com/freedbygrace/ActiveDirectoryManager.git
synced 2026-08-21 15:47:41 +00:00
d77ce2adbe
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/30fe5a86-4e58-47d8-aa32-104aaf3a85ce.jpg
101 lines
2.9 KiB
TypeScript
101 lines
2.9 KiB
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import { DashboardLayout } from "@/layouts/dashboard-layout";
|
|
import StatsCard from "@/components/dashboard/stats-card";
|
|
import ApiActivityCard from "@/components/dashboard/api-activity-card";
|
|
import ApiTokensCard from "@/components/dashboard/api-tokens-card";
|
|
import LdapConnectionsCard from "@/components/dashboard/ldap-connections-card";
|
|
import { ApiDocumentationCard } from "@/components/dashboard/api-documentation-card";
|
|
import {
|
|
Users,
|
|
UserPlus,
|
|
FolderClosed,
|
|
Monitor
|
|
} from "lucide-react";
|
|
import { LdapConnection, ApiToken } from "@shared/schema";
|
|
|
|
export default function DashboardPage() {
|
|
const { data: connections = [] } = useQuery<LdapConnection[]>({
|
|
queryKey: ["/api/ldap-connections"],
|
|
});
|
|
|
|
const { data: tokens = [] } = useQuery<ApiToken[]>({
|
|
queryKey: ["/api/tokens"],
|
|
});
|
|
|
|
return (
|
|
<DashboardLayout
|
|
title="Dashboard"
|
|
description="Active Directory Management API Overview"
|
|
>
|
|
{/* Statistics Cards */}
|
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
|
|
<StatsCard
|
|
title="Total Users"
|
|
value={1284}
|
|
icon={<Users className="h-5 w-5" />}
|
|
iconBgColor="bg-blue-100"
|
|
iconColor="text-primary"
|
|
changeValue={4.75}
|
|
changeType="increase"
|
|
changePeriod="from last month"
|
|
/>
|
|
|
|
<StatsCard
|
|
title="Total Groups"
|
|
value={87}
|
|
icon={<UserPlus className="h-5 w-5" />}
|
|
iconBgColor="bg-purple-100"
|
|
iconColor="text-purple-600"
|
|
changeValue={2.3}
|
|
changeType="increase"
|
|
changePeriod="from last month"
|
|
/>
|
|
|
|
<StatsCard
|
|
title="Organizational Units"
|
|
value={32}
|
|
icon={<FolderClosed className="h-5 w-5" />}
|
|
iconBgColor="bg-amber-100"
|
|
iconColor="text-amber-600"
|
|
changeValue={0}
|
|
changeType="nochange"
|
|
changePeriod="from last month"
|
|
/>
|
|
|
|
<StatsCard
|
|
title="Total Computers"
|
|
value={563}
|
|
icon={<Monitor className="h-5 w-5" />}
|
|
iconBgColor="bg-teal-100"
|
|
iconColor="text-teal-600"
|
|
changeValue={1.2}
|
|
changeType="decrease"
|
|
changePeriod="from last month"
|
|
/>
|
|
</div>
|
|
|
|
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
|
{/* API Activity Card */}
|
|
<div className="lg:col-span-2">
|
|
<ApiActivityCard />
|
|
</div>
|
|
|
|
{/* Active API Tokens */}
|
|
<div>
|
|
<ApiTokensCard tokens={tokens} />
|
|
</div>
|
|
</div>
|
|
|
|
{/* LDAP Connections */}
|
|
<div className="mt-6">
|
|
<LdapConnectionsCard connections={connections} />
|
|
</div>
|
|
|
|
{/* API Documentation Preview */}
|
|
<div className="mt-6">
|
|
<ApiDocumentationCard />
|
|
</div>
|
|
</DashboardLayout>
|
|
);
|
|
}
|