mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-30 16:13:55 +00:00
Remove unused code and Add edit platform in node Configurator pop
This commit is contained in:
parent
24deb65a0b
commit
e8e5ce8bb9
@ -114,8 +114,6 @@ export class AddQemuVmTemplateComponent implements OnInit {
|
||||
});
|
||||
|
||||
this.selectPlatform = this.configurationService.getPlatform();
|
||||
// this.selectedPlatform = this.selectPlatform[0];
|
||||
|
||||
this.consoleTypes = this.configurationService.getConsoleTypes();
|
||||
});
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user