From 386965934d0050f23180dab99670dd7c090173af Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Fri, 13 Apr 2018 09:40:45 +0200 Subject: [PATCH] mgr/dashboard: Force datatable to hide the loading indicator in case of an error. Signed-off-by: Volker Theile --- .../app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts | 4 ++++ .../app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.ts | 4 ++++ .../src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts index 49e124216e5c1..85d88da8912b9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts @@ -36,6 +36,10 @@ export class RgwBucketListComponent { this.rgwBucketService.list() .subscribe((resp: object[]) => { this.buckets = resp; + }, () => { + // Force datatable to hide the loading indicator in + // case of an error. + this.buckets = []; }); } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.ts index 4f1d710b4d84e..5aa82efe9e3c6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.ts @@ -42,6 +42,10 @@ export class RgwDaemonListComponent { this.rgwDaemonService.list() .subscribe((resp: object[]) => { this.daemons = resp; + }, () => { + // Force datatable to hide the loading indicator in + // case of an error. + this.daemons = []; }); } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts index 14bb8232fa485..2953ab7523ac4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts @@ -51,6 +51,10 @@ export class RgwUserListComponent { this.rgwUserService.list() .subscribe((resp: object[]) => { this.users = resp; + }, () => { + // Force datatable to hide the loading indicator in + // case of an error. + this.users = []; }); } -- 2.39.5