[pve-devel] [PATCH v2 pve-manager 05/10] utils: align regex of parse_ceph_version with Perl equivalent

Max Carrara m.carrara at proxmox.com
Mon Jul 1 16:10:35 CEST 2024


Signed-off-by: Max Carrara <m.carrara at proxmox.com>
Tested-by: Lukas Wagner <l.wagner at proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner at proxmox.com>
---
Changes v1 --> v2:
  * none

 www/manager6/Utils.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index f5608944..74e46694 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -118,7 +118,8 @@ Ext.define('PVE.Utils', {
 	}
 
 	if (service.ceph_version) {
-	    var match = service.ceph_version.match(/version (\d+(\.\d+)*)/);
+	    // See PVE/Ceph/Tools.pm - get_local_version
+	    const match = service.ceph_version.match(/^ceph.*\sv?(\d+(?:\.\d+)+)/);
 	    if (match) {
 		return match[1];
 	    }
-- 
2.39.2





More information about the pve-devel mailing list