Skip to content

Commit 993f945

Browse files
author
Abhishek Desai
committed
mgr/dashboard: add tab structure to File Systems page and embed Ceph-Filesystem Overview dashboard
fixes: https://tracker.ceph.com/issues/72039 Signed-off-by: Abhishek Desai <[email protected]>
1 parent 7c523c4 commit 993f945

File tree

3 files changed

+68
-28
lines changed

3 files changed

+68
-28
lines changed
Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,67 @@
1-
<cd-table [data]="filesystems"
2-
columnMode="flex"
3-
[columns]="columns"
4-
(fetchData)="loadFilesystems($event)"
5-
identifier="id"
6-
forceIdentifier="true"
7-
selectionType="single"
8-
[hasDetails]="true"
9-
(setExpandedRow)="setExpandedRow($event)"
10-
(updateSelection)="updateSelection($event)">
11-
<cd-cephfs-tabs *cdTableDetail
12-
[selection]="expandedRow">
13-
</cd-cephfs-tabs>
14-
<div class="table-actions">
15-
<cd-table-actions [permission]="permissions.cephfs"
16-
[selection]="selection"
17-
class="btn-group"
18-
id="cephfs-actions"
19-
[tableActions]="tableActions">
20-
</cd-table-actions>
21-
</div>
22-
</cd-table>
1+
<cds-tabs
2+
[type]="'contained'"
3+
[followFocus]="true"
4+
[isNavigation]="false"
5+
[cacheActive]="true"
6+
>
7+
<cds-tab
8+
heading="File systems"
9+
i18n-heading
10+
[tabContent]="fileSystemListContent">
11+
</cds-tab>
12+
<cds-tab
13+
heading="Overview"
14+
i18n-heading
15+
[tabContent]="grafanaContent">
16+
</cds-tab>
17+
</cds-tabs>
18+
19+
<ng-template #fileSystemListContent>
20+
<cd-table
21+
[data]="filesystems"
22+
columnMode="flex"
23+
[columns]="columns"
24+
(fetchData)="loadFilesystems($event)"
25+
identifier="id"
26+
forceIdentifier="true"
27+
selectionType="single"
28+
[hasDetails]="true"
29+
(setExpandedRow)="setExpandedRow($event)"
30+
(updateSelection)="updateSelection($event)"
31+
>
32+
<cd-cephfs-tabs
33+
*cdTableDetail
34+
[selection]="expandedRow">
35+
</cd-cephfs-tabs>
36+
<div class="table-actions">
37+
<cd-table-actions
38+
[permission]="permissions.cephfs"
39+
[selection]="selection"
40+
class="btn-group"
41+
id="cephfs-actions"
42+
[tableActions]="tableActions"
43+
>
44+
</cd-table-actions>
45+
</div>
46+
</cd-table>
47+
</ng-template>
2348

2449
<ng-template #deleteTpl>
2550
<cd-alert-panel type="danger"
2651
i18n>
2752
This will remove its data and metadata pools. It'll also remove the MDS daemon associated with the volume.
2853
</cd-alert-panel>
2954
</ng-template>
55+
56+
<ng-template #grafanaContent>
57+
<cd-grafana
58+
i18n-title
59+
title="CephFS Overview"
60+
[grafanaPath]="'ceph-filesystem-overview?'"
61+
[type]="'metrics'"
62+
uid="718Bruins"
63+
*ngIf="permissions.grafana.read"
64+
grafanaStyle="two"
65+
>
66+
</cd-grafana>
67+
</ng-template>

src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@
8080
<ng-container ngbNavItem="performance-details">
8181
<a
8282
ngbNavLink
83-
i18n>Performance Details</a>
83+
i18n>Overview</a>
8484
<ng-template ngbNavContent>
8585
<cd-grafana
8686
i18n-title
87-
title="CephFS MDS performance"
88-
[grafanaPath]="'mds-performance?var-mds_servers=mds.' + grafanaId"
87+
title="CephFS performance"
88+
[grafanaPath]="'ceph-filesystem-overview?var-name=' + details.name"
8989
[type]="'metrics'"
90-
uid="tbO9LAiZz"
90+
uid="718Bruins"
9191
grafanaStyle="one"
9292
>
9393
</cd-grafana>

src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ import {
4747
PlaceholderModule,
4848
SelectModule,
4949
TimePickerModule,
50-
TreeviewModule
50+
TreeviewModule,
51+
TabsModule
5152
} from 'carbon-components-angular';
5253

5354
import AddIcon from '@carbon/icons/es/add/32';
@@ -84,7 +85,8 @@ import Trash from '@carbon/icons/es/trash-can/32';
8485
LayoutModule,
8586
ComboBoxModule,
8687
IconModule,
87-
BaseChartDirective
88+
BaseChartDirective,
89+
TabsModule
8890
],
8991
declarations: [
9092
CephfsDetailComponent,

0 commit comments

Comments
 (0)