From 501ccf80f373c02d72da851ba25fc6bfe98dffa8 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 23 Jan 2025 12:06:49 +1300 Subject: [PATCH] Handle different metrics cases (cpu temp and usage) --- lib/nerves_hub_web/components/device_page/details.ex | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/nerves_hub_web/components/device_page/details.ex b/lib/nerves_hub_web/components/device_page/details.ex index 381bab0bb..e255544b2 100644 --- a/lib/nerves_hub_web/components/device_page/details.ex +++ b/lib/nerves_hub_web/components/device_page/details.ex @@ -126,11 +126,17 @@ defmodule NervesHubWeb.Components.DevicePage.Details do
CPU -
+
{round(@latest_metrics["cpu_usage_percent"])}% {round(@latest_metrics["cpu_temp"])}°
- NA +
+ {round(@latest_metrics["cpu_usage_percent"])}% +
+
+ {round(@latest_metrics["cpu_temp"])}° +
+ NA
Memory used