]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: remove unused upgradable component
authorAfreen Misbah <afreen@ibm.com>
Sun, 17 May 2026 21:18:22 +0000 (02:48 +0530)
committerAfreen Misbah <afreen@ibm.com>
Mon, 18 May 2026 07:58:25 +0000 (13:28 +0530)
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 <afreenmisbah@ibm.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.scss
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.html [deleted file]
src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.scss [deleted file]
src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.spec.ts [deleted file]
src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.ts [deleted file]

index 2476726fc54a529477e225a8dc02cc304b868d2b..6ac64f07781daa9ded3fb50543e342d7815e24c8 100644 (file)
@@ -11,7 +11,7 @@
 
     // Custom scrollbar styling for better Carbon integration
     &::-webkit-scrollbar {
-      width: 8px;
+      width: var(--cds-spacing-03);
     }
 
     &::-webkit-scrollbar-track {
index baf6aa044d767f5d41ef0f566b0c3b48eea73344..2bc713bf3dcd20377a1b7a6286d1421228838679 100644 (file)
@@ -57,7 +57,7 @@
                     i18n>Cluster Status</span>
               <ng-container *ngIf="healthData.health?.status !== 'HEALTH_OK'; else healthOk">
                 <a class="cds--link cds--type-body-compact-01"
-                   routerLink="/dashboard"
+                   routerLink="/overview"
                    [ngStyle]="healthData.health.status | healthColor">
                   {{ healthData.health.status | healthLabel | titlecase }}
                   <i class="fa fa-exclamation-triangle"></i>
index d086d3c95987f02398e61326a34067884f43935a..254bf26de5d4b3dca49292c8595bff97aa41dcb4 100644 (file)
@@ -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();
   });
 
index c559a6174db8f1872daf3a0962051bb8daf3966b..b3146312c0da7b9062964fca210d769e32cc1528 100644 (file)
@@ -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 (file)
index 173df9b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<div *ngIf="upgradeStatus$ | async as status; else isUpgradable">
-  <ng-container *ngIf="status.is_paused || status.in_progress; else isUpgradable">
-    <h5 *ngIf="status.is_paused; else inProgress"
-        i18n>
-      Upgrade is paused
-    </h5>
-    <ng-template #inProgress>
-      <a href="#/upgrade/progress"
-         i18n>
-        <i [ngClass]="[icons.spin, icons.spinner]"></i>
-          Upgrading {{executingTask?.progress}}%
-      </a>
-    </ng-template>
-  </ng-container>
-</div>
-
-<ng-template #isUpgradable>
-  <div *ngIf="upgradeInfo$ | async as info"
-       i18n>
-    <h5 *ngIf="info.versions.length > 0"
-        (click)="upgradeModal()">
-      <i [ngClass]="icons.up"></i>
-      Upgrade available
-    </h5>
-  </div>
-</ng-template>
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 (file)
index e69de29..0000000
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 (file)
index 11fa498..0000000
+++ /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<UpgradableComponent>;
-
-  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 (file)
index 007352c..0000000
+++ /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<UpgradeInfoInterface>;
-  upgradeStatus$: Observable<UpgradeStatusInterface>;
-  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();
-  }
-}