diff --git a/utils/dataTransfer/transferData.component.html b/utils/dataTransfer/transferData.component.html index a92a4bd4..d73e67e8 100644 --- a/utils/dataTransfer/transferData.component.html +++ b/utils/dataTransfer/transferData.component.html @@ -9,11 +9,11 @@ - + (okEmitter)="transfer()" (cancelEmitter)="init()">
-
+
In order to send data to a Cloud Storage, you would need to be authenticated, please login via EGI check-in.
@@ -22,18 +22,18 @@
-
+
You have requested to send the data corresponding to the DOI {{selectedSourceUrl.split(doiPrefix)[1]}} to a cloud storage using the EOSC Data Transfer service

Available DOI URLs:

-
{{this.downloadElements.length}} files found:
-
+
  • {{ element.name}}
  • @@ -52,11 +52,11 @@

    Destination storage type:

    -

    Destination system (e.g. hostname:8080):

    -
    Authentication:

    Destination path (e.g. /folder1/folder2):

    -

    or browse to select a folder.

    -
    +
    @@ -88,12 +88,21 @@

    Comming soon!

    - + + +
-
+
@@ -137,7 +146,7 @@ -->
- + diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts index 07378045..18876f96 100644 --- a/utils/dataTransfer/transferData.component.ts +++ b/utils/dataTransfer/transferData.component.ts @@ -9,6 +9,7 @@ import {properties} from "../../../../environments/environment"; import {delay, repeat, startWith, switchMap} from "rxjs/operators"; import {StringUtils} from "../string-utils.class"; import {HelperFunctions} from "../HelperFunctions.class"; +import {FullScreenModalComponent} from "../modal/full-screen-modal/full-screen-modal.component"; declare var UIkit; @Component({ @@ -54,7 +55,7 @@ export class EGIDataTransferComponent { downloadElements = null; @Input() isOpen = false; // @Input() selectedDestinationId = "dcache"; - @ViewChild('egiTransferModal') egiTransferModal; + @ViewChild('egiTransferModal') egiTransferModal: FullScreenModalComponent; APIURL = properties.eoscDataTransferAPI; // status: "loading" | "success" | "errorParser" | "errorUser" | "errorTransfer" | "init" | "canceled" = "init"; status: "unused" | "staging" | "submitted" | "active" | "succeeded" | "partial" | "failed" | "canceled" | "errorParser" | "errorUser" | "init" = "init"; @@ -122,7 +123,7 @@ export class EGIDataTransferComponent { let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); this.subscriptions.push(this.http.get(this.APIURL + "/storage/types", {headers: headers}).subscribe( (res: Array) => { - this.destinationOptions = res.map(dest => {return {"label": dest.destination, "value": dest}}); + this.destinationOptions = res.map(dest => {return {"label": dest.description, "value": dest}}); this.selectedDestination = res[0]; } )); @@ -143,11 +144,11 @@ export class EGIDataTransferComponent { this.parse(); } this.isOpen = true; + this.egiTransferModal.back = true; this.egiTransferModal.cancelButton = false; - this.egiTransferModal.okButton = true; + this.egiTransferModal.okButton = false; this.egiTransferModal.okButtonText = ">> Transfer"; - this.egiTransferModal.alertTitle = "EOSC Data Transfer [demo]"; - this.egiTransferModal.stayOpen = true; + this.egiTransferModal.title = "EOSC Data Transfer [demo]"; this.init(); if(typeof document !== 'undefined') { this.egiTransferModal.open(); @@ -241,7 +242,7 @@ export class EGIDataTransferComponent { for (let element of this.downloadElements) { let file = { "sources": [element['downloadUrl']], - "destinations": [(this.selectedDestination.protocol+"://") + this.destinationUrl + this.destinationPath + (this.destinationPath.endsWith("/") ? "" : "/") + element.name], + "destinations": [(this.selectedDestination.protocol+"://") + this.destinationUrl + this.destinationPath + (this.destinationPath.endsWith("/") ? "" : "/") + ((element.path && element.path != "/") ? element.path : "") + element.name], }; //TODO priority? checksum? filesize? diff --git a/utils/dataTransfer/transferData.module.ts b/utils/dataTransfer/transferData.module.ts index d78dd6d2..9267d368 100644 --- a/utils/dataTransfer/transferData.module.ts +++ b/utils/dataTransfer/transferData.module.ts @@ -4,10 +4,11 @@ import {FormsModule} from '@angular/forms'; import {EGIDataTransferComponent} from "./transferData.component"; import {InputModule} from "../../sharedComponents/input/input.module"; import {AlertModalModule} from "../modal/alertModal.module"; +import {FullScreenModalModule} from "../modal/full-screen-modal/full-screen-modal.module"; @NgModule({ imports: [ - CommonModule, FormsModule, InputModule, AlertModalModule + CommonModule, FormsModule, InputModule, AlertModalModule, FullScreenModalModule ], declarations: [ diff --git a/utils/modal/full-screen-modal/full-screen-modal.component.ts b/utils/modal/full-screen-modal/full-screen-modal.component.ts index 750286a0..07c542fb 100644 --- a/utils/modal/full-screen-modal/full-screen-modal.component.ts +++ b/utils/modal/full-screen-modal/full-screen-modal.component.ts @@ -31,12 +31,14 @@ declare var ResizeObserver; class="uk-width-expand uk-padding-small uk-padding-remove-vertical uk-flex uk-flex-center">

{{title}}

-
+
-
@@ -58,6 +60,7 @@ export class FullScreenModalComponent implements AfterViewInit, OnDestroy { @Input() classBody: string = 'uk-container-large'; back: boolean = false; title: string; + cancelButton: boolean = true; okButton: boolean = false; okButtonText = 'OK'; @Input()