feat(workspace): add workbench layout and traffic totals
Rework the default /workspace layout into a three-column view with a left-side Workbench, centered terminal, and right-side status monitor. Add a new Workbench pane that groups file manager, command history, and editor into tabs while preserving panel state. Extend server status data to expose cumulative network upload and download totals since boot, and show them in the monitor. Include a lightweight migration for the old default layout and update related locale strings, pane metadata, and knowledge base records.
This commit is contained in:
@@ -18,6 +18,8 @@ interface ServerStatus {
|
||||
cpuModel?: string;
|
||||
netRxRate?: number; // Bytes per second
|
||||
netTxRate?: number; // Bytes per second
|
||||
netRxTotalBytes?: number; // Bytes since boot
|
||||
netTxTotalBytes?: number; // Bytes since boot
|
||||
netInterface?: string;
|
||||
osName?: string;
|
||||
loadAvg?: number[]; // 系统平均负载 [1min, 5min, 15min]
|
||||
@@ -318,6 +320,8 @@ export class StatusMonitorService {
|
||||
status.netInterface = defaultInterface;
|
||||
const currentRx = currentStats[defaultInterface].rx_bytes;
|
||||
const currentTx = currentStats[defaultInterface].tx_bytes;
|
||||
status.netRxTotalBytes = currentRx;
|
||||
status.netTxTotalBytes = currentTx;
|
||||
const prevStats = previousNetStats.get(sessionId);
|
||||
|
||||
if (prevStats && prevStats.timestamp < timestamp) {
|
||||
|
||||
Reference in New Issue
Block a user