From 528f09c04eb10d20cc2b69aa806b2ee498d87fca Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Thu, 12 Sep 2024 18:51:13 +0530 Subject: [PATCH] mgr/dashboard: fix minor issues in carbon tables - fixes table in table structure's unusual padding - fixes the ceph fs details page where table was getting hidden - improving the subvolume list page by changing the spacings there - hide the refresh button where it shouldn't be shown. Fixes: https://tracker.ceph.com/issues/68050 Signed-off-by: Nizamudeen A --- .../cephfs-detail.component.html | 14 +++---- .../cephfs-subvolume-list.component.html | 4 +- .../cluster/services/services.component.ts | 2 +- .../rgw-bucket-details.component.html | 38 +++++++++---------- .../rgw-overview-dashboard.component.html | 2 +- .../device-list/device-list.component.html | 8 ++-- .../shared/components/doc/doc.component.html | 2 +- .../datatable/table/table.component.html | 6 ++- .../shared/datatable/table/table.component.ts | 12 +++--- .../mgr/dashboard/frontend/src/styles.scss | 1 + .../frontend/src/styles/_carbon-defaults.scss | 12 ++++++ 11 files changed, 57 insertions(+), 44 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.html index 2578d18ab17b5..cbc11db138fb7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.html @@ -1,23 +1,23 @@
-
+
Ranks - Standbys - - -
- -
Pools
+ +
+ Standbys + + +
MDS performance counters diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-list/cephfs-subvolume-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-list/cephfs-subvolume-list.component.html index da6386c350688..bfe66c864b378 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-list/cephfs-subvolume-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-list/cephfs-subvolume-list.component.html @@ -1,12 +1,12 @@
-
-
+
{ this.services = services; - this.count = pagination_obs.count; this.services = this.services.filter((col: any) => { if (col.service_type === 'mgmt-gateway' && col.status.running) { this.isMgmtGateway = true; } return !this.hiddenServices.includes(col.service_name); }); + this.count = this.services.length; this.isLoadingServices = false; }, () => { 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 31c54e59ebff9..ddc202152b9f4 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 @@ -139,26 +139,24 @@
{{ selection.bucket_policy | json}}
-
- Lifecycle -
- - -
- -
+ Lifecycle +
+ + +
+
{{selection.lifecycle | json}}
{{ (selection.lifecycle | xml) || '-'}}
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.html index 66f3ec5a5a7ab..519782b52990a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.html @@ -102,7 +102,7 @@ Multi-site needs to be configured in order to see the multi-site sync status. - Please consult the on how to configure and enable the multi-site functionality. + Please consult the  on how to configure and enable the multi-site functionality. diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/device-list/device-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/device-list/device-list.component.html index e9e2b5f663bd6..373ecfa462067 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/device-list/device-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/device-list/device-list.component.html @@ -40,11 +40,11 @@ - {{ "" | notAvailable }} - > {{value.min | i18nPlural: translationMapping}} - < {{value.max | i18nPlural: translationMapping}} - {{value.min}} to {{value.max | i18nPlural: translationMapping}} + > {{value.min | i18nPlural: translationMapping}} + < {{value.max | i18nPlural: translationMapping}} + {{value.min}} to {{value.max | i18nPlural: translationMapping}} {{ docText }} + target="_blank"> {{ docText }} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html index deb705d1fff98..4d4325724d7e7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html @@ -72,7 +72,8 @@ i18n-title i18n-description class="toolbar-action" - placement="bottom"> + placement="bottom" + *ngIf="fetchData?.observers?.length > 0"> @@ -195,7 +196,8 @@ (selectPage)="onPageChange($event)" [disabled]="limit === 0" [skeleton]="loadingIndicator" - [pageInputDisabled]="limit === 0"> + [pageInputDisabled]="limit === 0" + *ngIf="footer"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts index 5b2bd777dc7a0..1c6cca5782f6b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts @@ -411,7 +411,7 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr template: col?.headerTemplate, // if cellClass is a function it cannot be called here as it requires table data to execute // instead if cellClass is a function it will be called and applied while parsing the data - className: _.isString(col?.cellClass) ? col?.cellClass : col?.className, + className: _.isString(col?.cellClass) ? `${col?.cellClass}` : `${col?.className}`, visible: !col.isHidden, sortable: _.isNil(col.sortable) ? true : col.sortable }) @@ -553,12 +553,12 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr // this method was triggered by ngOnChanges(). if (this.fetchData.observers.length > 0) { this.loadingIndicator = true; + const loadingSubscription = this.fetchData.subscribe(() => { + this.loadingIndicator = false; + this.cdRef.detectChanges(); + }); + this._subscriptions.add(loadingSubscription); } - const loadingSubscription = this.fetchData.subscribe(() => { - this.loadingIndicator = false; - this.cdRef.detectChanges(); - }); - this._subscriptions.add(loadingSubscription); if (_.isInteger(this.autoReload) && this.autoReload > 0) { this.reloadSubscriber = this.timerService diff --git a/src/pybind/mgr/dashboard/frontend/src/styles.scss b/src/pybind/mgr/dashboard/frontend/src/styles.scss index f4cdd7981f548..9ca6f60b74423 100644 --- a/src/pybind/mgr/dashboard/frontend/src/styles.scss +++ b/src/pybind/mgr/dashboard/frontend/src/styles.scss @@ -237,4 +237,5 @@ formly-form { // Overriding legend css due to change in bootstrap v5 and setting it to none; legend { float: none; + margin-top: 1rem; } diff --git a/src/pybind/mgr/dashboard/frontend/src/styles/_carbon-defaults.scss b/src/pybind/mgr/dashboard/frontend/src/styles/_carbon-defaults.scss index c9ee32770d059..1d12facaf6a2f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/styles/_carbon-defaults.scss +++ b/src/pybind/mgr/dashboard/frontend/src/styles/_carbon-defaults.scss @@ -46,6 +46,18 @@ tr.cds--expandable-row > td:first-of-type { padding-inline-start: 1rem !important; } +tr.cds--expandable-row { + th, + tr td { + padding-inline-start: 0; + } +} + +tbody:has(td.cds--table-column-checkbox) > tr.cds--expandable-row[data-child-row] td, +tr.cds--parent-row.cds--expandable-row + tr[data-child-row] td { + padding-inline-start: 1rem; +} + th { padding-block: 0 !important; } -- 2.39.5