diff --git a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.spec.ts b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.spec.ts index 0ef7a2a5..2543f5c9 100644 --- a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.spec.ts +++ b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.spec.ts @@ -32,10 +32,6 @@ export class MockedQemuService { return of(qemuTemplate); } - public getBinaries(controller:Controller ) { - return of([]); - } - public getImages(controller:Controller ) { return of([]); } @@ -105,10 +101,6 @@ xdescribe('AddQemuVmTemplateComponent', () => { component.memoryForm.controls['ramMemory'].setValue(0); component.diskForm.controls['fileName'].setValue('file name'); component.chosenImage = 'path'; - component.selectedBinary = { - path: 'path', - version: 'version', - }; component.newImageSelected = true; component.controller = { id: 1 } as Controller ; @@ -124,10 +116,6 @@ xdescribe('AddQemuVmTemplateComponent', () => { component.memoryForm.controls['ramMemory'].setValue(0); component.diskForm.controls['fileName'].setValue('file name'); component.chosenImage = 'path'; - component.selectedBinary = { - path: 'path', - version: 'version', - }; component.newImageSelected = true; component.controller = { id: 1 } as Controller ; @@ -142,10 +130,6 @@ xdescribe('AddQemuVmTemplateComponent', () => { component.memoryForm.controls['binary'].setValue('binary'); component.diskForm.controls['fileName'].setValue('file name'); component.chosenImage = 'path'; - component.selectedBinary = { - path: 'path', - version: 'version', - }; component.newImageSelected = true; component.controller = { id: 1 } as Controller ; diff --git a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts index 1b3ea490..2c561c9d 100644 --- a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts +++ b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts @@ -25,10 +25,8 @@ import { ToasterService } from '../../../../services/toaster.service'; }) export class AddQemuVmTemplateComponent implements OnInit { controller:Controller ; - qemuBinaries: QemuBinary[] = []; selectPlatform: string[] = []; selectedPlatform: string; - selectedBinary: QemuBinary; ramMemory: number; consoleTypes: string[] = []; newImageSelected: boolean = false; @@ -108,19 +106,12 @@ export class AddQemuVmTemplateComponent implements OnInit { this.qemuTemplate = qemuTemplate; }); - - this.qemuService.getBinaries(this.controller).subscribe((qemuBinaries: QemuBinary[]) => { - this.qemuBinaries = qemuBinaries; - if (this.qemuBinaries[0]) this.selectedBinary = this.qemuBinaries[0]; - }); - this.qemuService.getImages(this.controller).subscribe((qemuImages: QemuImage[]) => { this.qemuImages = qemuImages; }); this.selectPlatform = this.configurationService.getPlatform(); this.selectedPlatform = this.selectPlatform[0]; - this.consoleTypes = this.configurationService.getConsoleTypes(); }); @@ -175,9 +166,7 @@ export class AddQemuVmTemplateComponent implements OnInit { addTemplate() { if (!this.nameForm.invalid && !this.memoryForm.invalid && (this.selectedImage || this.chosenImage)) { this.qemuTemplate.ram = +this.memoryForm.get('ramMemory').value; - this.qemuTemplate.qemu_path = this.selectedBinary.path; this.qemuTemplate.platform = this.selectedPlatform; - if (this.newImageSelected) { this.qemuTemplate.hda_disk_image = this.diskForm.get('fileName').value; } else { diff --git a/src/app/components/preferences/qemu/copy-qemu-vm-template/copy-qemu-vm-template.component.ts b/src/app/components/preferences/qemu/copy-qemu-vm-template/copy-qemu-vm-template.component.ts index 6ef1c61d..a242d411 100644 --- a/src/app/components/preferences/qemu/copy-qemu-vm-template/copy-qemu-vm-template.component.ts +++ b/src/app/components/preferences/qemu/copy-qemu-vm-template/copy-qemu-vm-template.component.ts @@ -16,7 +16,6 @@ import { ToasterService } from '../../../../services/toaster.service'; }) export class CopyQemuVmTemplateComponent implements OnInit { controller:Controller ; - qemuBinaries: QemuBinary[] = []; templateName: string = ''; qemuTemplate: QemuTemplate; nameForm: FormGroup; diff --git a/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.html b/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.html index 979515db..76d1b934 100644 --- a/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.html +++ b/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.html @@ -54,6 +54,13 @@ + + + + {{ platform }} + + + MB @@ -61,13 +68,7 @@ - - - - {{ binary.path }} - - - + diff --git a/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.spec.ts b/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.spec.ts index d9094549..01dc916b 100644 --- a/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.spec.ts +++ b/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.spec.ts @@ -31,9 +31,6 @@ export class MockedQemuService { return of(qemuTemplate); } - public getBinaries(controller:Controller ) { - return of([]); - } public getImages(controller:Controller ) { return of([]); diff --git a/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.ts b/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.ts index c34bfd53..41fd5e31 100644 --- a/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.ts +++ b/src/app/components/preferences/qemu/qemu-vm-template-details/qemu-vm-template-details.component.ts @@ -27,11 +27,13 @@ export class QemuVmTemplateDetailsComponent implements OnInit { onCloseOptions = []; categories = []; priorities: string[] = []; - binaries: QemuBinary[] = []; activateCpuThrottling: boolean = true; isConfiguratorOpened: boolean = false; displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions']; generalSettingsForm: FormGroup; + selectPlatform: string[] = []; + selectedPlatform: string; + @ViewChild('customAdaptersConfigurator') customAdaptersConfigurator: CustomAdaptersComponent; @@ -62,12 +64,10 @@ export class QemuVmTemplateDetailsComponent implements OnInit { this.qemuService.getTemplate(this.controller, template_id).subscribe((qemuTemplate: QemuTemplate) => { this.qemuTemplate = qemuTemplate; this.fillCustomAdapters(); - - this.qemuService.getBinaries(controller).subscribe((qemuBinaries: QemuBinary[]) => { - this.binaries = qemuBinaries; - }); }); }); + + this.selectPlatform = this.configurationService.getPlatform(); } getConfiguration() { diff --git a/src/app/components/preferences/vpcs/vpcs-template-details/vpcs-template-details.component.html b/src/app/components/preferences/vpcs/vpcs-template-details/vpcs-template-details.component.html index 68c08732..ae176604 100644 --- a/src/app/components/preferences/vpcs/vpcs-template-details/vpcs-template-details.component.html +++ b/src/app/components/preferences/vpcs/vpcs-template-details/vpcs-template-details.component.html @@ -1,7 +1,20 @@
-

VPCS device configuration

+
+ +
+
+

VPCS device configuration

+
diff --git a/src/app/components/project-map/new-template-dialog/new-template-dialog.component.html b/src/app/components/project-map/new-template-dialog/new-template-dialog.component.html index 848ab358..350795fb 100644 --- a/src/app/components/project-map/new-template-dialog/new-template-dialog.component.html +++ b/src/app/components/project-map/new-template-dialog/new-template-dialog.component.html @@ -131,19 +131,6 @@
-
- Qemu binary
- - - {{ binary.path }} - - -
Install required files
-
-
- - +
+ + +
diff --git a/src/app/components/project-map/node-editors/configurator/cloud/configurator-cloud.component.ts b/src/app/components/project-map/node-editors/configurator/cloud/configurator-cloud.component.ts index 215fcc1f..f4acae0b 100644 --- a/src/app/components/project-map/node-editors/configurator/cloud/configurator-cloud.component.ts +++ b/src/app/components/project-map/node-editors/configurator/cloud/configurator-cloud.component.ts @@ -21,7 +21,6 @@ export class ConfiguratorDialogCloudComponent implements OnInit { name: string; generalSettingsForm: FormGroup; consoleTypes: string[] = []; - binaries: QemuBinary[] = []; onCloseOptions = []; bootPriorities = []; diskInterfaces: string[] = []; diff --git a/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.html b/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.html index 14678fce..fb29217d 100644 --- a/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.html +++ b/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.html @@ -11,6 +11,13 @@ + + + + {{ platform }} + + + - - - - {{ binary.path }} - - - + diff --git a/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.ts b/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.ts index 246804aa..e610f3c5 100644 --- a/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.ts +++ b/src/app/components/project-map/node-editors/configurator/qemu/configurator-qemu.component.ts @@ -23,7 +23,6 @@ export class ConfiguratorDialogQemuComponent implements OnInit { name: string; generalSettingsForm: FormGroup; consoleTypes: string[] = []; - binaries: QemuBinary[] = []; onCloseOptions = []; bootPriorities = []; diskInterfaces: string[] = []; @@ -31,6 +30,7 @@ export class ConfiguratorDialogQemuComponent implements OnInit { displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions']; networkTypes = []; qemuImages: QemuImage[] = []; + selectPlatform: string[] = []; private conf = { autoFocus: false, @@ -63,13 +63,11 @@ export class ConfiguratorDialogQemuComponent implements OnInit { this.getConfiguration(); }); - this.qemuService.getBinaries(this.controller).subscribe((qemuBinaries: QemuBinary[]) => { - this.binaries = qemuBinaries; - }); - this.qemuService.getImages(this.controller).subscribe((qemuImages: QemuImage[]) => { this.qemuImages = qemuImages; }); + this.selectPlatform = this.qemuConfigurationService.getPlatform(); + } openQemuImageCreator() { diff --git a/src/app/services/qemu.service.ts b/src/app/services/qemu.service.ts index 0bf589e9..88d8d461 100644 --- a/src/app/services/qemu.service.ts +++ b/src/app/services/qemu.service.ts @@ -23,9 +23,6 @@ export class QemuService { return `${controller.protocol}//${controller.host}:${controller.port}/images/upload/${filename}`; } - getBinaries(controller:Controller ): Observable { - return this.httpController.get(controller, '/computes/local/qemu/binaries') as Observable; - } getImages(controller:Controller ): Observable { return this.httpController.get(controller, '/images?image_type=qemu') as Observable;