]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts
import ceph quincy 17.2.6
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / services / service-daemon-list / service-daemon-list.component.ts
index d1c2f9cc3f11d153fcccce0883d9d2c66990fa68..c626e4785122db33918bf43235ec97f66db7224e 100644 (file)
@@ -1,5 +1,7 @@
+import { HttpParams } from '@angular/common/http';
 import {
   AfterViewInit,
+  ChangeDetectorRef,
   Component,
   Input,
   OnChanges,
@@ -97,7 +99,8 @@ export class ServiceDaemonListComponent implements OnInit, OnChanges, AfterViewI
     public actionLabels: ActionLabelsI18n,
     private authStorageService: AuthStorageService,
     private daemonService: DaemonService,
-    private notificationService: NotificationService
+    private notificationService: NotificationService,
+    private cdRef: ChangeDetectorRef
   ) {}
 
   ngOnInit() {
@@ -214,6 +217,10 @@ export class ServiceDaemonListComponent implements OnInit, OnChanges, AfterViewI
     this.columns = this.columns.filter((col: any) => {
       return !this.hiddenColumns.includes(col.prop);
     });
+
+    setTimeout(() => {
+      this.cdRef.detectChanges();
+    }, 1000);
   }
 
   ngOnChanges() {
@@ -281,15 +288,17 @@ export class ServiceDaemonListComponent implements OnInit, OnChanges, AfterViewI
     });
   }
   getServices(context: CdTableFetchDataContext) {
-    this.serviceSub = this.cephServiceService.list(this.serviceName).subscribe(
-      (services: CephServiceSpec[]) => {
-        this.services = services;
-      },
-      () => {
-        this.services = [];
-        context.error();
-      }
-    );
+    this.serviceSub = this.cephServiceService
+      .list(new HttpParams({ fromObject: { limit: -1, offset: 0 } }), this.serviceName)
+      .observable.subscribe(
+        (services: CephServiceSpec[]) => {
+          this.services = services;
+        },
+        () => {
+          this.services = [];
+          context.error();
+        }
+      );
   }
 
   trackByFn(_index: any, item: any) {