Fix: proxmox CPU/MEM NaN when cluster has offline nodes (#2185)

pull/2186/head
Ado Nishimura 1 year ago committed by GitHub
parent 94718db22b
commit dcc2f3e8f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -34,7 +34,7 @@ export default function Component({ service }) {
const { data } = clusterData ;
const vms = data.filter(item => item.type === "qemu" && item.template === 0 && (widget.node === undefined || widget.node === item.node)) || [];
const lxc = data.filter(item => item.type === "lxc" && item.template === 0 && (widget.node === undefined || widget.node === item.node)) || [];
const nodes = data.filter(item => item.type === "node" && (widget.node === undefined || widget.node === item.node)) || [];
const nodes = data.filter(item => item.type === "node" && item.status === "online" && (widget.node === undefined || widget.node === item.node)) || [];
const runningVMs = vms.reduce(calcRunning, 0);
const runningLXC = lxc.reduce(calcRunning, 0);

Loading…
Cancel
Save