]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Force datatable to hide the loading indicator in case of an error.
authorVolker Theile <vtheile@suse.com>
Fri, 13 Apr 2018 07:40:45 +0000 (09:40 +0200)
committerVolker Theile <vtheile@suse.com>
Thu, 19 Apr 2018 09:35:13 +0000 (11:35 +0200)
Signed-off-by: Volker Theile <vtheile@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts

index 49e124216e5c15a29f96b7c0428fcf3ba08363f1..85d88da8912b95d1fabab5a0ad02deabae2b682d 100644 (file)
@@ -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 = [];
       });
   }
 
index 4f1d710b4d84e451eee21e6e30886ad681f6629d..5aa82efe9e3c6c9f20950d5818c7cda5efa04063 100644 (file)
@@ -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 = [];
       });
   }
 
index 14bb8232fa485c5d08ec10631d6ca9e49846d3a9..2953ab7523ac4712536a4c108fadebf791a3f4b3 100644 (file)
@@ -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 = [];
       });
   }