Qemu binaries endpoint, Now we are not using in Frontend side

This commit is contained in:
Rajnikant Lodhi 2022-08-01 10:02:42 +05:30
parent a2338d905b
commit 1e0afa2460
6 changed files with 25 additions and 25 deletions

View File

@ -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 {

View File

@ -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;
// });
});
});
}

View File

@ -131,7 +131,7 @@
<mat-card [hidden]="!(!isLinuxPlatform || applianceToInstall.dynamips)">
<div *ngIf="applianceToInstall.qemu">
<div>
<!-- <div>
Qemu binary<br />
<mat-select
class="selection-group"
@ -143,7 +143,7 @@
{{ binary.path }}
</mat-option>
</mat-select>
</div>
</div> -->
<div>
Install required files
<button

View File

@ -126,9 +126,9 @@ export class NewTemplateDialogComponent implements OnInit {
});
});
this.qemuService.getBinaries(this.controller).subscribe((binaries) => {
this.qemuBinaries = binaries;
});
// this.qemuService.getBinaries(this.controller).subscribe((binaries) => {
// this.qemuBinaries = binaries;
// });
this.qemuService.getImages(this.controller).subscribe((qemuImages) => {
this.qemuImages = qemuImages;
@ -642,10 +642,10 @@ export class NewTemplateDialogComponent implements OnInit {
return;
}
if (!this.selectedBinary) {
this.toasterService.error('Please select QEMU binary first');
return;
}
// if (!this.selectedBinary) {
// this.toasterService.error('Please select QEMU binary first');
// return;
// }
let qemuTemplate: QemuTemplate = new QemuTemplate();
qemuTemplate.ram = this.applianceToInstall.qemu.ram;
@ -662,7 +662,7 @@ export class NewTemplateDialogComponent implements OnInit {
qemuTemplate.first_port_name = this.applianceToInstall.first_port_name;
qemuTemplate.port_name_format = this.applianceToInstall.port_name_format;
qemuTemplate.symbol = this.applianceToInstall.symbol;
qemuTemplate.qemu_path = this.selectedBinary.path;
// qemuTemplate.qemu_path = this.selectedBinary.path;
qemuTemplate.compute_id = 'local';
qemuTemplate.template_id = uuid();
qemuTemplate.hda_disk_image = version.images.hda_disk_image;

View File

@ -63,9 +63,9 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
this.getConfiguration();
});
this.qemuService.getBinaries(this.controller).subscribe((qemuBinaries: QemuBinary[]) => {
this.binaries = qemuBinaries;
});
// this.qemuService.getBinaries(this.controller).subscribe((qemuBinaries: QemuBinary[]) => {
// this.binaries = qemuBinaries;
// });
this.qemuService.getImages(this.controller).subscribe((qemuImages: QemuImage[]) => {
this.qemuImages = qemuImages;

View File

@ -23,9 +23,9 @@ export class QemuService {
return `${controller.protocol}//${controller.host}:${controller.port}/images/upload/${filename}`;
}
getBinaries(controller:Controller ): Observable<QemuBinary[]> {
return this.httpController.get<QemuBinary[]>(controller, '/computes/local/qemu/binaries') as Observable<QemuBinary[]>;
}
// getBinaries(controller:Controller ): Observable<QemuBinary[]> {
// return this.httpController.get<QemuBinary[]>(controller, '/computes/local/qemu/binaries') as Observable<QemuBinary[]>;
// }
getImages(controller:Controller ): Observable<any> {
return this.httpController.get<QemuImage[]>(controller, '/images?image_type=qemu') as Observable<QemuImage[]>;