diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-27 23:18:45 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-27 23:18:45 +0200 |
commit | e21fbe28f12b3df62e1e61fea15fe1b189ab5a94 (patch) | |
tree | 3b86eb47b6062ea3d3b670f572a2a203725074b6 /src | |
parent | add thermal sensor readings from /sys/class/thermal (diff) | |
download | linux-status-e21fbe28f12b3df62e1e61fea15fe1b189ab5a94.tar.gz linux-status-e21fbe28f12b3df62e1e61fea15fe1b189ab5a94.zip |
expose thermal info via /thermal
Diffstat (limited to '')
-rwxr-xr-x | src/app.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -585,6 +585,7 @@ def cgi_one_value(params, name, default=None): class Request(Enum): STATUS = 'status' TOP = 'top' + THERMAL = 'thermal' REBOOT = 'reboot' POWEROFF = 'poweroff' @@ -610,6 +611,8 @@ class Request(Enum): return Status().complete() if self is Request.TOP: return Top().complete() + if self is Request.THERMAL: + return ThermalInfo().complete() if self in [Request.REBOOT, Request.POWEROFF] and self.disable_power: return Response(None, HTTPStatus.FORBIDDEN) |