Updating stepper for IOU devices

This commit is contained in:
piotrpekala7 2020-06-10 11:41:40 +02:00
parent 0463b8c3b8
commit 68a13e293b
2 changed files with 5 additions and 3 deletions

View File

@ -7,19 +7,21 @@
<div class="default-content">
<div class="container mat-elevation-z8">
<mat-vertical-stepper [linear]="true">
<mat-step label="Server type">
<mat-step label="Server type" [completed]="isGns3VmChosen || isLocalComputerChosen">
<mat-radio-group class="radio-group">
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked>Run this IOU device locally</mat-radio-button>
<mat-radio-button [disabled]="!isGns3VmAvailable" class="radio-button" value="2" (click)="setServerType('gns3 vm')">Run this IOU device on the GNS3 VM</mat-radio-button>
</mat-radio-group>
</mat-step>
<mat-step label="Name">
<mat-step label="Name" [completed]="templateNameForm.get('templateName').value">
<form [formGroup]="templateNameForm">
<mat-form-field class="form-field">
<input matInput placeholder="Name" type="text" formControlName="templateName"/>
</mat-form-field>
</form>
</mat-step>
<mat-step label="Image">
<form [formGroup]="imageForm">
<mat-radio-group class="radio-group">

View File

@ -49,7 +49,7 @@ export class AddIouTemplateComponent implements OnInit {
this.iouTemplate = new IouTemplate();
this.templateNameForm = this.formBuilder.group({
templateName: new FormControl('', Validators.required)
templateName: new FormControl(null, Validators.required)
});
this.imageForm = this.formBuilder.group({