diff --git a/frontend-modern/src/components/Dashboard/GuestRow.tsx b/frontend-modern/src/components/Dashboard/GuestRow.tsx index 499c50c6b..74e65a6af 100644 --- a/frontend-modern/src/components/Dashboard/GuestRow.tsx +++ b/frontend-modern/src/components/Dashboard/GuestRow.tsx @@ -1,4 +1,4 @@ -import { Show, createMemo, createSignal, createEffect } from 'solid-js'; +import { Show, createMemo, createSignal, createEffect, onMount } from 'solid-js'; import type { VM, Container } from '@/types/api'; import { formatBytes, formatUptime } from '@/utils/format'; import { MetricBar } from './MetricBar'; diff --git a/frontend-modern/src/components/Settings/Settings.tsx b/frontend-modern/src/components/Settings/Settings.tsx index 9a36ac298..3977e94bd 100644 --- a/frontend-modern/src/components/Settings/Settings.tsx +++ b/frontend-modern/src/components/Settings/Settings.tsx @@ -258,14 +258,24 @@ const Settings: Component = () => { const loadNodes = async () => { try { const nodesList = await NodesAPI.getNodes(); - // Add status and other UI fields - const nodesWithStatus = nodesList.map((node) => ({ - ...node, - // Use the hasPassword/hasToken from the API if available, otherwise check local fields - hasPassword: node.hasPassword ?? !!node.password, - hasToken: node.hasToken ?? !!node.tokenValue, - status: node.status || ('pending' as const), - })); + // Merge temperature data from WebSocket state + const currentState = state(); + const nodesWithStatus = nodesList.map((node) => { + // Find matching node in state to get temperature data + const stateNode = + currentState?.pveNodes?.find((n) => n.id === node.id || n.name === node.name) || + currentState?.pbsNodes?.find((n) => n.id === node.id || n.name === node.name); + + return { + ...node, + // Use the hasPassword/hasToken from the API if available, otherwise check local fields + hasPassword: node.hasPassword ?? !!node.password, + hasToken: node.hasToken ?? !!node.tokenValue, + status: node.status || ('pending' as const), + // Merge temperature data from state + temperature: stateNode?.temperature || node.temperature, + }; + }); setNodes(nodesWithStatus); } catch (error) { console.error('Failed to load nodes:', error);