mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-03 19:26:46 +00:00
gui: ceph: let compare_ceph_versions accept arrays directly
instead of always expecting a '.' separated version string we will use this for the 'structured' version data Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
4602218730
commit
3a08795a5e
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user