[pve-devel] [PATCH manager] ui: ceph/ServiceList: correctly set 'mixedversions'
Dominik Csapak
d.csapak at proxmox.com
Thu Apr 2 07:55:39 CEST 2020
We need to set mixedversions also if
data.version.parts < view.maxversion
so lets do that.
This avoids a bug when the first version in the list already is the
highest one.
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
the follow-up i promised
www/manager6/ceph/ServiceList.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/www/manager6/ceph/ServiceList.js b/www/manager6/ceph/ServiceList.js
index 77254acf..b7670395 100644
--- a/www/manager6/ceph/ServiceList.js
+++ b/www/manager6/ceph/ServiceList.js
@@ -98,10 +98,11 @@ Ext.define('PVE.node.CephServiceList', {
view.maxversion = [];
view.mixedversions = false;
for (const [nodename, data] of Object.entries(view.nodeversions)) {
- if (PVE.Utils.compare_ceph_versions(data.version.parts, view.maxversion) > 0) {
- if (view.maxversion.length > 0) {
- view.mixedversions = true;
- }
+ let res = PVE.Utils.compare_ceph_versions(data.version.parts, view.maxversion);
+ if (res !== 0 && view.maxversion.length > 0) {
+ view.mixedversions = true;
+ }
+ if (res > 0) {
view.maxversion = data.version.parts;
}
}
--
2.20.1
More information about the pve-devel
mailing list