]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/pool.service.ts
import 15.2.0 Octopus source
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / pool.service.ts
index 8d81b3167afbc3c3bac1a6f47d60e01ee2b0eeb1..d4382a631e5d220d7124fe1523c0078c93621d0b 100644 (file)
@@ -18,11 +18,11 @@ export class PoolService {
 
   constructor(private http: HttpClient, private rbdConfigurationService: RbdConfigurationService) {}
 
-  create(pool) {
+  create(pool: any) {
     return this.http.post(this.apiPath, pool, { observe: 'response' });
   }
 
-  update(pool) {
+  update(pool: any) {
     let name: string;
     if (pool.hasOwnProperty('srcpool')) {
       name = pool.srcpool;
@@ -36,11 +36,11 @@ export class PoolService {
     });
   }
 
-  delete(name) {
+  delete(name: string) {
     return this.http.delete(`${this.apiPath}/${name}`, { observe: 'response' });
   }
 
-  get(poolName) {
+  get(poolName: string) {
     return this.http.get(`${this.apiPath}/${poolName}`);
   }
 
@@ -59,11 +59,11 @@ export class PoolService {
     );
   }
 
-  getInfo(pool_name?: string) {
-    return this.http.get(`${this.apiPath}/_info` + (pool_name ? `?pool_name=${pool_name}` : ''));
+  getInfo() {
+    return this.http.get(`ui-${this.apiPath}/info`);
   }
 
-  list(attrs = []) {
+  list(attrs: string[] = []) {
     const attrsStr = attrs.join(',');
     return this.http
       .get(`${this.apiPath}?attrs=${attrsStr}`)