mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-13 20:48:12 +00:00
show upload file progress when uploading qemu template.
This commit is contained in:
@ -110,6 +110,9 @@
|
|||||||
placeholder="Please enter name"
|
placeholder="Please enter name"
|
||||||
/>
|
/>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<div *ngIf="uploadedFile">
|
||||||
|
<mat-progress-bar mode="determinate" [value]="uploader.progress" ></mat-progress-bar>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</mat-step>
|
</mat-step>
|
||||||
|
@ -32,6 +32,7 @@ export class AddQemuVmTemplateComponent implements OnInit {
|
|||||||
chosenImage: string = '';
|
chosenImage: string = '';
|
||||||
qemuTemplate: QemuTemplate;
|
qemuTemplate: QemuTemplate;
|
||||||
uploader: FileUploader;
|
uploader: FileUploader;
|
||||||
|
uploadedFile: boolean = false;
|
||||||
|
|
||||||
nameForm: FormGroup;
|
nameForm: FormGroup;
|
||||||
memoryForm: FormGroup;
|
memoryForm: FormGroup;
|
||||||
@ -127,6 +128,7 @@ export class AddQemuVmTemplateComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uploadImageFile(event) {
|
uploadImageFile(event) {
|
||||||
|
this.uploadedFile = true;
|
||||||
let name = event.target.files[0].name;
|
let name = event.target.files[0].name;
|
||||||
this.diskForm.controls['fileName'].setValue(name);
|
this.diskForm.controls['fileName'].setValue(name);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user