mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-20 03:36:46 +00:00
Default values in templates
This commit is contained in:
parent
0cee6188fb
commit
455a13b96f
@ -57,7 +57,7 @@ export class AddDockerTemplateComponent implements OnInit {
|
||||
});
|
||||
|
||||
this.networkAdaptersForm = this.formBuilder.group({
|
||||
adapters: new FormControl('', Validators.required)
|
||||
adapters: new FormControl('1', Validators.required)
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -133,6 +133,14 @@ export class AddIouTemplateComponent implements OnInit {
|
||||
this.iouTemplate.name = this.templateNameForm.get("templateName").value;
|
||||
if (this.newImageSelected) this.iouTemplate.path = this.imageForm.get("imageName").value;
|
||||
this.iouTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local';
|
||||
|
||||
if (this.selectedType === 'L2 image') {
|
||||
this.iouTemplate.ethernet_adapters = 4;
|
||||
this.iouTemplate.serial_adapters = 0;
|
||||
} else if (this.selectedType === 'L3 image') {
|
||||
this.iouTemplate.ethernet_adapters = 2;
|
||||
this.iouTemplate.serial_adapters = 2;
|
||||
}
|
||||
|
||||
this.iouService.addTemplate(this.server, this.iouTemplate).subscribe((template: IouTemplate) => {
|
||||
this.goBack();
|
||||
|
@ -23,9 +23,6 @@
|
||||
placeholder="Please choose a descriptive name for your new QEMU virtual machine"
|
||||
ngDefaultContro/>
|
||||
</mat-form-field><br/>
|
||||
<mat-checkbox>
|
||||
This is a legacy ASA VM
|
||||
</mat-checkbox>
|
||||
</form>
|
||||
</mat-step>
|
||||
<mat-step label="QEMU binary and memory">
|
||||
|
@ -60,7 +60,7 @@ export class AddQemuVmTemplateComponent implements OnInit {
|
||||
});
|
||||
|
||||
this.memoryForm = this.formBuilder.group({
|
||||
ramMemory: new FormControl('', Validators.required)
|
||||
ramMemory: new FormControl('256', Validators.required)
|
||||
});
|
||||
|
||||
this.diskForm = this.formBuilder.group({
|
||||
@ -98,6 +98,7 @@ export class AddQemuVmTemplateComponent implements OnInit {
|
||||
|
||||
this.qemuService.getBinaries(server).subscribe((qemuBinaries: QemuBinary[]) => {
|
||||
this.qemuBinaries = qemuBinaries;
|
||||
if (this.qemuBinaries[0]) this.selectedBinary = this.qemuBinaries[0];
|
||||
});
|
||||
|
||||
this.qemuService.getImages(server).subscribe((qemuImages: QemuImage[]) => {
|
||||
|
Loading…
Reference in New Issue
Block a user