]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/host.service.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / host.service.ts
index 7adbd0b104c27b83d1031b83105dd03f5131ef8e..3bb569575836e4aec8d3f41b5fd7bf3ee3d3e824 100644 (file)
@@ -27,11 +27,22 @@ export class HostService extends ApiClient {
     super();
   }
 
-  list(facts: string): Observable<object[]> {
-    return this.http.get<object[]>(this.baseURL, {
-      headers: { Accept: this.getVersionHeaderValue(1, 2) },
-      params: { facts: facts }
-    });
+  list(params: any, facts: string): Observable<object[]> {
+    params = params.set('facts', facts);
+    return this.http
+      .get<object[]>(this.baseURL, {
+        headers: { Accept: this.getVersionHeaderValue(1, 2) },
+        params: params,
+        observe: 'response'
+      })
+      .pipe(
+        map((response: any) => {
+          return response['body'].map((host: any) => {
+            host['headers'] = response.headers;
+            return host;
+          });
+        })
+      );
   }
 
   create(hostname: string, addr: string, labels: string[], status: string) {