From 15faca6d89b6fb38dd8034078c49f7a2bd50fe7c Mon Sep 17 00:00:00 2001 From: potats0 Date: Thu, 14 Oct 2021 10:56:17 +0800 Subject: [PATCH] show upload file progress when uploading qemu template. --- .../add-qemu-vm-template/add-qemu-vm-template.component.html | 3 +++ .../add-qemu-vm-template/add-qemu-vm-template.component.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.html b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.html index 3620769c..23b6c211 100644 --- a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.html +++ b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.html @@ -110,6 +110,9 @@ placeholder="Please enter name" /> +
+ +
diff --git a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts index 739844fb..4d43918e 100644 --- a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts +++ b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts @@ -32,6 +32,7 @@ export class AddQemuVmTemplateComponent implements OnInit { chosenImage: string = ''; qemuTemplate: QemuTemplate; uploader: FileUploader; + uploadedFile: boolean = false; nameForm: FormGroup; memoryForm: FormGroup; @@ -127,6 +128,7 @@ export class AddQemuVmTemplateComponent implements OnInit { } uploadImageFile(event) { + this.uploadedFile = true; let name = event.target.files[0].name; this.diskForm.controls['fileName'].setValue(name);