From 1e0afa246023ed227caf5a65e051303547f9538c Mon Sep 17 00:00:00 2001 From: Rajnikant Lodhi Date: Mon, 1 Aug 2022 10:02:42 +0530 Subject: [PATCH 01/10] Qemu binaries endpoint, Now we are not using in Frontend side --- .../add-qemu-vm-template.component.ts | 12 ++++++------ .../qemu-vm-template-details.component.ts | 6 +++--- .../new-template-dialog.component.html | 4 ++-- .../new-template-dialog.component.ts | 16 ++++++++-------- .../qemu/configurator-qemu.component.ts | 6 +++--- src/app/services/qemu.service.ts | 6 +++--- 6 files changed, 25 insertions(+), 25 deletions(-) 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..1a1f4c75 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 @@ -109,10 +109,11 @@ export class AddQemuVmTemplateComponent implements OnInit { }); - this.qemuService.getBinaries(this.controller).subscribe((qemuBinaries: QemuBinary[]) => { - this.qemuBinaries = qemuBinaries; - if (this.qemuBinaries[0]) this.selectedBinary = this.qemuBinaries[0]; - }); + // this.qemuService.getBinaries(this.controller).subscribe((qemuBinaries: QemuBinary[]) => { + // debugger + // this.qemuBinaries = qemuBinaries; + // if (this.qemuBinaries[0]) this.selectedBinary = this.qemuBinaries[0]; + // }); this.qemuService.getImages(this.controller).subscribe((qemuImages: QemuImage[]) => { this.qemuImages = qemuImages; @@ -175,9 +176,8 @@ 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.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/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..0f56e424 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 @@ -63,9 +63,9 @@ export class QemuVmTemplateDetailsComponent implements OnInit { this.qemuTemplate = qemuTemplate; this.fillCustomAdapters(); - this.qemuService.getBinaries(controller).subscribe((qemuBinaries: QemuBinary[]) => { - this.binaries = qemuBinaries; - }); + // this.qemuService.getBinaries(controller).subscribe((qemuBinaries: QemuBinary[]) => { + // this.binaries = qemuBinaries; + // }); }); }); } 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..213ade77 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,7 +131,7 @@
-
+
Install required files +
+
+

VPCS device configuration

+
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..57da298b 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 @@ -25,13 +25,13 @@ - + From 8846415959a6df63db9efb0c45747fe3a93efe1b Mon Sep 17 00:00:00 2001 From: Rajnikant Lodhi Date: Mon, 1 Aug 2022 16:51:38 +0530 Subject: [PATCH 04/10] . --- .../configurator/qemu/configurator-qemu.component.html | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 57da298b..f6873fa2 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 @@ -25,13 +25,7 @@ - + From 408130596a6de4ef002a42c009fdef17686b6f7f Mon Sep 17 00:00:00 2001 From: Rajnikant Lodhi Date: Mon, 1 Aug 2022 16:57:44 +0530 Subject: [PATCH 05/10] Removed QEMU binaries code --- .../add-qemu-vm-template.component.ts | 6 +----- .../qemu-vm-template-details.component.ts | 4 ---- .../new-template-dialog.component.html | 13 ------------- .../new-template-dialog.component.ts | 4 ---- .../qemu/configurator-qemu.component.ts | 4 ---- src/app/services/qemu.service.ts | 3 --- 6 files changed, 1 insertion(+), 33 deletions(-) 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 ca0853cf..9adea1d6 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 @@ -109,11 +109,7 @@ export class AddQemuVmTemplateComponent implements OnInit { }); - // this.qemuService.getBinaries(this.controller).subscribe((qemuBinaries: QemuBinary[]) => { - // debugger - // this.qemuBinaries = qemuBinaries; - // if (this.qemuBinaries[0]) this.selectedBinary = this.qemuBinaries[0]; - // }); + this.qemuService.getImages(this.controller).subscribe((qemuImages: QemuImage[]) => { this.qemuImages = qemuImages; 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 f1cf0a4f..a5438f97 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 @@ -65,10 +65,6 @@ 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; - // }); }); }); 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 213ade77..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 @@
-
Install required files
-
-
- - +
+ + +
From 8424df0e2b7b1d47593d67d2f7abe4bbefa322d2 Mon Sep 17 00:00:00 2001 From: Jeremy Grossmann Date: Tue, 2 Aug 2022 00:16:01 +0200 Subject: [PATCH 08/10] Update configurator-qemu.component.ts --- .../configurator/qemu/configurator-qemu.component.ts | 1 - 1 file changed, 1 deletion(-) 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 f45d9c25..fc1bb4c9 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[] = []; From e8e5ce8bb9c8f3d0aec55a9d5a7c455d498b2c8c Mon Sep 17 00:00:00 2001 From: Rajnikant Lodhi Date: Tue, 2 Aug 2022 09:47:50 +0530 Subject: [PATCH 09/10] Remove unused code and Add edit platform in node Configurator pop --- .../add-qemu-vm-template/add-qemu-vm-template.component.ts | 2 -- .../new-template-dialog/new-template-dialog.component.ts | 6 +----- .../configurator/qemu/configurator-qemu.component.html | 7 +++++++ .../configurator/qemu/configurator-qemu.component.ts | 3 +++ 4 files changed, 11 insertions(+), 7 deletions(-) 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 82d29ac6..853c4840 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 @@ -114,8 +114,6 @@ export class AddQemuVmTemplateComponent implements OnInit { }); this.selectPlatform = this.configurationService.getPlatform(); - // this.selectedPlatform = this.selectPlatform[0]; - this.consoleTypes = this.configurationService.getConsoleTypes(); }); diff --git a/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts b/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts index 075ea733..dbf921d6 100644 --- a/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts +++ b/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts @@ -612,11 +612,6 @@ export class NewTemplateDialogComponent implements OnInit { return; } - // if (!this.selectedBinary) { - // this.toasterService.error('Please select QEMU binary first'); - // return; - // } - let qemuTemplate: QemuTemplate = new QemuTemplate(); qemuTemplate.ram = this.applianceToInstall.qemu.ram; qemuTemplate.adapters = this.applianceToInstall.qemu.adapters; @@ -638,6 +633,7 @@ export class NewTemplateDialogComponent implements OnInit { qemuTemplate.hdb_disk_image = version.images.hdb_disk_image; qemuTemplate.template_type = 'qemu'; qemuTemplate.usage = this.applianceToInstall.usage; + qemuTemplate.platform = this.applianceToInstall.qemu.arch; const dialogRef = this.dialog.open(TemplateNameDialogComponent, { width: '400px', 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 f6873fa2..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 }} + + + { this.qemuImages = qemuImages; }); + this.selectPlatform = this.qemuConfigurationService.getPlatform(); + } openQemuImageCreator() { From 206d25d032d698f5f6b5c274074ba0e4b8498c2b Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 3 Aug 2022 11:08:30 +0200 Subject: [PATCH 10/10] Set platform with first element in the list --- .../add-qemu-vm-template/add-qemu-vm-template.component.ts | 4 +--- .../qemu-vm-template-details.component.ts | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) 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 853c4840..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 @@ -106,14 +106,12 @@ export class AddQemuVmTemplateComponent implements OnInit { this.qemuTemplate = qemuTemplate; }); - - - 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(); }); 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 b7c13400..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 @@ -68,7 +68,6 @@ export class QemuVmTemplateDetailsComponent implements OnInit { }); this.selectPlatform = this.configurationService.getPlatform(); - this.selectedPlatform = this.selectPlatform[0]; } getConfiguration() {