Remove unused code and Add edit platform in node Configurator pop

This commit is contained in:
Rajnikant Lodhi 2022-08-02 09:47:50 +05:30
parent 24deb65a0b
commit e8e5ce8bb9
4 changed files with 11 additions and 7 deletions

View File

@ -114,8 +114,6 @@ export class AddQemuVmTemplateComponent implements OnInit {
});
this.selectPlatform = this.configurationService.getPlatform();
// this.selectedPlatform = this.selectPlatform[0];
this.consoleTypes = this.configurationService.getConsoleTypes();
});

View File

@ -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',

View File

@ -11,6 +11,13 @@
<mat-form-field class="form-field">
<input matInput type="text" formControlName="name" [(ngModel)]="node.name" placeholder="Name" />
</mat-form-field>
<mat-form-field class="form-field">
<mat-select placeholder="Platform" [(ngModel)]="node.properties.platform" [ngModelOptions]="{ standalone: true }">
<mat-option *ngFor="let platform of selectPlatform" [value]="platform">
{{ platform }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="form-field">
<input
matInput

View File

@ -31,6 +31,7 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions'];
networkTypes = [];
qemuImages: QemuImage[] = [];
selectPlatform: string[] = [];
private conf = {
autoFocus: false,
@ -66,6 +67,8 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
this.qemuService.getImages(this.controller).subscribe((qemuImages: QemuImage[]) => {
this.qemuImages = qemuImages;
});
this.selectPlatform = this.qemuConfigurationService.getPlatform();
}
openQemuImageCreator() {