import AppLayout from '@/Layouts/AppLayout'; import { Head, router } from '@inertiajs/react'; import { HardDrive, Plus, Download, RotateCcw, Calendar, CheckCircle, XCircle, Clock } from 'lucide-react'; import { GlassCard, StatCard } from '@/Components/ui/GlassCard'; import { StatusBadge } from '@/Components/ui/StatusBadge'; import { Button } from '@/Components/ui/Button'; import { DataTable } from '@/Components/ui/DataTable'; import { formatBytes, timeAgo } from '@/lib/utils'; export default function BackupIndex({ backups, policies, stats }) { const backupColumns = [ { header: 'Target', accessor: 'target_name', render: row => (

{row.target_name}

{row.target_type}

)}, { header: 'Size', accessor: 'size_bytes', render: row => ( {row.size_bytes ? formatBytes(row.size_bytes) : '—'} )}, { header: 'Status', accessor: 'status', render: row => }, { header: 'Created', accessor: 'created_at', render: row => ( {timeAgo(row.created_at)} )}, { header: 'Expires', accessor: 'expires_at', render: row => ( row.expires_at ? {timeAgo(row.expires_at)} : Never )}, { header: '', key: 'actions', render: row => (
e.stopPropagation()}> {row.status === 'success' && ( <>
)}, ]; const policyColumns = [ { header: 'Policy', accessor: 'name', render: row => (

{row.name}

{row.target_type} · {row.schedule}

)}, { header: 'Retention', accessor: 'retention_value', render: row => ( {row.retention_value} {row.retention_type === 'count' ? 'backups' : 'days'} )}, { header: 'Storage', accessor: 'storage_type', render: row => ( {row.storage_type} )}, { header: 'Status', accessor: 'is_active', render: row => ( )}, ]; return (

Backup & Disaster Recovery

Manage backups, schedules, and restore points

{/* DR Status */}
{[ { label: 'RTO', value: '< 4h', desc: 'Recovery Time Objective', color: 'text-green-400' }, { label: 'RPO', value: '< 1h', desc: 'Recovery Point Objective', color: 'text-cyan-400' }, { label: 'Last DR Test', value: 'N/A', desc: 'Last tested', color: 'text-white/40' }, ].map(d => (

{d.label}

{d.value}

{d.desc}

))}

Backup Policies

Backup History

); }