mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-18 14:58:15 +00:00
Adding node dialog updated
This commit is contained in:
@ -49,7 +49,7 @@
|
|||||||
<mat-select
|
<mat-select
|
||||||
*ngIf="selectedTemplate"
|
*ngIf="selectedTemplate"
|
||||||
placeholder="Choose server for node"
|
placeholder="Choose server for node"
|
||||||
[(ngModel)]="selectedTemplate.compute_id">
|
[(value)]="selectedTemplate.compute_id">
|
||||||
<mat-option *ngFor="let type of nodeServers" [value]="type">
|
<mat-option *ngFor="let type of nodeServers" [value]="type">
|
||||||
{{type}}
|
{{type}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
@ -28,7 +28,7 @@ export class TemplateListDialogComponent implements OnInit {
|
|||||||
selectedTemplate: Template;
|
selectedTemplate: Template;
|
||||||
searchText: string = '';
|
searchText: string = '';
|
||||||
|
|
||||||
nodeServers: string[] = ['local', 'vm']
|
nodeServers: string[] = ['local', 'vm'];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialogRef: MatDialogRef<TemplateListDialogComponent>,
|
public dialogRef: MatDialogRef<TemplateListDialogComponent>,
|
||||||
@ -70,6 +70,9 @@ export class TemplateListDialogComponent implements OnInit {
|
|||||||
|
|
||||||
chooseTemplate(event) {
|
chooseTemplate(event) {
|
||||||
this.selectedTemplate = event.value;
|
this.selectedTemplate = event.value;
|
||||||
|
if (this.selectedTemplate.template_type === 'cloud' || this.selectedTemplate.template_type === 'ethernet_hub' || this.selectedTemplate.template_type === 'ethernet_switch') {
|
||||||
|
this.selectedTemplate.compute_id = 'local';
|
||||||
|
}
|
||||||
// this.configurationForm.controls['name'].setValue(this.selectedTemplate.default_name_format);
|
// this.configurationForm.controls['name'].setValue(this.selectedTemplate.default_name_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user