Fixes after review

Unit tests updated
Cancel option added to every step
Code cleaned up
This commit is contained in:
Piotr Pekala
2019-02-19 05:16:02 -08:00
parent b3aa58b9c9
commit 31f22728a9
68 changed files with 679 additions and 947 deletions

View File

@ -8,7 +8,7 @@
<div class="container mat-elevation-z8">
<mat-vertical-stepper [linear]="true">
<mat-step label="QEMU VM Name">
<form [formGroup]="firstStepForm">
<form [formGroup]="nameForm">
<mat-form-field class="form-field">
<input
matInput type="text"
@ -23,12 +23,12 @@
</form>
</mat-step>
<mat-step label="QEMU binary and memory">
<form [formGroup]="secondStepForm">
<form [formGroup]="memoryForm">
<mat-form-field class="form-field">
<mat-select
placeholder="Qemu binary"
[(ngModel)]="selectedBinary"
[ngModelOptions]="{standalone: true}" >
formControlName="binary" >
<mat-option *ngFor="let binary of qemuBinaries" [value]="binary">
{{binary.path}}
</mat-option>
@ -57,11 +57,11 @@
</mat-form-field>
</mat-step>
<mat-step label="Disk image">
<form [formGroup]="fourthStepForm">
<form [formGroup]="diskForm">
<mat-radio-group class="radio-group">
<mat-radio-button class="radio-button" value="1" (click)="setDiskImage('existingImage')" checked>Existing image</mat-radio-button>
<mat-radio-button class="radio-button" value="2" (click)="setDiskImage('newImage')">New image</mat-radio-button>
</mat-radio-group>
</mat-radio-group><br/><br/>
<mat-select
*ngIf="!newImageSelected"
placeholder="Disk image (hda)"
@ -90,9 +90,12 @@
</mat-form-field>
</div>
</form>
<div class="buttons-bar"><button mat-raised-button color="primary" (click)="addTemplate()">Add template</button></div>
</mat-step>
</mat-vertical-stepper>
</div>
<div class="buttons-bar">
<button mat-button class="cancel-button" (click)="goBack()">Cancel</button>
<button mat-raised-button color="primary" (click)="addTemplate()">Add template</button>
</div>
</div>
</div>