[pve-devel] [PATCH manager v2 4/4] gui: ceph: fix version comparison

Dominik Csapak d.csapak at proxmox.com
Fri May 31 12:15:53 CEST 2019


'>' on strings is not numeric, so we use our compare_ceph_versions helper

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
new in v2
 www/manager6/ceph/Services.js     | 2 +-
 www/manager6/ceph/StatusDetail.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/manager6/ceph/Services.js b/www/manager6/ceph/Services.js
index d049a307..4aea9f32 100644
--- a/www/manager6/ceph/Services.js
+++ b/www/manager6/ceph/Services.js
@@ -59,7 +59,7 @@ Ext.define('PVE.ceph.Services', {
 	var services = ['mon','mgr','mds'];
 	var maxversion = "00.0.00";
 	Object.values(metadata.version || {}).forEach(function(version) {
-	    if (version > maxversion) {
+	    if (PVE.Utils.compare_ceph_versions(version, maxversion) > 0) {
 		maxversion = version;
 	    }
 	});
diff --git a/www/manager6/ceph/StatusDetail.js b/www/manager6/ceph/StatusDetail.js
index 477f4207..188bc678 100644
--- a/www/manager6/ceph/StatusDetail.js
+++ b/www/manager6/ceph/StatusDetail.js
@@ -193,7 +193,7 @@ Ext.define('PVE.ceph.StatusDetail', {
 
 	var maxversion = "00.0.00";
 	Object.values(metadata.version || {}).forEach(function(version) {
-	    if (version > maxversion) {
+	    if (PVE.Utils.compare_ceph_versions(version, maxversion) > 0) {
 		maxversion = version;
 	    }
 	});
-- 
2.11.0





More information about the pve-devel mailing list