fix: correct node type check in empty state conditions

The dashboard and storage pages incorrectly filtered nodes by type === 'pve',
but the backend provides nodes with type === 'node'. This caused the 'No Proxmox
VE nodes configured' message to appear even when nodes were present.

- Dashboard.tsx: Simplified check to props.nodes.length === 0
- Storage.tsx: Changed filter to type === 'node'

Fixes #1192
This commit is contained in:
rcourtman
2026-02-05 12:22:01 +00:00
parent 8b4325bc53
commit f1ad0ffe06
2 changed files with 2 additions and 2 deletions

View File

@@ -939,7 +939,7 @@ export function Dashboard(props: DashboardProps) {
when={
connected() &&
initialDataReceived() &&
props.nodes.filter((n) => n.type === 'pve').length === 0 &&
props.nodes.length === 0 &&
props.vms.length === 0 &&
props.containers.length === 0
}

View File

@@ -733,7 +733,7 @@ const Storage: Component = () => {
when={
connected() &&
initialDataReceived() &&
(state.nodes || []).filter((n) => n.type === 'pve').length === 0 &&
(state.nodes || []).filter((n) => n.type === 'node').length === 0 &&
sortedStorage().length === 0 &&
searchTerm().trim() === ''
}