we want to improve the version hints in the osd tree gui and need
the version at the host nodes
we could (and want to) workaround it in the gui to have that
info for both versions of the api call
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
my $nodes = {};
my $newnodes = {};
+ my $hostversions = PVE::Cluster::get_node_kv("ceph-version");
foreach my $e (@{$res->{nodes}}) {
$nodes->{$e->{id}} = $e;
} else {
$new->{leaf} = ($e->{id} >= 0) ? 1 : 0;
}
+
+ if ((my $name = $e->{name}) && $e->{type} eq 'host') {
+ $new->{version} = $hostversions->{$name};
+ }
}
my $roots = [];
# we want this for the noout flag
$data->{flags} = $flags if $flags;
- $data->{versions} = PVE::Cluster::get_node_kv("ceph-version");
+ $data->{versions} = $hostversions; # for compatibility
return $data;
}});