import React, { useState, useEffect } from 'react' import api from '../services/api' import toast from 'react-hot-toast' import { CogIcon, ServerIcon, CircleStackIcon, ShieldCheckIcon, ClockIcon } from '@heroicons/react/24/outline' const System = () => { const [systemInfo, setSystemInfo] = useState(null) const [loading, setLoading] = useState(true) useEffect(() => { loadSystemInfo() }, []) const loadSystemInfo = async () => { try { setLoading(true) // This would be a real API endpoint in production const response = await api.get('/system/info') setSystemInfo(response.data.data) } catch (error) { // Mock data for development setSystemInfo({ version: '1.0.0', environment: 'development', uptime: '7d 14h 32m', database: { status: 'connected', version: 'PostgreSQL 14.2', connections: 5, maxConnections: 100 }, memory: { used: '256MB', total: '1GB', percentage: 25 }, lastBackup: '2024-01-15T10:30:00Z', ssl: { status: 'valid', expiresAt: '2024-03-15T00:00:00Z' } }) } finally { setLoading(false) } } const StatusCard = ({ title, icon: Icon, children }) => (
Monitor system health and configuration