]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: replace icons.spin with Carbon loading components
authorAfreen Misbah <afreen@ibm.com>
Sun, 17 May 2026 09:48:04 +0000 (15:18 +0530)
committerAfreen Misbah <afreen@ibm.com>
Tue, 19 May 2026 13:10:51 +0000 (18:40 +0530)
Replace fork-awesome spinner classes with appropriate Carbon loading components:

- cds-inline-loading: for inline spinners (action feedback, status updates)
  * table row actions (executing/removing)
  * upgrade status text/buttons
  * loading panel alerts

- cds-loading size="sm": for section data loading
  * tree view loading (crushmap, multisite-details, cephfs-directories)
  * progress component operations

- cds-loading size="lg": for dashboard/overview loading
  * rgw-overview-dashboard cards
  * multi-cluster overview

Added LoadingModule and InlineLoadingModule imports to:
- block.module.ts
- cephfs.module.ts
- cluster.module.ts
(rgw.module.ts and components.module.ts already had them)

Signed-off-by: Afreen Misbah <afreen@ibm.com>
Assisted-by: Claude
Fixes: https://tracker.ceph.com/issues/76631
15 files changed:
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/multi-cluster/multi-cluster.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/components/card-row/card-row.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/components/progress/progress.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/components/upgradable/upgradable.component.html [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html

index c575ca7d01b9a5e4d18e153366e02bc8da9e8642..1f51cb650ab5b61b05274210097d1af02e6ad04a 100644 (file)
@@ -64,7 +64,9 @@ import {
   GridModule,
   IconModule,
   IconService,
+  InlineLoadingModule,
   InputModule,
+  LoadingModule,
   ModalModule,
   NumberModule,
   RadioModule,
@@ -121,6 +123,8 @@ import { NvmeofTabsComponent } from './nvmeof-tabs/nvmeof-tabs.component';
     ButtonModule,
     GridModule,
     IconModule,
+    InlineLoadingModule,
+    LoadingModule,
     CheckboxModule,
     RadioModule,
     SelectModule,
index 33c08351c043d1184832ea9e37150d337b53a2b6..13483275b2ac85412c3992d015c5590fc3d326c2 100644 (file)
@@ -97,7 +97,7 @@ export class IscsiTargetDetailsComponent implements OnChanges, OnInit {
       target: {
         expanded: _.join(
           this.selectedItem.cdExecuting
-            ? [Icons.size24, Icons.spinner, Icons.spin]
+            ? [Icons.size24, Icons.spinner]
             : [Icons.size24, Icons.bullseye],
           ' '
         )
index b36ef9e8b72c42a0ecf3f3e1c37fd5946ca079fe..e7fc966455b3fab227d3e2e8d5a6fdd1ab947f7a 100644 (file)
              let-column="data.column"
              let-value="data.value"
              let-row="data.row">
-  <i [ngClass]="[icons.spinner, icons.spin]"
-     *ngIf="row.cdExecuting"></i>
+  <cds-inline-loading *ngIf="row.cdExecuting"></cds-inline-loading>
     <span [ngClass]="column?.customTemplateConfig?.valueClass">
     {{ value }}
   </span>
index 82d5f5a1dfc40040e74d7753d962407dafd6d3e0..de3e74c8a94267156ed53352fbaf46c21deae95a 100644 (file)
@@ -15,7 +15,9 @@
                        (select)="selectNode($event)">
         </cds-tree-view>
         <div *ngIf="loadingIndicator">
-          <i [ngClass]="[icons.spinner, icons.spin]"></i>
+          <cds-loading [isActive]="true"
+                       [overlay]="false"
+                       size="sm"></cds-loading>
         </div>
       </div>
     </div>
index 2b0555b5430257a634f43f9dc0842b5b46188836..3113ba597c9b1bf8a52a46548e825a494bf3a8bd 100644 (file)
@@ -42,8 +42,10 @@ import {
   GridModule,
   IconModule,
   IconService,
+  InlineLoadingModule,
   InputModule,
   LayoutModule,
+  LoadingModule,
   ModalModule,
   NumberModule,
   PlaceholderModule,
@@ -94,6 +96,8 @@ import { CephfsMirroringEntityComponent } from './cephfs-mirroring-entity/cephfs
     LayoutModule,
     ComboBoxModule,
     IconModule,
+    InlineLoadingModule,
+    LoadingModule,
     RadioModule,
     BaseChartDirective,
     TabsModule,
index d636b5dc99657b3e1e7c5fda033c73ef3bc163bc..312ee69f0a63640f20b668cc48a7e18c60b46497 100644 (file)
@@ -10,7 +10,9 @@ import {
   ButtonModule,
   GridModule,
   ProgressIndicatorModule,
+  InlineLoadingModule,
   InputModule,
+  LoadingModule,
   ModalModule,
   TreeviewModule,
   ListModule,
@@ -123,7 +125,9 @@ import { TextLabelListComponent } from '~/app/shared/components/text-label-list/
     GridModule,
     ProgressIndicatorModule,
     ButtonModule,
+    InlineLoadingModule,
     InputModule,
+    LoadingModule,
     ModalModule,
     ListModule,
     ToggletipModule,
index d59ca849a10a74e14e1317fa8ca90a7491b7f85d..804728c35c262352b31b1dc71aae036e0d7099bc 100644 (file)
@@ -6,8 +6,10 @@
       <div class="card-body">
         <div class="row">
           <div class="col-sm-6 col-lg-6 tree-container">
-            <i *ngIf="loadingIndicator"
-               [ngClass]="[icons.size24, icons.spinner, icons.spin]"></i>
+            <cds-loading *ngIf="loadingIndicator"
+                         [isActive]="true"
+                         [overlay]="false"
+                         size="sm"></cds-loading>
             <cds-tree-view #tree
                            [isMultiSelect]="false"
                            (select)="onNodeSelected($event)">
index bbdadd9d0ee67e4f5ef6f48ac2528a8e2c0e9fc9..97e27b280c44e81c8a931378edeea2d5172354f5 100644 (file)
   <div class="container h-75">
     <div class="row h-100 justify-content-center align-items-center">
       <div class="blank-page">
-        <i class="mx-auto d-block"
-           [ngClass]="[icons.size32, icons.spinner, icons.spin]">
-        </i>
+        <cds-loading class="mx-auto d-block"
+                     [isActive]="true"
+                     [overlay]="false"
+                     size="lg"></cds-loading>
         <p class="text-center mt-3"
            i18n>Loading data, Please wait...</p>
       </div>
index 2bc713bf3dcd20377a1b7a6286d1421228838679..0114a257cc48aebed1502972cb0dec39d7a18716 100644 (file)
             aria-label="Upgrade now"
             [disabled]="true"
             i18n>Checking for upgrades
-      <i [ngClass]="[icons.spin, icons.spinner]"></i>
+      <cds-inline-loading></cds-inline-loading>
     </button>
   </div>
 </ng-template>
 
+<<<<<<< HEAD
+=======
+<ng-template #loadingDetails>
+  <div class="w-50"
+       *ngIf="!errorMessage; else upgradeInfoError">
+    <span class="text-info justify-content-center align-items-center"
+          i18n>Fetching registry information
+      <cds-inline-loading></cds-inline-loading>
+    </span>
+  </div>
+</ng-template>
+
+>>>>>>> 60818962ca7 (mgr/dashboard: replace icons.spin with Carbon loading components)
 <ng-template #upgradeStatusError>
   <div cdsStack
        orientation="vertical"
 </ng-template>
 
 <ng-template #upgradeProgress>
+<<<<<<< HEAD
   <div cdsStack
        orientation="vertical"
        gap="4"
     <h5 class="cds--type-heading-compact-01"
         i18n>
       <i [ngClass]="[icons.spin, icons.spinner]"></i>
+=======
+  <div class="d-flex flex-column justify-content-center align-items-center mt-2">
+    <h5 i18n>
+      <cds-inline-loading></cds-inline-loading>
+>>>>>>> 60818962ca7 (mgr/dashboard: replace icons.spin with Carbon loading components)
       Upgrade in progress {{executingTasks?.progress}}%</h5>
     <a class="cds--link cds-mb-3"
        routerLink="/upgrade/progress"
index 36b3fab23fb7fb537c117b171de05464c4af3ec6..2fd22eb97b6202abf8aa3140c0f445871665e1a2 100644 (file)
        i18n>Topology Viewer</div>
   <div class="row">
     <div class="col-sm-6 col-lg-6 tree-container">
-      <i *ngIf="loadingIndicator"
-         [ngClass]="[icons.size24, icons.spinner, icons.spin]"></i>
+      <cds-loading *ngIf="loadingIndicator"
+                   [isActive]="true"
+                   [overlay]="false"
+                   size="sm"></cds-loading>
       <cds-tree-view #tree
                      [isMultiSelect]="false"
                      (select)="onNodeSelected($event)">
index 7e5897ea69b2c0c1a5eb1fe6350b286df98bf547..36a5df28a3a8b7239f925ada2cc04ee023c0aab8 100644 (file)
     <span *ngIf="data.categoryPgAmount?.working">
       {{ data.categoryPgAmount?.working }}
     </span>
-    <i class="text-warning"
-       [ngClass]="[icons.spinner, icons.spin]">
-    </i>
+    <cds-inline-loading class="text-warning"></cds-inline-loading>
   </span>
   }
 </ng-template>
index c2a1b8842b59a4960ecb3de19b00611646172023..2c8ca2e01516b4902822475d0e20ea5dcab00071 100644 (file)
@@ -1,9 +1,8 @@
 <ngb-alert type="info"
            [dismissible]="false">
   <strong>
-    <i [ngClass]="[icons.spinner, icons.spin]"
-       aria-hidden="true"
-       class="me-2"></i>
+    <cds-inline-loading aria-hidden="true"
+                        class="me-2"></cds-inline-loading>
   </strong>
   <ng-content></ng-content>
 </ngb-alert>
index 52f37ea57c24f2c20845e931b2f8ad3dec638786..377a903edf503f02337263fa327664644eb65a1d 100644 (file)
@@ -3,10 +3,14 @@
     <h3 class="text-center"
         [ngClass]="{ 'mt-3': status === 'in-progress' && isPaused }"
         *ngIf="!value || actionName === 'upgrading'">
-      <i *ngIf="status === 'in-progress' && isPaused; else spinningIcon"
-         [ngClass]="[icons.size24, icons.spinner]"></i>
+      <cds-loading *ngIf="status === 'in-progress' && isPaused; else spinningIcon"
+                   [isActive]="false"
+                   [overlay]="false"
+                   size="sm"></cds-loading>
       <ng-template #spinningIcon>
-        <i [ngClass]="[icons.size24, icons.spin, icons.spinner]"></i>
+        <cds-loading [isActive]="true"
+                     [overlay]="false"
+                     size="sm"></cds-loading>
       </ng-template>
     </h3>
 
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
new file mode 100644 (file)
index 0000000..e356fbb
--- /dev/null
@@ -0,0 +1,26 @@
+<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>
+        <cds-inline-loading></cds-inline-loading>
+          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>
index 57e400c29bf656ea40cba01cde055a06b693ecb6..df18fb836ec625b24afb12e2cfc419c3b7da5c50 100644 (file)
              let-column="data.column"
              let-row="data.row"
              let-value="data.value">
-  <i [ngClass]="[icons.spinner, icons.spin]"
-     *ngIf="row.cdExecuting"></i>
+  <cds-inline-loading *ngIf="row.cdExecuting"></cds-inline-loading>
   <span [ngClass]="column?.customTemplateConfig?.valueClass">
     {{ value }}
   </span>