feat: system resources widget (#3538)

* feat: add system resources widget

* Update packages/widgets/src/system-resources/index.ts

Co-authored-by: Andre Silva <32734153+Aandree5@users.noreply.github.com>

* fix: system resources not updating

* refactor: improve logic in component

* fix: tooltip overflow

* feat: add label with last value

* feat: hide label when hovering

* fix: formatting

* fix: lint

* fix: formatting

* fix: wrong redis channel used for opnsense

---------

Co-authored-by: Andre Silva <32734153+Aandree5@users.noreply.github.com>
Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
Manuel
2025-08-04 20:12:28 +00:00
committed by GitHub
parent 1b5ccb5293
commit 3ee408bf53
24 changed files with 512 additions and 26 deletions

View File

@@ -7,9 +7,13 @@ export class SystemHealthMonitoringMockService implements ISystemHealthMonitorin
version: "1.0.0",
cpuModelName: "Mock CPU",
cpuUtilization: Math.random(),
memUsed: (4 * 1024 * 1024 * 1024).toString(), // 4 GB in bytes
memAvailable: (8 * 1024 * 1024 * 1024).toString(), // 8 GB in bytes
memUsedInBytes: 4 * 1024 * 1024 * 1024, // 4 GB in bytes
memAvailableInBytes: 8 * 1024 * 1024 * 1024, // 8 GB in bytes
availablePkgUpdates: 0,
network: {
up: 1024 * 16,
down: 1024 * 16 * 6,
},
rebootRequired: false,
cpuTemp: Math.floor(Math.random() * 100), // Random temperature between 0 and 99
uptime: Math.floor(Math.random() * 1000000), // Random uptime in seconds