mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-23 14:52:22 +00:00
Fix for uploader
This commit is contained in:
parent
73ef1f0f80
commit
ced2cba28b
@ -187,11 +187,11 @@
|
||||
<input
|
||||
type="file"
|
||||
class="non-visible"
|
||||
#file2
|
||||
#file3
|
||||
(change)="importImage($event)"
|
||||
ng2FileSelect
|
||||
[uploader]="uploaderImage"/>
|
||||
<button class="button" mat-raised-button (click)="file2.click()">Import</button>
|
||||
<button class="button" mat-raised-button (click)="file3.click()">Import</button>
|
||||
<button class="button" mat-raised-button (click)="downloadImageFromVersion(version.images.hdb_disk_image)">Download</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -166,12 +166,14 @@ export class NewTemplateDialogComponent implements OnInit {
|
||||
this.uploaderImage.onErrorItem = (item: FileItem, response: string, status: number, headers: ParsedResponseHeaders) => {
|
||||
this.toasterService.error('An error has occured');
|
||||
this.progressService.deactivate();
|
||||
this.uploaderImage.clearQueue();
|
||||
};
|
||||
|
||||
this.uploaderImage.onSuccessItem = (item: FileItem, response: string, status: number, headers: ParsedResponseHeaders) => {
|
||||
this.toasterService.success('Image imported succesfully');
|
||||
this.refreshImages();
|
||||
this.progressService.deactivate();
|
||||
this.uploaderImage.clearQueue();
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user