From: Aashish Sharma Date: Mon, 15 Jun 2026 08:27:44 +0000 (+0530) Subject: mgr/dashboard: fix version string overlap, incomplete version on upgrades page X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=045ec191a8916e6a8a2155a692c58f04b4ef301b;p=ceph.git mgr/dashboard: fix version string overlap, incomplete version on upgrades page Fixes: https://tracker.ceph.com/issues/77400 Signed-off-by: Aashish Sharma --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.scss index f2e90ffffd2..fa8fdf0296f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.scss @@ -13,4 +13,5 @@ display: flex; flex-direction: column; gap: var(--cds-spacing-02); + overflow-wrap: break-word; } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.ts index e1806dfc35c..2abdd0906e1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.ts @@ -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];