]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts
import ceph quincy 17.2.4
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / osd.service.ts
index c8f881d5e13f540641ed983760fa6d0d3710555f..10a0cf47f0887ed720af19d652f36d235f2e5b0c 100644 (file)
@@ -7,6 +7,7 @@ import { map } from 'rxjs/operators';
 
 import { CdDevice } from '../models/devices';
 import { InventoryDeviceType } from '../models/inventory-device-type.model';
+import { DeploymentOptions } from '../models/osd-deployment-options';
 import { OsdSettings } from '../models/osd-settings';
 import { SmartDataResponseV1 } from '../models/smart';
 import { DeviceService } from '../services/device.service';
@@ -16,6 +17,8 @@ import { DeviceService } from '../services/device.service';
 })
 export class OsdService {
   private path = 'api/osd';
+  private uiPath = 'ui-api/osd';
+
   osdDevices: InventoryDeviceType[] = [];
 
   osdRecvSpeedModalPriorities = {
@@ -65,11 +68,11 @@ export class OsdService {
 
   constructor(private http: HttpClient, private deviceService: DeviceService) {}
 
-  create(driveGroups: Object[]) {
+  create(driveGroups: Object[], trackingId: string, method = 'drive_groups') {
     const request = {
-      method: 'drive_groups',
+      method: method,
       data: driveGroups,
-      tracking_id: _.join(_.map(driveGroups, 'service_id'), ', ')
+      tracking_id: trackingId
     };
     return this.http.post(this.path, request, { observe: 'response' });
   }
@@ -104,6 +107,10 @@ export class OsdService {
     return this.http.post(`${this.path}/${id}/scrub?deep=${deep}`, null);
   }
 
+  getDeploymentOptions() {
+    return this.http.get<DeploymentOptions>(`${this.uiPath}/deployment_options`);
+  }
+
   getFlags() {
     return this.http.get(`${this.path}/flags`);
   }