]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: filte hosts by services
authorPere Diaz Bou <pere-altea@hotmail.com>
Wed, 17 May 2023 16:17:50 +0000 (18:17 +0200)
committerNizamudeen A <nia@redhat.com>
Fri, 26 May 2023 06:30:58 +0000 (12:00 +0530)
Fixes: https://tracker.ceph.com/issues/61242
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
(cherry picked from commit 510a582fa8bd04125a565afe12d245fc4dadff2f)

src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts

index 69a942e56d2854577d7b829f388a02aac7999bb5..297085aca972e8a3c1cf2cfadf9b469f63ddb1e2 100644 (file)
@@ -11,6 +11,7 @@
                 columnMode="flex"
                 (fetchData)="getHosts($event)"
                 selectionType="single"
+                [searchableObjects]="true"
                 [hasDetails]="hasTableDetails"
                 (setExpandedRow)="setExpandedRow($event)"
                 (updateSelection)="updateSelection($event)"
index c6c9369acfc637dd0c3bdb7235704ec220602acf..3fc62a9d673857f68f506f1ee5635a279ddafbbc 100644 (file)
@@ -879,12 +879,6 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
             return false;
           }
 
-          if (_.isArray(cellValue)) {
-            cellValue = cellValue.join(' ');
-          } else if (_.isNumber(cellValue) || _.isBoolean(cellValue)) {
-            cellValue = cellValue.toString();
-          }
-
           if (_.isObjectLike(cellValue)) {
             if (this.searchableObjects) {
               cellValue = JSON.stringify(cellValue);
@@ -893,6 +887,12 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
             }
           }
 
+          if (_.isArray(cellValue)) {
+            cellValue = cellValue.join(' ');
+          } else if (_.isNumber(cellValue) || _.isBoolean(cellValue)) {
+            cellValue = cellValue.toString();
+          }
+
           return cellValue.toLowerCase().indexOf(searchTerm) !== -1;
         }).length > 0
       );