From: Abhishek Desai Date: Fri, 25 Jul 2025 18:32:44 +0000 (+0530) Subject: mgr/dashboard: Made grafana iframe scrollable and height consistent X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=64361708338a8cf97de7f7d4f2768c109a50c82f;p=ceph.git mgr/dashboard: Made grafana iframe scrollable and height consistent Fixes : https://tracker.ceph.com/issues/72044 Signed-off-by: Abhishek Desai --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.html index 8894f8cc5c1..55688f9240b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.html @@ -61,7 +61,7 @@ [type]="'metrics'" uid="718Bruins" *ngIf="permissions.grafana.read" - grafanaStyle="two" + grafanaStyle="three" > diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html index be2555e6a46..045106ff624 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html @@ -88,7 +88,8 @@ [grafanaPath]="'ceph-filesystem-overview?var-name=' + details.name" [type]="'metrics'" uid="718Bruins" - grafanaStyle="one" + grafanaStyle="five" + scrollable="no" > diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-details/host-details.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-details/host-details.component.html index 386d5b3c99b..a1d91928d1b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-details/host-details.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-details/host-details.component.html @@ -39,7 +39,7 @@ [grafanaPath]="'host-details?var-ceph_hosts=' + selectedHostname" [type]="'metrics'" uid="rtOg0AiWz" - grafanaStyle="four"> + grafanaStyle="five"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.html index 2b73a710ac3..49f7317348b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.html @@ -62,6 +62,7 @@ [grafanaPath]="'osd-device-details?var-osd=osd.' + osd['id']" [type]="'metrics'" uid="CrAHE0iZz" + scrollable="no" grafanaStyle="three"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html index a56877512f9..7a7fc9b01e8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html @@ -50,7 +50,7 @@ [grafanaPath]="'osd-overview?'" [type]="'metrics'" uid="lo02I1Aiz" - grafanaStyle="four"> + grafanaStyle="three"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-progress/upgrade-progress.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-progress/upgrade-progress.component.html index c561594e23b..162d031aede 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-progress/upgrade-progress.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-progress/upgrade-progress.component.html @@ -43,4 +43,4 @@ [showFilterTools]="false" [showDownloadCopyButton]="false" defaultTab="cluster-logs" - [scrollable]="true"> + > 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 85a7333437e..0049996098c 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 @@ -128,8 +128,7 @@ [showNavLinks]="false" [showFilterTools]="false" [showDownloadCopyButton]="false" - defaultTab="cluster-logs" - [scrollable]="true"> + defaultTab="cluster-logs"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.html index b5645eee561..07b15e42f8b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.html @@ -42,7 +42,7 @@ [grafanaPath]="'ceph-pools-overview?'" [type]="'metrics'" uid="z99hzWtmk" - grafanaStyle="two"> + grafanaStyle="three"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.html index 538436fb3df..3c51747db8e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.html @@ -136,7 +136,7 @@ Policies -
+
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.scss index 4412732255e..08d2559ef26 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.scss @@ -8,12 +8,6 @@ table td { word-wrap: break-word; } -.table-scroller { - height: 100%; - max-height: 50vh; - overflow: auto; -} - .spacing-left { margin-left: layout.$spacing-03; } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.html index 14045669a33..ede4deb91eb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.html @@ -28,7 +28,7 @@ [grafanaPath]="'rgw-overview?'" [type]="'metrics'" uid="WAkugZpiz" - grafanaStyle="two"> + grafanaStyle="three"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-details/rgw-topic-details.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-details/rgw-topic-details.component.html index dec284392da..9f583d3a54a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-details/rgw-topic-details.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-topic-details/rgw-topic-details.component.html @@ -61,7 +61,7 @@ -
+
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.html index e2212cb5767..06cd3609438 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.html @@ -6,5 +6,5 @@ [grafanaPath]="'smb-overview?'" [type]="'metrics'" uid="feem6ehrmi2o0b" - grafanaStyle="two"> + grafanaStyle="three"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.scss index e212837ca40..d037420b0a7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.scss @@ -9,7 +9,6 @@ .container-fluid { overflow: auto; - padding-bottom: 100px; padding-top: 48px; } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html index 5b1ef2a6cb5..2db4f505f70 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html @@ -61,7 +61,7 @@ class="grafana" [ngClass]="panelStyle" frameborder="0" - scrolling="no" + [(scrolling)]="scrollable" [title]="title" i18n-title> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.scss index 7b43a460ff4..5990cc23439 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.scss @@ -1,3 +1,5 @@ +@use '@carbon/layout'; + .grafana { height: 600px; width: 100%; @@ -5,7 +7,7 @@ } .grafana_one { - height: 400px; + height: layout.rem(450px); } .grafana_two { @@ -20,6 +22,10 @@ height: 1160px; } +.grafana_five { + height: layout.rem(1600px); +} + .timepicker { label { font-weight: 700; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.ts index d3c7012bcbb..acbcde87e82 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.ts @@ -39,6 +39,8 @@ export class GrafanaComponent implements OnInit, OnChanges { uid: string; @Input() title: string; + @Input() + scrollable: string = 'yes'; constructor(private sanitizer: DomSanitizer, private settingsService: SettingsService) { this.grafanaTimes = [ @@ -155,7 +157,8 @@ export class GrafanaComponent implements OnInit, OnChanges { one: 'grafana_one', two: 'grafana_two', three: 'grafana_three', - four: 'grafana_four' + four: 'grafana_four', + five: 'grafana_five' }; this.datasource = this.type === 'metrics' ? 'Dashboard1' : 'Loki'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.html index 72ca4e47990..4dc625459d5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.html @@ -1,4 +1,4 @@ -
+
-
+ @if (row[identifier] === expanded?.[identifier] && !scrollable) { +
+ } @else if (row[identifier] === expanded?.[identifier] && scrollable) { +
+ +
+ }