Closed wittypluck closed 3 months ago
Analyze: the _api_all method called by /api/4/all route call stats.getAllAsDict(). Currently, this stat's method (only used in this case) do not get the "enable" plugin list but the full plugin list.
Proposal: change the stats.getAllAsDict() to optionally take into account enable plugin list.
Patch done in the develop branch.
Will be released in Glances 4.1.0.
Thanks for the issue report @wittypluck !
Thanks @nicolargo , I confirm the issue is fixed on dev
tag.
Describe the bug In Glances v4, when the plugin
network
is Disabled in the configuration file, the endpointall
still sends an incompletenetwork
section. This section should be empty. The returned information does not have thetime_since_update
field which breaks Home Assistant Glances integration: https://github.com/home-assistant/core/issues/118632#issuecomment-2145529233To Reproduce Steps to reproduce the behavior:
Start Glances with the following options [network] disable=True
Call the
all
endpoint: curl http://localhost:61208/api/4/allSee error:
Expected behavior
The network section should be empty (similar to other modules and Glances v3):
Screenshots If applicable, add screenshots to help explain your problem.
Environement (please complete the following information)
latest
on Ubuntu 23.10latest
Additional context Add any other context about the problem here.
You can also pastebin: