import {PageParams} from "@/types/next"; import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page"; import {prisma} from "@/prisma"; import {Card, CardContent, CardHeader, CardTitle} from "@/components/ui/card"; import {EvolutionLineChart} from "@/components/wrappers/dashboard/statistics/charts/evolution-line-chart"; import {PercentageLineChart} from "@/components/wrappers/dashboard/statistics/charts/percentage-line-chart"; export default async function RoutePage(props: PageParams<{}>) { const projectsCount = await prisma.project.count({ where: { organization: { slug: "default" } }, }); const backupsEvolution = await prisma.backup.findMany({ select: { createdAt: true, }, orderBy: { createdAt: "asc", }, }); const backupsRate = await prisma.backup.groupBy({ by: ['createdAt', 'status'], where: { status: { in: ['success', 'failed'], }, }, _count: { id: true, }, }); return ( Statistics
Projects {projectsCount} KPI 2 KPI 3
Evolution of the number of backups Success rate of backups
) }