mirror of https://github.com/nicolargo/glances.git
Reaplly the Add hide option to sensors plugin #1596 PR
This commit is contained in:
parent
d201e647aa
commit
871b4c32b2
|
|
@ -230,9 +230,10 @@ host=127.0.0.1
|
|||
port=7634
|
||||
|
||||
[sensors]
|
||||
# This plugin is disable by default because on some system, the PsUtil
|
||||
# consume a lot of CPU to grab the stats...
|
||||
disable=True
|
||||
# Documentation: https://glances.readthedocs.io/en/latest/aoa/sensors.html
|
||||
disable=False
|
||||
# Hide some sensors
|
||||
#hide=ambient
|
||||
# Sensors core thresholds (in Celsius...)
|
||||
# Default values if not defined: 60/70/80
|
||||
temperature_core_careful=60
|
||||
|
|
|
|||
|
|
@ -127,14 +127,18 @@ class Plugin(GlancesPlugin):
|
|||
|
||||
pass
|
||||
|
||||
# Set the alias for each stat
|
||||
# Global change on stats
|
||||
self.stats = self.get_init_value()
|
||||
for stat in stats:
|
||||
# Do not take hide stat into account
|
||||
if self.is_hide(stat["label"].lower()):
|
||||
continue
|
||||
# Set the alias for each stat
|
||||
alias = self.has_alias(stat["label"].lower())
|
||||
if alias:
|
||||
stat["label"] = alias
|
||||
|
||||
# Update the stats
|
||||
self.stats = stats
|
||||
# Update the stats
|
||||
self.stats.append(stat)
|
||||
|
||||
return self.stats
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue