]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: carbon datatables impr and cleanups 59220/head
authorIvo Almeida <ialmeida@redhat.com>
Wed, 14 Aug 2024 11:15:36 +0000 (12:15 +0100)
committerIvo Almeida <ialmeida@redhat.com>
Wed, 14 Aug 2024 15:30:29 +0000 (16:30 +0100)
Fixes: https://tracker.ceph.com/issues/67544,
https://tracker.ceph.com/issues/67538,
https://tracker.ceph.com/issues/67542, https://tracker.ceph.com/issues/67545, https://tracker.ceph.com/issues/67546

Signed-off-by: Ivo Almeida <ialmeida@redhat.com>
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/datatable/crud-table/crud-table.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
src/pybind/mgr/dashboard/frontend/src/styles/themes/_content.scss

index 5890ea45bdc6da2115522fdd19c33206a61aee9e..d0b2c2105d1ab50a2e54994c024e120f4dfd8c8d 100644 (file)
          *ngIf="metadata">
       <legend>{{ metadataTitle }}</legend>
       <div>
-        <cd-table-key-value cdTableDetail
+        <cd-table-key-value *cdTableDetail
                             [data]="metadata">
         </cd-table-key-value>
       </div>
index e47cdee4a5d6d8779413c0ec671c587f19ba3614..73e4a307cfc7deed4bf5c7c04feb48088277a368 100644 (file)
@@ -29,9 +29,9 @@
                         [tableActions]="meta.actions">
       </cd-table-actions>
     </div>
-    <ng-container [ngIf]="expandedRow && meta.detail_columns.length > 0"
-                  *cdTableDetail>
-      <table class="table table-striped table-bordered">
+    <ng-container *ngIf="expandedRow && meta.detail_columns.length > 0">
+      <table *cdTableDetail
+             class="table table-striped table-bordered">
         <tbody>
           <tr *ngFor="let column of meta.detail_columns">
             <td i18n
index 26196e1f3e8956025a43df737084b4c6a85f3a35..37277df4033af8aebb3d83e4bfd352b49cd367b6 100644 (file)
@@ -363,6 +363,29 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr
         }
       ];
     }
+
+    const tableHeadersSubscription = this._tableHeaders
+      .pipe(
+        map((values: CdTableColumn[]) =>
+          values.map(
+            (col: CdTableColumn) =>
+              new TableHeaderItem({
+                data: col?.headerTemplate ? { ...col } : col.name,
+                title: col.name,
+                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,
+                visible: !col.isHidden,
+                sortable: _.isNil(col.sortable) ? true : col.sortable
+              })
+          )
+        )
+      )
+      .subscribe({
+        next: (values: TableHeaderItem[]) => (this.model.header = values)
+      });
+
     const datasetSubscription = this._dataset
       .pipe(
         filter((values: any[]) => {
@@ -419,28 +442,6 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr
         }
       });
 
-    const tableHeadersSubscription = this._tableHeaders
-      .pipe(
-        map((values: CdTableColumn[]) =>
-          values.map(
-            (col: CdTableColumn) =>
-              new TableHeaderItem({
-                data: col?.headerTemplate ? { ...col } : col.name,
-                title: col.name,
-                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,
-                visible: !col.isHidden,
-                sortable: _.isNil(col.sortable) ? true : col.sortable
-              })
-          )
-        )
-      )
-      .subscribe({
-        next: (values: TableHeaderItem[]) => (this.model.header = values)
-      });
-
     const rowsExpandedSubscription = this.model.rowsExpandedChange.subscribe({
       next: (index: number) => {
         if (this.model.rowsExpanded.every((x) => !x)) {
@@ -454,9 +455,9 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr
       }
     });
 
+    this._subscriptions.add(tableHeadersSubscription);
     this._subscriptions.add(datasetSubscription);
     this._subscriptions.add(rowsExpandedSubscription);
-    this._subscriptions.add(tableHeadersSubscription);
   }
 
   ngOnInit() {
index e436feed15037aef27cb25a49a32c0005d27d74f..35e35f03b9fe5382e521d99fa2e20724274a6855 100644 (file)
@@ -28,10 +28,10 @@ $content-theme: map-merge(
     focus-inverse: lighten(vv.$primary, 25%),
     text-inverse: vv.$dark,
     support-info: vv.$info,
-    layer-01: vv.$secondary,
-    layer-hover-01: vv.$gray-600,
+    layer-01: vv.$light,
+    layer-hover-01: colors.$gray-20,
     text-primary: vv.$dark,
-    text-secondary: vv.$body-bg-alt,
+    text-secondary: vv.$dark,
     text-disabled: vv.$gray-500,
     icon-secondary: vv.$body-bg-alt
   )