]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.ts
import quincy beta 17.1.0
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / create-cluster / create-cluster-review.component.ts
index 8960f399a77eba445133d32ec5fcd4c6318778c5..4490b4e441c9942188ef417a13b755c36a0f661c 100644 (file)
@@ -5,7 +5,6 @@ import _ from 'lodash';
 import { CephServiceService } from '~/app/shared/api/ceph-service.service';
 import { HostService } from '~/app/shared/api/host.service';
 import { OsdService } from '~/app/shared/api/osd.service';
-import { CellTemplate } from '~/app/shared/enum/cell-template.enum';
 import { CephServiceSpec } from '~/app/shared/models/service.interface';
 import { DimlessBinaryPipe } from '~/app/shared/pipes/dimless-binary.pipe';
 import { WizardStepsService } from '~/app/shared/services/wizard-steps.service';
@@ -17,12 +16,7 @@ import { WizardStepsService } from '~/app/shared/services/wizard-steps.service';
 })
 export class CreateClusterReviewComponent implements OnInit {
   hosts: object[] = [];
-  hostsByService: object;
   hostsCount: number;
-  serviceCount: number;
-  serviceOccurrences = {};
-  hostsCountPerService: object[] = [];
-  uniqueServices: Set<string> = new Set();
   totalDevices: number;
   totalCapacity = 0;
   services: Array<CephServiceSpec> = [];
@@ -45,45 +39,6 @@ export class CreateClusterReviewComponent implements OnInit {
     let dbDevices = 0;
     let dbDeviceCapacity = 0;
 
-    this.hostsByService = {
-      columns: [
-        {
-          prop: 'service_type',
-          name: $localize`Services`,
-          flexGrow: 1,
-          cellTransformation: CellTemplate.badge,
-          customTemplateConfig: {
-            class: 'badge-dark'
-          }
-        },
-        {
-          name: $localize`Number of Hosts`,
-          prop: 'hosts_per_service',
-          flexGrow: 1
-        }
-      ]
-    };
-
-    this.cephServiceService.list().subscribe((resp: Array<CephServiceSpec>) => {
-      this.services = resp;
-      this.serviceCount = this.services.length;
-
-      _.forEach(this.services, (serviceKey) => {
-        this.serviceOccurrences[serviceKey['service_type']] =
-          (this.serviceOccurrences[serviceKey['service_type']] || 0) + 1;
-        this.uniqueServices.add(serviceKey['service_type']);
-      });
-
-      this.uniqueServices.forEach((serviceType) => {
-        this.hostsCountPerService.push({
-          service_type: serviceType,
-          hosts_per_service: this.serviceOccurrences[serviceType]
-        });
-      });
-
-      this.hostsByService['data'] = [...this.hostsCountPerService];
-    });
-
     this.hostService.list('true').subscribe((resp: object[]) => {
       this.hosts = resp;
       this.hostsCount = this.hosts.length;