2022-10-17 11:42:01 +02:00
< a ( click ) = " open ( ) "
2023-06-19 10:02:23 +02:00
[title]="'Send data to cloud storage'"
2022-10-17 11:42:01 +02:00
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'"
> < span icon = "cloud-upload" > < / span >
< span class = "uk-icon-button uk-icon landing-action-button landing-action-button-portal" >
< span uk-icon = "cloud-upload" > < / span >
< / span >
< / a >
2022-10-05 15:52:04 +02:00
<!-- This is the modal -->
2023-05-16 15:36:43 +02:00
< fs-modal # egiTransferModal classBody = "uk-container-xlarge" [ okButtonDisabled ] = " destinationPath . length = = 0 | | status = = ' succeeded '
2023-03-16 19:55:12 +01:00
|| (requests > 0) || !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
2023-05-16 15:36:43 +02:00
(okEmitter)="transfer()" (cancelEmitter)="init()">
2022-10-14 12:32:11 +02:00
< div * ngIf = "!accessToken" class = "" >
2023-05-16 15:36:43 +02:00
< div class = "uk-width-1-1 uk-margin-bottom uk-text-center" >
2022-10-14 12:32:11 +02:00
In order to send data to a Cloud Storage, you would need to be authenticated, please login via EGI check-in.
< / div >
< div class = "uk-text-center" >
< button * ngIf = "!accessToken" class = "uk-button uk-button-default" ( click ) = " checkin ( ) " > Login
< / button >
< / div >
< / div >
< div * ngIf = "accessToken" class = "" >
2023-05-16 15:36:43 +02:00
< div class = "uk-width-1-1 uk-margin-bottom uk-text-center" >
2022-10-05 15:52:04 +02:00
You have requested to send the data corresponding to the DOI < a [ href ] = " selectedSourceUrl " target = "_blank" > {{selectedSourceUrl.split(doiPrefix)[1]}}< / a > to a cloud storage using the EOSC Data Transfer service
< / div >
2023-03-15 09:53:19 +01:00
< div class = "uk-grid uk-grid-small uk-child-width-1-2 uk-grid-divider" >
2022-10-05 15:52:04 +02:00
<!-- Source -->
2022-10-17 11:42:01 +02:00
< div class = "uk-first-column source" >
2022-11-11 10:55:15 +01:00
< p class = "uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top" > Available DOI URLs:< / p >
2023-05-16 15:36:43 +02:00
< div input type = "select" [ ( value ) ] = " selectedSourceUrl " hint = "Select..." [ inputClass ] = " ' flat ' "
2022-10-05 15:52:04 +02:00
[options]="sourceUrls" (valueChange)="this.parse()">< / div >
2023-02-13 18:39:08 +01:00
< div * ngIf = "status!='active'" class = "uk-margin-top" >
2022-10-05 15:52:04 +02:00
< div > {{this.downloadElements.length}} files found:< / div >
2023-05-16 15:36:43 +02:00
< div class = "uk-margin-small-top uk-height-max-medium uk-overflow-auto" >
2022-10-05 15:52:04 +02:00
< ul >
< li * ngFor = " let element of this.downloadElements" > {{ element.name}}
< / li >
< / ul >
< / div >
< div * ngIf = "!this.downloadElements || this.downloadElements.length == 0" > - < / div >
< / div >
< / div >
<!-- Destination -->
2023-01-05 18:14:26 +01:00
< div * ngIf = "destinationOptions" class = "destination" >
2022-11-11 12:56:58 +01:00
<!-- -->
2023-02-13 18:39:08 +01:00
<!-- Testing:<br> -->
<!-- https://dcache - demo.desy.de:2443 -->
<!-- <br> -->
<!-- /Demonstrators/EOSC - Future/EGI/ -->
<!-- <br> -->
2022-11-11 12:56:58 +01:00
<!-- -->
2023-03-16 19:55:12 +01:00
< p class = "uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top" > Destination storage type:< / p >
2023-05-16 15:36:43 +02:00
< div input type = "select" [ ( value ) ] = " selectedDestination " hint = "Select..." [ inputClass ] = " ' flat ' "
2023-03-15 09:53:19 +01:00
[options]="destinationOptions" (valueChange)="folders = {}">< / div >
2022-11-11 12:56:58 +01:00
2023-03-16 19:55:12 +01:00
< p class = "uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top" > Destination system (e.g. hostname:8080):< / p >
2023-05-16 15:36:43 +02:00
< div input [ ( value ) ] = " destinationUrl " [ inputClass ] = " ' flat ' "
2022-11-11 12:56:58 +01:00
[validators]="URLValidators" class="">< / div >
< ng-container
2023-01-04 12:27:49 +01:00
*ngIf="selectedDestination.authType == 'password' || selectedDestination.authType == 'keys'">
2023-03-16 19:55:12 +01:00
< p class = "uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top" > Authentication:< / p >
2022-11-11 12:56:58 +01:00
< div class = "uk-grid uk-child-width-1-2" >
2023-01-04 12:27:49 +01:00
< div input [ ( value ) ] = " destinationAuthUser " [ placeholder ] = " ' Give ' + ( selectedDestination . authType = =
2023-06-13 15:10:06 +02:00
'password'? 'username':'access key') " [inputClass]="'flat x-small'"
2022-11-11 12:56:58 +01:00
class="">< / div >
2023-02-13 18:39:08 +01:00
< div input password = true [ ( value ) ] = " destinationAuthPass " [ placeholder ] = " ' Give ' + ( selectedDestination . authType = =
2023-06-13 15:10:06 +02:00
'password'? 'password':'secret key') " [inputClass]="'flat x-small'"
2022-11-11 12:56:58 +01:00
class="">< / div >
< / div >
2023-06-13 15:10:06 +02:00
<!-- <div class="uk - text - xsmall">You can check our data protection policy <a class="custom - external" href="https://www.openaire.eu/data - protection - policy" target="_blank">here</a>.</div> -->
2022-11-11 12:56:58 +01:00
< / ng-container >
2023-03-16 19:55:12 +01:00
< p class = "uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top" > Destination path (e.g. /folder1/folder2):< / p >
2023-05-16 15:36:43 +02:00
< div input [ ( value ) ] = " destinationPath " [ inputClass ] = " ' flat ' "
2022-11-11 12:56:58 +01:00
[validators]="pathValidators" class="">< / div >
<!-- <div *ngIf="selectedDestination.hasBrowse"> -->
2023-02-13 18:39:08 +01:00
< p * ngIf = "selectedDestination.canBrowse" class = "uk-text-meta uk-text-xsmall uk-margin-remove-bottom" > or < a
[ngClass]="!validateDestinationUrl() ? 'uk-text-muted uk-disabled' : 'uk-text-primary'" [attr.disabled]="!destinationUrl"
(click)="browseFolder('/')">browse< / a > to
2022-10-14 12:32:11 +02:00
select a folder.< / p >
2023-05-16 15:36:43 +02:00
< div * ngIf = "folders['/']" class = "uk-height-max-medium uk-overflow-auto" >
2022-11-11 12:56:58 +01:00
< ng-container * ngTemplateOutlet = "folderListTmpl; context: { folder : folders['/'], folderPath: '/'}" > < / ng-container >
2022-10-05 15:52:04 +02:00
< / div >
2022-10-14 12:32:11 +02:00
2022-11-11 12:56:58 +01:00
<!-- </div> -->
2023-01-04 12:27:49 +01:00
< ng-container * ngIf = "selectedDestination.destination == 'ftp'" >
2022-10-14 12:32:11 +02:00
< p > Comming soon!< / p >
< / ng-container >
2023-05-16 15:36:43 +02:00
2023-06-13 15:10:06 +02:00
< div class = "uk-margin-top" >
<!-- (ngModelChange)="filterChange(value.selected)" -->
< input type = "checkbox" class = "uk-checkbox"
[(ngModel)]="privacyAccepted"/>
< span class = "uk-margin-small-left uk-text-small" > *I have read and accepted the data protection policy < a class = "custom-external" href = "https://www.openaire.eu/data-protection-policy" target = "_blank" > here< / a > .< / span >
< / div >
< div class = "uk-align-right uk-margin-medium-top uk-margin-bottom" >
< button class = "uk-button uk-button-primary"
[disabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded'
|| (requests > 0) || !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
[class.uk-disabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded'
|| (requests > 0) || !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
(click)="transfer()">
>> Transfer
< / button >
< / div >
2023-05-16 15:36:43 +02:00
2022-10-05 15:52:04 +02:00
< / div >
< / div >
2023-02-13 18:39:08 +01:00
<!-- [class.uk - alert - success]="status && status.indexOf('error')== - 1" -->
<!-- [class.uk - alert - error]="status && status.indexOf('error')!= - 1"> -->
2023-05-16 15:36:43 +02:00
< div id = "transferAlert" * ngIf = "message" class = "uk-width-1-1 uk-alert uk-margin-medium-top" [ ngClass ] = " ' uk-alert- ' + statusMessage " uk-alert >
2023-02-13 18:39:08 +01:00
< div [ innerHTML ] = " message " > < / div >
<!-- <a *ngIf="status != 'succeeded' && status != 'active'" (click)="transfer()"> -->
<!-- Try again! -->
<!-- </a> -->
2023-03-16 19:55:12 +01:00
< div * ngIf = "requests > 0" class = "uk-flex uk-flex-center uk-text-muted" >
2023-02-13 18:39:08 +01:00
< div >
< span class = "uk-icon uk-spinner" >
< svg width = "60" height = "60" viewBox = "0 0 30 30" xmlns = "http://www.w3.org/2000/svg"
data-svg="spinner">< circle
fill="none" stroke="#000" cx="15" cy="15" r="14" style="stroke-width: 2px;">< / circle > < / svg >
< / span >
< / div >
2022-10-05 15:52:04 +02:00
< / div >
2023-03-16 19:55:12 +01:00
< a * ngIf = "requests <= 0" class = "uk-alert-close" uk-close > < / a >
2022-10-05 15:52:04 +02:00
< / div >
<!-- <div *ngIf="jobId || status == 'canceled'">
< button * ngIf = " status != 'canceled'" class = "uk-button uk-button-default" ( click ) = " getStatus ( ) " > Check status< / button >
< button * ngIf = " status != 'canceled'" class = "uk-button uk-button-default" ( click ) = " cancel ( ) " > Cancel< / button >
< div > {{statusMessage}}< / div >
< / div > -->
2023-02-13 18:39:08 +01:00
<!-- <div *ngIf=" status != 'canceled'" class="uk - width - 1 - 1 uk - text - right " -->
<!-- [class.uk - invisible]="!(status == 'succeeded' || status.indexOf('error')!= - 1)"> -->
<!-- <button class="uk - button uk - button - default uk - margin - top " (click)="close()">Close</button> -->
<!-- </div> -->
2022-10-05 15:52:04 +02:00
<!-- TESTS -->
<!-- <button (click)="hasBrowse()"
class="uk-button uk-button-primary uk-margin-top"
>
has Browse
< / button >
< button ( click ) = " createFolder ( ) "
class="uk-button uk-button-primary uk-margin-top"
>
Create folder new
< / button >
< button ( click ) = " deleteFolder ( ) "
class="uk-button uk-button-primary uk-margin-top"
>
delete folder new
< / button > -->
<!-- End of TESTS -->
< / div >
2023-05-16 15:36:43 +02:00
< / fs-modal >
2022-10-05 15:52:04 +02:00
<!-- Browse Templates -->
< ng-template # folderListTmpl let-folder = "folder" let-folderPath = "folderPath" >
< ng-container * ngTemplateOutlet = "folderTmpl; context: { folder: folder, folderPath:folderPath}" > < / ng-container >
< ul * ngIf = "folders[folderPath] && folders[folderPath].isOpen" class = "uk-list uk-list-divider uk-margin-small-left folder " style = "border-left: 1px solid #e3e3e3; padding-left: 5px;" >
< li * ngFor = " let file of files[folderPath]" >
< ng-container * ngIf = "file.isFolder else itsFile" >
2022-11-11 12:56:58 +01:00
< ng-container * ngTemplateOutlet = "folderListTmpl; context: { folder: file ,
folderPath:file.accessUrl.split(destinationUrl)[1]}">< / ng-container >
2022-10-05 15:52:04 +02:00
< / ng-container >
< ng-template # itsFile >
< ng-container * ngTemplateOutlet = "fileTmpl; context: { file: file}" > < / ng-container >
< / ng-template >
< / li >
< / ul >
< / ng-template >
< ng-template # fileTmpl let-file = "file" >
< div class = "uk-grid uk-grid-small uk-flex uk-flex-middle" >
2022-10-14 12:18:13 +02:00
<!-- <span uk - icon="file"></span> -->
2022-10-05 15:52:04 +02:00
< span class = "uk-width-expand uk-text-truncate" > {{file['name']}}< / span >
2022-10-14 12:18:13 +02:00
< span
class="uk-width-auto uk-text-truncate uk-text-small uk-text-italic">{{(file.createdAt?file.createdAt:file.modifiedAt) |date : 'medium'}}< / span >
2022-10-05 15:52:04 +02:00
< / div >
< / ng-template >
< ng-template # folderTmpl let-folder = "folder" let-folderPath = "folderPath" >
< div * ngIf = "folder" [ class . uk-background-muted ] = " destinationPath = = folderPath " >
< div class = "uk-grid uk-grid-small uk-flex uk-flex-middle" >
2022-10-14 12:18:13 +02:00
< a >
2022-10-05 15:52:04 +02:00
< div class = "uk-grid uk-grid-small" >
2022-10-14 12:18:13 +02:00
< span ( click ) = " browseFolder ( folderPath ) " uk-icon = "icon:triangle-down; ratio:1.1"
title="Expand/ Collapse">< / span >
< span ( click ) = " destinationPath = folderPath" title = "Select folder" >
< span uk-icon = "folder" > < / span > < span
2022-11-11 12:56:58 +01:00
class="uk-width-expand uk-text-truncate uk-margin-small-left">{{folder.name?folder.name:folder.accessUrl.split(destinationUrl)[1]}}< / span >
2022-10-14 12:18:13 +02:00
<!-- <span class="uk - width - auto uk - text - truncate">{{(folder.createdAt?folder.createdAt:folder.modifiedAt) |date : 'medium'}}</span> -->
< / span >
2022-10-05 15:52:04 +02:00
< / div >
< / a >
2022-10-14 12:18:13 +02:00
<!-- <a *ngIf="destinationPath != folderPath" (click)="destinationPath = folderPath" class="uk - button uk - button - default uk - button - small">select</a> -->
2022-10-05 15:52:04 +02:00
< / div >
< / div >
< / ng-template >