This commit is contained in:
Maxim Devaev
2023-11-20 07:08:13 +02:00
parent 627f7821ef
commit 0e42e10c29
3 changed files with 7 additions and 7 deletions

View File

@@ -63,16 +63,16 @@ class ExportApi:
])
rows: list[str] = []
self.__append_prometheus_rows(rows, atx_state["enabled"], "pikvm_atx_enabled")
self.__append_prometheus_rows(rows, atx_state["leds"]["power"], "pikvm_atx_power")
self.__append_prometheus_rows(rows, atx_state["enabled"], "pikvm_atx_enabled") # type: ignore
self.__append_prometheus_rows(rows, atx_state["leds"]["power"], "pikvm_atx_power") # type: ignore
for mode in sorted(UserGpioModes.ALL):
for (channel, ch_state) in gpio_state[f"{mode}s"].items():
for (channel, ch_state) in gpio_state[f"{mode}s"].items(): # type: ignore
if not channel.startswith("__"): # Hide special GPIOs
for key in ["online", "state"]:
self.__append_prometheus_rows(rows, ch_state["state"], f"pikvm_gpio_{mode}_{key}_{channel}")
self.__append_prometheus_rows(rows, hw_state["health"], "pikvm_hw")
self.__append_prometheus_rows(rows, hw_state["health"], "pikvm_hw") # type: ignore
self.__append_prometheus_rows(rows, fan_state, "pikvm_fan")
return "\n".join(rows)