]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: remove duplicate ids from table column filters
authornsedrickm <nsedrick101@gmail.com>
Mon, 29 Aug 2022 18:35:29 +0000 (19:35 +0100)
committerNizamudeen A <nia@redhat.com>
Thu, 12 Jan 2023 10:31:55 +0000 (16:01 +0530)
Generate random ids for column filters to avoid id conflics on pages with multiple tables sharing the same column filters

Signed-off-by: nsedrickm <nsedrick101@gmail.com>
Fixes: https://tracker.ceph.com/issues/55869
(cherry picked from commit 78ec4addee07371cd8c86a91ec83dfe7324bd752)

src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html

index 576a1cbe76181ca035f44fb837fdf86dd06fdb8c..b73f0ad3973a6523bd0b3a19add425086fffb126 100644 (file)
                 <input class="custom-control-input"
                        type="checkbox"
                        [name]="column.prop"
-                       [id]="column.prop"
+                       id="{{ column.prop }}{{ tableName }}"
                        [checked]="!column.isHidden">
                 <label class="custom-control-label"
-                       [for]="column.prop">{{ column.name }}</label>
+                       for="{{ column.prop }}{{ tableName }}">{{ column.name }}</label>
               </div>
             </button>
           </ng-container>