]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix version string overlap, incomplete version on upgrades page 69470/head
authorAashish Sharma <aashish@li-e9bf2ecc-2ad7-11b2-a85c-baf05c5182ab.ibm.com>
Mon, 15 Jun 2026 08:27:44 +0000 (13:57 +0530)
committerAashish Sharma <aashish@li-e9bf2ecc-2ad7-11b2-a85c-baf05c5182ab.ibm.com>
Tue, 7 Jul 2026 09:02:34 +0000 (14:32 +0530)
Fixes: https://tracker.ceph.com/issues/77400
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.scss
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.ts

index f2e90ffffd23c93480231040e270ae66a4e1f26e..fa8fdf0296ff07b93ac0e0ac1f7c26d859ab11a4 100644 (file)
@@ -13,4 +13,5 @@
   display: flex;
   flex-direction: column;
   gap: var(--cds-spacing-02);
+  overflow-wrap: break-word;
 }
index e1806dfc35cb2521a428d9e4c96ce4862051d731..2abdd0906e170470ccad5707496d466b695a7bcc 100644 (file)
@@ -74,8 +74,12 @@ export class UpgradeComponent implements OnInit, OnDestroy {
 
     this.subs.add(
       this.summaryService.subscribe((summary) => {
-        const version = summary.version.replace(VERSION_PREFIX, '').split('-');
-        this.version = version[0];
+        const versionString = summary.version.replace(VERSION_PREFIX, '').trim();
+        // Match legacy Ceph versions that include a build suffix
+        // (e.g. 13.1.0-419-g251e2515b5) and extract only the semantic version.
+        // Newer version formats without this suffix are left unchanged.
+        const match = versionString.match(/^(\d+\.\d+\.\d+)-\d+-g[0-9a-f]+/i);
+        this.version = match ? match[1] : versionString;
         this.executingTasks = summary.executing_tasks.filter((tasks) =>
           tasks.name.includes('progress/Upgrade')
         )[0];