Updated the logic for Stat/Metric tracking in the dashboard more robust. (#365)

* Updated the logic for Stat/Metric tracking in the dashboard more robust.

* Show used/total for stats.

* Added the ability to configure the update interval of metrics in the dashboard.
This commit is contained in:
Jas Singh
2024-10-24 02:26:39 -07:00
committed by GitHub
parent 694711e0d4
commit fcdba86fec
10 changed files with 223 additions and 95 deletions

View File

@@ -48,8 +48,10 @@ export const DashboardMenuSettings = (): Scrollable<Child, Attribute> => {
Option({ opt: options.menus.dashboard.powermenu.reboot, title: 'Reboot Command', type: 'string' }),
Option({ opt: options.menus.dashboard.powermenu.logout, title: 'Logout Command', type: 'string' }),
Option({ opt: options.menus.dashboard.powermenu.sleep, title: 'Sleep Command', type: 'string' }),
Header('Controls'),
Option({ opt: options.menus.dashboard.controls.enabled, title: 'Enabled', type: 'boolean' }),
Header('Resource Usage Metrics'),
Option({ opt: options.menus.dashboard.stats.enabled, title: 'Enabled', type: 'boolean' }),
Option({
@@ -58,6 +60,15 @@ export const DashboardMenuSettings = (): Scrollable<Child, Attribute> => {
subtitle: "NOTE: This is currently only available for NVidia GPUs and requires 'python-gpustat'.",
type: 'boolean',
}),
Option({
opt: options.menus.dashboard.stats.interval,
title: 'Update Interval',
subtitle: 'The frequency at which to poll system metrics.',
type: 'number',
min: 100,
increment: 500,
}),
Header('Shortcuts'),
Option({ opt: options.menus.dashboard.shortcuts.enabled, title: 'Enabled', type: 'boolean' }),
Option({