From 37208d82b6fb2ae84ad4e5c056f45289fb27d079 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 4 Sep 2023 12:48:17 +0300 Subject: [PATCH 1/4] [Library | develop]: transferData.component.ts: Set "overwrite": false & in method "validatePath()", removed regex and check only if path starts with / | transferData.component.html: Updated checks for path validation | resultLanding.component.ts: Added field public belongsInEOSC: boolean = false; and initialize it | resultLanding.component.html: Added message above title "This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud" when in EOSC portal, but result has no EOSC context. --- landingPages/result/resultLanding.component.html | 8 +++++++- landingPages/result/resultLanding.component.ts | 8 +++++++- utils/dataTransfer/transferData.component.html | 13 +++++++------ utils/dataTransfer/transferData.component.ts | 9 +++++---- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index b9bb4761..32b272cd 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -213,7 +213,10 @@ - + + + This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud + {{getAccessLabel(resultLandingInfo.hostedBy_collectedFrom[0].accessRight)}} + + This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud + 0) { - this.resultLandingInfo.contexts = contexts.filter(context => this.publicCommunities.includes(context.idContext)); + this.resultLandingInfo.contexts = contexts.filter(context => { + if(context.idContext == "eosc") { + this.belongsInEOSC = true; + } + return this.publicCommunities.includes(context.idContext) + }); this.cdr.detectChanges(); } } diff --git a/utils/dataTransfer/transferData.component.html b/utils/dataTransfer/transferData.component.html index 2bc7dc11..687a06a1 100644 --- a/utils/dataTransfer/transferData.component.html +++ b/utils/dataTransfer/transferData.component.html @@ -15,10 +15,11 @@ + + + + (cancelEmitter)="init()"> @@ -85,7 +86,7 @@

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

-

or diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts index 6b281846..0c250dfe 100644 --- a/utils/dataTransfer/transferData.component.ts +++ b/utils/dataTransfer/transferData.component.ts @@ -164,7 +164,7 @@ export class EGIDataTransferComponent { this.egiTransferFsModal.back = false; this.egiTransferFsModal.cancelButton = true; this.egiTransferFsModal.okButton = false; - this.egiTransferFsModal.okButtonText = ">> Transfer"; + // this.egiTransferFsModal.okButtonText = ">> Transfer"; this.egiTransferFsModal.title = "EOSC Data Transfer"; if(typeof document !== 'undefined') { this.egiTransferFsModal.open(); @@ -254,7 +254,7 @@ export class EGIDataTransferComponent { "files": [], "params": { "priority": 0, - "overwrite": true, + "overwrite": false, "retry": 3 } }; @@ -560,8 +560,9 @@ export class EGIDataTransferComponent { } } validatePath():boolean { - let exp1 = /^\/([A-z0-9-_+]+\/?)*$/g; - return (this.destinationPath.length > 0 && this.destinationPath.match(exp1) != null) + // let exp1 = /^\/([A-z0-9-_+]+\/?)*$/g; + // let exp1 = /^\/([A-z0-9-_]+[+\/]?)*$/; + return (this.destinationPath.length > 0 && this.destinationPath.startsWith("/")) } From fc2c58e3b92f49dc9db28a1ba39cc5280773a775 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 4 Sep 2023 14:38:51 +0300 Subject: [PATCH 2/4] [Library | develop]: fos.component.ts: [Bug fix] when on eosc explore, link of fos subjects to search page is external. --- landingPages/landing-utils/fos.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/landingPages/landing-utils/fos.component.ts b/landingPages/landing-utils/fos.component.ts index 7457e9a3..fece3437 100644 --- a/landingPages/landing-utils/fos.component.ts +++ b/landingPages/landing-utils/fos.component.ts @@ -31,10 +31,14 @@ import {StringUtils} from "../../utils/string-utils.class";

From bad855089cb0c522dbeb0a009553742f668049c0 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 4 Sep 2023 14:46:25 +0300 Subject: [PATCH 3/4] [Library | develop]: resultLanding.component.html: Added check for message of non eosc results - do not show it in production environment until we get approval. --- landingPages/result/resultLanding.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 32b272cd..a906c918 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -214,7 +214,7 @@ - + This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud {{getAccessLabel(resultLandingInfo.hostedBy_collectedFrom[0].accessRight)}} - + This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud Date: Mon, 4 Sep 2023 15:45:06 +0300 Subject: [PATCH 4/4] [Library | develop]: searchFields.ts: In RESULT_REFINE_FIELDS, query "foslabel" (instead of fos) field in all environments. --- utils/properties/searchFields.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/properties/searchFields.ts b/utils/properties/searchFields.ts index e8ace190..7ae0fcda 100644 --- a/utils/properties/searchFields.ts +++ b/utils/properties/searchFields.ts @@ -14,7 +14,7 @@ export class SearchFields { // Remove Collected From Filter "collectedfrom","collectedfrom" public RESULT_REFINE_FIELDS = [ - "resultbestaccessright", "instancetypename", (properties.environment !== 'production' ? "foslabel" : "fos"), "relfunder", + "resultbestaccessright", "instancetypename", "foslabel", "relfunder", "relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id", "relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"];