| import React, { useEffect, useState } from 'react'; |
| import '../style/Admin.css'; |
| function LogsDashboard() { |
| const [logs, setLogs] = useState([]); |
| const [stats, setStats] = useState({}); |
| <div className="admin-container"> |
| <h2>运行日志 & 性能 Dashboard</h2> |
| <section className="dashboard-stats"> |
| <pre>{JSON.stringify(stats, null, 2)}</pre> |
| <section className="dashboard-logs"> |
| <table className="admin-table"> |
| <tr><th>时间</th><th>级别</th><th>消息</th></tr> |
| <td>{new Date(log.time).toLocaleString()}</td> |
| export default LogsDashboard; |