if (selected.length) {
name = selected[0].data.name;
}
- vm.set('versions', data.versions);
+ vm.set('versions', data.versions || {});
// extract max version
let maxversion = "0";
let mixedversions = false;
let version = value || "";
let maxversion = vm.get('maxversion');
if (value && PVE.Utils.compare_ceph_versions(value, maxversion) !== 0) {
- if (rec.data.type === 'host' || PVE.Utils.compare_ceph_versions(versions[rec.data.host] || "", maxversion) !== 0) {
+ let host_version = rec.parentNode?.data?.version || versions[rec.data.host] || "";
+ if (rec.data.type === 'host' || PVE.Utils.compare_ceph_versions(host_version, maxversion) !== 0) {
icon = PVE.Utils.get_ceph_icon_html('HEALTH_UPGRADE');
} else {
icon = PVE.Utils.get_ceph_icon_html('HEALTH_OLD');
result.statuses.push(gettext('Version') + ": " + result.version);
if (PVE.Utils.compare_ceph_versions(result.version, maxversion) !== 0) {
- if (metadata.version[host] === maxversion) {
+ let host_version = metadata.node[host]?.version?.parts || metadata.version?[host] || "";
+ if (PVE.Utils.compare_ceph_versions(host_version, maxversion) === 0) {
if (result.health > healthstates.HEALTH_OLD) {
result.health = healthstates.HEALTH_OLD;
}