]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: add tab structure to File Systems page and embed Ceph-Filesystem Overv... 64405/head
authorAbhishek Desai <abhishek.desai1@ibm.com>
Wed, 9 Jul 2025 08:09:50 +0000 (13:39 +0530)
committerAbhishek Desai <abhishek.desai1@ibm.com>
Thu, 10 Jul 2025 14:58:02 +0000 (20:28 +0530)
fixes: https://tracker.ceph.com/issues/72039
Signed-off-by: Abhishek Desai <abhishek.desai1@ibm.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs.module.ts

index 7b9934a6020a5fcd6ae67e9bb77f8ea920006a2e..8894f8cc5c14e2e8b800e5bc8abd7296dc9ccaaf 100644 (file)
@@ -1,25 +1,50 @@
-<cd-table [data]="filesystems"
-          columnMode="flex"
-          [columns]="columns"
-          (fetchData)="loadFilesystems($event)"
-          identifier="id"
-          forceIdentifier="true"
-          selectionType="single"
-          [hasDetails]="true"
-          (setExpandedRow)="setExpandedRow($event)"
-          (updateSelection)="updateSelection($event)">
-  <cd-cephfs-tabs *cdTableDetail
-                  [selection]="expandedRow">
-  </cd-cephfs-tabs>
-  <div class="table-actions">
-    <cd-table-actions [permission]="permissions.cephfs"
-                      [selection]="selection"
-                      class="btn-group"
-                      id="cephfs-actions"
-                      [tableActions]="tableActions">
-    </cd-table-actions>
-  </div>
-</cd-table>
+<cds-tabs
+  [type]="'contained'"
+  [followFocus]="true"
+  [isNavigation]="false"
+  [cacheActive]="true"
+  >
+  <cds-tab
+    heading="File systems"
+    i18n-heading
+    [tabContent]="fileSystemListContent">
+  </cds-tab>
+  <cds-tab
+    heading="Overview"
+    i18n-heading
+    [tabContent]="grafanaContent">
+  </cds-tab>
+</cds-tabs>
+
+<ng-template #fileSystemListContent>
+  <cd-table
+    [data]="filesystems"
+    columnMode="flex"
+    [columns]="columns"
+    (fetchData)="loadFilesystems($event)"
+    identifier="id"
+    forceIdentifier="true"
+    selectionType="single"
+    [hasDetails]="true"
+    (setExpandedRow)="setExpandedRow($event)"
+    (updateSelection)="updateSelection($event)"
+  >
+    <cd-cephfs-tabs
+      *cdTableDetail
+      [selection]="expandedRow">
+    </cd-cephfs-tabs>
+    <div class="table-actions">
+      <cd-table-actions
+        [permission]="permissions.cephfs"
+        [selection]="selection"
+        class="btn-group"
+        id="cephfs-actions"
+        [tableActions]="tableActions"
+      >
+      </cd-table-actions>
+    </div>
+  </cd-table>
+</ng-template>
 
 <ng-template #deleteTpl>
   <cd-alert-panel type="danger"
     This will remove its data and metadata pools. It'll also remove the MDS daemon associated with the volume.
   </cd-alert-panel>
 </ng-template>
+
+<ng-template #grafanaContent>
+  <cd-grafana
+    i18n-title
+    title="CephFS Overview"
+    [grafanaPath]="'ceph-filesystem-overview?'"
+    [type]="'metrics'"
+    uid="718Bruins"
+    *ngIf="permissions.grafana.read"
+    grafanaStyle="two"
+  >
+  </cd-grafana>
+</ng-template>
index 4581cc0b3c92c4766d97605f4e74d297475ce49c..be2555e6a46ea0dc4577f1b5fee976da97d2a96d 100644 (file)
     <ng-container ngbNavItem="performance-details">
       <a
       ngbNavLink
-      i18n>Performance Details</a>
+      i18n>Overview</a>
       <ng-template ngbNavContent>
         <cd-grafana
           i18n-title
-          title="CephFS MDS performance"
-          [grafanaPath]="'mds-performance?var-mds_servers=mds.' + grafanaId"
+          title="CephFS performance"
+          [grafanaPath]="'ceph-filesystem-overview?var-name=' + details.name"
           [type]="'metrics'"
-          uid="tbO9LAiZz"
+          uid="718Bruins"
           grafanaStyle="one"
         >
         </cd-grafana>
index da530d27dc1c56f6c1171049c0ec332461654495..9f92b814d9d1625d80f2c76d0385bf933ab2b73c 100644 (file)
@@ -47,7 +47,8 @@ import {
   PlaceholderModule,
   SelectModule,
   TimePickerModule,
-  TreeviewModule
+  TreeviewModule,
+  TabsModule
 } from 'carbon-components-angular';
 
 import AddIcon from '@carbon/icons/es/add/32';
@@ -84,7 +85,8 @@ import Trash from '@carbon/icons/es/trash-can/32';
     LayoutModule,
     ComboBoxModule,
     IconModule,
-    BaseChartDirective
+    BaseChartDirective,
+    TabsModule
   ],
   declarations: [
     CephfsDetailComponent,