Production release November 2023 #20

Merged
argiro.kokogiannaki merged 75 commits from develop into master 2023-11-07 09:48:32 +01:00
9 changed files with 40 additions and 21 deletions
Showing only changes of commit a2f52cf40e - Show all commits

View File

@ -216,6 +216,6 @@ export class FosComponent implements OnInit, OnDestroy {
}
public buildFosQueryParam(fos) {
return (properties.environment !== 'production' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
}
}

View File

@ -31,10 +31,14 @@ import {StringUtils} from "../../utils/string-utils.class";
</div>
<div class="uk-margin-small-top">
<div *ngFor="let subject of subjects.slice(0, viewAll?subjects.length:threshold); let i=index" class="uk-text-truncate">
<a [routerLink]="properties.searchLinkToResults"
[queryParams]="buildFosQueryParam(subject)">
<a *ngIf="properties.adminToolsPortalType != 'eosc'"
[routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subject)">
{{subject.label}}
</a>
<a *ngIf="properties.adminToolsPortalType == 'eosc'" class="custom-external" target="_blank"
[href]="'https://explore.openaire.eu'+properties.searchLinkToResults+'?fos='+urlEncodeAndQuote(subject.label)">
{{subject.label}}
</a>
</div>
</div>
</div>
@ -117,10 +121,10 @@ export class FosComponent {
}
public buildFosQueryParam(fos) {
return (properties.environment !== 'production' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
}
public buildFosHrefParam(fos): string {
return (properties.environment !== 'production' ? ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label)) : ('fos='+this.urlEncodeAndQuote(fos.id)));
return ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label));
}
}

View File

@ -19,7 +19,7 @@ import {AlertModalModule} from "../../utils/modal/alertModal.module";
import { SearchInputModule } from '../../sharedComponents/search-input/search-input.module';
import {EntityMetadataComponent} from "./entity-metadata.component";
import {IconsService} from "../../utils/icons/icons.service";
import {closed_access, open_access, unknown_access} from "../../utils/icons/icons";
import {book, closed_access, cog, database, earth, open_access, unknown_access} from "../../utils/icons/icons";
import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-screen-modal.module";
import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.module";
@ -45,6 +45,6 @@ import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.
})
export class ResultLandingUtilsModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([open_access, closed_access, unknown_access]);
this.iconsService.registerIcons([open_access, closed_access, unknown_access, book, cog, database, earth]);
}
}

View File

@ -215,7 +215,10 @@
</div>
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<i class="uk-text-meta uk-text-xsmall" *ngIf="properties.adminToolsPortalType == 'eosc' && !belongsInEOSC && properties.environment !== 'production'">
This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud
</i>
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
[subTitle]="resultLandingInfo.subtitle"
[authors]="resultLandingInfo.authors"
@ -508,6 +511,9 @@
<icon [name]="resultLandingInfo.hostedBy_collectedFrom[0].accessRightIcon" [flex]="true" [ratio]="1"></icon>
<span class="uk-margin-xsmall-left uk-text-small uk-text-uppercase uk-text-bolder">{{getAccessLabel(resultLandingInfo.hostedBy_collectedFrom[0].accessRight)}}</span>
</div>
<i class="uk-text-meta uk-text-xsmall" *ngIf="properties.adminToolsPortalType == 'eosc' && !belongsInEOSC && properties.environment !== 'production'">
This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud
</i>
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
[subTitle]="resultLandingInfo.subtitle"
[authors]="resultLandingInfo.authors"

View File

@ -55,6 +55,7 @@ export class ResultLandingComponent {
public deleteByInferenceOpened: boolean = false;
@Input() public resultFromInput: boolean = false;
@Input() public resultLandingInfo: ResultLandingInfo;
public belongsInEOSC: boolean = false;
public supplementaryResults: RelationResult[];
public relation: string = 'trust';
public id: string;
@ -592,7 +593,12 @@ export class ResultLandingComponent {
if (contexts) {
await this.promise;
if(this.publicCommunities && this.publicCommunities.length > 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();
}
}

View File

@ -135,7 +135,7 @@ export class SearchDataprovidersService {
// result.description = result.description.substring(0, this.sizeOfDescription) + "...";
// }
let typeid: string = resData['datasourcetype'].classid;
let typeid: string = resData['datasourcetype'] && resData['datasourcetype'].classid;
if(typeid != "entityregistry" && typeid != "entityregistry::projects" && typeid != "entityregistry::repositories") {
if(resData.hasOwnProperty('accessinfopackage')) {

View File

@ -15,10 +15,11 @@
<ng-container *ngTemplateOutlet="modalContents;"></ng-container>
</modal-alert>
<!-- [okButtonDisabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded' || (requests > 0)-->
<!-- || !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"-->
<!-- (okEmitter)="transfer()" (cancelEmitter)="init()"-->
<fs-modal #egiTransferFsModal classTitle="uk-tile-default uk-border-bottom" classBody="uk-container-xlarge"
[okButtonDisabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded' || (requests > 0)
|| !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
(okEmitter)="transfer()" (cancelEmitter)="init()">
(cancelEmitter)="init()">
<ng-container *ngTemplateOutlet="modalContents;"></ng-container>
</fs-modal>
@ -85,7 +86,7 @@
</ng-container>
<p class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top">Destination path (e.g. /folder1/folder2):</p>
<div input [(value)]="destinationPath" [inputClass]="'flat'"
<div #destinationPathInput input [(value)]="destinationPath" [inputClass]="'flat'"
[validators]="pathValidators" class=""></div>
<!-- <div *ngIf="selectedDestination.hasBrowse">-->
<p *ngIf="selectedDestination.canBrowse" class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom"> or <a
@ -111,9 +112,9 @@
<div *ngIf="isMobile" 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)"
|| (requests > 0) || !destinationPathInput.formControl.valid || !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)"
|| (requests > 0) || !destinationPathInput.formControl.valid || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
(click)="transfer()">
>> Transfer
</button>

View File

@ -152,6 +152,7 @@ export class EGIDataTransferComponent {
this.init();
if(!this.isMobile) {
this.egiTransferModal.stayOpen = true;
// this.egiTransferModal.back = true;
this.egiTransferModal.cancelButton = false;
this.egiTransferModal.okButton = true;
@ -164,7 +165,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 +255,7 @@ export class EGIDataTransferComponent {
"files": [],
"params": {
"priority": 0,
"overwrite": true,
"overwrite": false,
"retry": 3
}
};
@ -560,8 +561,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("/"))
}

View File

@ -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"];