// Copyright 2026 Arctel.net // SPDX-License-Identifier: Apache-2.0 'use client'; import * as React from 'react'; import { useTranslations } from 'next-intl'; import { Code, Cpu, Database, HardDrive } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Progress } from '@/components/ui/progress'; export function DashboardTab() { const t = useTranslations('admin.demo.dashboard'); return (
{/* CPU */} {t('cpuUsage')}
42.8 %

{t('cpuStatus')}

{/* Storage */} {t('storageUsage')}
72.4 GB{' '} / 100 GB

{t('storageStatus')}

{/* DB Overview */} {t('database')}
PostgreSQL{' '} (v16.2)
{t('activeConnections')}{' '} 12
{t('totalTables')}{' '} 34

{t('dbStatus')}

{/* 指标卡片规范与代码 */} {t('dashboardDesignSpec')}
  • {t('spec.dashedBorder')} border-dashed shadow-none {' '} {t('spec.dashedBorder2')}
  • {t('spec.headerLayout')} flex flex-row items-center justify-between pb-2 {' '} {t('spec.headerLayout2')}
  • {t('spec.valueStyle')} text-2xl font-semibold tracking-tight {' '} {t('spec.valueStyle2')}
  • {t('spec.progressBar')} h-1.5 {' '} {t('spec.progressBar2')}
  • {t('spec.secondaryText')} text-[10px] text-muted-foreground {' '} {t('spec.secondaryText2')}
            {`
  
    指标标题
    
  
  
    
42.8 %

状态说明小字

`}
); }