data-transfer-v2 #6

Merged
konstantina.galouni merged 26 commits from data-transfer-v2 into develop 2023-06-13 16:20:04 +02:00
3 changed files with 6 additions and 10 deletions
Showing only changes of commit 8e22fe60b0 - Show all commits

View File

@ -60,8 +60,7 @@
</orcid-work> </orcid-work>
</li> </li>
<li *ngIf=" properties.enableEoscDataTransfer && resultLandingInfo.resultType == 'dataset' && <li *ngIf=" properties.enableEoscDataTransfer && resultLandingInfo.resultType == 'dataset' &&
resultLandingInfo.identifiers && resultLandingInfo.identifiers.get('doi') && resultLandingInfo.identifiers && resultLandingInfo.identifiers.get('doi')"
resultLandingInfo.identifiers.get('doi').join('').indexOf('zenodo.')!=-1"
class="uk-text-center"> class="uk-text-center">
<egi-transfer-data [dois]="resultLandingInfo.identifiers.get('doi')" [isOpen]="egiTransferModalOpen"></egi-transfer-data> <egi-transfer-data [dois]="resultLandingInfo.identifiers.get('doi')" [isOpen]="egiTransferModalOpen"></egi-transfer-data>
</li> </li>
@ -157,8 +156,7 @@
</orcid-work> </orcid-work>
</div> </div>
<div *ngIf=" properties.enableEoscDataTransfer && resultLandingInfo.resultType == 'dataset' && <div *ngIf=" properties.enableEoscDataTransfer && resultLandingInfo.resultType == 'dataset' &&
resultLandingInfo.identifiers && resultLandingInfo.identifiers.get('doi') && resultLandingInfo.identifiers && resultLandingInfo.identifiers.get('doi')"
resultLandingInfo.identifiers.get('doi').join('').indexOf('zenodo.')!=-1"
class=""> class="">
<egi-transfer-data [dois]="resultLandingInfo.identifiers.get('doi')" [isOpen]="egiTransferModalOpen"></egi-transfer-data> <egi-transfer-data [dois]="resultLandingInfo.identifiers.get('doi')" [isOpen]="egiTransferModalOpen"></egi-transfer-data>
</div> </div>

View File

@ -28,8 +28,8 @@
<div class="uk-grid uk-child-width-1-2 uk-grid-divider"> <div class="uk-grid uk-child-width-1-2 uk-grid-divider">
<!-- Source --> <!-- Source -->
<div class="uk-first-column source"> <div class="uk-first-column source">
<p class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top">Available Zenodo DOI URLs:</p> <p class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top">Available DOI URLs:</p>
<div input type="select" [(value)]="selectedSourceUrl" placeholder="Zenodo DOI URL" hint="Select..." <div input type="select" [(value)]="selectedSourceUrl" placeholder="DOI URL" hint="Select..."
[options]="sourceUrls" (valueChange)="this.parse()"></div> [options]="sourceUrls" (valueChange)="this.parse()"></div>
<div *ngIf="status!='loading'" class="uk-margin-top"> <div *ngIf="status!='loading'" class="uk-margin-top">
<div>{{this.downloadElements.length}} files found:</div> <div>{{this.downloadElements.length}} files found:</div>

View File

@ -87,9 +87,7 @@ export class EGIDataTransferComponent {
} }
for (let doi of this.dois) { for (let doi of this.dois) {
if (doi.indexOf("zenodo.") != -1) {
this.sourceUrls.push(this.doiPrefix + doi); this.sourceUrls.push(this.doiPrefix + doi);
}
} }
try { try {
this.sourceUrls.sort(function (a, b) { this.sourceUrls.sort(function (a, b) {
@ -147,8 +145,8 @@ export class EGIDataTransferComponent {
this.status = "init"; this.status = "init";
}, error => { }, error => {
this.status = "errorParser"; this.status = "errorParser";
this.message = "Couldn't get download URLs from zenodo"; this.message = error.error && error.error.id && error.error.id == 'doiNotSupported'?'DOI not supported':( error.error && error.error.id && error.error.id? error.error.id:'Error parsing information') ;
UIkit.notification("Couldn't get download URLs from zenodo", { UIkit.notification(this.message, {
status: 'error', status: 'error',
timeout: 3000, timeout: 3000,
pos: 'bottom-right' pos: 'bottom-right'