diff --git a/utils/dataTransfer/transferData.component.html b/utils/dataTransfer/transferData.component.html
index 2e4c059f..6e835e1b 100644
--- a/utils/dataTransfer/transferData.component.html
+++ b/utils/dataTransfer/transferData.component.html
@@ -44,23 +44,49 @@
-
Please select the Destination Storage type:
+
+ Testing:
+ https://dcache-demo.desy.de:2443
+
+ /Demonstrators/EOSC-Future/EGI/
+
+
+
Please select the
+ Destination Storage technology:
-
+ [options]="destinationOptions">
+
+ Provide the
+ corresponding storage destination url:
+
+
+
+ Provide
+ authentication if needed:
+
+
+
Provide the corresponding storage destination path:
-
+ [validators]="pathValidators" class="">
+
or browse to
+ class="uk-text-primary" (click)="browseFolder('/')">browse to
select a folder.
-
-
+
Comming soon!
@@ -117,7 +143,8 @@
-
-
+
@@ -144,7 +171,7 @@
title="Expand/ Collapse">
{{folder.name?folder.name:folder.accessUrl.split(selectedDestination.url)[1]}}
+ class="uk-width-expand uk-text-truncate uk-margin-small-left">{{folder.name?folder.name:folder.accessUrl.split(destinationUrl)[1]}}
diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts
index d884038d..eacaa5aa 100644
--- a/utils/dataTransfer/transferData.component.ts
+++ b/utils/dataTransfer/transferData.component.ts
@@ -7,6 +7,7 @@ import {COOKIE} from "../../login/utils/helper.class";
import {Router} from "@angular/router";
import {properties} from "../../../../environments/environment";
import {delay, repeat} from "rxjs/operators";
+import {StringUtils} from "../string-utils.class";
declare var UIkit;
@Component({
@@ -38,9 +39,12 @@ export class EGIDataTransferComponent {
loginURL = properties.eoscDataTransferLoginUrl;
sourceUrls = [];
selectedSourceUrl = null;
+ destinationUrl = "";
+ destinationAuthUser = "";
+ destinationAuthPass = "";
destinationPath = "";
destinationOptions = properties.eoscDataTransferDestinations;
- selectedDestination = null;
+ selectedDestination:{label :string, id: string, auth: 'token' | 'password' | 'keys'} = null;
folders = {};
files = {};
downloadElements = null;
@@ -51,7 +55,8 @@ export class EGIDataTransferComponent {
status: "loading" | "success" | "errorParser" | "errorUser" | "errorTransfer" | "init" | "canceled" = "init";
message;
doiPrefix = properties.doiURL;
- validators = [Validators.required, this.pathValidator() /*StringUtils.urlValidator()*/];
+ pathValidators = [Validators.required, this.pathValidator() /*StringUtils.urlValidator()*/];
+ URLValidators = [Validators.required, StringUtils.urlValidator()];
jobId = null;
statusMessage = null;
jobStatus;
@@ -179,7 +184,7 @@ export class EGIDataTransferComponent {
let file = {
"sources": [element['downloadUrl']],
- "destinations": [this.selectedDestination.url + this.destinationPath + element.name],
+ "destinations": [this.destinationUrl + this.destinationPath + element.name],
};
//TODO priority? checksum? filesize?
@@ -188,6 +193,10 @@ export class EGIDataTransferComponent {
}
let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken});
+ if(this.selectedDestination.auth != "token" && this.destinationAuthPass.length > 0 && this.destinationAuthUser.length > 0){
+ headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken,
+ 'Authorization-Storage': btoa(this.destinationAuthUser + ':' + this.destinationAuthPass)});
+ }
this.subscriptions.push(this.http.post(this.APIURL + "/transfers" ,body, {headers: headers}).subscribe(
res => {
// console.log(res)
@@ -201,7 +210,7 @@ export class EGIDataTransferComponent {
this.egiTransferModal.okButton = false;
this.message = `
-
Transfer of ` + this.downloadElements.length + ` files to
`+this.selectedDestination.label+` has began.`;
+
Transfer of ` + this.downloadElements.length + ` files to `+this.selectedDestination.label+` has began.`;
/*this.message += `