From a611e7cf0744de589fd1040e397d72cb21d02f16 Mon Sep 17 00:00:00 2001 From: David Weinholz Date: Fri, 25 Jan 2019 11:31:07 +0100 Subject: [PATCH 1/6] updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 976b6f11f7..b4c5febf75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ +## 0.1.0-beta.0.6.0 Release + #### Bug Fixes From 199f302e70bc1d46edba6000ee12be10a3851bd5 Mon Sep 17 00:00:00 2001 From: David Weinholz Date: Fri, 25 Jan 2019 12:06:58 +0100 Subject: [PATCH 2/6] fix(Applications):Single vm to simple vm --- src/app/applications/addsinglevm.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/applications/addsinglevm.component.html b/src/app/applications/addsinglevm.component.html index 4a7ae4d399..a82adeacdb 100644 --- a/src/app/applications/addsinglevm.component.html +++ b/src/app/applications/addsinglevm.component.html @@ -4,7 +4,7 @@
- New Single Vm Application + New Simple Vm Application – Form
From 67e734f5a6e802b2f427901145cf89b7c4d82972 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 29 Jan 2019 23:50:28 +0100 Subject: [PATCH 3/6] feat(Resources):added resources overview method --- src/app/api-connector/facility.service.ts | 13 ++++++++++++- .../facility.application.component.ts | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/app/api-connector/facility.service.ts b/src/app/api-connector/facility.service.ts index 2fe87da0c2..70faec2951 100644 --- a/src/app/api-connector/facility.service.ts +++ b/src/app/api-connector/facility.service.ts @@ -57,6 +57,17 @@ export class FacilityService { }).pipe(catchError((error: any) => throwError(error))); + } + + getFacilityResources(facility: number): Observable { + + return this.http.get(this.settings.getApiBaseURL() + 'computecenters/' + facility + '/projects/resources/', { + withCredentials: true, + + + }).pipe(catchError((error: any) => throwError(error))); + + } @@ -139,7 +150,7 @@ export class FacilityService { * @param {number} facility id of the facility * @returns {Observable} */ - getFacilityGroupRichMembers(groupid: number,facility:number): Observable { + getFacilityGroupRichMembers(groupid: number, facility: number): Observable { return this.http.get(this.settings.getApiBaseURL() + 'computecenters/' + facility + '/projects/' + groupid + '/members/', { withCredentials: true, }).pipe(catchError((error: any) => throwError(error.error))); diff --git a/src/app/facility_manager/facility.application.component.ts b/src/app/facility_manager/facility.application.component.ts index ddacd06bbc..5564814881 100644 --- a/src/app/facility_manager/facility.application.component.ts +++ b/src/app/facility_manager/facility.application.component.ts @@ -89,8 +89,10 @@ export class FacilityApplicationComponent extends AbstractBaseClasse implements console.log(result ) this.managerFacilities = result; this.selectedFacility = this.managerFacilities[0]; + this.facilityService.getFacilityResources(this.selectedFacility['FacilityId']).subscribe() this.getAllApplications(this.selectedFacility ['FacilityId']); + }) } From 6726cc3198d98e998782cc56cb5cfce4640ca103 Mon Sep 17 00:00:00 2001 From: David Weinholz Date: Wed, 30 Jan 2019 14:16:12 +0100 Subject: [PATCH 4/6] feat(Facility):added resurces voerview --- .../facility.application.component.ts | 2 - .../facilitymanager-routing.module.ts | 11 +- .../facilitymanager.module.ts | 4 +- .../resources/resources.component.html | 103 ++++++++++++++++ .../resources/resources.component.scss | 0 .../resources/resources.component.spec.ts | 25 ++++ .../resources/resources.component.ts | 114 ++++++++++++++++++ src/app/layouts/full-layout.component.html | 62 ++++++---- 8 files changed, 296 insertions(+), 25 deletions(-) create mode 100644 src/app/facility_manager/resources/resources.component.html create mode 100644 src/app/facility_manager/resources/resources.component.scss create mode 100644 src/app/facility_manager/resources/resources.component.spec.ts create mode 100644 src/app/facility_manager/resources/resources.component.ts diff --git a/src/app/facility_manager/facility.application.component.ts b/src/app/facility_manager/facility.application.component.ts index 5564814881..e43155468e 100644 --- a/src/app/facility_manager/facility.application.component.ts +++ b/src/app/facility_manager/facility.application.component.ts @@ -86,7 +86,6 @@ export class FacilityApplicationComponent extends AbstractBaseClasse implements super(); this.facilityService.getManagerFacilities().subscribe(result => { - console.log(result ) this.managerFacilities = result; this.selectedFacility = this.managerFacilities[0]; this.facilityService.getFacilityResources(this.selectedFacility['FacilityId']).subscribe() @@ -359,7 +358,6 @@ export class FacilityApplicationComponent extends AbstractBaseClasse implements */ onChangeSelectedFacility(value) { this.all_applications = []; - console.log(this.selectedFacility) this.getAllApplications(this.selectedFacility['FacilityId']) } diff --git a/src/app/facility_manager/facilitymanager-routing.module.ts b/src/app/facility_manager/facilitymanager-routing.module.ts index 2081c4c9ca..899371d7bb 100644 --- a/src/app/facility_manager/facilitymanager-routing.module.ts +++ b/src/app/facility_manager/facilitymanager-routing.module.ts @@ -3,6 +3,7 @@ import {Routes, RouterModule} from '@angular/router'; import {FacilityProjectsOverviewComponent} from "../facility_manager/facilityprojectsoverview.component"; import {ImageTagComponent} from "../facility_manager/imagetags.component"; import {FacilityApplicationComponent} from "./facility.application.component"; +import {ResourcesComponent} from "./resources/resources.component"; const routes: Routes = [ @@ -19,14 +20,22 @@ const routes: Routes = [ data: { title: 'Image Tags' } - },{ + }, { path: 'facilityApplications', component: FacilityApplicationComponent, data: { title: 'Facility Applications' } + }, + { + path: 'facilityResources', + component: ResourcesComponent, + data: { + title: 'Facility Resources' + } } + ]; @NgModule({ diff --git a/src/app/facility_manager/facilitymanager.module.ts b/src/app/facility_manager/facilitymanager.module.ts index 3169c9bd53..c90719964a 100644 --- a/src/app/facility_manager/facilitymanager.module.ts +++ b/src/app/facility_manager/facilitymanager.module.ts @@ -7,6 +7,7 @@ import {FormsModule} from '@angular/forms'; import {ImageTagComponent} from "../facility_manager/imagetags.component"; import {FacilitymanagerRoutingModule} from "./facilitymanager-routing.module"; import {FacilityApplicationComponent} from "./facility.application.component"; +import { ResourcesComponent } from './resources/resources.component'; @NgModule({ imports: [ @@ -19,7 +20,8 @@ import {FacilityApplicationComponent} from "./facility.application.component"; declarations: [ FacilityProjectsOverviewComponent, ImageTagComponent, - FacilityApplicationComponent + FacilityApplicationComponent, + ResourcesComponent ] }) export class FacilitymanagerModule { } diff --git a/src/app/facility_manager/resources/resources.component.html b/src/app/facility_manager/resources/resources.component.html new file mode 100644 index 0000000000..91bb1d2a19 --- /dev/null +++ b/src/app/facility_manager/resources/resources.component.html @@ -0,0 +1,103 @@ +
+ +
+
+ +

Projects Overview: {{selectedFacility['Facility']}} + + +

+
+
+ Resources + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Facility: {{selectedFacility['Facility']}}

Approved OpenStackWait for Confirmation OpenStackSimple VMTotal
 Ram [GB] {{openStackApprovedTotalRam}} {{openStackWFCTotalRam}} {{simpleVmTotalRam}} {{totalRam}}
 Cores {{openStackApprovedTotalCores}} {{openStackWFCTotalCores}} {{simpleVmTotalCores}} {{totalCores}}
 Vms {{openStackApprovedTotalVms}} {{openStackWFCTotalVms}} {{simpleVmTotalVms}} {{totalVms}}
 Volumes {{openStackApprovedTotalVolumeCounter}} {{openStackWFCTotalVolumeCounter}} {{simpleVmTotalVolumeCounter}} {{totalVolumeCounter}}
 Volumes Storage [GB] {{openStackApprovedTotalVolumeLimit}} {{openStackWFCTotalVolumeLimit}} {{simpleVmTotalVolumeLimit}} {{totalVolumeLimit}}
 Object Storage [GB] {{openStackApprovedTotalObjectStorage}} {{openStackWFCTotalObjectStorage}}  {{totalObjectStorage}}
 FPGA {{openStackApprovedTotalFPGA}} {{openStackWFCTotalFPGA}}  {{totalFPGA}}
 GPU {{openStackApprovedTotalGPU}} {{openStackWFCTotalGPU}}  {{totalFPGA}}
+ +
+
+ +
+
diff --git a/src/app/facility_manager/resources/resources.component.scss b/src/app/facility_manager/resources/resources.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/app/facility_manager/resources/resources.component.spec.ts b/src/app/facility_manager/resources/resources.component.spec.ts new file mode 100644 index 0000000000..06cd8a0d3d --- /dev/null +++ b/src/app/facility_manager/resources/resources.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ResourcesComponent } from './resources.component'; + +describe('ResourcesComponent', () => { + let component: ResourcesComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ResourcesComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ResourcesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/facility_manager/resources/resources.component.ts b/src/app/facility_manager/resources/resources.component.ts new file mode 100644 index 0000000000..52b25bb0f4 --- /dev/null +++ b/src/app/facility_manager/resources/resources.component.ts @@ -0,0 +1,114 @@ +import {Component, OnInit} from '@angular/core'; +import {FacilityService} from "../../api-connector/facility.service"; +import {ComputecenterComponent} from "../../projectmanagement/computecenter.component"; + +@Component({ + selector: 'app-resources', + templateUrl: './resources.component.html', + styleUrls: ['./resources.component.scss'], + providers: [FacilityService] + +}) +export class ResourcesComponent implements OnInit { + + public managerFacilities: [string, number][]; + /** + * Chosen facility. + */ + public selectedFacility: [string, number]; + + isLoaded = false; + + simpleVmTotalRam = 0; + simpleVmTotalCores = 0; + simpleVmTotalVms = 0; + simpleVmTotalVolumeLimit = 0; + simpleVmTotalVolumeCounter = 0; + + openStackApprovedTotalRam = 0; + openStackApprovedTotalCores = 0; + openStackApprovedTotalVms = 0; + openStackApprovedTotalVolumeLimit = 0; + openStackApprovedTotalVolumeCounter = 0; + openStackApprovedTotalObjectStorage = 0; + openStackApprovedTotalFPGA = 0; + openStackApprovedTotalGPU = 0; + + openStackWFCTotalRam = 0; + openStackWFCTotalCores = 0; + openStackWFCTotalVms = 0; + openStackWFCTotalVolumeLimit = 0; + openStackWFCTotalVolumeCounter = 0; + openStackWFCTotalObjectStorage = 0; + openStackWFCTotalFPGA = 0; + openStackWFCTotalGPU = 0; + totalRam = 0; + totalCores = 0; + totalVms = 0; + totalVolumeLimit = 0; + totalVolumeCounter = 0; + totalObjectStorage = 0; + totalFPGA = 0; + totalGPU = 0; + + + constructor(private facilityService: FacilityService) { + this.facilityService.getManagerFacilities().subscribe(result => { + this.managerFacilities = result; + this.selectedFacility = this.managerFacilities[0]; + this.getSelectedFacilityResources() + + + }) + } + + public getSelectedFacilityResources() { + this.facilityService.getFacilityResources(this.selectedFacility['FacilityId']).subscribe(res => { + this.simpleVmTotalRam = res['simpleVmApplications']['totalRam']; + this.simpleVmTotalCores = res['simpleVmApplications']['totalCores']; + this.simpleVmTotalVms = res['simpleVmApplications']['totalVms']; + this.simpleVmTotalVolumeLimit = res['simpleVmApplications']['totalVolumeLimit']; + this.simpleVmTotalVolumeCounter = res['simpleVmApplications']['totalVolumeCounter']; + + this.openStackApprovedTotalRam = res['approvedOpenStackApplications']['totalRam']; + this.openStackApprovedTotalCores = res['approvedOpenStackApplications']['totalCores']; + this.openStackApprovedTotalVms = res['approvedOpenStackApplications']['totalVms']; + this.openStackApprovedTotalVolumeLimit = res['approvedOpenStackApplications']['totalVolumeLimit']; + this.openStackApprovedTotalVolumeCounter = res['approvedOpenStackApplications']['totalVolumeCounter']; + this.openStackApprovedTotalObjectStorage = res['approvedOpenStackApplications']['totalObjectStorage']; + this.openStackApprovedTotalFPGA = res['approvedOpenStackApplications']['totalFPGA']; + this.openStackApprovedTotalGPU = res['approvedOpenStackApplications']['totalGPU']; + + this.openStackWFCTotalRam = res['wfcOpenStackApplications']['totalRam']; + this.openStackWFCTotalCores = res['wfcOpenStackApplications']['totalCores']; + this.openStackWFCTotalVms = res['wfcOpenStackApplications']['totalVms']; + this.openStackWFCTotalVolumeLimit = res['wfcOpenStackApplications']['totalVolumeLimit']; + this.openStackWFCTotalVolumeCounter = res['wfcOpenStackApplications']['totalVolumeCounter']; + this.openStackWFCTotalObjectStorage = res['wfcOpenStackApplications']['totalObjectStorage']; + this.openStackWFCTotalFPGA = res['wfcOpenStackApplications']['totalFPGA']; + this.openStackWFCTotalGPU = res['wfcOpenStackApplications']['totalGPU']; + + this.totalRam = res['total']['totalRam']; + this.totalCores = res['total']['totalCores']; + this.totalVms = res['total']['totalVms']; + this.totalVolumeLimit = res['total']['totalVolumeLimit']; + this.totalVolumeCounter = res['total']['totalVolumeCounter']; + this.totalObjectStorage = res['total']['totalObjectStorage']; + this.totalFPGA = res['total']['totalFPGA']; + this.totalGPU = res['total']['totalGPU']; + + this.isLoaded = true; + }) + + } + + + onChangeSelectedFacility(value) { + this.getSelectedFacilityResources() + } + + ngOnInit() { + } + + +} diff --git a/src/app/layouts/full-layout.component.html b/src/app/layouts/full-layout.component.html index 277daa3e70..3702376a66 100644 --- a/src/app/layouts/full-layout.component.html +++ b/src/app/layouts/full-layout.component.html @@ -2,7 +2,7 @@
@@ -13,11 +13,13 @@ Profile
  • @@ -25,28 +27,33 @@ Project management