mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
1.5 KiB
1.5 KiB
049 - Monitor List View
Objective
The user requested that the Monitor page should switch its card-based grid view to a list view similar to a provided screenshot, and a view mode toggle should be added to the top right.
Expected Features
- View Mode Toggle
- Add a state
viewModeinpages/monitor.tsx. - Add a toggle button with LayoutGrid/List icons next to the refresh button.
- Pass
viewModedown toMonitorViewcomponent.
- Add a state
- List View Implementation
- Extend
MonitorViewPropswithviewMode: "list" | "grid". - Render the
ServerCardgrid whenviewMode === "grid". - Render a
TablewhenviewMode === "list". - The list view should include:
- 状态 (Status: Colored dot depending on
isOnline). - 名称 (Name: Node name).
- 速率 (Speed: Up/Down speeds styled appropriately).
- 流量 (Traffic: Total Up/Down bytes).
- 开机时长 (Uptime).
- 连接数 (Connections: TCP/UDP).
- CPU (Progress bar).
- RAM (Progress bar).
- 存储 (Storage / Disk Progress bar).
- 操作 (Actions: Eye view icon to open detailed monitor).
- 状态 (Status: Colored dot depending on
- Extend
Checklist
- Create plan document.
- Add viewMode state and toggle in
monitor.tsx. - Receive viewMode in
MonitorViewand selectively render Grid vs List views. - Ensure list correctly visualizes node info, speed, traffic, uptime, conns, CPU/RAM/Disk usages, and action icons.
- Fix HeroUI missing TableProps typings (remove
removeWrapperprop).