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..9d2bf8dd 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..40db7280 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,8 @@ export class AddQemuVmTemplateComponent implements OnInit {
chosenImage: string = '';
qemuTemplate: QemuTemplate;
uploader: FileUploader;
+ uploadedFile: boolean = false;
+ uploadProgress: number = 0;
nameForm: FormGroup;
memoryForm: FormGroup;
@@ -86,6 +88,9 @@ export class AddQemuVmTemplateComponent implements OnInit {
});
this.toasterService.success('Image uploaded');
};
+ this.uploader.onProgressItem = (progress: any) => {
+ this.uploadProgress = progress['progress'];
+ };
const server_id = this.route.snapshot.paramMap.get('server_id');
this.serverService.get(parseInt(server_id, 10)).then((server: Server) => {
@@ -127,6 +132,7 @@ export class AddQemuVmTemplateComponent implements OnInit {
}
uploadImageFile(event) {
+ this.uploadedFile = true;
let name = event.target.files[0].name;
this.diskForm.controls['fileName'].setValue(name);