instead of always expecting a '.' separated version string
we will use this for the 'structured' version data

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 www/manager6/Utils.js | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index a42dbf91..1bc6ef03 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -121,11 +121,24 @@ Ext.define('PVE.Utils', { utilities: {
     },
 
     compare_ceph_versions: function(a, b) {
+       let avers = [];
+       let bvers = [];
+
        if (a === b) {
            return 0;
        }
-       let avers = a.toString().split('.');
-       let bvers = b.toString().split('.');
+
+       if (Ext.isArray(a)) {
+           avers = a.slice(); // copy array
+       } else {
+           avers = a.toString().split('.');
+       }
+
+       if (Ext.isArray(b)) {
+           bvers = b.slice(); // copy array
+       } else {
+           bvers = b.toString().split('.');
+       }
 
        while (true) {
            let av = avers.shift();
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to