From: Tiago Melo Date: Tue, 5 May 2020 11:48:10 +0000 (+0000) Subject: mgr/dashboard: Reduce requests in Mirroring page X-Git-Tag: v15.2.4~10^2~10^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f429e592a9042f91b87b7c6ac59d511f0c215c8;p=ceph.git mgr/dashboard: Reduce requests in Mirroring page Fixes: https://tracker.ceph.com/issues/45385 Signed-off-by: Tiago Melo (cherry picked from commit f1a020eaf5644d9c7b43c40445a74f89e0e8b536) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.html index 037393882d1f..b7e42d6baa58 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.html @@ -1,7 +1,7 @@ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.html index d3d862fd86fc..b8278b486536 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.html @@ -1,28 +1,31 @@ - + - - - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.html index 0b7cf9177650..755da08342b6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.html @@ -3,7 +3,7 @@ [columns]="columns" identifier="name" forceIdentifier="true" - [autoReload]="0" + [autoReload]="-1" (fetchData)="refresh()" selectionType="single" (updateSelection)="updateSelection($event)"> 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 1eb859e18f16..518e8c7d1529 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 @@ -99,6 +99,8 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O * Auto reload time in ms - per default every 5s * You can set it to 0, undefined or false to disable the auto reload feature in order to * trigger 'fetchData' if the reload button is clicked. + * You can set it to a negative number to, on top of disabling the auto reload, + * prevent triggering fetchData when initializing the table. */ @Input() autoReload: any = 5000; @@ -269,8 +271,10 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O }); }); }); - } else { + } else if (!this.autoReload) { this.reloadData(); + } else { + this.useData(); } }