Adding node dialog updated

This commit is contained in:
piotrpekala7 2020-04-16 17:40:45 +02:00
parent b3aee79f40
commit 9a33b28576
2 changed files with 5 additions and 2 deletions

View File

@ -49,7 +49,7 @@
<mat-select
*ngIf="selectedTemplate"
placeholder="Choose server for node"
[(ngModel)]="selectedTemplate.compute_id">
[(value)]="selectedTemplate.compute_id">
<mat-option *ngFor="let type of nodeServers" [value]="type">
{{type}}
</mat-option>

View File

@ -28,7 +28,7 @@ export class TemplateListDialogComponent implements OnInit {
selectedTemplate: Template;
searchText: string = '';
nodeServers: string[] = ['local', 'vm']
nodeServers: string[] = ['local', 'vm'];
constructor(
public dialogRef: MatDialogRef<TemplateListDialogComponent>,
@ -70,6 +70,9 @@ export class TemplateListDialogComponent implements OnInit {
chooseTemplate(event) {
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);
}