From: Afreen Misbah Date: Sun, 17 May 2026 21:18:22 +0000 (+0530) Subject: mgr/dashboard: remove unused upgradable component X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=346e04abcdea8e931eef3bce1589f3b7ead066d5;p=ceph.git mgr/dashboard: remove unused upgradable component The upgradable component is no longer used after converting the upgrade page to use Carbon tiles directly. Assisted-by: Claude Signed-off-by: Afreen Misbah --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.scss index 2476726fc54a..6ac64f07781d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.scss @@ -11,7 +11,7 @@ // Custom scrollbar styling for better Carbon integration &::-webkit-scrollbar { - width: 8px; + width: var(--cds-spacing-03); } &::-webkit-scrollbar-track { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html index baf6aa044d76..2bc713bf3dcd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html @@ -57,7 +57,7 @@ i18n>Cluster Status {{ healthData.health.status | healthLabel | titlecase }} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.spec.ts index d086d3c95987..254bf26de5d4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.spec.ts @@ -96,9 +96,7 @@ describe('UpgradeComponent', () => { it('should load the view once check for upgrade is done', () => { component.ngOnInit(); fixture.detectChanges(); - const upgradeSection = fixture.debugElement.nativeElement.querySelector( - '#newVersionAvailable' - ); + const upgradeSection = fixture.debugElement.nativeElement.querySelector('#newVersionAvailable'); expect(upgradeSection).not.toBeNull(); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts index c559a6174db8..b3146312c0da 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts @@ -87,7 +87,6 @@ import { VerticalNavigationComponent } from './vertical-navigation/vertical-navi import { CardGroupComponent } from './card-group/card-group.component'; import { HelpTextComponent } from './help-text/help-text.component'; import { FormAdvancedFieldsetComponent } from './form-advanced-fieldset/form-advanced-fieldset.component'; -import { UpgradableComponent } from './upgradable/upgradable.component'; import { ProgressComponent } from './progress/progress.component'; import { SidePanelComponent } from './side-panel/side-panel.component'; import { ChartsModule } from '@carbon/charts-angular'; @@ -217,7 +216,6 @@ import { NumberWithUnitComponent } from './number-with-unit/number-with-unit.com CardGroupComponent, HelpTextComponent, FormAdvancedFieldsetComponent, - UpgradableComponent, ProgressComponent, SidePanelComponent, IconComponent, @@ -265,7 +263,6 @@ import { NumberWithUnitComponent } from './number-with-unit/number-with-unit.com CardGroupComponent, HelpTextComponent, FormAdvancedFieldsetComponent, - UpgradableComponent, ProgressComponent, SidePanelComponent, IconComponent, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.html deleted file mode 100644 index 173df9b68714..000000000000 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.html +++ /dev/null @@ -1,26 +0,0 @@ -
- -
- Upgrade is paused -
- -
- - Upgrading {{executingTask?.progress}}% - - - -
- - -
-
- - Upgrade available -
-
-
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.scss deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.spec.ts deleted file mode 100644 index 11fa498c9b49..000000000000 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { UpgradableComponent } from './upgradable.component'; -import { HttpClientTestingModule } from '@angular/common/http/testing'; - -describe('UpgradableComponent', () => { - let component: UpgradableComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [UpgradableComponent], - imports: [HttpClientTestingModule] - }).compileComponents(); - - fixture = TestBed.createComponent(UpgradableComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.ts deleted file mode 100644 index 007352cc175e..000000000000 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { Observable, Subscription } from 'rxjs'; -import { UpgradeService } from '../../api/upgrade.service'; -import { UpgradeInfoInterface, UpgradeStatusInterface } from '../../models/upgrade.interface'; -import { OrchestratorService } from '../../api/orchestrator.service'; -import { Icons } from '~/app/shared/enum/icons.enum'; -import { SummaryService } from '../../services/summary.service'; -import { ExecutingTask } from '../../models/executing-task'; - -@Component({ - selector: 'cd-upgradable', - templateUrl: './upgradable.component.html', - styleUrls: ['./upgradable.component.scss'], - standalone: false -}) -export class UpgradableComponent implements OnInit, OnDestroy { - orchAvailable: boolean = false; - upgradeInfo$: Observable; - upgradeStatus$: Observable; - upgradeModalRef: NgbModalRef; - executingTask: ExecutingTask; - private subs = new Subscription(); - - icons = Icons; - - constructor( - private orchestratorService: OrchestratorService, - private summaryService: SummaryService, - private upgradeService: UpgradeService - ) {} - - ngOnInit() { - this.orchestratorService.status().subscribe((status: any) => { - this.orchAvailable = status.available; - if (this.orchAvailable && status.upgrade_status?.available) { - this.upgradeInfo$ = this.upgradeService.listCached(); - this.upgradeStatus$ = this.upgradeService.status(); - } - }); - - this.subs.add( - this.summaryService.subscribe((summary) => { - this.executingTask = summary.executing_tasks.filter((tasks) => - tasks.name.includes('progress/Upgrade') - )[0]; - }) - ); - } - - ngOnDestroy() { - this.subs?.unsubscribe(); - } - - upgradeModal() { - this.upgradeModalRef = this.upgradeService.startUpgradeModal(); - } -}