diff --git a/client/src/app/instance/search/components/result/datatable-actions.component.ts b/client/src/app/instance/search/components/result/datatable-actions.component.ts index 70e64e95affb137011a054a176925dca4ac946ec..5c29499606f57e2117b0fbec16fc780b7a23d630 100644 --- a/client/src/app/instance/search/components/result/datatable-actions.component.ts +++ b/client/src/app/instance/search/components/result/datatable-actions.component.ts @@ -1,6 +1,8 @@ import { Component, Input, Output, EventEmitter } from '@angular/core'; import { HttpClient } from '@angular/common/http'; +import { ToastrService } from 'ngx-toastr'; + import { Dataset, Attribute } from 'src/app/metamodel/models'; import { Criterion, ConeSearch, criterionToString } from 'src/app/instance/store/models'; import { getHost } from 'src/app/shared/utils'; @@ -22,7 +24,7 @@ export class DatatableActionsComponent { @Input() sampRegistered: boolean; @Output() broadcast: EventEmitter<string> = new EventEmitter(); - constructor(private appConfig: AppConfigService, private http: HttpClient) { } + constructor(private appConfig: AppConfigService, private http: HttpClient, private toastr: ToastrService) { } /** * Checks if the download format is allowed by Anis Admin configuration. @@ -99,6 +101,10 @@ export class DatatableActionsComponent { click(event, href, extension): void { event.preventDefault(); + if (extension === 'zip') { + this.toastr.info('Achive is under construction, please wait', 'Download archive'); + } + this.http.get(href, {responseType: "blob"}).subscribe( data => { let downloadLink = document.createElement('a');