mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-18 00:17:39 +01:00
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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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() === ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user