From 764b92ae66c45836e9d59ff0f9c3827addef4ead Mon Sep 17 00:00:00 2001 From: argirok Date: Fri, 11 Nov 2022 11:20:02 +0200 Subject: [PATCH 001/140] Eosc data transfer: - add and use separate property for login url - use new API url --- utils/dataTransfer/transferData.component.ts | 2 +- utils/properties/env-properties.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts index e0ede1ee..3fa5129a 100644 --- a/utils/dataTransfer/transferData.component.ts +++ b/utils/dataTransfer/transferData.component.ts @@ -35,7 +35,7 @@ export class EGIDataTransferComponent { subscriptions = []; accessToken = null; @Input() dois; - loginURL = properties.environment == "development"? "http://rudie.di.uoa.gr:8580/openid_connect_login":"https://explore.eosc-portal.eu/egi-login-service/openid_connect_login" + loginURL = properties.eoscDataTransferLoginUrl; sourceUrls = []; selectedSourceUrl = null; destinationPath = ""; diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts index f0f7aacf..a414667b 100644 --- a/utils/properties/env-properties.ts +++ b/utils/properties/env-properties.ts @@ -143,5 +143,6 @@ export interface EnvProperties { egiNotebookLink?: string; connectPortalUrl?; eoscDataTransferAPI?; + eoscDataTransferLoginUrl?; eoscDataTransferDestinations?; } From 8e22fe60b0e68371649d57461c4d08683a397d7e Mon Sep 17 00:00:00 2001 From: argirok Date: Fri, 11 Nov 2022 11:55:15 +0200 Subject: [PATCH 002/140] Data transfer: remove checks for only zenodo dois --- landingPages/result/resultLanding.component.html | 6 ++---- utils/dataTransfer/transferData.component.html | 4 ++-- utils/dataTransfer/transferData.component.ts | 6 ++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index cedd2c18..a41ffda3 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -60,8 +60,7 @@
  • @@ -157,8 +156,7 @@
    diff --git a/utils/dataTransfer/transferData.component.html b/utils/dataTransfer/transferData.component.html index 2a478607..2e4c059f 100644 --- a/utils/dataTransfer/transferData.component.html +++ b/utils/dataTransfer/transferData.component.html @@ -28,8 +28,8 @@
    -

    Available Zenodo DOI URLs:

    -
    Available DOI URLs:

    +
    {{this.downloadElements.length}} files found:
    diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts index 3fa5129a..736a1ee7 100644 --- a/utils/dataTransfer/transferData.component.ts +++ b/utils/dataTransfer/transferData.component.ts @@ -87,9 +87,7 @@ export class EGIDataTransferComponent { } for (let doi of this.dois) { - if (doi.indexOf("zenodo.") != -1) { this.sourceUrls.push(this.doiPrefix + doi); - } } try { this.sourceUrls.sort(function (a, b) { @@ -147,8 +145,8 @@ export class EGIDataTransferComponent { this.status = "init"; }, error => { this.status = "errorParser"; - this.message = "Couldn't get download URLs from zenodo"; - UIkit.notification("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(this.message, { status: 'error', timeout: 3000, pos: 'bottom-right' From ce4b358ce9ced23e48f34a8e2ae37bbaa9f6dc5d Mon Sep 17 00:00:00 2001 From: argirok Date: Fri, 11 Nov 2022 12:28:07 +0200 Subject: [PATCH 003/140] add access token in parser method --- utils/dataTransfer/transferData.component.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts index 736a1ee7..d884038d 100644 --- a/utils/dataTransfer/transferData.component.ts +++ b/utils/dataTransfer/transferData.component.ts @@ -138,19 +138,20 @@ export class EGIDataTransferComponent { this.status = "loading"; this.message = null; this.downloadElements = []; - this.subscriptions.push(this.http.get(this.APIURL + "/parser?doi=" + encodeURIComponent(this.selectedSourceUrl)).subscribe( + let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); + this.subscriptions.push(this.http.get(this.APIURL + "/parser?doi=" + encodeURIComponent(this.selectedSourceUrl), {headers: headers}).subscribe( res => { this.downloadElements= res['elements'] // console.log(this.downloadElements) this.status = "init"; }, error => { this.status = "errorParser"; - 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(this.message, { + this.message = error.error && error.error.id && error.error.id == 'doiNotSupported'?'DOI not supported':( error.error && error.error.description && error.error.description? error.error.description:'Error parsing information') ; + /* UIkit.notification(this.message, { status: 'error', timeout: 3000, pos: 'bottom-right' - }); + });*/ } )); From 7666b55b6c2e02e029fe32722337eff889cc1ce9 Mon Sep 17 00:00:00 2001 From: argirok Date: Fri, 11 Nov 2022 13:56:58 +0200 Subject: [PATCH 004/140] Data transfer: add input for destination URL, inputs for destination authorization add destination authorization header in parser --- .../dataTransfer/transferData.component.html | 51 ++++++++++++++----- utils/dataTransfer/transferData.component.ts | 29 +++++++---- 2 files changed, 58 insertions(+), 22 deletions(-) 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 += `
      `; @@ -255,7 +264,7 @@ export class EGIDataTransferComponent { this.jobStatus = res; 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 += `
        `; @@ -313,7 +322,7 @@ export class EGIDataTransferComponent { } hasBrowse(){ let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - this.subscriptions.push(this.http.get(this.APIURL + "/storage/info?dest="+this.selectedDestination.id+"&seUrl="+encodeURIComponent(this.selectedDestination.url + this.destinationPath) , {headers: headers}).subscribe( + this.subscriptions.push(this.http.get(this.APIURL + "/storage/info?dest="+this.selectedDestination.id+"&seUrl="+encodeURIComponent(this.destinationUrl + this.destinationPath) , {headers: headers}).subscribe( res => { console.log(res); } @@ -323,7 +332,7 @@ export class EGIDataTransferComponent { getFolder(folderPath){ //TODO is this necessary? let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - this.subscriptions.push(this.http.get(this.APIURL + "/storage/folder?dest="+this.selectedDestination.id+"&seUrl="+encodeURIComponent(this.selectedDestination.url + folderPath) , {headers: headers}).subscribe( + this.subscriptions.push(this.http.get(this.APIURL + "/storage/folder?dest="+this.selectedDestination.id+"&seUrl="+encodeURIComponent(this.destinationUrl + folderPath) , {headers: headers}).subscribe( res => { this.folders[folderPath]= res; this.folders[folderPath]['isOpen'] = true; @@ -338,7 +347,7 @@ export class EGIDataTransferComponent { } this.getFolder(folderPath); let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - this.subscriptions.push(this.http.get(this.APIURL + "/storage/folder/list?dest="+this.selectedDestination.id+"&folderUrl="+encodeURIComponent(this.selectedDestination.url + folderPath) , {headers: headers}).subscribe( + this.subscriptions.push(this.http.get(this.APIURL + "/storage/folder/list?dest="+this.selectedDestination.id+"&folderUrl="+encodeURIComponent(this.destinationUrl + folderPath) , {headers: headers}).subscribe( res => { this.files[folderPath]= res['elements']; } @@ -348,7 +357,7 @@ export class EGIDataTransferComponent { createFolder(){ let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); this.subscriptions.push(this.http.post(this.APIURL + "/storage/folder?dest="+this.selectedDestination.id+"&seUrl="+ - encodeURIComponent(this.selectedDestination.url + this.destinationPath + "test1/") , {headers: headers}).subscribe( + encodeURIComponent(this.destinationUrl + this.destinationPath + "test1/") , {headers: headers}).subscribe( res => { console.log(res); } @@ -358,7 +367,7 @@ export class EGIDataTransferComponent { deleteFolder(){ let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - this.subscriptions.push(this.http.delete(this.APIURL + "/storage/folder?dest="+this.selectedDestination.id+"&seUrl="+encodeURIComponent(this.selectedDestination.url + this.destinationPath + "test1/") , {headers: headers}).subscribe( + this.subscriptions.push(this.http.delete(this.APIURL + "/storage/folder?dest="+this.selectedDestination.id+"&seUrl="+encodeURIComponent(this.destinationUrl + this.destinationPath + "test1/") , {headers: headers}).subscribe( res => { console.log(res); } From 9ead7fee7d73a274e96096cdfe18afe4644fe085 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Tue, 20 Dec 2022 15:27:18 +0200 Subject: [PATCH 005/140] progress on explore landing page --- .../landing-header.component.ts | 28 +++---- .../result/resultLanding.component.html | 79 ++++++++++++++----- 2 files changed, 74 insertions(+), 33 deletions(-) diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index 39ebfbed..d8286945 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -7,14 +7,20 @@ import {AlertModal} from "../../../utils/modal/alert"; selector: 'landing-header', template: `
        -
        - +
        + +
        + +
        +
        +
        + {{entityType}} - - {{(entityType?' . ':'') + removeUnknown(types, true).join(' . ')}} - - + + {{(entityType?' >> ':'') + removeUnknown(types, true).join(' . ')}} + + {{' . '}} @@ -41,20 +47,14 @@ import {AlertModal} from "../../../utils/modal/alert"; {{' . ' + year}} - . Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}} + . Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}} . Under curation -
        -
        - -
        - -
        -
        +
        diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index bedbea13..2cf40c10 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -4,7 +4,7 @@
        -
        +
      • -
      • @@ -42,7 +40,6 @@
      • -
      • -
      • -
        +
      -->
      @@ -106,6 +102,45 @@
      + + + - -
      - - {{(resultLandingInfo.countries.length === 1) ? 'Country: ' : 'Countries: '}} - - {{resultLandingInfo.countries.join(", ")}} -
      @@ -282,6 +304,14 @@
    +
    +
    + {{(resultLandingInfo.countries.length === 1) ? 'Country ' : 'Countries '}} +
    +
    + {{resultLandingInfo.countries.join(", ")}} +
    +
    + +
    +
    +
    + left +
    +
    + right +
    +
    +
    Date: Wed, 4 Jan 2023 13:27:49 +0200 Subject: [PATCH 006/140] [Eosc Explore & Library | data-transfer-v2]: environment.ts: Updated eoscDataTransferDestinations to be like api response. | transferData.component: Updated destinationOptions and selectedDestination according to the updated eoscDataTransferDestinations. --- .../dataTransfer/transferData.component.html | 8 +++--- utils/dataTransfer/transferData.component.ts | 25 ++++++++++--------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/utils/dataTransfer/transferData.component.html b/utils/dataTransfer/transferData.component.html index 6e835e1b..5ebc6e2a 100644 --- a/utils/dataTransfer/transferData.component.html +++ b/utils/dataTransfer/transferData.component.html @@ -62,14 +62,14 @@ [validators]="URLValidators" class="">
    + *ngIf="selectedDestination.authType == 'password' || selectedDestination.authType == 'keys'">

    Provide authentication if needed:

    -
    -
    @@ -87,7 +87,7 @@
    - +

    Comming soon!

    diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts index eacaa5aa..8bd841d9 100644 --- a/utils/dataTransfer/transferData.component.ts +++ b/utils/dataTransfer/transferData.component.ts @@ -43,8 +43,9 @@ export class EGIDataTransferComponent { destinationAuthUser = ""; destinationAuthPass = ""; destinationPath = ""; - destinationOptions = properties.eoscDataTransferDestinations; - selectedDestination:{label :string, id: string, auth: 'token' | 'password' | 'keys'} = null; + destinationOptions = properties.eoscDataTransferDestinations.map(dest => {return {"label": dest.destination, "value": dest}}); + selectedDestination:{ kind: string, destination: string, description: string, authType: 'token' | 'password' | 'keys', + canBrowse: boolean, transferWith: string} = null; folders = {}; files = {}; downloadElements = null; @@ -83,7 +84,7 @@ export class EGIDataTransferComponent { if(this.accessToken) { if (this.selectedDestinationId) { for (let option of this.destinationOptions) { - if (this.selectedDestinationId == option.value.id) { + if (this.selectedDestinationId == option.value.destination) { this.selectedDestination = option.value; } } @@ -167,7 +168,7 @@ export class EGIDataTransferComponent { // console.log(this.selectedDestination) this.status = "loading"; let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - this.subscriptions.push(this.http.get(this.APIURL + "/user/info?dest="+this.selectedDestination.id, {headers: headers}).subscribe( + this.subscriptions.push(this.http.get(this.APIURL + "/user/info?dest="+this.selectedDestination.destination, {headers: headers}).subscribe( res => { // console.log(res) let body = { @@ -193,7 +194,7 @@ export class EGIDataTransferComponent { } let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - if(this.selectedDestination.auth != "token" && this.destinationAuthPass.length > 0 && this.destinationAuthUser.length > 0){ + if(this.selectedDestination.authType != "token" && this.destinationAuthPass.length > 0 && this.destinationAuthUser.length > 0){ headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken, 'Authorization-Storage': btoa(this.destinationAuthUser + ':' + this.destinationAuthPass)}); } @@ -210,7 +211,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.description+` has began.`; /*this.message += `
      `; @@ -264,7 +265,7 @@ export class EGIDataTransferComponent { this.jobStatus = res; this.message = ` -
      Transfer of ` + this.downloadElements.length + ` files to ` + this.selectedDestination.label+` has began.`; +
      Transfer of ` + this.downloadElements.length + ` files to ` + this.selectedDestination.description+` has began.`; /*this.message += `
        `; @@ -322,7 +323,7 @@ export class EGIDataTransferComponent { } hasBrowse(){ let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - this.subscriptions.push(this.http.get(this.APIURL + "/storage/info?dest="+this.selectedDestination.id+"&seUrl="+encodeURIComponent(this.destinationUrl + this.destinationPath) , {headers: headers}).subscribe( + this.subscriptions.push(this.http.get(this.APIURL + "/storage/info?dest="+this.selectedDestination.destination+"&seUrl="+encodeURIComponent(this.destinationUrl + this.destinationPath) , {headers: headers}).subscribe( res => { console.log(res); } @@ -332,7 +333,7 @@ export class EGIDataTransferComponent { getFolder(folderPath){ //TODO is this necessary? let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - this.subscriptions.push(this.http.get(this.APIURL + "/storage/folder?dest="+this.selectedDestination.id+"&seUrl="+encodeURIComponent(this.destinationUrl + folderPath) , {headers: headers}).subscribe( + this.subscriptions.push(this.http.get(this.APIURL + "/storage/folder?dest="+this.selectedDestination.destination+"&seUrl="+encodeURIComponent(this.destinationUrl + folderPath) , {headers: headers}).subscribe( res => { this.folders[folderPath]= res; this.folders[folderPath]['isOpen'] = true; @@ -347,7 +348,7 @@ export class EGIDataTransferComponent { } this.getFolder(folderPath); let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - this.subscriptions.push(this.http.get(this.APIURL + "/storage/folder/list?dest="+this.selectedDestination.id+"&folderUrl="+encodeURIComponent(this.destinationUrl + folderPath) , {headers: headers}).subscribe( + this.subscriptions.push(this.http.get(this.APIURL + "/storage/folder/list?dest="+this.selectedDestination.destination+"&folderUrl="+encodeURIComponent(this.destinationUrl + folderPath) , {headers: headers}).subscribe( res => { this.files[folderPath]= res['elements']; } @@ -356,7 +357,7 @@ export class EGIDataTransferComponent { } createFolder(){ let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - this.subscriptions.push(this.http.post(this.APIURL + "/storage/folder?dest="+this.selectedDestination.id+"&seUrl="+ + this.subscriptions.push(this.http.post(this.APIURL + "/storage/folder?dest="+this.selectedDestination.destination+"&seUrl="+ encodeURIComponent(this.destinationUrl + this.destinationPath + "test1/") , {headers: headers}).subscribe( res => { console.log(res); @@ -367,7 +368,7 @@ export class EGIDataTransferComponent { deleteFolder(){ let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); - this.subscriptions.push(this.http.delete(this.APIURL + "/storage/folder?dest="+this.selectedDestination.id+"&seUrl="+encodeURIComponent(this.destinationUrl + this.destinationPath + "test1/") , {headers: headers}).subscribe( + this.subscriptions.push(this.http.delete(this.APIURL + "/storage/folder?dest="+this.selectedDestination.destination+"&seUrl="+encodeURIComponent(this.destinationUrl + this.destinationPath + "test1/") , {headers: headers}).subscribe( res => { console.log(res); } From 3c20944aec78714d59265b1bfebea91b2cadbbb7 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Thu, 5 Jan 2023 19:14:26 +0200 Subject: [PATCH 007/140] [Library | data-transfer-v2]: transferData.component: Get destinationOptions from API (/storage/types). --- .../dataTransfer/transferData.component.html | 2 +- utils/dataTransfer/transferData.component.ts | 31 ++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/utils/dataTransfer/transferData.component.html b/utils/dataTransfer/transferData.component.html index 5ebc6e2a..972da1ae 100644 --- a/utils/dataTransfer/transferData.component.html +++ b/utils/dataTransfer/transferData.component.html @@ -43,7 +43,7 @@
      -
      +
      Testing:
      https://dcache-demo.desy.de:2443 diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts index 8bd841d9..1070e809 100644 --- a/utils/dataTransfer/transferData.component.ts +++ b/utils/dataTransfer/transferData.component.ts @@ -43,14 +43,14 @@ export class EGIDataTransferComponent { destinationAuthUser = ""; destinationAuthPass = ""; destinationPath = ""; - destinationOptions = properties.eoscDataTransferDestinations.map(dest => {return {"label": dest.destination, "value": dest}}); + destinationOptions = null;//properties.eoscDataTransferDestinations.map(dest => {return {"label": dest.destination, "value": dest}}); selectedDestination:{ kind: string, destination: string, description: string, authType: 'token' | 'password' | 'keys', canBrowse: boolean, transferWith: string} = null; folders = {}; files = {}; downloadElements = null; @Input() isOpen = false; - @Input() selectedDestinationId = "dcache"; + // @Input() selectedDestinationId = "dcache"; @ViewChild('egiTransferModal') egiTransferModal; APIURL = properties.eoscDataTransferAPI; status: "loading" | "success" | "errorParser" | "errorUser" | "errorTransfer" | "init" | "canceled" = "init"; @@ -82,15 +82,24 @@ export class EGIDataTransferComponent { open(){ this.accessToken = COOKIE.getCookie("EGIAccessToken"); if(this.accessToken) { - if (this.selectedDestinationId) { - for (let option of this.destinationOptions) { - if (this.selectedDestinationId == option.value.destination) { - this.selectedDestination = option.value; - } + // if (this.selectedDestinationId) { + // for (let option of this.destinationOptions) { + // if (this.selectedDestinationId == option.value.destination) { + // this.selectedDestination = option.value; + // } + // } + // } else { + // this.selectedDestination = this.destinationOptions[0].value; + // } + + let headers = new HttpHeaders({'Authorization': 'Bearer '+this.accessToken}); + this.subscriptions.push(this.http.get(this.APIURL + "/storage/types", {headers: headers}).subscribe( + (res: Array) => { + this.destinationOptions = res.map(dest => {return {"label": dest.destination, "value": dest}}); + this.selectedDestination = res[0]; } - } else { - this.selectedDestination = this.destinationOptions[0].value; - } + )); + for (let doi of this.dois) { this.sourceUrls.push(this.doiPrefix + doi); @@ -129,7 +138,7 @@ export class EGIDataTransferComponent { } init(){ this.destinationPath = ""; - this.selectedDestination = this.destinationOptions[0].value; + // this.selectedDestination = this.destinationOptions[0].value; this.selectedSourceUrl = this.sourceUrls[0]; this.message = null; this.status = "init"; From 871c45c48091b38415ff208fcf80272218fa35f2 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 9 Jan 2023 18:35:28 +0200 Subject: [PATCH 008/140] progress on result-landing page and used components within it --- .../dataProvider/dataProvider.component.html | 3 +- .../landing-utils/availableOn.component.ts | 22 ++- .../landing-header.component.ts | 43 +++++- .../landing-header/landing-header.module.ts | 4 +- .../landing-utils/showPublisher.component.ts | 137 +++++++++--------- .../landing-utils/showPublisher.module.ts | 3 +- .../result/resultLanding.component.html | 67 ++++++--- landingPages/result/resultLanding.module.ts | 4 +- orcid/orcid-work.component.ts | 9 +- utils/icons/icons.ts | 15 ++ 10 files changed, 204 insertions(+), 103 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 888317a6..aa6ec280 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -98,7 +98,8 @@ + [types]="dataProviderInfo.type ? [dataProviderInfo.type] : null" + [entityType]="getTypeName()"> diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 48536226..071bd84e 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -5,7 +5,19 @@ import {properties} from "../../../../environments/environment"; @Component({ selector: 'availableOn', template: ` -
      + + + + + + + {{availableOn[0].downloadNames.join("; ")}} + + + + + + + @@ -91,7 +105,9 @@ export class AvailableOnComponent { constructor() { } - ngOnInit() {} + ngOnInit() { + console.log(this.availableOn); + } public removeUnknown(value: string): string { if (value.toLowerCase() === 'unknown') { diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index d8286945..d68d6d12 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -6,19 +6,31 @@ import {AlertModal} from "../../../utils/modal/alert"; @Component({ selector: 'landing-header', template: ` -
      -
      +
      +
      -
      +
      + + + + + + + + + {{entityType}} + + + - {{(entityType?' >> ':'') + removeUnknown(types, true).join(' . ')}} + {{removeUnknown(types, true).join(' , ')}} @@ -54,6 +66,23 @@ import {AlertModal} from "../../../utils/modal/alert"; uk-tooltip="pos:bottom-right; delay:10;" class="uk-text-primary">Under curation + + + + + {{language}} + + + + + + + {{programmingLanguage}} + + + +
      @@ -79,6 +108,12 @@ export class LandingHeaderComponent { @Input() titleClass: string = null; @Input() isTitleH1:boolean =true; @Input() isSticky: boolean = false; + @Input() publisher; // showPublisher component + @Input() publishDate: Date; // showPublisher component + @Input() journal; // showPublisher component + @Input() languages; + @Input() programmingLanguages; + public removeUnknown(array: string[], type: boolean = false): string[] { if (type) { return this.removeDuplicates(array).filter(value => value.toLowerCase() !== 'unknown'); diff --git a/landingPages/landing-utils/landing-header/landing-header.module.ts b/landingPages/landing-utils/landing-header/landing-header.module.ts index d607e391..069a17b5 100644 --- a/landingPages/landing-utils/landing-header/landing-header.module.ts +++ b/landingPages/landing-utils/landing-header/landing-header.module.ts @@ -3,9 +3,11 @@ import {LandingHeaderComponent} from "./landing-header.component"; import {CommonModule} from "@angular/common"; import {LandingModule} from "../landing.module"; import {ShowAuthorsModule} from "../../../utils/authors/showAuthors.module"; +import {IconsModule} from "src/app/openaireLibrary/utils/icons/icons.module"; +import {ShowPublisherModule} from "../showPublisher.module"; @NgModule({ - imports: [CommonModule, LandingModule, ShowAuthorsModule], + imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, ShowPublisherModule], declarations: [LandingHeaderComponent], exports: [LandingHeaderComponent] }) diff --git a/landingPages/landing-utils/showPublisher.component.ts b/landingPages/landing-utils/showPublisher.component.ts index 55d96ffe..08e86591 100644 --- a/landingPages/landing-utils/showPublisher.component.ts +++ b/landingPages/landing-utils/showPublisher.component.ts @@ -4,73 +4,76 @@ import {EnvProperties} from "../../utils/properties/env-properties"; @Component({ selector: 'showPublisher, [showPublisher]', template: ` -
      - - Published: - {{publishDate | date: 'dd MMM yyyy' : 'UTC'}} - - - Journal: - {{journal['journal']}} - , - - - volume - {{journal['volume'] | number}} - {{journal['volume']}} - - , - - - - issue - {{journal['issue'] | number}} - {{journal['issue']}} - - , - - - {{(journal['start_page'] && journal['end_page']) ? 'pages' : 'page'}} - - {{journal['start_page'] | number}} - {{journal['start_page']}} - - - - - {{journal['end_page'] | number}} - {{journal['end_page']}} - - - ( - - issn: {{journal['issn']}} - , - - - eissn: {{journal['eissn']}} - , - - - lissn: {{journal['lissn']}} - , - - - - - Copyright policy - - - ) - -
      -
      - Publisher: {{publisher}} -
      + + + + {{publishDate | date: 'dd MMM yyyy' : 'UTC'}} + + + + + {{journal['journal']}} + , + + + volume + {{journal['volume'] | number}} + {{journal['volume']}} + + , + + + + issue + {{journal['issue'] | number}} + {{journal['issue']}} + + , + + + {{(journal['start_page'] && journal['end_page']) ? 'pages' : 'page'}} + + {{journal['start_page'] | number}} + {{journal['start_page']}} + + - + + {{journal['end_page'] | number}} + {{journal['end_page']}} + + + ( + + issn: {{journal['issn']}} + , + + + eissn: {{journal['eissn']}} + , + + + lissn: {{journal['lissn']}} + , + + + + + Copyright policy + + + ) + + + + + + {{publisher}} + ` }) export class ShowPublisherComponent { diff --git a/landingPages/landing-utils/showPublisher.module.ts b/landingPages/landing-utils/showPublisher.module.ts index 3da1cc5c..8a8d0549 100644 --- a/landingPages/landing-utils/showPublisher.module.ts +++ b/landingPages/landing-utils/showPublisher.module.ts @@ -1,10 +1,11 @@ import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {ShowPublisherComponent} from "./showPublisher.component"; +import {IconsModule} from '../../utils/icons/icons.module'; @NgModule({ imports: [ - CommonModule + CommonModule, IconsModule ], declarations: [ ShowPublisherComponent diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 2cf40c10..f0d0e01d 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -105,36 +105,58 @@
      -
      + @@ -206,10 +228,14 @@ [authors]="resultLandingInfo.authors" [underCuration]="resultLandingInfo.underCurationMessage" [entityType]="getTypeName()" [types]="resultLandingInfo.types" - [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate"> + [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate" + [publisher]="resultLandingInfo.publisher" [publishDate]="resultLandingInfo.dateofacceptance" + [journal]="resultLandingInfo.journal" [languages]="resultLandingInfo.languages" + [programmingLanguages]="resultLandingInfo.programmingLanguages"> -
      + +
      -
      +
      @@ -522,9 +549,9 @@ (viewAllClicked)="viewAll=$event" (noCommunities)="noCommunities = true">
      -
      +
      diff --git a/landingPages/result/resultLanding.module.ts b/landingPages/result/resultLanding.module.ts index 3a901b22..3f091caa 100644 --- a/landingPages/result/resultLanding.module.ts +++ b/landingPages/result/resultLanding.module.ts @@ -33,7 +33,7 @@ import {MatFormFieldModule} from "@angular/material/form-field"; import {MatSelectModule} from "@angular/material/select"; import {IconsModule} from "../../utils/icons/icons.module"; import {IconsService} from "../../utils/icons/icons.service"; -import {graph, link, quotes} from "../../utils/icons/icons"; +import {graph, link, quotes, cite, link_to, versions} from "../../utils/icons/icons"; import {InputModule} from "../../sharedComponents/input/input.module"; import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module"; @@ -58,6 +58,6 @@ import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.modul }) export class ResultLandingModule { constructor(private iconsService: IconsService) { - this.iconsService.registerIcons([link, graph, quotes]) + this.iconsService.registerIcons([link, graph, quotes, cite, link_to, versions]) } } diff --git a/orcid/orcid-work.component.ts b/orcid/orcid-work.component.ts index 3f0ccc69..a91d319e 100644 --- a/orcid/orcid-work.component.ts +++ b/orcid/orcid-work.component.ts @@ -54,21 +54,22 @@ declare var UIkit: any; - + + Claim ' } + +export const cite = { + name: 'cite', + data: ' ' +} + +export const link_to = { + name: 'link_to', + data: ' ' +} + +export const versions = { + name: 'versions', + data: ' ' +} /** Add new icon under this line to be sure that it will be added on preview */ From c1fa0889ee670084ba97f6a22e67a2d23c09d95c Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Fri, 13 Jan 2023 08:32:16 +0200 Subject: [PATCH 009/140] progress in landing page (new metrics, tweaks for new action-bar) --- .../landing-utils/availableOn.component.ts | 53 ++++- .../result/resultLanding.component.html | 211 ++++++++++++++++-- landingPages/result/resultLanding.service.ts | 78 ++++++- orcid/orcid-work.component.ts | 42 ++-- utils/entities/resultLandingInfo.ts | 11 + 5 files changed, 356 insertions(+), 39 deletions(-) diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 071bd84e..916b55b2 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -1,20 +1,57 @@ -import {Component, EventEmitter, Input, Output} from '@angular/core'; +import {Component, ElementRef, EventEmitter, Input, Output, ViewChild} from '@angular/core'; import {HostedByCollectedFrom} from "../../utils/result-preview/result-preview"; import {properties} from "../../../../environments/environment"; +declare var UIkit; @Component({ selector: 'availableOn', template: ` - - + - {{availableOn[0].downloadNames.join("; ")}} + {{availableOn[0].downloadNames.join("; ")}} + - + +
      +
      + + + +
      + + + {{instance.downloadNames.join("; ")}} + + +
      + {{instance.types.join(" . ")}} + . + {{instance.years.join(" . ")}} +
      +
      + License: + + {{instance.license}} + + {{instance.license}} +
      +
      + Providers: + + {{collectedName}}; + +
      +
      +
      +
      - + @@ -130,28 +128,20 @@ Link to Share Cite - - - + - + + + +
      @@ -459,6 +453,160 @@
    + +
    + +
      +
    • +
      +
      +
      +
      +
      + BIP! +
      + Impact by + BIP! +
      +
      + + + + + + + + + + + + + + + + + + + +
      + Citations + + {{resultLandingInfo.measure.citations}} +
      + Popularity + + {{resultLandingInfo.measure.popularity}} +
      + Influence + + {{resultLandingInfo.measure.influence}} +
      + Impulse + + {{resultLandingInfo.measure.impulse}} +
      +
      +
      +
      +
      +
      +
      +
      + Altmetric +
      + Social by + Altmetric +
      +
      + + + + + + + + + + + +
      + Facebook + + 1 +
      + Twitter + + 4 +
      +
      +
      +
      +
      +
      +
      +
      + usage counts +
      + Usage by + UsageCounts +
      +
      + + + + + + + + + + + + + +
      + + + Downloads + + {{resultLandingInfo.measure.downloads}} +
      + + + Views + + {{resultLandingInfo.measure.views}} +
      +
      +
      +
      +
      +
    • +
    • + 2 +
    • +
    • + 3 +
    • +
    • + 4 +
    • +
    +
    +
    @@ -504,13 +652,40 @@ -
    +
    -
    - left +
    +
    + +
    +
    Citations
    +
    Popularity
    +
    Influence
    +
    Downloads
    +
    Views
    +
    +
    +
    {{resultLandingInfo.measure.citations}}
    +
    {{resultLandingInfo.measure.popularity}}
    +
    {{resultLandingInfo.measure.influence}}
    +
    {{resultLandingInfo.measure.downloads}}
    +
    {{resultLandingInfo.measure.views}}
    +
    +
    -
    - right +
    +
    diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index f240ebeb..26c2ff25 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -126,7 +126,7 @@ export class ResultLandingService { } parseResultLandingInfo (data: any, subjectsVocabulary: any, properties: EnvProperties): any { - this.resultLandingInfo = new ResultLandingInfo(); + this.resultLandingInfo = new ResultLandingInfo(); // res this.resultLandingInfo.record = data[15]; @@ -408,6 +408,82 @@ export class ResultLandingService { }); } + // res['result']['metadata']['oaf:entity']['oaf:result']['measure'] + if (data[0] != null) { + if (data[0].measure?.length) { + this.resultLandingInfo.measure = {"downloads": null, "views": null, "popularity": null, "influence": null, "citations": null, "impulse": null}; + for (let i = 0; i < data[0].measure.length; i++) { + if (data[0].measure[i].id == 'downloads') { + // this.resultLandingInfo.measure['downloads'] = data[0].measure[i].count; + this.resultLandingInfo.measure['downloads'] = data[0].measure[i].count == 0 ? ' - ' : data[0].measure[i].count; + } + if (data[0].measure[i].id == 'views') { + this.resultLandingInfo.measure['views'] = data[0].measure[i].count == 0 ? ' - ' : data[0].measure[i].count; + } + if (data[0].measure[i].id == 'influence') { + if (data[0].measure[i].class == 'C1') { + this.resultLandingInfo.measure['influence'] = 'Top 0.01%'; + } else if (data[0].measure[i].class == 'C2') { + this.resultLandingInfo.measure['influence'] = 'Top 0.1%'; + } else if (data[0].measure[i].class == 'C3') { + this.resultLandingInfo.measure['influence'] = 'Top 1%'; + } else if (data[0].measure[i].class == 'C4') { + this.resultLandingInfo.measure['influence'] = 'Top 10%'; + } else if (data[0].measure[i].class == 'C5') { + this.resultLandingInfo.measure['influence'] = 'Average/low'; + } else if (data[0].measure[i].class == 'A') { + this.resultLandingInfo.measure['influence'] = 'Exceptional'; + } else if (data[0].measure[i].class == 'B') { + this.resultLandingInfo.measure['influence'] = 'Substantial'; + } else { + this.resultLandingInfo.measure['influence'] = 'Average'; + } + } + if (data[0].measure[i].id == 'popularity') { + if (data[0].measure[i].class == 'C1') { + this.resultLandingInfo.measure['popularity'] = 'Top 0.01%'; + } else if (data[0].measure[i].class == 'C2') { + this.resultLandingInfo.measure['popularity'] = 'Top 0.1%'; + } else if (data[0].measure[i].class == 'C3') { + this.resultLandingInfo.measure['popularity'] = 'Top 1%'; + } else if (data[0].measure[i].class == 'C4') { + this.resultLandingInfo.measure['popularity'] = 'Top 10%'; + } else if (data[0].measure[i].class == 'C5') { + this.resultLandingInfo.measure['popularity'] = 'Average/low'; + } else if (data[0].measure[i].class == 'A') { + this.resultLandingInfo.measure['popularity'] = 'Exceptional'; + } else if (data[0].measure[i].class == 'B') { + this.resultLandingInfo.measure['popularity'] = 'Substantial'; + } else { + this.resultLandingInfo.measure['popularity'] = 'Average'; + } + } + if (data[0].measure[i].id == 'influence_alt') { + this.resultLandingInfo.measure['citations'] = data[0].measure[i].score == 0 ? ' - ' : data[0].measure[i].score; + } + if (data[0].measure[i].id == 'impulse') { + if (data[0].measure[i].class == 'C1') { + this.resultLandingInfo.measure['impulse'] = 'Top 0.01%'; + } else if (data[0].measure[i].class == 'C2') { + this.resultLandingInfo.measure['impulse'] = 'Top 0.1%'; + } else if (data[0].measure[i].class == 'C3') { + this.resultLandingInfo.measure['impulse'] = 'Top 1%'; + } else if (data[0].measure[i].class == 'C4') { + this.resultLandingInfo.measure['impulse'] = 'Top 10%'; + } else if (data[0].measure[i].class == 'C5') { + this.resultLandingInfo.measure['impulse'] = 'Average/low'; + } else if (data[0].measure[i].class == 'A') { + this.resultLandingInfo.measure['impulse'] = 'Exceptional'; + } else if (data[0].measure[i].class == 'B') { + this.resultLandingInfo.measure['impulse'] = 'Substantial'; + } else { + this.resultLandingInfo.measure['impulse'] = 'Average'; + } + } + } + } + } + this.resultLandingInfo.relatedResults = this.parsingFunctions.sortByPercentage(this.resultLandingInfo.relatedResults); return this.resultLandingInfo; diff --git a/orcid/orcid-work.component.ts b/orcid/orcid-work.component.ts index a91d319e..5f95479d 100644 --- a/orcid/orcid-work.component.ts +++ b/orcid/orcid-work.component.ts @@ -54,33 +54,47 @@ declare var UIkit: any; + [attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small'" + [title]="(!pids || !isLoggedIn) ? (!pids ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd"> - - + class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder landing-action-button-orcid" + [class.uk-disabled]="showLoading || !isLoggedIn || !pids" + (mouseover)="hoverEvent($event)" (mouseout)="hoverEvent($event)"> + Claim - + + class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder landing-action-button-orcid" + [class.uk-disabled]="showLoading || !isLoggedIn || !pids" + (mouseover)="hoverEvent($event, 'delete')" (mouseout)="hoverEvent($event, 'delete')"> + + Remove + + + + + + diff --git a/utils/entities/resultLandingInfo.ts b/utils/entities/resultLandingInfo.ts index c531307d..5ed2b93b 100644 --- a/utils/entities/resultLandingInfo.ts +++ b/utils/entities/resultLandingInfo.ts @@ -29,6 +29,15 @@ export interface Context { logo?: string; } +export interface Measure { + downloads: string; + views: string; + influence: string; + popularity: string; + citations: string; + impulse: string; +} + export class ResultLandingInfo { relcanId; objIdentifier: string; @@ -140,4 +149,6 @@ export class ResultLandingInfo { // SOFTWARE programmingLanguages: string[]; + + measure: Measure; } From 95de86e7673b07b3f0d2c0afe3051ecc1ebc72dd Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Fri, 13 Jan 2023 15:57:26 +0200 Subject: [PATCH 010/140] progress in result landing page --- .../landing-utils/availableOn.component.ts | 89 +++++---- landingPages/landing-utils/fos.component.ts | 4 +- .../landing-utils/fundedBy.component.ts | 2 +- .../landing-utils/relatedTo.component.ts | 2 +- landingPages/landing-utils/sdg.component.ts | 4 +- .../result/resultLanding.component.html | 181 +++++++++++++----- .../result/resultLanding.component.ts | 6 +- landingPages/result/resultLanding.module.ts | 4 +- .../dataTransfer/transferData.component.html | 15 +- utils/dataTransfer/transferData.module.ts | 8 +- utils/icons/icons.ts | 15 ++ 11 files changed, 219 insertions(+), 111 deletions(-) diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 916b55b2..d18b7688 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -1,53 +1,60 @@ import {Component, ElementRef, EventEmitter, Input, Output, ViewChild} from '@angular/core'; import {HostedByCollectedFrom} from "../../utils/result-preview/result-preview"; import {properties} from "../../../../environments/environment"; +import {StringUtils} from '../../utils/string-utils.class'; declare var UIkit; @Component({ selector: 'availableOn', template: ` - - - - - {{availableOn[0].downloadNames.join("; ")}} - - - -
    -
    - - +
    + + + -
    - - - {{instance.downloadNames.join("; ")}} - + {{sliceString(availableOn[0].downloadNames.join("; "), 20)}} + + + + + + +
    +
    + + -
    - {{instance.types.join(" . ")}} - . - {{instance.years.join(" . ")}} -
    -
    - License: - - {{instance.license}} - - {{instance.license}} -
    -
    - Providers: - - {{collectedName}}; - +
    + + + {{instance.downloadNames.join("; ")}} + + +
    + {{instance.types.join(" . ")}} + . + {{instance.years.join(" . ")}} +
    +
    + License: + + {{instance.license}} + + {{instance.license}} +
    +
    + Providers: + + {{collectedName}}; + +
    @@ -179,4 +186,8 @@ export class AvailableOnComponent { get isOpen() { return (typeof document !== 'undefined') && this.dropElement && UIkit.drop(this.dropElement.nativeElement).isActive(); } + + public sliceString(str: string, size: number) { + return StringUtils.sliceString(str, size) + } } diff --git a/landingPages/landing-utils/fos.component.ts b/landingPages/landing-utils/fos.component.ts index c1ffc00a..7bdbc318 100644 --- a/landingPages/landing-utils/fos.component.ts +++ b/landingPages/landing-utils/fos.component.ts @@ -12,11 +12,11 @@ import {StringUtils} from "../../utils/string-utils.class"; {{title}} - {{title}} + {{title}} - View all & feedback + View all & suggest Feedback diff --git a/landingPages/landing-utils/fundedBy.component.ts b/landingPages/landing-utils/fundedBy.component.ts index 634998e1..2d82a151 100644 --- a/landingPages/landing-utils/fundedBy.component.ts +++ b/landingPages/landing-utils/fundedBy.component.ts @@ -11,7 +11,7 @@ import {HelperFunctions} from '../../utils/HelperFunctions.class'; {{title}} - {{title}} + {{title}} View less View all diff --git a/landingPages/landing-utils/relatedTo.component.ts b/landingPages/landing-utils/relatedTo.component.ts index b9c64222..61929ab4 100644 --- a/landingPages/landing-utils/relatedTo.component.ts +++ b/landingPages/landing-utils/relatedTo.component.ts @@ -18,7 +18,7 @@ import {OpenaireEntities} from "../../utils/properties/searchFields"; {{title}} - {{title}} + {{title}} View less View all diff --git a/landingPages/landing-utils/sdg.component.ts b/landingPages/landing-utils/sdg.component.ts index c8ba6336..01ff2d60 100644 --- a/landingPages/landing-utils/sdg.component.ts +++ b/landingPages/landing-utils/sdg.component.ts @@ -13,11 +13,11 @@ import {StringUtils} from "../../utils/string-utils.class"; {{title}} - {{title}} + {{title}} - View all & feedback + View all & suggest Feedback
    diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index cf180b37..e91edbdf 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -108,9 +108,9 @@
    @@ -294,7 +293,7 @@ customClass="portalTab"> - @@ -453,26 +452,27 @@
    - +
    -
      + -
        +
          +
        • -
          -
          +
          +
          @@ -485,6 +485,9 @@ + @@ -493,6 +496,9 @@ + @@ -501,6 +507,9 @@ + @@ -509,6 +518,9 @@ + @@ -522,7 +534,7 @@
          -
          +
          Altmetric @@ -554,11 +566,11 @@
          -
          -
          +
          +
          - usage counts + OpenAIRE UsageCounts
          Usage by UsageCounts @@ -595,14 +607,87 @@
          -
        • - 2 + +
        • +
          +
          +
        • + + Citations
          + + Popularity
          + + Influence
          + + Impulse
          + + + + + + + + + + + + + + + + + + + + + + +
          + + + Citations + + {{resultLandingInfo.measure.citations}} +
          + + + Popularity + + {{resultLandingInfo.measure.popularity}} +
          + + + Influence + + {{resultLandingInfo.measure.influence}} +
          + + + Impulse + + {{resultLandingInfo.measure.impulse}} +
          +
          +
          + Chart +
          +
          +
          + Powered by + BIP! + BIP! +
        • +
        • 3
        • -
        • - 4 + +
        • +
          +
          + Stats +
          +
          + Chart +
          +
          +
          + Powered by + OpenAIRE UsageCounts +
    @@ -652,40 +737,36 @@ -
    -
    +
    -
    - +
    -
    Citations
    -
    Popularity
    -
    Influence
    -
    Downloads
    -
    Views
    +
    +
    +
    +
    +
    +
    +
    +
    Citations
    +
    Popularity
    +
    Influence
    +
    Downloads
    +
    Views
    -
    {{resultLandingInfo.measure.citations}}
    -
    {{resultLandingInfo.measure.popularity}}
    -
    {{resultLandingInfo.measure.influence}}
    -
    {{resultLandingInfo.measure.downloads}}
    -
    {{resultLandingInfo.measure.views}}
    +
    {{resultLandingInfo.measure.citations}}
    +
    {{resultLandingInfo.measure.popularity}}
    +
    {{resultLandingInfo.measure.influence}}
    +
    {{resultLandingInfo.measure.downloads}}
    +
    {{resultLandingInfo.measure.views}}
    -
    - +
    + Metrics badge
    @@ -721,7 +802,7 @@
    + (viewAllClicked)="viewAll=$event" (noCommunities)="noCommunities = true">
    diff --git a/utils/dataTransfer/transferData.module.ts b/utils/dataTransfer/transferData.module.ts index d78dd6d2..a8b6a44d 100644 --- a/utils/dataTransfer/transferData.module.ts +++ b/utils/dataTransfer/transferData.module.ts @@ -4,18 +4,18 @@ import {FormsModule} from '@angular/forms'; import {EGIDataTransferComponent} from "./transferData.component"; import {InputModule} from "../../sharedComponents/input/input.module"; import {AlertModalModule} from "../modal/alertModal.module"; +import {IconsModule} from '../icons/icons.module'; @NgModule({ imports: [ - CommonModule, FormsModule, InputModule, AlertModalModule - + CommonModule, FormsModule, InputModule, AlertModalModule, IconsModule ], declarations: [ EGIDataTransferComponent - ], + ], exports: [ EGIDataTransferComponent - ] + ] }) export class EGIDataTransferModule { } diff --git a/utils/icons/icons.ts b/utils/icons/icons.ts index 0c020ffa..c8786e9a 100644 --- a/utils/icons/icons.ts +++ b/utils/icons/icons.ts @@ -127,4 +127,19 @@ export const versions = { name: 'versions', data: ' ' } + +export const rocket = { + name: 'rocket', + data: '' +} + +export const fire = { + name: 'fire', + data: '' +} + +export const landmark = { + name: 'landmark', + data: '' +} /** Add new icon under this line to be sure that it will be added on preview */ From c58bc15a74ca36f928939fc787ce8eeb21ec0707 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 23 Jan 2023 16:19:00 +0200 Subject: [PATCH 011/140] progress on all landing page types --- .../dataProvider/dataProvider.component.html | 34 +++-- .../landing-utils/availableOn.component.ts | 6 +- .../landing-header.component.ts | 127 +++++++++++++----- .../landing-utils/parsingFunctions.class.ts | 4 +- .../landing-utils/showPublisher.component.ts | 7 +- .../organization/organization.component.html | 43 +++++- .../organization/organization.module.ts | 4 +- landingPages/project/project.component.html | 71 +++++++--- landingPages/project/project.module.ts | 4 +- .../result/resultLanding.component.html | 72 ++++------ landingPages/result/resultLanding.module.ts | 4 +- landingPages/result/resultLanding.service.ts | 1 - utils/altmetrics.component.ts | 9 +- utils/icons/icons.ts | 10 ++ 14 files changed, 259 insertions(+), 137 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index aa6ec280..12902252 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -4,7 +4,7 @@
    -
    +
  • -
    +
    -->
    @@ -70,8 +69,22 @@
    -
    + +
    @@ -99,18 +112,21 @@ [subTitle]="(dataProviderInfo.officialName && dataProviderInfo.title.name !== dataProviderInfo.officialName)?dataProviderInfo.officialName:null" [types]="dataProviderInfo.type ? [dataProviderInfo.type] : null" - [entityType]="getTypeName()"> + [entityType]="getTypeName()" + [compatibility]="dataProviderInfo.compatibility" [aggregationStatus]="dataProviderInfo.aggregationStatus" + [thematic]="dataProviderInfo.thematic" [type]="type"> -
    + +
    - - + {{sliceString(availableOn[0].downloadNames.join("; "), 20)}} @@ -26,7 +26,7 @@ declare var UIkit;
    - +
    diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index d68d6d12..a7ddf8ba 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -2,6 +2,7 @@ import {Component, Input} from "@angular/core"; import {EnvProperties} from "../../../utils/properties/env-properties"; import {Author} from "../../../utils/result-preview/result-preview"; import {AlertModal} from "../../../utils/modal/alert"; +import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchFields"; @Component({ selector: 'landing-header', @@ -14,6 +15,23 @@ import {AlertModal} from "../../../utils/modal/alert";
    + + + + + + + Open Access Mandate for {{openaireEntities.PUBLICATIONS}} and {{openaireEntities.DATASETS}} + + + Open Access Mandate for {{openaireEntities.PUBLICATIONS}} + + + Open Access Mandate for {{openaireEntities.DATASETS}} + + + + @@ -32,35 +50,41 @@ import {AlertModal} from "../../../utils/modal/alert"; {{removeUnknown(types, true).join(' , ')}} - - - {{' . '}} - - - {{'from '}} - - - {{'until '}} - - - {{startDate | date: 'yyyy'}} - - - {{' - '}} - - - {{endDate | date: 'yyyy'}} - - - - {{' . ' + status}} - - - {{' . ' + year}} - - - . Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}} - + + + + From + {{startDate | date: 'dd MMM yyyy'}} + + + + Until + {{endDate | date: 'dd MMM yyyy'}} + + + + + {{startDate | date: 'dd MMM yyyy'}} + (Started) + + - + + {{endDate | date: 'dd MMM yyyy'}} + {{currentDate >= endDate ? '(Ended)' : '(Ending)'}} + + + + + {{status}} + + + + {{date | date: 'dd MMM yyyy': 'UTC'}} + + + + Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}} + . - + + + + + + + + {{compatibility.info}} + {{compatibility.name}} + + + {{compatibility.info}} + + {{compatibility.info}} in OpenAIRE + + + + {{compatibility.name}} + + + + + + OpenAIRE Text Mining + + + + Thematic +
    @@ -95,8 +148,11 @@ export class LandingHeaderComponent { @Input() types: string[]; @Input() startDate: number; // project landing @Input() endDate: number; // project landing + @Input() currentDate: number; // project landing @Input() status: string; // project landing - @Input() year: string; + @Input() openAccessMandatePublications: boolean // project landing + @Input() openAccessMandateDatasets: boolean // project landing + @Input() date: Date; @Input() embargoEndDate: Date; @Input() title: string; @Input() subTitle: string; @@ -109,10 +165,15 @@ export class LandingHeaderComponent { @Input() isTitleH1:boolean =true; @Input() isSticky: boolean = false; @Input() publisher; // showPublisher component - @Input() publishDate: Date; // showPublisher component @Input() journal; // showPublisher component @Input() languages; @Input() programmingLanguages; + @Input() compatibility; // data provider landing + @Input() aggregationStatus; // data provider landing + @Input() thematic: boolean; // data provider landing + @Input() type; // data provider landing + + public openaireEntities = OpenaireEntities; public removeUnknown(array: string[], type: boolean = false): string[] { if (type) { diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index 23592e3f..0111e941 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -20,8 +20,8 @@ export class ParsingFunctions { private notebook_label: string = "EOSC"; private notebook_value: string = "EOSC Jupyter Notebook"; - public open = 'lock_open'; - public closed = 'lock'; + public open = 'open_access'; + public closed = 'closed_access'; public unknown = 'question_mark'; private instanceWithDoiExists: boolean = false; diff --git a/landingPages/landing-utils/showPublisher.component.ts b/landingPages/landing-utils/showPublisher.component.ts index 08e86591..5aaf623c 100644 --- a/landingPages/landing-utils/showPublisher.component.ts +++ b/landingPages/landing-utils/showPublisher.component.ts @@ -4,12 +4,8 @@ import {EnvProperties} from "../../utils/properties/env-properties"; @Component({ selector: 'showPublisher, [showPublisher]', template: ` - - - - {{publishDate | date: 'dd MMM yyyy' : 'UTC'}} - @@ -77,7 +73,6 @@ import {EnvProperties} from "../../utils/properties/env-properties"; ` }) export class ShowPublisherComponent { - @Input() publishDate: Date; @Input() publisher; @Input() journal; //@Input() sherpaUrl = 'http://www.sherpa.ac.uk/romeo/search.php?issn='; diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index 95cdc3f7..0a1502fc 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -3,13 +3,12 @@
    -
    +
  • @@ -18,7 +17,6 @@
  • -
  • @@ -31,7 +29,8 @@
  • -
    +
    --> +
    @@ -63,11 +62,43 @@
    +
    + + +
    @@ -100,12 +131,12 @@ - + -
    +
  • -
  • @@ -57,7 +55,6 @@ -
  • -
    +
    -->
    @@ -109,6 +106,45 @@
    + + +
    @@ -171,12 +207,14 @@ + [startDate]="projectInfo.startDate" [endDate]="projectInfo.endDate" + [currentDate]="projectInfo.currentDate" [status]="projectInfo.status" + [openAccessMandatePublications]="projectInfo.openAccessMandatePublications" + [openAccessMandateDatasets]="projectInfo.openAccessMandateDatasets"> -
    + + - - - - -
    +
    -->
    @@ -245,13 +278,13 @@
    -
    + +
    {{projectInfo.urlInfo}} diff --git a/landingPages/project/project.module.ts b/landingPages/project/project.module.ts index 496a07af..5e4c6762 100644 --- a/landingPages/project/project.module.ts +++ b/landingPages/project/project.module.ts @@ -31,7 +31,7 @@ import {LoadingModule} from "../../utils/loading/loading.module"; import {IconsModule} from "../../utils/icons/icons.module"; import {InputModule} from "../../sharedComponents/input/input.module"; import {IconsService} from "../../utils/icons/icons.service"; -import {graph, link} from "../../utils/icons/icons"; +import {graph, link, link_to, open_access} from "../../utils/icons/icons"; @NgModule({ imports: [ @@ -55,6 +55,6 @@ import {graph, link} from "../../utils/icons/icons"; }) export class ProjectModule { constructor(private iconsService: IconsService) { - this.iconsService.registerIcons([link, graph]) + this.iconsService.registerIcons([link, graph, link_to, open_access]) } } diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index e91edbdf..b23d4e7b 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -217,10 +217,9 @@ [authors]="resultLandingInfo.authors" [underCuration]="resultLandingInfo.underCurationMessage" [entityType]="getTypeName()" [types]="resultLandingInfo.types" - [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate" - [publisher]="resultLandingInfo.publisher" [publishDate]="resultLandingInfo.dateofacceptance" - [journal]="resultLandingInfo.journal" [languages]="resultLandingInfo.languages" - [programmingLanguages]="resultLandingInfo.programmingLanguages"> + [date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate" + [publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal" + [languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages"> @@ -271,7 +270,7 @@ [authors]="resultLandingInfo.authors" [underCuration]="resultLandingInfo.underCurationMessage" [entityType]="getTypeName()" [types]="resultLandingInfo.types" - [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate" + [date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate" isSticky="true"> @@ -292,8 +291,7 @@ [tabTitle]="'Enermaps Tool'" [tabId]="'enermaps'" customClass="portalTab"> - - @@ -452,7 +450,7 @@
    - +
    -
    -
    -
    -
    - Altmetric -
    - Social by - Altmetric -
    -
    - - - - - - - - - - - -
    - Facebook - - 1 -
    - Twitter - - 4 -
    -
    -
    +
    +
    @@ -671,8 +639,8 @@
    -
  • - 3 +
  • +
  • @@ -680,8 +648,16 @@
    Stats
    -
    - Chart +
    +
    + + +
    +
    + +
    @@ -747,21 +723,21 @@
    -
    +
    Citations
    Popularity
    Influence
    Downloads
    -
    Views
    +
    Views
    {{resultLandingInfo.measure.citations}}
    {{resultLandingInfo.measure.popularity}}
    {{resultLandingInfo.measure.influence}}
    {{resultLandingInfo.measure.downloads}}
    -
    {{resultLandingInfo.measure.views}}
    +
    {{resultLandingInfo.measure.views}}
  • diff --git a/landingPages/result/resultLanding.module.ts b/landingPages/result/resultLanding.module.ts index 6620f0e6..32743312 100644 --- a/landingPages/result/resultLanding.module.ts +++ b/landingPages/result/resultLanding.module.ts @@ -33,7 +33,7 @@ import {MatFormFieldModule} from "@angular/material/form-field"; import {MatSelectModule} from "@angular/material/select"; import {IconsModule} from "../../utils/icons/icons.module"; import {IconsService} from "../../utils/icons/icons.service"; -import {graph, link, quotes, cite, link_to, versions, rocket, fire, landmark} from "../../utils/icons/icons"; +import {graph, link, quotes, cite, link_to, versions, rocket, fire, landmark, open_access, closed_access} from "../../utils/icons/icons"; import {InputModule} from "../../sharedComponents/input/input.module"; import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module"; @@ -58,6 +58,6 @@ import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.modul }) export class ResultLandingModule { constructor(private iconsService: IconsService) { - this.iconsService.registerIcons([link, graph, quotes, cite, link_to, versions, rocket, fire, landmark]) + this.iconsService.registerIcons([link, graph, quotes, cite, link_to, versions, rocket, fire, landmark, open_access, closed_access]) } } diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index 26c2ff25..72212d64 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -127,7 +127,6 @@ export class ResultLandingService { parseResultLandingInfo (data: any, subjectsVocabulary: any, properties: EnvProperties): any { this.resultLandingInfo = new ResultLandingInfo(); - // res this.resultLandingInfo.record = data[15]; this.resultLandingInfo.objIdentifier = data[15]["result"]["header"]["dri:objIdentifier"]; diff --git a/utils/altmetrics.component.ts b/utils/altmetrics.component.ts index 71104099..ceab92dd 100644 --- a/utils/altmetrics.component.ts +++ b/utils/altmetrics.component.ts @@ -6,12 +6,13 @@ declare var loadAltmetrics:any; @Component({ selector: 'altmetrics', template: ` -
    +
    ` }) export class AltMetricsComponent { - @Input() id ; + @Input() id; @Input() type = 'doi'; // doi or arxiv + @Input() size: string = 'donut'; // public doi="10.7717/peerj.1150"; public altmetrics:string; @@ -26,9 +27,9 @@ export class AltMetricsComponent { ngOnInit() { this.sub = this.route.queryParams.subscribe(data => { if(this.type == "doi"){ - this.altmetrics='
    '; + this.altmetrics='
    '; }else{ - this.altmetrics='
    '; + this.altmetrics='
    '; } if (typeof document !== 'undefined') { // let yourModule = require('../utils/altmetrics.js'); diff --git a/utils/icons/icons.ts b/utils/icons/icons.ts index c8786e9a..686cabfa 100644 --- a/utils/icons/icons.ts +++ b/utils/icons/icons.ts @@ -142,4 +142,14 @@ export const landmark = { name: 'landmark', data: '' } + +export const open_access = { + name: 'open_access', + data: ' image/svg+xml art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos Open Access logo, converted into svg, designed by PLoS. This version with transparent background. http://commons.wikimedia.org/wiki/File:Open_Access_logo_PLoS_white.svg art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos http://www.plos.org/ ' +} + +export const closed_access = { + name: 'closed_access', + data: ' image/svg+xml Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao Closed Access logo, derived from PLoS Open Access logo. This version with transparent background. http://commons.wikimedia.org/wiki/File:Closed_Access_logo_transparent.svg Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao ' +} /** Add new icon under this line to be sure that it will be added on preview */ From 0a519c667a6286a0bedb528ef4741c53ba5c3532 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Tue, 24 Jan 2023 15:32:58 +0200 Subject: [PATCH 012/140] start on result landing mobile redesign --- .../dataProvider/dataProvider.component.html | 851 +++++++++--------- landingPages/landing-utils/fos.component.ts | 65 +- .../landing-header.component.ts | 6 +- landingPages/landing-utils/sdg.component.ts | 74 +- .../result/resultLanding.component.html | 196 +++- 5 files changed, 676 insertions(+), 516 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 12902252..3ad5742f 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -6,13 +6,13 @@
    -
    - -
    - -
    -
    - - -
    - -
    - - - Powered by - OpenAIRE Research Graph - - - . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} - -
    - -
    - See an issue? - Report it here -
    -
    -
    - -
    - -
    - -
    -
    -
    - + +
    +
    + +
    +
    -
    - -
    - -
    - - - -
    -
    + + +
    + +
    + + + Powered by + OpenAIRE Research Graph + + + . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} + +
    + +
    + See an issue? + Report it here +
    +
    +
    + +
    + +
    + +
    + - -
    -
    - - - - - - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    - No summary information available -
    -
    -
    - -
    -
    -
    Description
    -
    -
    -
    - +
    + +
    + +
    + + + + + + + + + + + + + + + + + + +
    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    + No summary information available +
    +
    +
    + +
    +
    +
    Description
    +
    +
    +
    + +
    +
    + +
      + +
    + +
    + +
    Collected full-texts
    + {{dataProviderInfo.aggregationStatus.fulltexts | number}} +
    + +
    Results with funding information
    + {{dataProviderInfo.fundedContent | number}} +
    +
    + + +
    +
    Countries
    + {{dataProviderInfo.countries.join(", ")}} +
    + +
    +
    Jurisdiction
    + {{dataProviderInfo.jurisdiction}} +
    + +
    +
    Content policy
    + {{dataProviderInfo.contentpolicy}} +
    + + +
    +
    +
    Subjects
    + {{dataProviderInfo.subjects.slice(0, lessBtnSubjects ? dataProviderInfo.subjects.length : thresholdSubjects).join(", ")}} + ... +
    + -
    -
    - -
      - -
    - -
    - -
    Collected full-texts
    - {{dataProviderInfo.aggregationStatus.fulltexts | number}} -
    - -
    Results with funding information
    - {{dataProviderInfo.fundedContent | number}} -
    -
    - - -
    -
    Countries
    - {{dataProviderInfo.countries.join(", ")}} -
    - -
    -
    Jurisdiction
    - {{dataProviderInfo.jurisdiction}} -
    - -
    -
    Content policy
    - {{dataProviderInfo.contentpolicy}} -
    - - -
    -
    -
    Subjects
    - {{dataProviderInfo.subjects.slice(0, lessBtnSubjects ? dataProviderInfo.subjects.length : thresholdSubjects).join(", ")}} - ... -
    - - -
    - -
    -
    -
    -
    - -
    -
    Detailed information @
    - - - {{provenance}} - - - {{provenance}} - - [{{i}}] - - - , - -
    -
    - -
    -
    -
    -
    - - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    - - -
    -
    - - - -
    -
    Statistics
    - -
    - - -
    -
    -
    -
    -
    - - -
    + +
    + +
    +
    +
    +
    + +
    +
    Detailed information @
    + + + {{provenance}} + + + {{provenance}} + + [{{i}}] + + + , + +
    +
    + +
    +
    +
    +
    + + + +
    + + +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + + + +
    +
    Statistics
    + +
    + + +
    +
    +
    +
    +
    + + +
    +
    @@ -487,8 +490,8 @@ [attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'" [title]="organization.name"> + [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" + [routerLink]="properties.searchLinkToOrganization.split('?')[0]"> {{(organization.acronym) ? organization.acronym : ''}} {{(!organization.acronym && organization.name) ? organization.name : ''}} diff --git a/landingPages/landing-utils/fos.component.ts b/landingPages/landing-utils/fos.component.ts index 7bdbc318..0e893ba0 100644 --- a/landingPages/landing-utils/fos.component.ts +++ b/landingPages/landing-utils/fos.component.ts @@ -6,29 +6,46 @@ import {StringUtils} from "../../utils/string-utils.class"; @Component({ selector: 'fos', template: ` -
    Beta
    -
    - - - {{title}} - - {{title}} - - - View all & suggest - - Feedback -
    - +
    +
    Beta
    +
    + + + {{title}} + + {{title}} + + + View all & suggest + + Feedback +
    + +
    +
    +
    +
    + Fields of Science (FOS) +
    + +
    +
    ` }) @@ -38,7 +55,7 @@ export class FosComponent { @Output() viewAllClicked = new EventEmitter(); @Output() feedbackClicked = new EventEmitter(); public lessBtn: boolean = false; - public threshold: number = 2; + public threshold: number = 3; // was 2 public routerHelper: RouterHelper = new RouterHelper(); public properties = properties; public title: string = "Fields of Science"; diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index a7ddf8ba..5cac5a41 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -14,7 +14,7 @@ import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchF
    -
    +
    @@ -42,8 +42,8 @@ import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchF - {{entityType}} - + {{entityType}} + diff --git a/landingPages/landing-utils/sdg.component.ts b/landingPages/landing-utils/sdg.component.ts index 01ff2d60..368b0c04 100644 --- a/landingPages/landing-utils/sdg.component.ts +++ b/landingPages/landing-utils/sdg.component.ts @@ -6,34 +6,52 @@ import {StringUtils} from "../../utils/string-utils.class"; @Component({ selector: 'sdg', template: ` -
    Beta
    -
    - - - {{title}} - - {{title}} - - - View all & suggest - Feedback -
    - -
    - sdg_colors - -
    +
    +
    Beta
    +
    + + + {{title}} + + {{title}} + + + View all & suggest + Feedback +
    +
    + sdg_colors + +
    +
    +
    +
    + sdg_colors + SDGs: + + +
    +
    ` }) diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index b23d4e7b..560305a3 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -1,4 +1,5 @@ -
    + +
    @@ -6,14 +7,14 @@ + [searchActionRoute]="properties.searchLinkToResults">
    @@ -256,13 +257,13 @@ + [publishDate]="resultLandingInfo.dateofacceptance" + [journal]="resultLandingInfo.journal" [properties]="properties" class="uk-margin-small-top">
    -->
    + uk-sticky="bottom: true; media: @m" [attr.offset]="offset">
    - +
    + class="uk-margin-medium-bottom uk-width-2-3@m">
    Related {{openaireEntities.ORGANIZATIONS}}
    + class="uk-text-center"> View all @@ -371,8 +372,8 @@ [{{getReferenceIdName(id)}} OpenAIRE] + [queryParams]="{id: id.value}" + target="_blank">OpenAIRE]

    @@ -401,12 +402,12 @@ *ngFor="let keyIn of keysToArray(resultLandingInfo.bioentities.get(key)).slice((bioentitiesPage-1)*2*pageSize, bioentitiesPage*2*pageSize)"> @@ -442,7 +443,7 @@ {{word}} {{word}} + target="_blank" [href]="word">{{word}} @@ -670,7 +671,6 @@
    - @@ -681,7 +681,7 @@
    + [class.uk-animation-right]="viewAll">
    @@ -694,8 +694,8 @@
    + class="uk-offcanvas-switcher uk-flex uk-flex-center uk-flex-middle uk-hidden@m" + (click)="rightSidebarOffcanvasClicked = true;">
    @@ -749,14 +749,14 @@
    + && (!viewAll || viewAll=='egiNotebook')">
    Compatible EOSC Services
    eosc_logo + loading="lazy" alt="eosc_logo" style="width:27px; height:27px">
    {{subject.value}} @@ -793,9 +793,131 @@ [properties]="properties" [entityType]="getTypeName()" [fields]="feedbackFields" [(showForm)]="showFeedback" [preSelectedField]="feedbackPreSelectedField">
    + + +
    +
    +
    + + {{resultLandingInfo.hostedBy_collectedFrom[0].accessRight}} +
    + + +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    +
    +
    + +
    + Summary + +
    +
    +
    + +
    + References + +
    +
    +
    + +
    + Related Research + +
    +
    +
    + +
    + External Databases + +
    +
    +
    + +
    + Enermaps Tool + +
    +
    +
    + +
    + Compatible EOSC Services + +
    +
    + +
    + Funded by + +
    +
    +
    + +
    + Related to Research Communities + +
    +
    +
    +
    +
    + +
    + + #AlertModalDeletedByInference large="true"> + #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle"> @@ -854,9 +976,9 @@ class="uk-margin-bottom">
    {{header}}
    + input type="select" placeholder="Filter by relation" inputClass="flat x-small" + [options]="relatedClassFilters" [(value)]="relatedClassSelected" + (valueChange)="relatedClassChanged()">
    Date: Fri, 27 Jan 2023 14:42:09 +0200 Subject: [PATCH 013/140] Change my-tabs with new class landing-tab --- utils/tabs/tabs.component.ts | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/utils/tabs/tabs.component.ts b/utils/tabs/tabs.component.ts index 694be03d..bedd3cf7 100644 --- a/utils/tabs/tabs.component.ts +++ b/utils/tabs/tabs.component.ts @@ -16,8 +16,8 @@ import {TabComponent} from './tab.component'; @Component({ selector: 'my-tabs', template: ` -
    -
    +
    +
    @@ -50,7 +50,7 @@ import {TabComponent} from './tab.component';
    - --> -
    - -
    +
    + + +
    + +
    + + + Powered by + OpenAIRE Research Graph + + + . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} + +
    + +
    + See an issue? + Report it here +
    +
    + + +
    + +
    + +
    +
    @@ -45,33 +72,7 @@
    - -
    - -
    - - - Powered by - OpenAIRE Research Graph - - - . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} - -
    - -
    - See an issue? - Report it here -
    -
    -
    - -
    - -
    - -
    +
    @@ -86,7 +87,7 @@
    -
    +
    @@ -184,8 +185,7 @@
    diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index 0a1502fc..182e7bb5 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -32,18 +32,11 @@
    --> -
    -
    - -
    - -
    -
    +
    -
    +
    @@ -63,196 +56,206 @@
    -
    +
    - -
    -
    -
    -
    - - - - - View all {{organizationInfo.deletedByInferenceIds.length}} versions - - - - - - - - Share - - - - Download - + - -
    - - -
    - - - - -
    -
    - + + +
    + + + + + - - - - - - - - - -
    - - - -
    - Country: {{organizationInfo.country}} -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    - -
    - - - - -
    + +
    +
    + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    + + + + +
    +
    +
    diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index 2762502d..265c6b80 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -71,17 +71,10 @@
    --> -
    -
    - -
    - -
    -
    +
    -
    +
    @@ -101,423 +94,463 @@
    -
    +
    - -
    -
    -
    -
    - - - - Link to - - - - Share - - - - Deposit - - - - Embed - - - - Download - +
    + +
    + +
    + +
    +
    + + + -
    - -
    - -
    - - - -
    - - - - -
    - - - - - + +
    + +
    +
    +
    + + + + + + + + + + + +
    +
    +
    + + Funder: + {{projectInfo.funding.funderName}} + + + Project code: + {{projectInfo.funding.code}} + + + Call for proposal: + {{projectInfo.funding.callIdentifier}} + +
    +
    + + Funded under: + {{projectInfo.funding.fundingStream}} + + + Overall Budget: + {{projectInfo.funding.budget | number}} + {{projectInfo.funding.currency}} + + + Funder Contribution: + {{projectInfo.funding.contribution | number}} + {{projectInfo.funding.currency}} + +
    +
    + + + +
    +
    Open Access mandate
    +
    + + {{openaireEntities.PUBLICATIONS}}: + No + + + {{openaireEntities.DATASETS}}: + No + +
    +
    +
    +
    +
    + +
    - - - - - - - -
    -
    -
    - - Funder: - {{projectInfo.funding.funderName}} - - - Project code: - {{projectInfo.funding.code}} - - - Call for proposal: - {{projectInfo.funding.callIdentifier}} - -
    -
    - - Funded under: - {{projectInfo.funding.fundingStream}} - - - Overall Budget: - {{projectInfo.funding.budget | number}} - {{projectInfo.funding.currency}} - - - Funder Contribution: - {{projectInfo.funding.contribution | number}} - {{projectInfo.funding.currency}} - -
    -
    - - - -
    -
    Open Access mandate
    -
    - - {{openaireEntities.PUBLICATIONS}}: - No - - - {{openaireEntities.DATASETS}}: - No - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    -
    - No summary information available -
    -
    -
    - -
    -
    -
    Description
    -
    -
    -
    -
    - - View more - + +
    +
    + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + No summary information available +
    +
    +
    + +
    +
    +
    Description
    +
    +
    +
    +
    -
    -
    -
    -
    -
    - -
    Partners
    -
    - - -
    - View less -
    -
    -
    -
    -
    -
    -
    -
    +
    +
    +
    +
    + +
    Partners
    +
    + + +
    + View less +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + + +
    +
    + + +
    + + +
    +
    + +
    + + +
    +
    + +
    + + +
    +
    + + + + +
    +
    Statistics
    + +
    +
    +
    +
    Produced + {{openaireEntities.RESULTS}} per year +
    + +
    +
    +
    +
    +
    Access mode of + {{openaireEntities.RESULTS}} +
    + +
    +
    +
    +
    +
    + {{openaireEntities.RESULTS}} per datasource +
    + +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    - -
    - - -
    -
    - - -
    - - -
    -
    - -
    - - -
    -
    - -
    - - -
    -
    - - - - -
    -
    Statistics
    - -
    -
    -
    -
    Produced - {{openaireEntities.RESULTS}} per year -
    - -
    -
    -
    -
    -
    Access mode of - {{openaireEntities.RESULTS}} -
    - -
    -
    -
    -
    -
    - {{openaireEntities.RESULTS}} per datasource -
    - -
    -
    -
    -
    -
    -
    - -
    - - -
    diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 560305a3..e336fcdd 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -68,17 +68,10 @@
    --> -
    -
    - -
    - -
    -
    +
    -
    +
    @@ -98,583 +91,595 @@
    -
    - -
    -
    -
    -
    - - - - - - - View all {{resultLandingInfo.deletedByInferenceIds.length}} versions - - - - - - - - Link to - - - - Share - - - - Cite - - - - - - - - + - -
    - - - -
    - - - - -
    - -
    - + +
    + + + +
    + + + + +
    + + + +
    + - + - + +
    + + + +
    + + +
    +
    + +
    - - - - - -
    - - -
    -
    - + + + + + + + +
    + +
    + +
    + + +
    - - - - - - - -
    - -
    - -
    - - - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - -
    -
    - -
    - -
    -
    -
    - No summary information available -
    -
    -
    - -
    -
    -
    Abstract
    -
    -
    -
    - -
    -
    -
    -
    - {{(resultLandingInfo.countries.length === 1) ? 'Country ' : 'Countries '}} -
    -
    - {{resultLandingInfo.countries.join(", ")}} + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + +
    +
    +
    + No summary information available
    -
    - - -
    - -
    -
    Related {{openaireEntities.ORGANIZATIONS}}
    - - -
    - View less -
    -
    -
    -
    - - -
    - - -
    -

    - {{item.name}} - - - [{{getReferenceIdName(id)}} - OpenAIRE] - - -

    -
    - - -
    -
    - - - - -
    - - -
    - - -
    -
    - {{keyIn}} -
    - - {{keyIn}} - -
    -
    -
    -
    - - -
    -
    - -
    -
    - Enermaps tool preview - -
    -
      - -
    • - {{detail[0]}}: - - - {{word}} - {{word}} - - -
    • -
      -
    -
    -
    - -
    - -
      - -
    • -
      -
      -
      -
      -
      - BIP! -
      - Impact by - BIP! -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - Citations - - {{resultLandingInfo.measure.citations}} -
      - - - Popularity - - {{resultLandingInfo.measure.popularity}} -
      - - - Influence - - {{resultLandingInfo.measure.influence}} -
      - - - Impulse - - {{resultLandingInfo.measure.impulse}} -
      -
      +
      + +
      +
      +
      Abstract
      +
      +
      -
      -
      - -
      -
      -
      -
      -
      - OpenAIRE UsageCounts -
      - Usage by - UsageCounts -
      -
      - - - - - - - - - - - - - -
      - - - Downloads - - {{resultLandingInfo.measure.downloads}} -
      - - - Views - - {{resultLandingInfo.measure.views}} -
      -
      +
      -
    • - -
    • -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - Citations - - {{resultLandingInfo.measure.citations}} -
      - - - Popularity - - {{resultLandingInfo.measure.popularity}} -
      - - - Influence - - {{resultLandingInfo.measure.influence}} -
      - - - Impulse - - {{resultLandingInfo.measure.impulse}} -
      +
      +
      + {{(resultLandingInfo.countries.length === 1) ? 'Country ' : 'Countries '}}
      -
      - Chart -
      -
      -
      - Powered by - BIP! - BIP! -
      -
    • - -
    • - -
    • - -
    • -
      - Stats -
      -
      -
      - - -
      -
      - -
      + {{resultLandingInfo.countries.join(", ")}}
      -
      - Powered by - OpenAIRE UsageCounts +
      + +
      -
    • -
    -
    -
    -
    -
    - - -
    + +
    +
    Related {{openaireEntities.ORGANIZATIONS}}
    + + +
    + View less +
    +
    +
    +
    +
    + +
    + + +
    +

    + {{item.name}} + + + [{{getReferenceIdName(id)}} + OpenAIRE] + + +

    +
    + + +
    +
    + + + + +
    + + +
    + + +
    +
    + {{keyIn}} +
    + + {{keyIn}} + +
    +
    +
    +
    + + +
    +
    + +
    +
    + Enermaps tool preview + +
    +
      + +
    • + {{detail[0]}}: + + + {{word}} + {{word}} + + +
    • +
      +
    +
    +
    + +
    + +
      + +
    • +
      +
      +
      +
      +
      + BIP! +
      + Impact by + BIP! +
      +
      + + + + + + + + + + + + + + + + + + + + + + + +
      + + + Citations + + {{resultLandingInfo.measure.citations}} +
      + + + Popularity + + {{resultLandingInfo.measure.popularity}} +
      + + + Influence + + {{resultLandingInfo.measure.influence}} +
      + + + Impulse + + {{resultLandingInfo.measure.impulse}} +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      + OpenAIRE UsageCounts +
      + Usage by + UsageCounts +
      +
      + + + + + + + + + + + + + +
      + + + Downloads + + {{resultLandingInfo.measure.downloads}} +
      + + + Views + + {{resultLandingInfo.measure.views}} +
      +
      +
      +
      +
      +
    • + +
    • +
      +
      + + + + + + + + + + + + + + + + + + + + + + + +
      + + + Citations + + {{resultLandingInfo.measure.citations}} +
      + + + Popularity + + {{resultLandingInfo.measure.popularity}} +
      + + + Influence + + {{resultLandingInfo.measure.influence}} +
      + + + Impulse + + {{resultLandingInfo.measure.impulse}} +
      +
      +
      + +
      +
      +
      + Powered by + BIP! + BIP! +
      +
    • + +
    • + +
    • + +
    • +
      +
      + Stats +
      +
      +
      + + +
      +
      + +
      +
      +
      +
      + Powered by + OpenAIRE UsageCounts +
      +
    • +
    +
    +
    +
    +
    + + +
    +
    +
    diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index 4c5ab6a6..75ba17d1 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -72,6 +72,7 @@ export class ResultLandingComponent { public totalViews: number = null; public totalDownloads: number = null; public pageViews: number = null; + public bipFrameUrl: string; // Custom tab paging variables public referencesPage: number = 1; @@ -456,6 +457,7 @@ export class ResultLandingComponent { this.viewsFrameUrl = this.properties.statisticsFrameNewAPIURL + 'chart?json=' + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly views","type":"column","query":{"name":"usagestats.results.views.monthly", "parameters":["' + this.id + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Monthly views"},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":""}}}'); this.downloadsFrameUrl = this.properties.statisticsFrameNewAPIURL + 'chart?json=' + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly downloads","type":"column","query":{"name":"usagestats.results.downloads.monthly", "parameters":["' + this.id + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Monthly downloads"},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":""}}}'); + this.bipFrameUrl = this.properties.bipFrameAPIURL + this.id; let pid:Identifier = Identifier.getPIDFromIdentifiers(this.resultLandingInfo.identifiers); if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType this.updateUrlWithType(pid); diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index 72212d64..d8ff3308 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -428,8 +428,6 @@ export class ResultLandingService { this.resultLandingInfo.measure['influence'] = 'Top 1%'; } else if (data[0].measure[i].class == 'C4') { this.resultLandingInfo.measure['influence'] = 'Top 10%'; - } else if (data[0].measure[i].class == 'C5') { - this.resultLandingInfo.measure['influence'] = 'Average/low'; } else if (data[0].measure[i].class == 'A') { this.resultLandingInfo.measure['influence'] = 'Exceptional'; } else if (data[0].measure[i].class == 'B') { @@ -447,8 +445,6 @@ export class ResultLandingService { this.resultLandingInfo.measure['popularity'] = 'Top 1%'; } else if (data[0].measure[i].class == 'C4') { this.resultLandingInfo.measure['popularity'] = 'Top 10%'; - } else if (data[0].measure[i].class == 'C5') { - this.resultLandingInfo.measure['popularity'] = 'Average/low'; } else if (data[0].measure[i].class == 'A') { this.resultLandingInfo.measure['popularity'] = 'Exceptional'; } else if (data[0].measure[i].class == 'B') { @@ -469,8 +465,6 @@ export class ResultLandingService { this.resultLandingInfo.measure['impulse'] = 'Top 1%'; } else if (data[0].measure[i].class == 'C4') { this.resultLandingInfo.measure['impulse'] = 'Top 10%'; - } else if (data[0].measure[i].class == 'C5') { - this.resultLandingInfo.measure['impulse'] = 'Average/low'; } else if (data[0].measure[i].class == 'A') { this.resultLandingInfo.measure['impulse'] = 'Exceptional'; } else if (data[0].measure[i].class == 'B') { diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index e026e951..0b450eb7 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -213,8 +213,6 @@ export class SearchResearchResultsService { result.measure[3] = 'Top 1% in'; } else if (resData['measure'][i].class == 'C4') { result.measure[3] = 'Top 10% in'; - } else if (resData['measure'][i].class == 'C5') { - result.measure[3] = 'Average/low'; } else if (resData['measure'][i].class == 'A') { result.measure[3] = 'Exceptional'; } else if (resData['measure'][i].class == 'B') { @@ -233,8 +231,6 @@ export class SearchResearchResultsService { result.measure[2] = 'Top 1% in'; } else if (resData['measure'][i].class == 'C4') { result.measure[2] = 'Top 10% in'; - } else if (resData['measure'][i].class == 'C5') { - result.measure[2] = 'Average/low'; } else if (resData['measure'][i].class == 'A') { result.measure[2] = 'Exceptional'; } else if (resData['measure'][i].class == 'B') { diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts index f0f7aacf..a89f9d38 100644 --- a/utils/properties/env-properties.ts +++ b/utils/properties/env-properties.ts @@ -17,6 +17,7 @@ export interface EnvProperties { framesAPIURL?: string; statisticsFrameAPIURL?: string; statisticsFrameNewAPIURL?: string; + bipFrameAPIURL?: string; useNewStatistisTool?: boolean; useOldStatisticsSchema?: boolean; monitorStatsFrameUrl?:string; From 5c9470a959a08a12ff34e032b0d6f06e359d21e7 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 13 Feb 2023 15:51:15 +0200 Subject: [PATCH 015/140] fix for 'collected from' link that was not working, coloring of new access icons and bip/usage icons, metrics tabs and charts - all landing pages --- .../dataProvider/dataProvider.component.html | 288 +++++++++++----- .../dataProvider/dataProvider.component.ts | 36 +- .../landing-utils/availableOn.component.ts | 12 +- .../landing-header.component.ts | 25 +- .../landing-header/landing-header.module.ts | 3 +- landingPages/project/project.component.html | 131 +++++-- landingPages/project/project.component.ts | 36 +- .../result/resultLanding.component.html | 325 +++++++++--------- .../result/resultLanding.component.ts | 12 + landingPages/result/resultLanding.service.ts | 10 +- 10 files changed, 581 insertions(+), 297 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 2bd0a011..c1084fa7 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -79,7 +79,7 @@ - + Share
    @@ -90,93 +90,121 @@
    - - - -
    - -
    - - - - - - - - - + + +
    - {{country}} + + + + +
    - - - -
    - Thematic
    -
    -
    --> - - - - - -
    - + + + + + + + + + + + + + + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    Downloads
    +
    Views
    +
    +
    +
    {{totalDownloads | number}}
    +
    {{totalViews | number}}
    +
    +
    +
    +
    + Metrics badge +
    +
    +
    @@ -220,6 +248,9 @@ || fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)" [tabTitle]="'Related '+openaireEntities.DATASOURCES" [tabId]="'relatedDatasources'"> + + @@ -436,6 +467,93 @@
    + + +
    + +
      + +
    • +
      +
      +
      +
      + OpenAIRE UsageCounts +
      + Usage by + UsageCounts +
      +
      + + + + + + + + + + + + + +
      + + + Downloads + + {{totalDownloads | number}} +
      + + + Views + + {{totalViews | number}} +
      +
      +
      +
      +
    • + +
    • +
      +
      +
      +
      {{formatNumber(totalDownloads)}}
      +
      Downloads
      +
      +
      +
      {{formatNumber(totalViews)}}
      +
      Views
      +
      +
      + +
      + +
      +
      + + +
      +
      +
      +
      + Powered by + OpenAIRE UsageCounts +
      +
    • +
    +
    +
    diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts index c5df0b83..b11ba7c4 100644 --- a/landingPages/dataProvider/dataProvider.component.ts +++ b/landingPages/dataProvider/dataProvider.component.ts @@ -25,9 +25,11 @@ import {SearchResult} from "../../utils/entities/searchResult"; import {ResultPreview} from "../../utils/result-preview/result-preview"; import {IndexInfoService} from "../../utils/indexInfo.service"; import {properties} from "../../../../environments/environment"; -import {Subscriber} from "rxjs"; +import {Subscriber, Subscription, zip} from "rxjs"; import {TabComponent} from "../../utils/tabs/tab.component"; import {OpenaireEntities} from "../../utils/properties/searchFields"; +import {MetricsService} from '../../services/metrics.service'; +import {NumberUtils} from '../../utils/number-utils.class'; declare var ResizeObserver; @@ -63,7 +65,7 @@ export class DataProviderComponent { public downloadsFrameUrl: string; public totalViews: number; public totalDownloads: number; - public pageViews: number; + // public pageViews: number; // Statistics tab variables public statsClicked: boolean = false; @@ -141,6 +143,7 @@ export class DataProviderComponent { // public shouldSticky: boolean = true; subscriptions = []; + private sub: Subscription; properties: EnvProperties = properties; public openaireEntities = OpenaireEntities; @@ -157,6 +160,7 @@ export class DataProviderComponent { private helper: HelperService, private _location: Location, private indexInfoService: IndexInfoService, + private metricsService: MetricsService, private cdr: ChangeDetectorRef) { this.fetchPublications = new FetchResearchResults(this._searchResearchResultsService); this.fetchDatasets = new FetchResearchResults(this._searchResearchResultsService); @@ -210,6 +214,7 @@ export class DataProviderComponent { } }); } + this.getMetrics(); })); } @@ -665,11 +670,23 @@ export class DataProviderComponent { public metricsResults($event) { this.totalViews = $event.totalViews; this.totalDownloads = $event.totalDownloads; - this.pageViews = $event.pageViews; + // this.pageViews = $event.pageViews; } + private getMetrics() { + let obs; + obs = zip(this.metricsService.getMetricsNumber(this.datasourceId, "usagestats.views.repository.local", this.properties), + this.metricsService.getMetricsNumber(this.datasourceId, "usagestats.downloads.repository.local", this.properties)); + this.sub = obs.subscribe(data => { + console.log(data); + this.totalViews = data[0]; + this.totalDownloads = data[1]; + this.cdr.detectChanges(); + }); + } + public get hasMetrics(): boolean { - return !(this.totalViews != null && this.totalDownloads != null && this.pageViews != null) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0; + return !(this.totalViews != null && this.totalDownloads != null) || this.totalViews > 0 || this.totalDownloads > 0; } // public openStatistics() { @@ -827,4 +844,15 @@ export class DataProviderComponent { this.descriptionModal.alertTitle = "Description"; this.descriptionModal.open(); } + + public clickedUsageMetrics() { + setTimeout( () => { + this.metricsClicked = true; + }); + } + + public formatNumber(num: number | string) { + let formatted = NumberUtils.roundNumber(+num); + return formatted.number + formatted.size; + } } diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 7a7c182c..edab04cb 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -11,9 +11,9 @@ declare var UIkit;
    - - + {{sliceString(availableOn[0].downloadNames.join("; "), 20)}} @@ -24,9 +24,9 @@ declare var UIkit;
    - - +
    @@ -63,7 +63,7 @@ declare var UIkit; - - + *ngIf="(openAccessMandatePublications != undefined && openAccessMandatePublications) || (openAccessMandateDatasets != undefined && openAccessMandateDatasets)"> + + @@ -38,25 +38,25 @@ import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchF + [flex]="true" [ratio]="0.8"> + [flex]="true" [ratio]="0.8"> + type="outlined" [flex]="true" [ratio]="0.8"> + [flex]="true" [ratio]="0.8"> + [flex]="true" [ratio]="0.8"> + [flex]="true" [ratio]="0.8"> + [flex]="true" [ratio]="0.8"> {{entityType}} - + {{removeUnknown(types, true).join(' , ')}} @@ -120,8 +120,7 @@ import {OpenaireEntities} from "src/app/openaireLibrary/utils/properties/searchF - - + diff --git a/landingPages/landing-utils/landing-header/landing-header.module.ts b/landingPages/landing-utils/landing-header/landing-header.module.ts index 069a17b5..6ae684c9 100644 --- a/landingPages/landing-utils/landing-header/landing-header.module.ts +++ b/landingPages/landing-utils/landing-header/landing-header.module.ts @@ -5,9 +5,10 @@ import {LandingModule} from "../landing.module"; import {ShowAuthorsModule} from "../../../utils/authors/showAuthors.module"; import {IconsModule} from "src/app/openaireLibrary/utils/icons/icons.module"; import {ShowPublisherModule} from "../showPublisher.module"; +import {RouterModule} from "@angular/router"; @NgModule({ - imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, ShowPublisherModule], + imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, ShowPublisherModule, RouterModule], declarations: [LandingHeaderComponent], exports: [LandingHeaderComponent] }) diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index 265c6b80..47104db2 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -152,7 +152,7 @@
    -
    +
    -
    - +
    + Metrics badge +
    +
    @@ -386,6 +384,9 @@ [tabTitle]="openaireEntities.OTHER" [tabNumber]="fetchOrps.searchUtils.totalResults" [tabId]="'other'"> + + @@ -500,6 +501,92 @@
    + +
    + +
      + +
    • +
      +
      +
      +
      + OpenAIRE UsageCounts +
      + Usage by + UsageCounts +
      +
      + + + + + + + + + + + + + +
      + + + Downloads + + {{totalDownloads | number}} +
      + + + Views + + {{totalViews | number}} +
      +
      +
      +
      +
    • + +
    • +
      +
      +
      +
      {{formatNumber(totalDownloads)}}
      +
      Downloads
      +
      +
      +
      {{formatNumber(totalViews)}}
      +
      Views
      +
      +
      + +
      + +
      +
      + + +
      +
      +
      +
      + Powered by + OpenAIRE UsageCounts +
      +
    • +
    +
    +
    diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index 56622846..d3fc955b 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -25,10 +25,12 @@ import {StringUtils} from "../../utils/string-utils.class"; import {ResultPreview} from "../../utils/result-preview/result-preview"; import {SearchResult} from "../../utils/entities/searchResult"; import {IndexInfoService} from "../../utils/indexInfo.service"; -import {Subscriber} from "rxjs"; +import {Subscriber, zip, Subscription} from "rxjs"; import {properties} from "../../../../environments/environment"; import {Option} from "../../sharedComponents/input/input.component"; import {OpenaireEntities} from "../../utils/properties/searchFields"; +import {MetricsService} from '../../services/metrics.service'; +import {NumberUtils} from '../../utils/number-utils.class'; declare var ResizeObserver; @@ -50,7 +52,7 @@ export class ProjectComponent { public downloadsFrameUrl: string; public totalViews: number; public totalDownloads: number; - public pageViews: number; + // public pageViews: number; // Statistics tab variables public statsClicked: boolean; @@ -160,6 +162,7 @@ export class ProjectComponent { // public shouldSticky: boolean = true; subscriptions = []; + private sub: Subscription; properties: EnvProperties; public openaireEntities = OpenaireEntities; @@ -176,6 +179,7 @@ export class ProjectComponent { private _reportsService: ReportsService, private htmlService: HtmlProjectReportService, private indexInfoService: IndexInfoService, + private metricsService: MetricsService, private cdr: ChangeDetectorRef) {} ngOnInit() { @@ -230,6 +234,8 @@ export class ProjectComponent { this.downloadURLAPI = this.properties.csvAPIURL; this.createClipboard(); + + this.getMetrics(); })); } @@ -552,11 +558,22 @@ export class ProjectComponent { public metricsResults($event) { this.totalViews = $event.totalViews; this.totalDownloads = $event.totalDownloads; - this.pageViews = $event.pageViews; + // this.pageViews = $event.pageViews; } + private getMetrics() { + let obs; + obs = zip(this.metricsService.getMetricsNumber(this.projectId, "usagestats.projects.views", this.properties), + this.metricsService.getMetricsNumber(this.projectId, "usagestats.projects.downloads", this.properties)); + this.sub = obs.subscribe(data => { + this.totalViews = data[0]; + this.totalDownloads = data[1]; + this.cdr.detectChanges(); + }); + } + public get hasMetrics(): boolean { - return !(this.totalViews != null && this.totalDownloads != null && this.pageViews != null) || this.totalViews > 0 || this.totalDownloads > 0||this.pageViews > 0; + return !(this.totalViews != null && this.totalDownloads != null) || this.totalViews > 0 || this.totalDownloads > 0; } public viewAllOrganizationsClick() { @@ -961,4 +978,15 @@ export class ProjectComponent { this.descriptionModal.alertTitle = "Description"; this.descriptionModal.open(); } + + public clickedUsageMetrics() { + setTimeout( () => { + this.metricsClicked = true; + }); + } + + public formatNumber(num: number | string) { + let formatted = NumberUtils.roundNumber(+num); + return formatted.number + formatted.size; + } } diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index e336fcdd..1fd5e19a 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -115,7 +115,7 @@ - + View all {{resultLandingInfo.deletedByInferenceIds.length}} versions @@ -127,17 +127,17 @@ [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder"> - + Link to - + Share - + Cite @@ -464,14 +464,14 @@ Social
  • - Usage + Usage
  • - - -
  • -
    -
    -
    -
    {{formatNumber(totalDownloads)}}
    -
    Downloads
    -
    -
    -
    {{formatNumber(totalViews)}}
    -
    Views
    -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    - Powered by +
    +
    + + + + + + + + + + + + + +
    + + + Downloads + + {{formatNumber(totalDownloads)}} +
    + + + Views + + {{formatNumber(totalViews)}} +
    +
    +
  • +
    + + +
  • +
    +
    +
    +
    {{formatNumber(totalDownloads)}}
    +
    Downloads
    +
    +
    +
    {{formatNumber(totalViews)}}
    +
    Views
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    + Powered by OpenAIRE UsageCounts -
    -
  • - -
    +
    + + +
    diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index 97ef4895..20e85f19 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -38,7 +38,7 @@ export class ParsingFunctions { public open = 'open_access'; public closed = 'closed_access'; - public unknown = 'question_mark'; + // public unknown = 'question_mark'; private instanceWithDoiExists: boolean = false; @@ -194,7 +194,7 @@ export class ParsingFunctions { } available.downloadUrl = properties.doiURL + identifiers.get("doi")[0]; - available.accessRightIcon = this.unknown; + // available.accessRightIcon = this.unknown; /* if(title != undefined && title['url'] == "") { title['url'] = url; @@ -355,14 +355,17 @@ export class ParsingFunctions { if (available.accessRight) { if (available.accessRight.toLowerCase().indexOf('open') !== -1) { available.accessRightIcon = this.open; - } else if (available.accessRight.toLowerCase().indexOf('not available') !== -1) { - available.accessRightIcon = this.unknown; - } else { + } + // else if (available.accessRight.toLowerCase().indexOf('not available') !== -1) { + // available.accessRightIcon = this.unknown; + // } + else { available.accessRightIcon = this.closed; } - } else { - available.accessRightIcon = this.unknown; - } + } + // else { + // available.accessRightIcon = this.unknown; + // } if (instance.hasOwnProperty("license")) { available.license = Array.isArray(instance['license']) ? instance['license'][0] : instance['license']; diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index e170b407..4355125e 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -96,359 +96,359 @@
    + uk-sticky="bottom: true;" [attr.offset]="graph_offset">
    -
    +
    -
    - -
    - -
    -
    +
    + +
    + +
    +
    - - - -
    - -
    -
    -
    - - - - - - - - - - - -
    -
    -
    - - Funder: - {{projectInfo.funding.funderName}} - - - Project code: - {{projectInfo.funding.code}} - - - Call for proposal: - {{projectInfo.funding.callIdentifier}} - -
    -
    - - Funded under: - {{projectInfo.funding.fundingStream}} - - - Overall Budget: - {{projectInfo.funding.budget | number}} - {{projectInfo.funding.currency}} - - - Funder Contribution: - {{projectInfo.funding.contribution | number}} - {{projectInfo.funding.currency}} - -
    -
    - - - -
    -
    Open Access mandate
    -
    - - {{openaireEntities.PUBLICATIONS}}: - No - - - {{openaireEntities.DATASETS}}: - No - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    + + + +
    + +
    +
    +
    + + + + + + + + + + + +
    +
    +
    + + Funder: + {{projectInfo.funding.funderName}} + + + Project code: + {{projectInfo.funding.code}} + + + Call for proposal: + {{projectInfo.funding.callIdentifier}} + +
    +
    + + Funded under: + {{projectInfo.funding.fundingStream}} + + + Overall Budget: + {{projectInfo.funding.budget | number}} + {{projectInfo.funding.currency}} + + + Funder Contribution: + {{projectInfo.funding.contribution | number}} + {{projectInfo.funding.currency}} + +
    +
    + + + +
    +
    Open Access mandate
    +
    + + {{openaireEntities.PUBLICATIONS}}: + No + + + {{openaireEntities.DATASETS}}: + No + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + -
    + -
    +
    -
    -
    +
    +
    -
    -
    {{formatNumber(totalDownloads)}}
    -
    {{formatNumber(totalViews)}}
    -
    -
    -
    -
    - Metrics badge -
    -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - -
    -
    - -
    - +
    +
    {{formatNumber(totalDownloads)}}
    +
    {{formatNumber(totalViews)}}
    +
    +
    +
    +
    + Metrics badge +
    +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + +
    +
    + +
    + - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - -
    -
    + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + +
    +
    @@ -459,179 +459,179 @@
    - -
    - - -
    -
    - -
    - Summary - -
    -
    -
    - -
    - {{openaireEntities.PUBLICATIONS}} - -
    -
    -
    - -
    - {{openaireEntities.DATASETS}} - -
    -
    -
    - -
    - {{openaireEntities.SOFTWARE}} - -
    -
    -
    - -
    - {{openaireEntities.OTHER}} - -
    -
    -
    - -
    - DMPs - -
    -
    -
    - -
    - Statistics - -
    -
    -
    -
    -
    -
    - -
    -
    - + +
    + + +
    +
    + +
    + Summary + +
    +
    +
    + +
    + {{openaireEntities.PUBLICATIONS}} + +
    +
    +
    + +
    + {{openaireEntities.DATASETS}} + +
    +
    +
    + +
    + {{openaireEntities.SOFTWARE}} + +
    +
    +
    + +
    + {{openaireEntities.OTHER}} + +
    +
    +
    + +
    + DMPs + +
    +
    +
    + +
    + Statistics + +
    +
    +
    +
    +
    +
    + +
    +
    +
    - - - - - Deposit - - -
    -
    - + + + + + Deposit + + +
    +
    +
    - +
    - - - - - Link to - - -
    -
    -
    + + + + + Link to + + +
    +
    +
    - + - + - + - + - + - + - + - + -
    +
    - + @@ -678,8 +678,8 @@ -
    + [large]="true"> +
    @@ -702,259 +702,259 @@ -
    -
    -
    -
    -
    -
    - No summary information available -
    -
    -
    - -
    -
    -
    Description
    -
    -
    -
    - -
    -
    -
    -
    -
    - -
    Partners
    - -
    -
    -
    -
    -
    -
    +
    +
    +
    +
    +
    +
    + No summary information available +
    +
    +
    + +
    +
    +
    Description
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    Partners
    + +
    +
    +
    +
    +
    +
    -
    - - -
    +
    + + +
    -
    - - -
    +
    + + +
    -
    - - -
    +
    + + +
    -
    - - -
    +
    + + +
    - + -
    -
    Statistics
    - -
    -
    -
    -
    Produced - {{openaireEntities.RESULTS}} per year -
    - -
    -
    -
    -
    -
    Access mode of - {{openaireEntities.RESULTS}} -
    - -
    -
    -
    -
    -
    - {{openaireEntities.RESULTS}} per datasource -
    - -
    -
    -
    -
    +
    +
    Statistics
    + +
    +
    +
    +
    Produced + {{openaireEntities.RESULTS}} per year +
    + +
    +
    +
    +
    +
    Access mode of + {{openaireEntities.RESULTS}} +
    + +
    +
    +
    +
    +
    + {{openaireEntities.RESULTS}} per datasource +
    + +
    +
    +
    +
    -
    - -
      - -
    • -
      -
      -
      -
      +
      + +
        + +
      • +
        +
        +
        +
        OpenAIRE UsageCounts -
        - Usage by - +
        + Usage by + UsageCounts -
        -
        - - - - - - - - - - - - - -
        - - - Downloads - - {{formatNumber(totalDownloads)}} -
        - - - Views - - {{formatNumber(totalViews)}} -
        -
        -
        -
      -
    • - -
    • -
      -
      -
      -
      {{formatNumber(totalDownloads)}}
      -
      Downloads
      -
      -
      -
      {{formatNumber(totalViews)}}
      -
      Views
      -
      -
      - -
      - -
      -
      - - -
      -
      -
      -
      - Powered by +
      +
      + + + + + + + + + + + + + +
      + + + Downloads + + {{formatNumber(totalDownloads)}} +
      + + + Views + + {{formatNumber(totalViews)}} +
      +
      +
    +
    + + +
  • +
    +
    +
    +
    {{formatNumber(totalDownloads)}}
    +
    Downloads
    +
    +
    +
    {{formatNumber(totalViews)}}
    +
    Views
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    + Powered by OpenAIRE UsageCounts -
    -
  • - -
    +
    + + +
    @@ -962,18 +962,18 @@ - + - + -
    +
    + [options]="resultTypesForEmbedding" [(value)]="embed_research_results_type">
    {{getDynamicContent(embed_research_results_type)}}
    @@ -993,10 +993,10 @@ -
    +
    + [options]="resultTypesForDownloading" [(value)]="download_research_results_type" (click)="buildResultTypesForDownloading()">
    + class="uk-text-meta uk-margin-medium-top uk-text-center"> No reports available
    diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 4595057b..16bd4492 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -7,14 +7,14 @@ - - - - - - View all {{resultLandingInfo.deletedByInferenceIds.length}} versions - - - - - - - - Link to - - - - Share - - - - Cite - - - - - - - - -
    -
    -
    -
    - -
    - - - -
    - - - - -
    - - - - - - - -
    - - -
    -
    - -
    -
    - - - - - - - -
    - -
    - -
    - - - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - -
    -
    - -
    - +
    + +
    + +
    +
    + + + +
    + + + +
    + + + + +
    + + + + + + + +
    + + +
    +
    + +
    +
    + + + + + + + +
    + +
    + +
    + + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    + - - - - - - - - -
    + + + + + + + + +
    -
    -
    - -
    +
    +
    + +
    -
    -
    - +
    +
    + -
    -
    - -
    -
    -
    +
    +
    + + +
    +
    @@ -340,7 +340,7 @@
    + [class.uk-animation-right]="viewAll">
    @@ -353,8 +353,8 @@
    + class="uk-offcanvas-switcher uk-flex uk-flex-center uk-flex-middle uk-hidden@m" + (click)="rightSidebarOffcanvasClicked = true;">
    @@ -371,62 +371,62 @@ - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + -
    + -
    + -
    + -
    + -
    -
    -
    {{formatNumber(resultLandingInfo.measure.citations)}}
    -
    {{resultLandingInfo.measure.popularity}}
    -
    {{resultLandingInfo.measure.influence}}
    -
    {{formatNumber(resultLandingInfo.measure.downloads)}}
    -
    {{formatNumber(resultLandingInfo.measure.views)}}
    -
    -
    -
    -
    - Metrics badge -
    -
    -
    +
    +
    +
    {{formatNumber(resultLandingInfo.measure.citations)}}
    +
    {{resultLandingInfo.measure.popularity}}
    +
    {{resultLandingInfo.measure.influence}}
    +
    {{formatNumber(resultLandingInfo.measure.downloads)}}
    +
    {{formatNumber(resultLandingInfo.measure.views)}}
    +
    +
    +
    +
    + Metrics badge +
    +
    +
    + && (!viewAll || viewAll=='egiNotebook')">
    @@ -442,9 +442,9 @@
    + class="uk-margin-bottom"> + (viewAllClicked)="viewAll=$event" (noCommunities)="noCommunities = true">
    - -
    -
    +
    +
    - - {{resultLandingInfo.hostedBy_collectedFrom[0].accessRight}} -
    - + {{resultLandingInfo.hostedBy_collectedFrom[0].accessRight}} +
    + - -
    - -
    - -
    - -
    - +
    + +
    + +
    + +
    + -
    - -
    - + +
    + -
    -
    -
    -
    - -
    - Summary - -
    -
    -
    - -
    - References - -
    -
    -
    - -
    - Related Research - -
    -
    -
    - -
    - External Databases - -
    -
    -
    +
    +
    +
    +
    + +
    + Summary + +
    +
    +
    + +
    + References + +
    +
    +
    + +
    + Related Research + +
    +
    +
    + +
    + External Databases + +
    +
    +
    + && (!viewAll || viewAll=='egiNotebook')">
    Compatible EOSC Services @@ -547,15 +547,15 @@

    - -
    - Enermaps Tool - -
    -
    -
    -
    -
    + +
    + Enermaps Tool + +
    +
    +
    +
    +
    @@ -619,35 +619,35 @@
    +
    @@ -713,12 +713,12 @@ - +
    + #AlertModalDeletedByInference large="true"> -
    + [large]="true"> +
    @@ -766,10 +766,10 @@ -
    + #fosSelectionModal [large]="true"> +
    -
    +
    @@ -790,9 +790,9 @@ class="uk-margin-bottom">
    {{header}}
    + input type="select" placeholder="Filter by relation" inputClass="flat x-small" + [options]="relatedClassFilters" [(value)]="relatedClassSelected" + (valueChange)="relatedClassChanged()">
    @@ -894,13 +894,13 @@

    {{item.name}} - - [ + [{{getReferenceIdName(id)}} - OpenAIRE] - +

    @@ -961,7 +961,7 @@
    Enermaps tool preview

    Visit {{detail[0]}}: - - {{word}} - + {{word}} + {{word}} - - + + @@ -1246,8 +1246,8 @@ -

    -
    +
    +
    diff --git a/searchPages/searchUtils/searchFilter.component.html b/searchPages/searchUtils/searchFilter.component.html index 31b1831c..fe68a0fd 100644 --- a/searchPages/searchUtils/searchFilter.component.html +++ b/searchPages/searchUtils/searchFilter.component.html @@ -19,7 +19,7 @@
    Top 100 values are shown in the filters
    -
    +
    @@ -27,9 +27,13 @@
    - + class="uk-animation-fade uk-text-small"> + +
    +
    + +
    + No filters available with that term
    diff --git a/searchPages/searchUtils/searchFilter.component.ts b/searchPages/searchUtils/searchFilter.component.ts index 9484c2c3..c6569607 100644 --- a/searchPages/searchUtils/searchFilter.component.ts +++ b/searchPages/searchUtils/searchFilter.component.ts @@ -5,7 +5,8 @@ import { EventEmitter, OnInit, OnChanges, - SimpleChanges + SimpleChanges, + ChangeDetectorRef } from '@angular/core'; import {Filter, Value} from './searchHelperClasses.class'; import {ActivatedRoute, Router} from "@angular/router"; @@ -42,7 +43,11 @@ export class SearchFilterComponent implements OnInit, OnChanges { sub; public isOpen: boolean = false; sortedValues; - constructor(private _router: Router, private route: ActivatedRoute) { + hasMatch: boolean = false; + + constructor(private _router: Router, + private route: ActivatedRoute, + private cdr: ChangeDetectorRef) { } ngOnDestroy() { @@ -115,6 +120,7 @@ export class SearchFilterComponent implements OnInit, OnChanges { return false; } } + this.hasMatch = true; return true; } @@ -246,9 +252,13 @@ export class SearchFilterComponent implements OnInit, OnChanges { return 0; } }); - } + } this.sortedValues = Object.assign(sorted); + } + initMatching() { + this.hasMatch = false; + this.cdr.detectChanges(); } toggle(event) { @@ -324,4 +334,4 @@ export class SearchFilterComponent implements OnInit, OnChanges { return Object.entries(obj); } } -} +} \ No newline at end of file From d6edc17fee672236bf9704a0df8a14fa7b915331 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Thu, 6 Apr 2023 12:46:50 +0300 Subject: [PATCH 063/140] add subjects as a new tab in resultLanding --- .../landing-utils/showSubjects.component.ts | 4 +- .../result/resultLanding.component.html | 48 +++++++++++++------ .../result/resultLanding.component.ts | 15 ++++-- 3 files changed, 46 insertions(+), 21 deletions(-) diff --git a/landingPages/landing-utils/showSubjects.component.ts b/landingPages/landing-utils/showSubjects.component.ts index 8d38de9a..31767075 100644 --- a/landingPages/landing-utils/showSubjects.component.ts +++ b/landingPages/landing-utils/showSubjects.component.ts @@ -26,7 +26,7 @@ import {properties} from "../../../../environments/environment";
    - Subjects + Keywords
    @@ -215,7 +215,7 @@ export class ShowSubjectsComponent { if(this.isMobile) { this.viewAllSubjects = true; this.viewAllClicked.emit({ - subtitle: 'Subjects', + subtitle: 'Keywords', id: 'subjects' }); } else { diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index f7f290dc..a7f40041 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -286,6 +286,9 @@ + + @@ -312,6 +315,9 @@ + + + @@ -512,6 +518,13 @@

    + +
    + Subjects + +
    +
    +
    References @@ -660,6 +673,13 @@ + + + + + + @@ -854,20 +874,6 @@ {{resultLandingInfo.countries.join(", ")}}
    -
    - - [viewAllSubjects]="viewAllMobile=='subjects'" - [viewAllClassifiedSubjects]="viewAllMobile=='classifiedSubjects'" - (viewAllClicked)="viewAllSubjectsMobileClicked($event)"> - -
    @@ -890,6 +896,20 @@
    + +
    + + +
    +
    +
    0) - || !!this.resultLandingInfo.subjects - || (this.resultLandingInfo.classifiedSubjects && this.resultLandingInfo.classifiedSubjects.size > 0) || (!!this.resultLandingInfo.organizations && this.resultLandingInfo.organizations.length > 0)); } @@ -927,9 +926,9 @@ export class ResultLandingComponent { } } - public viewAllSubjectsMobileClicked(event: string) { - this.summaryFsModal.title += " - "+event['subtitle']; - this.summaryFsModal.back = true; + public viewAllSubjectsMobileClicked(event) { + this.subjectsFsModal.title += " - "+event['subtitle']; + this.subjectsFsModal.back = true; this.viewAllMobile = event['id']; } @@ -947,6 +946,12 @@ export class ResultLandingComponent { this.viewAllMobile = ""; } + public cancelSubjectsClicked() { + this.subjectsFsModal.title = "Subjects"; + this.subjectsFsModal.back = false; + this.viewAllMobile = ""; + } + public openOrganizationsModal() { this.organizationsModal.cancelButton = false; this.organizationsModal.okButton = false; From f641624b3277ac3be8cbbb38e84cebd57d90bd23 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 10 Apr 2023 11:51:18 +0300 Subject: [PATCH 064/140] search page: show the search term in the title, above results --- .../displayClaims.component.html | 2 +- .../displayClaims/displayClaims.component.ts | 4 +-- .../searchUtils/newSearchPage.component.html | 13 ++++++--- .../searchUtils/newSearchPage.component.ts | 10 +++++++ utils/resultsAndPagesNum.component.ts | 28 ++++++++++++++----- 5 files changed, 43 insertions(+), 14 deletions(-) diff --git a/claims/claim-utils/displayClaims/displayClaims.component.html b/claims/claim-utils/displayClaims/displayClaims.component.html index 8eba3930..2c5dd4eb 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.html +++ b/claims/claim-utils/displayClaims/displayClaims.component.html @@ -16,7 +16,7 @@
    -
    diff --git a/claims/claim-utils/displayClaims/displayClaims.component.ts b/claims/claim-utils/displayClaims/displayClaims.component.ts index 0f9b03ad..84e90ca7 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.ts +++ b/claims/claim-utils/displayClaims/displayClaims.component.ts @@ -240,7 +240,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy { handleErrors(err, message) { NotificationHandler.rise(message, "danger"); - console.error("Dispaly Claims (component): " + message + " " + (err && err.error ? err.error : '')); + console.error("Display Claims (component): " + message + " " + (err && err.error ? err.error : '')); } goTo(page: number = 1) { @@ -290,7 +290,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy { } changeKeyword() { - if (this.filterForm.get("keyword") && (this.filterForm.get("keyword").value.length >= 3 || this.filterForm.get("keyword").value.length == 0)) { + if (this.filterForm.get("keyword") && (this.filterForm.get("keyword").value?.length >= 3 || this.filterForm.get("keyword").value?.length == 0)) { this.searchTermStream.next(this.filterForm.get("keyword").value); } } diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index 0f3bf4bf..d52614c8 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -255,12 +255,17 @@
    -
    +
    {{searchUtils.totalResults|number}} - {{type}}, page - {{searchUtils.page | number}} - of {{(totalPages(searchUtils.totalResults)|number)}} + {{type}} + + for + {{searchTerm}} + + {{oldTotalResults|number}} diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index 6f6e5c10..83aa9045 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -151,6 +151,8 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { showOffCanvas:boolean = false; isMobile: boolean = false; isServer: boolean; + searchTerm: string = null; + advancedSearchTerms: number = 0; constructor(private route: ActivatedRoute, private location: Location, @@ -1689,6 +1691,14 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { this.getRangeFiltersFromURL(params); this.getRefineFiltersFromURL(params); this.createAdvancedSearchSelectedFiltersFromURLParameters(params); + this.searchTerm = ''; + if(params && params['fv0'] && params['f0'] && params['f0'] == 'q'){ + let keyword = StringUtils.URIDecode(params['fv0']); + this.searchTerm = keyword; + } + if(params){ + this.advancedSearchTerms = Object.keys(params).filter(key => key.includes('fv')).length; + } } removeResultType(type) { diff --git a/utils/resultsAndPagesNum.component.ts b/utils/resultsAndPagesNum.component.ts index e4de31f1..b41896bc 100644 --- a/utils/resultsAndPagesNum.component.ts +++ b/utils/resultsAndPagesNum.component.ts @@ -3,13 +3,25 @@ import {Component, Input} from "@angular/core"; @Component({ selector: 'results-and-pages', template: ` -
    - {{totalResults | number}} - {{type}}, page - {{currentPage}} - of - {{getTotalPages() | number}} -
    + +
    + {{totalResults | number}} + {{type}}, page + {{currentPage}} + of + {{getTotalPages() | number}} +
    +
    + +
    + {{totalResults | number}} + {{type}} + + for + {{searchTerm}} + +
    +
    ` }) @@ -19,6 +31,8 @@ export class ResultsAndPagesNumComponent { @Input() pageSize: number = 10; @Input() totalResults: number = 0; @Input() customClasses: string = ""; + @Input() hasSearch: boolean = false; + @Input() searchTerm: string; constructor() {} From 51d50cf331e4497f5c7c273dff86524affa92b14 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 10 Apr 2023 14:06:37 +0300 Subject: [PATCH 065/140] landing page: fix the check when there is nothing to show in the right column --- landingPages/result/resultLanding.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index c92e1ae9..5b1c9b53 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -583,7 +583,7 @@ export class ResultLandingComponent { public get hasRightSidebarInfo(): boolean { return (this.resultLandingInfo.eoscSubjects && this.resultLandingInfo.eoscSubjects.length - && (properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'eosc')) + && properties.adminToolsPortalType == 'eosc') || (this.resultLandingInfo.sdg && this.resultLandingInfo.sdg.length > 0) || From 6a2ac8cc4e1a77c10f632eccfd73b91082fe4a4a Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 11 Apr 2023 01:28:53 +0300 Subject: [PATCH 066/140] Add stats profile entity class. Add stats profiles in admin tabs --- .../admin-tabs/admin-tabs.component.ts | 9 +- monitor/entities/stakeholder.ts | 14 ++- monitor/services/stakeholder.service.ts | 89 +++++++++---------- 3 files changed, 62 insertions(+), 50 deletions(-) diff --git a/dashboard/sharedComponents/admin-tabs/admin-tabs.component.ts b/dashboard/sharedComponents/admin-tabs/admin-tabs.component.ts index 087c4c71..f7cd106f 100644 --- a/dashboard/sharedComponents/admin-tabs/admin-tabs.component.ts +++ b/dashboard/sharedComponents/admin-tabs/admin-tabs.component.ts @@ -11,9 +11,10 @@ import {ActivatedRoute} from "@angular/router";
  • Portals
  • Pages
  • Entities
  • -
  • Menus
  • -
  • Classes
  • -
  • Customization
  • +
  • Menus
  • +
  • Classes
  • +
  • Customization
  • +
  • Stats Profiles
  • ` }) @@ -25,7 +26,7 @@ export class AdminTabsComponent implements OnInit { @Input() public user: User; @Input() - public tab: "portal" | "page" | "entity" | "menu" | "class" | "customization"= 'page'; + public tab: "portal" | "page" | "entity" | "menu" | "class" | "customization" | "stats-profiles" = 'page'; private subscriptions: any[] = []; constructor(private route: ActivatedRoute, private userManagementService: UserManagementService) { diff --git a/monitor/entities/stakeholder.ts b/monitor/entities/stakeholder.ts index 3c14d3ec..dd4bf082 100644 --- a/monitor/entities/stakeholder.ts +++ b/monitor/entities/stakeholder.ts @@ -213,8 +213,20 @@ export class IndicatorPath { } } + +export class StatsProfile { + _id: string; + name: string; + + constructor(name: string) { + this._id = null; + this.name = name; + } +} + export type FilterType = "fundingL0"|"start_year" | "end_year" | "co-funded"; -export class IndicatorFilterUtils{ + +export class IndicatorFilterUtils { static getFilter(fieldPath: string, filterType:FilterType) { if((filterType == "start_year" || filterType == "end_year") && (fieldPath.indexOf(".year") != -1 || fieldPath.indexOf(".start year") != -1) diff --git a/monitor/services/stakeholder.service.ts b/monitor/services/stakeholder.service.ts index c71f7f8e..21fffb88 100644 --- a/monitor/services/stakeholder.service.ts +++ b/monitor/services/stakeholder.service.ts @@ -4,13 +4,10 @@ import {BehaviorSubject, from, Observable, Subscriber} from "rxjs"; import {Indicator, Section, Stakeholder, StakeholderInfo, Visibility} from "../entities/stakeholder"; import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {map} from "rxjs/operators"; -import {ActivatedRoute} from "@angular/router"; import {properties} from "../../../../environments/environment"; import {CustomOptions} from "../../services/servicesUtils/customOptions.class"; import {StringUtils} from "../../utils/string-utils.class"; -let maps: string[] = ['parameters', 'filters']; - export interface Reorder { action: 'moved' | 'added' | 'removed', target: string, @@ -21,25 +18,25 @@ export interface Reorder { providedIn: "root" }) export class StakeholderService { - + private stakeholderSubject: BehaviorSubject = null; private promise: Promise; private sub; - + constructor(private http: HttpClient) { this.stakeholderSubject = new BehaviorSubject(null); } - + ngOnDestroy() { this.clearSubscriptions(); } - + clearSubscriptions() { if (this.sub instanceof Subscriber) { this.sub.unsubscribe(); } } - + getStakeholder(alias: string, shouldUpdate: boolean = false): Observable { if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias || shouldUpdate) { this.promise = new Promise((resolve, reject) => { @@ -56,78 +53,80 @@ export class StakeholderService { } return from(this.getStakeholderAsync()); } - + async getStakeholderAsync() { - if(this.promise) { + if (this.promise) { await this.promise; this.promise = null; } this.clearSubscriptions(); return this.stakeholderSubject.getValue(); } - + getAlias(url: string): Observable { return this.http.get(url + '/stakeholder/alias', CustomOptions.registryOptions()).pipe(map(stakeholders => { return this.formalize(stakeholders); })); } - + getStakeholders(url: string, type: string = null, defaultId: string = null): Observable<(Stakeholder & StakeholderInfo)[]> { - return this.http.get(url + '/stakeholder' + ((type) ? ('?type=' + type) : '') + ((!type && defaultId)? ('?defaultId=' + defaultId):''), CustomOptions.registryOptions()).pipe(map(stakeholders => { + return this.http.get(url + '/stakeholder' + ((type) ? ('?type=' + type) : '') + ((!type && defaultId) ? ('?defaultId=' + defaultId) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => { return this.formalize(this.checkIsUpload(stakeholders)); })); } - + getMyStakeholders(url: string, type: string = null): Observable<(Stakeholder & StakeholderInfo)[]> { return this.http.get(url + '/my-stakeholder' + ((type) ? ('?type=' + type) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => { return this.formalize(this.checkIsUpload(stakeholders)); })); } - + getDefaultStakeholders(url: string, type: string = null): Observable { return this.http.get(url + '/stakeholder/default' + ((type) ? ('?type=' + type) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => { return this.formalize(this.checkIsUpload(stakeholders)); })); } - + buildStakeholder(url: string, stakeholder: Stakeholder): Observable { - if(stakeholder.alias && stakeholder.alias.startsWith('/')) { - stakeholder.alias = stakeholder.alias.slice(1); - } + if (stakeholder.alias && stakeholder.alias.startsWith('/')) { + stakeholder.alias = stakeholder.alias.slice(1); + } return this.http.post(url + '/build-stakeholder', stakeholder, CustomOptions.registryOptions()).pipe(map(stakeholder => { return this.formalize(this.checkIsUpload(stakeholder)); })); } - + changeVisibility(url: string, path: string[], visibility: Visibility, propagate: boolean = false): Observable { - return this.http.post(url + '/' + path.join('/') + '/change-visibility' + '?visibility=' + visibility + (propagate?'&propagate=true':''), null, CustomOptions.registryOptions()); + return this.http.post(url + '/' + path.join('/') + '/change-visibility' + '?visibility=' + visibility + (propagate ? '&propagate=true' : ''), null, CustomOptions.registryOptions()); } - + saveElement(url: string, element: any, path: string[] = []): Observable { - if(element.alias && element.alias.startsWith('/')) { - element.alias = element.alias.slice(1); - } + if (element.alias && element.alias.startsWith('/')) { + element.alias = element.alias.slice(1); + } path = HelperFunctions.encodeArray(path); return this.http.post(url + ((path.length > 0) ? '/' : '') + path.join('/') + '/save', element, CustomOptions.registryOptions()).pipe(map(element => { - if(path.length === 0) { - return this.formalize(this.checkIsUpload(element)); - } else { - return this.formalize(element); - } - })); - } - saveBulkElements(url: string, indicators, path: string[] = []): Observable { - path = HelperFunctions.encodeArray(path); - return this.http.post(url + ((path.length > 0) ? '/' : '') + path.join('/') + - '/save-bulk', indicators, CustomOptions.registryOptions()).pipe(map(element => { - if(path.length === 0) { + if (path.length === 0) { return this.formalize(this.checkIsUpload(element)); } else { return this.formalize(element); } })); } + + saveBulkElements(url: string, indicators, path: string[] = []): Observable { + path = HelperFunctions.encodeArray(path); + return this.http.post(url + ((path.length > 0) ? '/' : '') + path.join('/') + + '/save-bulk', indicators, CustomOptions.registryOptions()).pipe(map(element => { + if (path.length === 0) { + return this.formalize(this.checkIsUpload(element)); + } else { + return this.formalize(element); + } + })); + } + saveSection(url: string, element: any, path: string[] = [], index: number = -1): Observable
    { path = HelperFunctions.encodeArray(path); return this.http.post
    (url + ((path.length > 0) ? '/' : '') + path.join('/') + @@ -135,7 +134,7 @@ export class StakeholderService { return this.formalize(element); })); } - + deleteElement(url: string, path: string[], childrenAction: string = null): Observable { path = HelperFunctions.encodeArray(path); let params: string = ""; @@ -144,29 +143,29 @@ export class StakeholderService { } return this.http.delete(url + '/' + path.join('/') + '/delete' + params, CustomOptions.registryOptions()); } - + reorderElements(url: string, path: string[], ids: string[]): Observable { path = HelperFunctions.encodeArray(path); return this.http.post(url + '/' + path.join('/') + '/reorder', ids, CustomOptions.registryOptions()); } - + reorderIndicators(url: string, path: string[], reorder: Reorder, type: string = 'chart'): Observable { path = HelperFunctions.encodeArray(path); return this.http.post(url + '/' + path.join('/') + '/' + type + '/reorder', reorder, CustomOptions.registryOptions()).pipe(map(indicators => { return this.formalize(indicators); })); } - + getStakeholderAsObservable(): Observable { return this.stakeholderSubject.asObservable(); } - + setStakeholder(stakeholder: Stakeholder) { this.stakeholderSubject.next(stakeholder); } - + private checkIsUpload(response: Stakeholder | Stakeholder[]): any | any[] { - if(Array.isArray(response)) { + if (Array.isArray(response)) { response.forEach(value => { value.isUpload = value.logoUrl && !StringUtils.isValidUrl(value.logoUrl); }); @@ -175,7 +174,7 @@ export class StakeholderService { } return response; } - + private formalize(element: any) { return HelperFunctions.copy(element); } From e88bb206dcfbe6da62542c45794d4fe6e552fb09 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 12 Apr 2023 17:59:04 +0300 Subject: [PATCH 067/140] Add statsProfile field in stakeholder --- monitor/entities/stakeholder.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/monitor/entities/stakeholder.ts b/monitor/entities/stakeholder.ts index dd4bf082..9970b6b3 100644 --- a/monitor/entities/stakeholder.ts +++ b/monitor/entities/stakeholder.ts @@ -21,6 +21,7 @@ export class Stakeholder { index_id; index_name: string; index_shortName: string; + statsProfile: string = "monitor"; alias: string; defaultId: string; visibility: Visibility; From a49970aca66cf98a2ee9cd767e8dc87badc0b80f Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 18 Apr 2023 15:26:41 +0300 Subject: [PATCH 068/140] Add number percentage pipe. Add format field in indicatorPath --- monitor/entities/stakeholder.ts | 5 ++++- utils/pipes/number-percentage.pipe.ts | 18 ++++++++++++++++++ utils/pipes/number-round.module.ts | 5 +++-- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 utils/pipes/number-percentage.pipe.ts diff --git a/monitor/entities/stakeholder.ts b/monitor/entities/stakeholder.ts index 9970b6b3..c1abb28b 100644 --- a/monitor/entities/stakeholder.ts +++ b/monitor/entities/stakeholder.ts @@ -12,6 +12,7 @@ export type IndicatorType = 'number' | 'chart'; export type IndicatorSize = 'small' | 'medium' | 'large'; export type IndicatorPathType = 'table' | 'bar' | 'column' | 'pie' | 'line' | 'other'; export type SourceType = 'statistics' | 'search' |'stats-tool' | 'old' | 'image'; +export type Format = 'NUMBER' | 'PERCENTAGE'; export type Visibility = 'PUBLIC' | 'PRIVATE' | 'RESTRICTED'; export class Stakeholder { @@ -193,8 +194,9 @@ export class IndicatorPath { parameters: any; filters: any; filtersApplied: number = 0; + format: Format; - constructor(type: IndicatorPathType, source: SourceType, url: string, chartObject: string, jsonPath: string[]) { + constructor(type: IndicatorPathType, source: SourceType, url: string, chartObject: string, jsonPath: string[], format: Format = 'NUMBER') { this.type = type; this.url = url; this.source = source; @@ -203,6 +205,7 @@ export class IndicatorPath { this.parameters = {}; this.filters = {}; this.filtersApplied = 0; + this.format = format; } static createParameters(funderName: string = null, title: string = null, chartType: string = null): any { diff --git a/utils/pipes/number-percentage.pipe.ts b/utils/pipes/number-percentage.pipe.ts new file mode 100644 index 00000000..4480d12c --- /dev/null +++ b/utils/pipes/number-percentage.pipe.ts @@ -0,0 +1,18 @@ +import {Pipe, PipeTransform} from "@angular/core"; +import {Level, NumberSize, NumberUtils} from "../number-utils.class"; +import {DecimalPipe} from "@angular/common"; + +@Pipe({name: 'numberPercentage'}) +export class NumberPercentagePipe implements PipeTransform { + decimalPipe: DecimalPipe = new DecimalPipe("en"); + + constructor() { + } + + /** + * */ + transform(value: number | string, ...args: any[]): any { + value = Number.parseFloat(value.toString()) * 100; + return this.decimalPipe.transform(value) + '%'; + } +} diff --git a/utils/pipes/number-round.module.ts b/utils/pipes/number-round.module.ts index 951da877..dfa54a0d 100644 --- a/utils/pipes/number-round.module.ts +++ b/utils/pipes/number-round.module.ts @@ -1,9 +1,10 @@ import {NgModule} from "@angular/core"; import {NumberRoundPipe} from "./number-round.pipe"; +import {NumberPercentagePipe} from "./number-percentage.pipe"; @NgModule({ - declarations: [NumberRoundPipe], - exports: [NumberRoundPipe] + declarations: [NumberRoundPipe, NumberPercentagePipe], + exports: [NumberRoundPipe, NumberPercentagePipe] }) export class NumberRoundModule { From dd6f18db52c8e4dbee3c9c05624c15a076ae74bb Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Fri, 21 Apr 2023 11:04:43 +0300 Subject: [PATCH 069/140] search page: simplify search bar - remove 2 steps --- searchPages/find/searchAll.component.ts | 3 ++- .../searchUtils/advancedSearchForm.component.html | 9 +++++---- utils/properties/env-properties.ts | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/searchPages/find/searchAll.component.ts b/searchPages/find/searchAll.component.ts index 67b16706..3d208365 100644 --- a/searchPages/find/searchAll.component.ts +++ b/searchPages/find/searchAll.component.ts @@ -85,7 +85,8 @@ export class SearchAllComponent { @Input() name; @Input() customFilter: SearchCustomFilter = null; @Input() piwikSiteId = null; - @Input() formPlaceholderText = "Search for "+OpenaireEntities.RESULTS+", "+OpenaireEntities.PROJECTS+", "+OpenaireEntities.DATASOURCES+" & "+OpenaireEntities.ORGANIZATIONS+" in OpenAIRE"; + @Input() formPlaceholderText = "What are you looking for?" + // @Input() formPlaceholderText = "Search for "+OpenaireEntities.RESULTS+", "+OpenaireEntities.PROJECTS+", "+OpenaireEntities.DATASOURCES+" & "+OpenaireEntities.ORGANIZATIONS+" in OpenAIRE"; @Input() searchForm: SearchForm = {class: 'search-form', dark: true} @Input() breadcrumbs: Breadcrumb[] = []; diff --git a/searchPages/searchUtils/advancedSearchForm.component.html b/searchPages/searchUtils/advancedSearchForm.component.html index 80cc62f7..81dba4f7 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.html +++ b/searchPages/searchUtils/advancedSearchForm.component.html @@ -163,11 +163,12 @@
    - - + + +
    diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts index a89f9d38..dafbf5cc 100644 --- a/utils/properties/env-properties.ts +++ b/utils/properties/env-properties.ts @@ -96,6 +96,7 @@ export interface EnvProperties { searchLinkToOrp?: string; searchLinkToOrganization?: string; //Search pages + searchLinkToAll?: string; searchLinkToCommunities?: string; searchLinkToStakeholders?: string; searchLinkToPublications?: string; From aa86ee0fe3a16a3491521e1a45823acfc848e890 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Fri, 21 Apr 2023 12:49:14 +0300 Subject: [PATCH 070/140] Add entity-actions in all landing pages --- .../dataProvider/dataProvider.component.html | 13 +--- .../dataProvider/dataProvider.module.ts | 3 +- .../organization/organization.component.html | 40 +++++----- .../organization/organization.module.ts | 4 +- landingPages/project/project.component.html | 50 +++--------- landingPages/project/project.module.ts | 6 +- .../result/resultLanding.component.html | 77 ++++++++----------- landingPages/result/resultLanding.module.ts | 3 +- .../entity-actions.component.ts | 75 ++++++++++-------- .../result-preview.component.html | 44 +++++------ 10 files changed, 141 insertions(+), 174 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 0f041baf..4d75685e 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -82,15 +82,8 @@
    @@ -884,4 +877,4 @@ - \ No newline at end of file + diff --git a/landingPages/dataProvider/dataProvider.module.ts b/landingPages/dataProvider/dataProvider.module.ts index 1ec1f0e2..5aa044ba 100644 --- a/landingPages/dataProvider/dataProvider.module.ts +++ b/landingPages/dataProvider/dataProvider.module.ts @@ -36,6 +36,7 @@ import {LoadingModalModule} from "../../utils/modal/loadingModal.module"; import {ResultLandingUtilsModule} from "../landing-utils/resultLandingUtils.module"; import {FullScreenModalModule} from '../../utils/modal/full-screen-modal/full-screen-modal.module'; import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module'; +import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module"; @NgModule({ imports: @@ -45,7 +46,7 @@ import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module'; PagingModule, Schema2jsonldModule, SEOServiceModule, ShowPublisherModule, HelperModule, LandingHeaderModule, AlertModalModule, NoLoadPaging, FeedbackModule, TabsModule, SearchTabModule, LoadingModule, IconsModule, LoadingModalModule, ResultLandingUtilsModule, - FullScreenModalModule, SafeHtmlPipeModule + FullScreenModalModule, SafeHtmlPipeModule, EntityActionsModule ], declarations: [StatisticsTabComponent, diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index 9220b421..c6e0e9c2 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -83,28 +83,28 @@
    diff --git a/landingPages/organization/organization.module.ts b/landingPages/organization/organization.module.ts index 9d5448fa..a367d897 100644 --- a/landingPages/organization/organization.module.ts +++ b/landingPages/organization/organization.module.ts @@ -32,6 +32,8 @@ import {InputModule} from '../../sharedComponents/input/input.module'; import {IconsService} from '../../utils/icons/icons.service'; import {graph, versions} from "../../utils/icons/icons"; import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-screen-modal.module"; +import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module"; +import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module"; @NgModule({ @@ -49,7 +51,7 @@ import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-sc Schema2jsonldModule, SEOServiceModule, HelperModule, OrganizationsDeletedByInferenceModule, LandingHeaderModule, FeedbackModule, MatSelectModule, - TabsModule, SearchTabModule, LoadingModule, IconsModule, InputModule, FullScreenModalModule + TabsModule, SearchTabModule, LoadingModule, IconsModule, InputModule, FullScreenModalModule, EGIDataTransferModule, EntityActionsModule ], declarations: [ OrganizationComponent, diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index 8263325a..f1661901 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -116,48 +116,20 @@
    -
    diff --git a/landingPages/project/project.module.ts b/landingPages/project/project.module.ts index 617e3d85..a85a3a9c 100644 --- a/landingPages/project/project.module.ts +++ b/landingPages/project/project.module.ts @@ -3,7 +3,7 @@ import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {FormsModule} from '@angular/forms'; import {RouterModule} from '@angular/router'; -import { MatSelectModule } from "@angular/material/select"; +import {MatSelectModule} from "@angular/material/select"; import {ProjectComponent} from './project.component'; import {ProjectServiceModule} from './projectService.module'; @@ -34,6 +34,8 @@ import {IconsService} from "../../utils/icons/icons.service"; import {graph, link, link_to, open_access} from "../../utils/icons/icons"; import {FullScreenModalModule} from '../../utils/modal/full-screen-modal/full-screen-modal.module'; import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module'; +import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module"; +import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module"; @NgModule({ imports: [ @@ -44,7 +46,7 @@ import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module'; Schema2jsonldModule, SEOServiceModule, HelperModule, LandingHeaderModule, MatSelectModule, FeedbackModule, AltMetricsModule, TabsModule, SearchTabModule, LoadingModule, IconsModule, InputModule, - FullScreenModalModule, SafeHtmlPipeModule + FullScreenModalModule, SafeHtmlPipeModule, EGIDataTransferModule, EntityActionsModule ], declarations: [ ProjectComponent diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index a7f40041..b65506c3 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -116,49 +116,38 @@
    @@ -1305,4 +1294,4 @@ - \ No newline at end of file + diff --git a/landingPages/result/resultLanding.module.ts b/landingPages/result/resultLanding.module.ts index 3ca8944a..2df31ec0 100644 --- a/landingPages/result/resultLanding.module.ts +++ b/landingPages/result/resultLanding.module.ts @@ -40,6 +40,7 @@ import {RecaptchaModule} from 'ng-recaptcha'; import {SdgFosSuggestModule} from '../landing-utils/sdg-fos-suggest/sdg-fos-suggest.module'; import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-screen-modal.module"; import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module'; +import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module"; @NgModule({ imports: [ @@ -49,7 +50,7 @@ import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module'; DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule, AnnotationModule, LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule, LoadingModule, OrcidModule, MatFormFieldModule, MatSelectModule, IconsModule, InputModule, EGIDataTransferModule, RecaptchaModule, - SdgFosSuggestModule, FullScreenModalModule, SafeHtmlPipeModule + SdgFosSuggestModule, FullScreenModalModule, SafeHtmlPipeModule, EntityActionsModule ], declarations: [ ResultLandingComponent diff --git a/utils/entity-actions/entity-actions.component.ts b/utils/entity-actions/entity-actions.component.ts index 126727d5..49dbe3a0 100644 --- a/utils/entity-actions/entity-actions.component.ts +++ b/utils/entity-actions/entity-actions.component.ts @@ -11,39 +11,48 @@ import {EnvProperties} from "../properties/env-properties"; selector: 'entity-actions', template: ` diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index 86538ab0..9a6157fa 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -165,9 +165,7 @@
    -
    +
    @@ -177,26 +175,26 @@ [type]="result.resultType" [result]="result" [id]="result.objId?result.objId:result.id" [url]="properties.domain + properties.baseLink + url + '?' + urlParam + '=' + result.id"> - - - - - - - - Added in ORCID: - - - {{date | date: 'dd MMM yyyy'}} - - & - - - - + + + + + + + + Added in ORCID: + + + {{date | date: 'dd MMM yyyy'}} + + & + + + +
    Date: Fri, 21 Apr 2023 13:37:19 +0300 Subject: [PATCH 071/140] search page: cite this > parse missing information (to match landing page) --- services/searchResearchResults.service.ts | 26 +++++++++++++++++++++++ utils/entities/searchResult.ts | 5 ++++- utils/result-preview/result-preview.ts | 9 ++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index cc2c6715..6afc9161 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -390,6 +390,32 @@ export class SearchResearchResultsService { if (resData['context'] != null) { result.enermapsId = ParsingFunctions.getEnermapsConceptId(this.parsingFunctions.parseContexts(resData['context'])); } + if (resData.dateofacceptance && resData.dateofacceptance != null) { + let date: string = (resData.dateofacceptance ? resData.dateofacceptance : '') + ''; // transform to string in case it is an integer + result.date = (date && (date).indexOf('-') !== -1) ? date.split('-')[0] : date; + result.dateofacceptance = resData.dateofacceptance ? Dates.getDate(resData.dateofacceptance) : null; + } + if (resData.journal && resData.journal != null) { + result.journal = { + "journal": "", + "issn": "", + "lissn": "", + "eissn": "", + "issue": "", + "volume": "", + "start_page": "", + "end_page": "" + } + result.journal['journal'] = resData.journal.content; + result.journal['issn'] = resData.journal.issn; + result.journal['lissn'] = resData.journal.lissn; + result.journal['eissn'] = resData.journal.eissn; + result.journal['issue'] = resData.journal.iss; + result.journal['volume'] = resData.journal.vol; + result.journal['start_page'] = resData.journal.sp; + result.journal['end_page'] = resData.journal.ep; + } + results.push(result); } return results; diff --git a/utils/entities/searchResult.ts b/utils/entities/searchResult.ts index 6b2feef9..c8221930 100644 --- a/utils/entities/searchResult.ts +++ b/utils/entities/searchResult.ts @@ -1,4 +1,4 @@ -import {Author, HostedByCollectedFrom, Organization, Project, ResultTitle} from "../result-preview/result-preview"; +import {Author, HostedByCollectedFrom, Journal, Organization, Project, ResultTitle} from "../result-preview/result-preview"; import {Measure, Metric} from "./resultLandingInfo"; export class SearchResult { @@ -9,6 +9,9 @@ export class SearchResult { DOIs: string[] = []; identifiers: Map; measure: Measure; + date: string; + dateofacceptance: Date; + journal: Journal; //publications & datasets & orp & software & projects & dataproviders: description: string; diff --git a/utils/result-preview/result-preview.ts b/utils/result-preview/result-preview.ts index 9ab1f0d8..b7a2450b 100644 --- a/utils/result-preview/result-preview.ts +++ b/utils/result-preview/result-preview.ts @@ -79,6 +79,9 @@ export class ResultPreview { accessMode: string; // sc39: string; countries: string[]; + date: string; + dateofacceptance: Date; + journal: Journal; //Impact factor DOI: string; @@ -163,6 +166,9 @@ export class ResultPreview { resultPreview.description = result.description; resultPreview.year = result.year; resultPreview.embargoEndDate = result.embargoEndDate; + resultPreview.date = result.date; + resultPreview.dateofacceptance = result.dateofacceptance; + resultPreview.journal = result.journal; resultPreview.authors = result.authors; resultPreview.languages = result.languages; resultPreview.publisher = result.publisher; @@ -214,6 +220,9 @@ export class ResultPreview { resultPreview.year = new Date(result.dateofacceptance).getFullYear().toString(); } resultPreview.embargoEndDate = result.embargoEndDate; + resultPreview.date = result.date; + resultPreview.dateofacceptance = result.dateofacceptance; + resultPreview.journal = result.journal; resultPreview.authors = result.authors; resultPreview.languages = result.languages; resultPreview.publisher = result.publisher; From d69b0d0bb595da5f03fabc5ae02eec75d0d02a9c Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Tue, 25 Apr 2023 13:02:33 +0300 Subject: [PATCH 072/140] resultLanding: remove numbers from FoS FoS page: remove numbers from 3rd level only --- fos/fos.component.html | 4 ++-- landingPages/landing-utils/fos.component.ts | 14 +++++++------- landingPages/result/resultLanding.service.ts | 6 ++++-- utils/entities/resultLandingInfo.ts | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/fos/fos.component.html b/fos/fos.component.html index af6ee6e0..8f707fec 100644 --- a/fos/fos.component.html +++ b/fos/fos.component.html @@ -113,7 +113,7 @@
    @@ -139,7 +139,7 @@
    diff --git a/landingPages/landing-utils/fos.component.ts b/landingPages/landing-utils/fos.component.ts index 88306b6f..39eaa6c5 100644 --- a/landingPages/landing-utils/fos.component.ts +++ b/landingPages/landing-utils/fos.component.ts @@ -32,8 +32,8 @@ import {StringUtils} from "../../utils/string-utils.class"; @@ -47,12 +47,12 @@ import {StringUtils} from "../../utils/string-utils.class"; @@ -71,7 +71,7 @@ import {StringUtils} from "../../utils/string-utils.class"; }) export class FosComponent { - @Input() subjects: string[]; + @Input() subjects: {"id": string, "label": string}[]; @Input() viewAll: boolean = false; @Output() viewAllClicked = new EventEmitter(); @Output() suggestClicked = new EventEmitter(); diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index 6c45f45e..6b1e58e3 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -312,9 +312,11 @@ export class ResultLandingService { this.resultLandingInfo.subjects = subjectResults[0]; this.resultLandingInfo.otherSubjects = subjectResults[1]; this.resultLandingInfo.classifiedSubjects = subjectResults[2]; - this.resultLandingInfo.fos = subjectResults[3]; + subjectResults[3].forEach(element => { + this.resultLandingInfo.fos.push({id: element, label: element.replace(/^\d+/, '').trim()}); + }); if (this.resultLandingInfo.fos) { - this.resultLandingInfo.fos.sort((a, b) => a.localeCompare(b)) + this.resultLandingInfo.fos.sort((a, b) => a.id.localeCompare(b.id)); } this.resultLandingInfo.sdg = subjectResults[4]; if (this.resultLandingInfo.sdg) { diff --git a/utils/entities/resultLandingInfo.ts b/utils/entities/resultLandingInfo.ts index f1454627..0ae3866f 100644 --- a/utils/entities/resultLandingInfo.ts +++ b/utils/entities/resultLandingInfo.ts @@ -84,7 +84,7 @@ export class ResultLandingInfo { subjects: string[]; otherSubjects: Map; classifiedSubjects: Map; // - fos: string[]; + fos: {"id": string, "label": string}[] = []; sdg: string[]; eoscSubjects: any[]; From d9d69031c8b4574c2ffe5c5279e268934910da5e Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 25 Apr 2023 15:20:33 +0300 Subject: [PATCH 073/140] Delete Stats Profile. Fix input autocoplete reset value on search. --- .../admin-tabs/admin-tabs.component.ts | 3 +-- monitor/entities/stakeholder.ts | 10 ---------- sharedComponents/input/input.component.ts | 5 ++--- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/dashboard/sharedComponents/admin-tabs/admin-tabs.component.ts b/dashboard/sharedComponents/admin-tabs/admin-tabs.component.ts index f7cd106f..99677e59 100644 --- a/dashboard/sharedComponents/admin-tabs/admin-tabs.component.ts +++ b/dashboard/sharedComponents/admin-tabs/admin-tabs.component.ts @@ -14,7 +14,6 @@ import {ActivatedRoute} from "@angular/router";
  • Menus
  • Classes
  • Customization
  • -
  • Stats Profiles
  • ` }) @@ -26,7 +25,7 @@ export class AdminTabsComponent implements OnInit { @Input() public user: User; @Input() - public tab: "portal" | "page" | "entity" | "menu" | "class" | "customization" | "stats-profiles" = 'page'; + public tab: "portal" | "page" | "entity" | "menu" | "class" | "customization" = 'page'; private subscriptions: any[] = []; constructor(private route: ActivatedRoute, private userManagementService: UserManagementService) { diff --git a/monitor/entities/stakeholder.ts b/monitor/entities/stakeholder.ts index c1abb28b..9fc420a1 100644 --- a/monitor/entities/stakeholder.ts +++ b/monitor/entities/stakeholder.ts @@ -218,16 +218,6 @@ export class IndicatorPath { } -export class StatsProfile { - _id: string; - name: string; - - constructor(name: string) { - this._id = null; - this.name = name; - } -} - export type FilterType = "fundingL0"|"start_year" | "end_year" | "co-funded"; export class IndicatorFilterUtils { diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts index 5d83e1fa..45b9b1fe 100644 --- a/sharedComponents/input/input.component.ts +++ b/sharedComponents/input/input.component.ts @@ -21,7 +21,6 @@ import {BehaviorSubject, Subscription} from "rxjs"; import {EnvProperties} from "../../utils/properties/env-properties"; import {properties} from "../../../../environments/environment"; import {ClickEvent} from "../../utils/click/click-outside-or-esc.directive"; -import {element} from "protractor"; export type InputType = 'text' @@ -147,11 +146,11 @@ declare var UIkit; - - From 2d8be4114636d3f7dc7d23180bb7b6f28144e7b6 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Wed, 26 Apr 2023 12:28:37 +0300 Subject: [PATCH 074/140] search page: group time filters (e.g projects -> startdate, enddate, activewithin) --- searchPages/searchUtils/newSearchPage.component.html | 8 ++++---- utils/properties/searchFields.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index d52614c8..c0639eee 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -98,10 +98,6 @@ (onFilterChange)="filterChanged($event)" [quickFilter]="quickFilter" [actionRoute]="true"> -
  • - -
  • +
  • + +
  • diff --git a/utils/properties/searchFields.ts b/utils/properties/searchFields.ts index 97ab07f4..3043e422 100644 --- a/utils/properties/searchFields.ts +++ b/utils/properties/searchFields.ts @@ -265,7 +265,7 @@ export class SearchFields { ["projectendyear", "projectstartyear"] ]; public PROJECT_REFINE_FIELDS: string[] = ["funder", "fundinglevel0_id", "fundinglevel1_id", - "fundinglevel2_id", "projectstartyear", "projectendyear", "projectoamandatepublications"]; + "fundinglevel2_id", "projectoamandatepublications", "projectstartyear", "projectendyear"]; public PROJECT_ADVANCED_FIELDS: string[] = ["q", "projectacronym", "projecttitle", "projectkeywords", "funder", "fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id", "projectstartdate", "projectenddate", From beb43ed1b7c5b0e1dd6e1db4f076f75bb3e0265d Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Tue, 2 May 2023 12:00:40 +0300 Subject: [PATCH 075/140] project & data landing/search page: get usage counts from index (measure field) --- .../dataProvider/dataProvider.component.html | 74 +++++++++---------- .../dataProvider/dataProvider.component.ts | 3 +- .../dataProvider/dataProvider.service.ts | 3 + landingPages/project/project.component.html | 74 +++++++++---------- landingPages/project/project.component.ts | 3 +- landingPages/project/project.service.ts | 4 + services/searchDataproviders.service.ts | 2 + services/searchProjects.service.ts | 2 + utils/entities/dataProviderInfo.ts | 2 + utils/entities/projectInfo.ts | 47 ++++++------ utils/rangeFilter/rangeFilter.component.html | 4 +- .../result-preview.component.html | 4 +- .../result-preview.component.ts | 6 ++ 13 files changed, 125 insertions(+), 103 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 4d75685e..de65c000 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -189,17 +189,17 @@
    -
    -
    +
    +
    -
    -
    {{formatNumber(totalDownloads)}}
    -
    {{formatNumber(totalViews)}}
    +
    {{formatNumber(dataProviderInfo.measure.counts[1].value)}}
    +
    {{formatNumber(dataProviderInfo.measure.counts[0].value)}}
    @@ -780,14 +780,14 @@
  • Overview
  • -
  • +
  • Usage
    • -
      +
      @@ -803,30 +803,30 @@
      - + - - + - @@ -836,20 +836,20 @@ -
    • +
    • -
      +
      {{formatNumber(totalDownloads)}}
      -
      Downloads
      + [attr.uk-tooltip]="dataProviderInfo.measure.counts[1].value >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'" + title="{{dataProviderInfo.measure.counts[1].value | number}}">{{formatNumber(dataProviderInfo.measure.counts[1].value)}}
      +
      {{dataProviderInfo.measure.counts[1].name}}
      -
      +
      {{formatNumber(totalViews)}}
      -
      Views
      + [attr.uk-tooltip]="dataProviderInfo.measure.counts[0].value >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'" + title="{{dataProviderInfo.measure.counts[0].value | number}}">{{formatNumber(dataProviderInfo.measure.counts[0].value)}}
      +
      {{dataProviderInfo.measure.counts[0].name}}
      diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts index 1e9846ea..d7812330 100644 --- a/landingPages/dataProvider/dataProvider.component.ts +++ b/landingPages/dataProvider/dataProvider.component.ts @@ -712,7 +712,8 @@ export class DataProviderComponent { public get hasMetrics(): boolean { // return !(this.totalViews != null && this.totalDownloads != null) || this.totalViews > 0 || this.totalDownloads > 0; - return (this.totalViews != null && this.totalViews > 0) || (this.totalDownloads != null && this.totalDownloads > 0); + // return (this.totalViews != null && this.totalViews > 0) || (this.totalDownloads != null && this.totalDownloads > 0); + return this.dataProviderInfo.measure?.counts?.length && (this.dataProviderInfo.measure?.counts[0].value > 0 || this.dataProviderInfo.measure?.counts[1].value); } // public openStatistics() { diff --git a/landingPages/dataProvider/dataProvider.service.ts b/landingPages/dataProvider/dataProvider.service.ts index d13e4cdd..eaaa6409 100644 --- a/landingPages/dataProvider/dataProvider.service.ts +++ b/landingPages/dataProvider/dataProvider.service.ts @@ -364,6 +364,9 @@ export class DataProviderService { this.dataProviderInfo.journal = null; // this.dataProviderInfo.journal = {"journal": "", "issn": "", "lissn": "", "eissn": ""}; } + if (data[0]?.measure) { + this.dataProviderInfo.measure = this.parsingFunctions.parseMeasures(data[0].measure); + } return this.dataProviderInfo; } diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index f1661901..eeef97ba 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -322,17 +322,17 @@
      -
      -
      +
      +
      -
      -
      {{formatNumber(totalDownloads)}}
      -
      {{formatNumber(totalViews)}}
      +
      {{formatNumber(projectInfo.measure.counts[1].value)}}
      +
      {{formatNumber(projectInfo.measure.counts[0].value)}}
      @@ -843,14 +843,14 @@
    • Overview
    • -
    • +
    • Usage
      • -
        +
        @@ -866,30 +866,30 @@
      - + - Downloads + + {{dataProviderInfo.measure.counts[1].name}} - {{formatNumber(totalDownloads)}} + [attr.uk-tooltip]="dataProviderInfo.measure.counts[1].value >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'" + title="{{dataProviderInfo.measure.counts[1].value | number}}"> + {{formatNumber(dataProviderInfo.measure.counts[1].value)}}
      - + - Views + + {{dataProviderInfo.measure.counts[0].name}} - {{formatNumber(totalViews)}} + [attr.uk-tooltip]="dataProviderInfo.measure.counts[0].value >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'" + title="{{dataProviderInfo.measure.counts[0].value | number}}"> + {{formatNumber(dataProviderInfo.measure.counts[0].value)}}
      - + - - + - @@ -899,18 +899,18 @@ -
    • +
    • -
      -
      {{formatNumber(totalDownloads)}}
      -
      Downloads
      +
      +
      {{formatNumber(projectInfo.measure.counts[1].value)}}
      +
      {{projectInfo.measure.counts[1].name}}
      -
      -
      {{formatNumber(totalViews)}}
      -
      Views
      +
      +
      {{formatNumber(projectInfo.measure.counts[0].value)}}
      +
      {{projectInfo.measure.counts[0].name}}
      diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index 9c3eafc0..e3faee57 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -596,7 +596,8 @@ export class ProjectComponent { } public get hasMetrics(): boolean { - return !(this.totalViews != null && this.totalDownloads != null) || this.totalViews > 0 || this.totalDownloads > 0; + // return !(this.totalViews != null && this.totalDownloads != null) || this.totalViews > 0 || this.totalDownloads > 0; + return this.projectInfo.measure?.counts?.length && (this.projectInfo.measure?.counts[0].value > 0 || this.projectInfo.measure?.counts[1].value); } public viewAllOrganizationsClick() { diff --git a/landingPages/project/project.service.ts b/landingPages/project/project.service.ts index 17084a51..f1224980 100644 --- a/landingPages/project/project.service.ts +++ b/landingPages/project/project.service.ts @@ -236,6 +236,10 @@ export class ProjectService { this.projectInfo.urlInfo = "Detailed project information (CORDIS)"; } + if (data[0]?.measure) { + this.projectInfo.measure = this.parsingFunctions.parseMeasures(data[0].measure); + } + return this.projectInfo; } diff --git a/services/searchDataproviders.service.ts b/services/searchDataproviders.service.ts index 3160d7ee..91c4fd14 100644 --- a/services/searchDataproviders.service.ts +++ b/services/searchDataproviders.service.ts @@ -169,6 +169,8 @@ export class SearchDataprovidersService { if(resData['pid']) { result.identifiers = this.parsingFunctions.parseIdentifiers(resData['pid']); } + // Measure + result.measure = this.parsingFunctions.parseMeasures(resData['measure']); results.push(result); } diff --git a/services/searchProjects.service.ts b/services/searchProjects.service.ts index e898dcda..2109666f 100644 --- a/services/searchProjects.service.ts +++ b/services/searchProjects.service.ts @@ -254,6 +254,8 @@ export class SearchProjectsService { if(resData.hasOwnProperty("enddate")) { result.endYear = resData.enddate.split('-')[0]; } + // Measure + result.measure = this.parsingFunctions.parseMeasures(resData['measure']); results.push(result); } diff --git a/utils/entities/dataProviderInfo.ts b/utils/entities/dataProviderInfo.ts index 47cabf6c..449bcc64 100644 --- a/utils/entities/dataProviderInfo.ts +++ b/utils/entities/dataProviderInfo.ts @@ -1,4 +1,5 @@ import {properties} from "../../../../environments/environment"; +import {Measure} from "./resultLandingInfo"; export class DataproviderProvenance { provenance: Map; @@ -36,6 +37,7 @@ export class DataProviderInfo { identifiers: Map; //key is the classname fundedContent: string; // search query + measure: Measure; //collected from datasource api // aggregationStatus: {"fundedContent": string, "indexRecords": string, "fulltexts": string, "lastUpdateDate": string}; diff --git a/utils/entities/projectInfo.ts b/utils/entities/projectInfo.ts index 84d0f47b..e66736fe 100644 --- a/utils/entities/projectInfo.ts +++ b/utils/entities/projectInfo.ts @@ -1,25 +1,26 @@ +import {Measure} from "./resultLandingInfo"; + export class ProjectInfo { - id:string; - acronym: string; - title: string; - - funding: {funderName: string, funderShortName: string, code: string, callIdentifier: string, - fundingStream: string, budget: string, contribution: string, currency: string}; - startDate: number; - endDate: number; - currentDate: number; - status: string; - openAccessMandatePublications: string; - openAccessMandateDatasets: string; - // specialClause39: string; - organizations: { "acronym": string, "name": string, "id": string }[];//Map; - url: string; - urlInfo: string; - description: string; - //publications: any; - researchData: any; - - totalPublications: number; - totalDatasets: number; - publicationsStatus: any; + id:string; + acronym: string; + title: string; + funding: {funderName: string, funderShortName: string, code: string, callIdentifier: string, + fundingStream: string, budget: string, contribution: string, currency: string}; + startDate: number; + endDate: number; + currentDate: number; + status: string; + openAccessMandatePublications: string; + openAccessMandateDatasets: string; + // specialClause39: string; + organizations: { "acronym": string, "name": string, "id": string }[];//Map; + url: string; + urlInfo: string; + description: string; + //publications: any; + researchData: any; + totalPublications: number; + totalDatasets: number; + publicationsStatus: any; + measure: Measure; } diff --git a/utils/rangeFilter/rangeFilter.component.html b/utils/rangeFilter/rangeFilter.component.html index 5159299d..a93220e0 100644 --- a/utils/rangeFilter/rangeFilter.component.html +++ b/utils/rangeFilter/rangeFilter.component.html @@ -12,10 +12,10 @@
      + inputClass="flat small" class=" uk-width-1-3">
      -
      + inputClass="flat small" class=" uk-width-1-3">
    • - + - Downloads + + {{projectInfo.measure.counts[1].name}} - {{formatNumber(totalDownloads)}} + [attr.uk-tooltip]="projectInfo.measure.counts[1].value >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'" + title="{{projectInfo.measure.counts[1].value | number}}"> + {{formatNumber(projectInfo.measure.counts[1].value)}}
      - + - Views + + {{projectInfo.measure.counts[0].name}} - {{formatNumber(totalViews)}} + [attr.uk-tooltip]="projectInfo.measure.counts[0].value >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'" + title="{{projectInfo.measure.counts[0].value | number}}"> + {{formatNumber(projectInfo.measure.counts[0].value)}}
      @@ -235,7 +235,7 @@ - +
      {{metric.name}}{{metric.value}}{{metric.value | number}}
      diff --git a/utils/result-preview/result-preview.component.ts b/utils/result-preview/result-preview.component.ts index aba09805..d6a88335 100644 --- a/utils/result-preview/result-preview.component.ts +++ b/utils/result-preview/result-preview.component.ts @@ -7,6 +7,7 @@ import {properties} from "../../../../environments/environment"; import {Identifier, StringUtils} from "../string-utils.class"; import {OpenaireEntities} from "../properties/searchFields"; import {HelperFunctions} from "../HelperFunctions.class"; +import {NumberUtils} from '../../utils/number-utils.class'; @Component({ selector: 'result-preview', @@ -213,4 +214,9 @@ export class ResultPreviewComponent implements OnInit, OnChanges { return this.result.resultType == "publication" || this.result.resultType == "dataset" || this.result.resultType == "software" || this.result.resultType == "other" || this.result.resultType == "result"; } + + public formatNumber(num: number | string) { + let formatted = NumberUtils.roundNumber(+num); + return formatted.number + formatted.size; + } } From 84bd4b24b8b7fee13535626e482c43662bc12fbc Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Tue, 2 May 2023 12:11:25 +0300 Subject: [PATCH 076/140] search page: advanced-search > remove number of rules applied in search bar and moved them above the results --- searchPages/searchUtils/advancedSearchForm.component.html | 2 +- searchPages/searchUtils/newSearchPage.component.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/searchPages/searchUtils/advancedSearchForm.component.html b/searchPages/searchUtils/advancedSearchForm.component.html index 81dba4f7..e9d954f3 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.html +++ b/searchPages/searchUtils/advancedSearchForm.component.html @@ -136,7 +136,7 @@ Search - ({{selectedFields.length}} Rules) + diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index c0639eee..c441ff44 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -263,9 +263,9 @@ for {{searchTerm}} - + {{oldTotalResults|number}} From 8a8a7e4152be3ca5a5a1bd75960f0e52daf30c0c Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Tue, 2 May 2023 12:47:49 +0300 Subject: [PATCH 077/140] fix an error for results without FoS --- landingPages/result/resultLanding.service.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index 6b1e58e3..49c24532 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -312,9 +312,11 @@ export class ResultLandingService { this.resultLandingInfo.subjects = subjectResults[0]; this.resultLandingInfo.otherSubjects = subjectResults[1]; this.resultLandingInfo.classifiedSubjects = subjectResults[2]; - subjectResults[3].forEach(element => { - this.resultLandingInfo.fos.push({id: element, label: element.replace(/^\d+/, '').trim()}); - }); + if (subjectResults[3]) { + subjectResults[3].forEach(element => { + this.resultLandingInfo.fos.push({id: element, label: element.replace(/^\d+/, '').trim()}); + }); + } if (this.resultLandingInfo.fos) { this.resultLandingInfo.fos.sort((a, b) => a.id.localeCompare(b.id)); } From b500fcb95757fdbdfc67581b0e3380315148e59d Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Thu, 4 May 2023 11:58:11 +0300 Subject: [PATCH 078/140] resultLanding: use common structure for metrics (measure) --- .../result/resultLanding.component.html | 288 +++++++----------- .../result/resultLanding.component.ts | 8 +- 2 files changed, 119 insertions(+), 177 deletions(-) diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index b65506c3..0f85204b 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -325,7 +325,7 @@
      - +
      @@ -374,49 +374,69 @@ -
      -
      -
      -
      -
      -
      + + +
      + +
      +
      +
      + + +
      + +
      +
      +
      -
      - Citations - -
      -
      - Popularity - -
      -
      - Influence - -
      -
      - Downloads - -
      -
      - Views - -
      + + + + + + + + + +
      -
      {{formatNumber(resultLandingInfo.measure.citations)}}
      -
      {{resultLandingInfo.measure.popularity}}
      -
      {{resultLandingInfo.measure.influence}}
      -
      {{formatNumber(resultLandingInfo.measure.downloads)}}
      -
      {{formatNumber(resultLandingInfo.measure.views)}}
      + + + +
      + {{formatNumber(measure.value)}} +
      +
      + +
      + {{measure.value}} +
      +
      +
      +
      + + +
      + {{formatNumber(measure.value)}} +
      +
      +
      @@ -1009,13 +1029,13 @@
    • Overview
    • -
    • +
    • Impact
    • Social
    • -
    • +
    • Usage
    @@ -1023,7 +1043,7 @@
  • -
    +
    @@ -1040,54 +1060,20 @@
    - - - - - - - - - - - - - - - - - - - - + + + + + + +
    - - - Citations - - - {{formatNumber(resultLandingInfo.measure.citations)}} -
    - - - Popularity - - - {{resultLandingInfo.measure.popularity}} -
    - - - Influence - - - {{resultLandingInfo.measure.influence}} -
    - - - Impulse - - - {{resultLandingInfo.measure.impulse}} -
    + + + {{measure.name}} + + + {{isNumber(measure.value) ? formatNumber(measure.value) : measure.value}} +
    @@ -1096,7 +1082,7 @@
    -
    +
    @@ -1112,32 +1098,21 @@
    - - - - - - - - - - + + + + + + +
    - - - Downloads - - {{formatNumber(resultLandingInfo.measure.downloads)}} -
    - - - Views - - {{formatNumber(resultLandingInfo.measure.views)}} -
    + + + {{measure.name}} + + {{formatNumber(measure.value)}} +
    @@ -1146,59 +1121,25 @@
  • -
  • +
  • - - - - - - - - - - - - - - - - - - - - + + + + + + +
    - - - Citations - - - {{formatNumber(resultLandingInfo.measure.citations)}} -
    - - - Popularity - - - {{resultLandingInfo.measure.popularity}} -
    - - - Influence - - - {{resultLandingInfo.measure.influence}} -
    - - - Impulse - - - {{resultLandingInfo.measure.impulse}} -
    + + + {{measure.name}} + + + {{isNumber(measure.value) ? formatNumber(measure.value) : measure.value}} +
    @@ -1221,22 +1162,17 @@
  • -
  • +
  • -
    -
    {{formatNumber(resultLandingInfo.measure.downloads)}}
    -
    Downloads
    -
    -
    -
    {{formatNumber(resultLandingInfo.measure.views)}}
    -
    Views
    -
    + +
    +
    {{formatNumber(measure.value)}}
    +
    {{measure.name}}
    +
    +
    diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index 5b1c9b53..815cd238 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -1084,11 +1084,17 @@ export class ResultLandingComponent { return "
    This indicator reflects the \"current\" impact/attention (the \"hype\") of an article in the research community at large, based on the underlying citation network.
    BIP!Popularity provided by BIP!
    "; } else if (value == 'influence') { return "
    This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    BIP!Influence provided by BIP!
    "; - } else if (value == 'downloads') { + } else if (value == 'impulse') { + return "
    This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
    BIP!Impulse provided by BIP!
    "; + } else if (value == 'downloads') { return "
    OpenAIRE UsageCountsDownloads provided by UsageCounts
    "; } else if (value == 'views') { return "
    OpenAIRE UsageCountsViews provided by UsageCounts
    "; } } } + + public isNumber(value): boolean { + return typeof value === 'number'; + } } From 87c91e23fb49e37da8e74742bc41a1e9f6379048 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Thu, 4 May 2023 15:15:47 +0300 Subject: [PATCH 079/140] project & dataProvider landing: use ngFor loop on the measure.counts arrays to display the correct measures --- .../dataProvider/dataProvider.component.html | 100 ++++++++---------- .../dataProvider/dataProvider.component.ts | 2 +- landingPages/project/project.component.html | 98 ++++++++--------- landingPages/project/project.component.ts | 2 +- 4 files changed, 92 insertions(+), 110 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index de65c000..349fc6e9 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -189,18 +189,21 @@
    -
    -
    + + +
    + +
    +
    +
    @@ -209,10 +212,12 @@
    -
    {{formatNumber(dataProviderInfo.measure.counts[1].value)}}
    -
    {{formatNumber(dataProviderInfo.measure.counts[0].value)}}
    + +
    + {{formatNumber(measure.value)}} +
    +
    @@ -780,14 +785,14 @@
  • Overview
  • -
  • +
  • Usage
    • -
      +
      @@ -803,32 +808,21 @@
      - - - - - - - - - - + + + + + + +
      - - - {{dataProviderInfo.measure.counts[1].name}} - - {{formatNumber(dataProviderInfo.measure.counts[1].value)}} -
      - - - {{dataProviderInfo.measure.counts[0].name}} - - {{formatNumber(dataProviderInfo.measure.counts[0].value)}} -
      + + + {{measure.name}} + + {{formatNumber(measure.value)}} +
      @@ -836,21 +830,17 @@
    • -
    • +
    • -
      -
      {{formatNumber(dataProviderInfo.measure.counts[1].value)}}
      -
      {{dataProviderInfo.measure.counts[1].name}}
      -
      -
      -
      {{formatNumber(dataProviderInfo.measure.counts[0].value)}}
      -
      {{dataProviderInfo.measure.counts[0].name}}
      -
      + +
      +
      {{formatNumber(measure.value)}}
      +
      {{measure.name}}
      +
      +
      diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts index d7812330..5c9099ec 100644 --- a/landingPages/dataProvider/dataProvider.component.ts +++ b/landingPages/dataProvider/dataProvider.component.ts @@ -713,7 +713,7 @@ export class DataProviderComponent { public get hasMetrics(): boolean { // return !(this.totalViews != null && this.totalDownloads != null) || this.totalViews > 0 || this.totalDownloads > 0; // return (this.totalViews != null && this.totalViews > 0) || (this.totalDownloads != null && this.totalDownloads > 0); - return this.dataProviderInfo.measure?.counts?.length && (this.dataProviderInfo.measure?.counts[0].value > 0 || this.dataProviderInfo.measure?.counts[1].value); + return this.dataProviderInfo.measure?.counts?.length > 0; } // public openStatistics() { diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index eeef97ba..1519ebd6 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -322,18 +322,21 @@
      -
      -
      + + +
      + +
      +
      +
      @@ -342,10 +345,12 @@
      -
      {{formatNumber(projectInfo.measure.counts[1].value)}}
      -
      {{formatNumber(projectInfo.measure.counts[0].value)}}
      + +
      + {{formatNumber(measure.value)}} +
      +
      @@ -843,14 +848,14 @@
    • Overview
    • -
    • +
    • Usage
    From 1ec84770535c7f691d6eb7d2b0a99c6aec4bcd65 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 28 Jun 2023 14:39:31 +0300 Subject: [PATCH 120/140] FOS: Change OpenAIRE Research Graph to OpenAIRE Graph. --- fos/fos.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fos/fos.component.html b/fos/fos.component.html index af6ee6e0..27479019 100644 --- a/fos/fos.component.html +++ b/fos/fos.component.html @@ -15,7 +15,7 @@ Fields of Science .
    - We have integrated a Field-of-Science (FoS) taxonomy into our dataset to organize and discover research more effectively. Using the full capabilities of the OpenAIRE Research Graph (full-texts, citations, references, venues) we apply AI and bring forward any multidisciplinarity potential. + We have integrated a Field-of-Science (FoS) taxonomy into our dataset to organize and discover research more effectively. Using the full capabilities of the OpenAIRE Graph (full-texts, citations, references, venues) we apply AI and bring forward any multidisciplinarity potential.
    Our work is based on the work from our partner Athena Research Center: SciNoBo : A Hierarchical Multi-Label Classifier of Scientific Publications - https://doi.org/10.1145/3487553.3524677 From 4b845dd0bd9e6d323180640af8580c8b583d144b Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 29 Jun 2023 10:20:29 +0300 Subject: [PATCH 121/140] Customization: Fix checkForObsoleteVersion to return null for connect. --- connect/community/CustomizationOptions.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/connect/community/CustomizationOptions.ts b/connect/community/CustomizationOptions.ts index f6838fe2..78a8e890 100644 --- a/connect/community/CustomizationOptions.ts +++ b/connect/community/CustomizationOptions.ts @@ -174,6 +174,9 @@ export class CustomizationOptions { } public static checkForObsoleteVersion(current: CustomizationOptions, communityId: string) { + if(communityId === 'connect') { + return null; + } let defaultCO = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor); let updated = Object.assign({}, defaultCO); if (!current) { From 715069eabc0e9e442eb3d017d09862d699d14585 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Fri, 30 Jun 2023 14:39:48 +0300 Subject: [PATCH 122/140] Remove logs from reload. Add url variable in order to handle error from guards with the connect path. --- error-interceptor.service.ts | 16 +++++++++++++--- reload/reload.component.ts | 2 -- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/error-interceptor.service.ts b/error-interceptor.service.ts index 1ad66661..713949c3 100644 --- a/error-interceptor.service.ts +++ b/error-interceptor.service.ts @@ -3,15 +3,25 @@ import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from "@angular/com import {Observable, throwError, TimeoutError} from "rxjs"; import {catchError} from "rxjs/operators"; import {Session} from "./login/utils/helper.class"; -import {Router} from "@angular/router"; +import {GuardsCheckEnd, GuardsCheckStart, Router} from "@angular/router"; import {LoginErrorCodes} from "./login/utils/guardHelper.class"; import {properties} from "../../environments/environment"; +import * as url from "url"; @Injectable() export class ErrorInterceptorService implements HttpInterceptor { private static UNAUTHORIZED_WHITELIST = [properties.userInfoUrl, properties.orcidAPIURL, properties.registryUrl? (properties.registryUrl + 'verification/'):null, properties.eoscDataTransferAPI].filter(value => !!value); + private url: string = null; + constructor(private router: Router) { + this.router.events.forEach(event => { + if(event instanceof GuardsCheckStart) { + this.url = event.url; + } else if(event instanceof GuardsCheckEnd) { + this.url = null; + } + }) } intercept(req: HttpRequest, next: HttpHandler): Observable> { @@ -42,7 +52,7 @@ export class ErrorInterceptorService implements HttpInterceptor { this.router.navigate(['/user-info'], { queryParams: { 'errorCode': LoginErrorCodes.NOT_LOGIN, - 'redirectUrl': this.router.url + 'redirectUrl': this.url?this.url:this.router.url } }); } @@ -51,7 +61,7 @@ export class ErrorInterceptorService implements HttpInterceptor { this.router.navigate(['/user-info'], { queryParams: { 'errorCode': LoginErrorCodes.NOT_AUTHORIZED, - 'redirectUrl': this.router.url + 'redirectUrl': this.url?this.url:this.router.url } }); } diff --git a/reload/reload.component.ts b/reload/reload.component.ts index 833b43ce..e86df79c 100644 --- a/reload/reload.component.ts +++ b/reload/reload.component.ts @@ -16,7 +16,6 @@ export class ReloadComponent { public ngOnInit() { let URL = Session.getReloadUrl(); - console.log(URL); if (URL && URL["path"] && URL["path"] != "") { let url: string = URL["path"]; let host = URL["host"]; @@ -24,7 +23,6 @@ export class ReloadComponent { if (host == (location.protocol + "//" + location.host)) { let baseUrl = (document && document.getElementsByTagName('base')) ? document.getElementsByTagName('base')[0].href.split(document.location.host)[1] : "/"; url = (baseUrl.length > 1 && url.indexOf(baseUrl) != -1) ? ("/" + url.split(baseUrl)[1]) : url; - console.log(url); if (paramsObject) { Session.setReloadUrl("", "", "", ""); if(URL['fragment'] && URL['fragment'] !== '') { From aabd28d1f176c4d8c50e3822cb9629cc8f43e071 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Fri, 30 Jun 2023 14:54:25 +0300 Subject: [PATCH 123/140] Fix disabled color for labels --- sharedComponents/input/input.component.ts | 414 +++++++++++----------- 1 file changed, 208 insertions(+), 206 deletions(-) diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts index 7b889d2f..19c5040c 100644 --- a/sharedComponents/input/input.component.ts +++ b/sharedComponents/input/input.component.ts @@ -23,15 +23,15 @@ import {properties} from "../../../../environments/environment"; import {ClickEvent} from "../../utils/click/click-outside-or-esc.directive"; export type InputType = - 'text' - | 'URL' - | 'logoURL' - | 'autocomplete' - | 'autocomplete_soft' - | 'textarea' - | 'select' - | 'chips' - | 'year-range'; + 'text' + | 'URL' + | 'logoURL' + | 'autocomplete' + | 'autocomplete_soft' + | 'textarea' + | 'select' + | 'chips' + | 'year-range'; export interface Option { icon?: string, @@ -70,144 +70,144 @@ declare var UIkit; @Component({ selector: '[dashboard-input], [input]', template: ` -
    -
    -
    -
    - -
    -
    - - - - +
    +
    +
    +
    + +
    +
    + + + + - - - -
    {{placeholderInfo.label}}
    -
    {{getLabel(formControl.value)}}
    -
    - -
    {{noValueSelected}}
    -
    {{getLabel(formControl.value)}}
    -
    -
    - - - -
    {{placeholderInfo?.static ? placeholderInfo.label : getLabel(formAsControl.value)}}
    -
    {{getLabel(formAsControl.value)}}
    -
    - -
    {{noValueSelected}}
    -
    {{getLabel(formControl.value)}}
    -
    -
    - - - - -
    -
    -
    - {{getLabel(chip.value)}} - + + + +
    {{placeholderInfo.label}}
    +
    {{getLabel(formControl.value)}}
    +
    + +
    {{noValueSelected}}
    +
    {{getLabel(formControl.value)}}
    +
    +
    + + + +
    {{placeholderInfo?.static ? placeholderInfo.label : getLabel(formAsControl.value)}}
    +
    {{getLabel(formAsControl.value)}}
    +
    + +
    {{noValueSelected}}
    +
    {{getLabel(formControl.value)}}
    +
    +
    + + + + +
    +
    +
    + {{getLabel(chip.value)}} + +
    +
    +
    + +
    +
    + + {{(formAsArray.length - visibleChips)}} more +
    +
    +
    + +
    + +
    +
    -
    +
    + +
    +
    +
    + + + + + + + +
    + + +
    +
    +
    -
    -
    - -
    -
    - + {{(formAsArray.length - visibleChips)}} more -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    -
    - - - - - - - -
    - -
    -
    - -
    -
    -
    -
    -
      -
    • - +
      + + [attr.uk-tooltip]="(tooltip)?('title: ' + (option.tooltip ? option.tooltip : option.label) + '; delay: 500; pos:bottom-left'):null">{{option.label}} + +
    • +
    +
    -
    - + {{errors?.error}} Please provide a valid URL (e.g. https://example.com) - + - + Note: Prefer urls like "https://example.com/my-secure-image.png" @@ -215,9 +215,9 @@ declare var UIkit; Browsers may not load non secure content. - - - + + + ` }) export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChanges { @@ -261,7 +261,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang /** Year Range Configuration */ @Input() yearRange: YearRange; public activeIndex: 0 | 1 | null = null; - + @Input() visibleRows: number = -1; @Input() extendEnter: () => void = null; @Output() focusEmitter: EventEmitter = new EventEmitter(); @@ -282,7 +282,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang @ViewChild('optionBox') optionBox: ElementRef; @ViewChild('searchInput') searchInput: ElementRef; @ViewChildren('chip') chips: QueryList; - + @Input() set placeholder(placeholder: string | Placeholder) { if(this.type === 'year-range') { @@ -297,7 +297,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang this.placeholderInfo = placeholder; } } - + @Input() set options(options: (Option | string | number) []) { this.optionsArray = options.map(option => { @@ -322,13 +322,13 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang this.selectable = true; } } - + constructor(private elementRef: ElementRef, private cdr: ChangeDetectorRef) { if (elementRef.nativeElement.hasAttribute('dashboard-input') && this.properties.environment === "development") { console.warn("'dashboard-input' selector is deprecated; use 'input' instead."); } } - + @HostListener('window:keydown.arrowUp', ['$event']) arrowUp(event: KeyboardEvent) { if (this.opened) { @@ -339,7 +339,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } } } - + @HostListener('window:keydown.arrowDown', ['$event']) arrowDown(event: KeyboardEvent) { if (this.opened) { @@ -350,7 +350,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } } } - + @HostListener('window:keydown.arrowLeft', ['$event']) arrowLeft(event: KeyboardEvent) { if (this.type === 'chips' && this.focused) { @@ -364,7 +364,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } } } - + @HostListener('window:keydown.arrowRight', ['$event']) arrowRight(event: KeyboardEvent) { if (this.type === 'chips' && this.focused) { @@ -378,7 +378,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } } } - + @HostListener('window:keydown.enter', ['$event']) enter(event: KeyboardEvent) { if (this.opened && this.optionBox) { @@ -395,7 +395,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang this.extendEnter(); } } - + @HostListener('keydown', ['$event']) onKeyDown(event: KeyboardEvent) { if (this.separators.includes(event.key) || this.separators.includes(event.key.toLowerCase())) { @@ -403,11 +403,11 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang this.add(event, true); } } - + click(event: ClickEvent) { this.focus(!event.clicked); } - + ngOnInit() { InputComponent.INPUT_COUNTER++; this.id = 'input-' + InputComponent.INPUT_COUNTER; @@ -430,11 +430,11 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } }) } - + ngAfterViewInit() { this.reset(); } - + ngOnChanges(changes: SimpleChanges) { if (this.formControl) { if (changes.value) { @@ -455,11 +455,11 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } } } - + ngOnDestroy(): void { this.unsubscribe(); } - + getFormByName(name: string): UntypedFormControl { if (this.formControl instanceof UntypedFormGroup) { return this.formControl.get(name); @@ -467,7 +467,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang return null; } } - + get formAsGroup(): UntypedFormGroup { if (this.formControl instanceof UntypedFormGroup) { return this.formControl; @@ -475,7 +475,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang return null; } } - + get formAsControl(): UntypedFormControl { if (this.formControl instanceof UntypedFormControl) { return this.formControl; @@ -483,7 +483,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang return null; } } - + get formAsArray(): UntypedFormArray { if (this.formControl instanceof UntypedFormArray) { return this.formControl; @@ -491,26 +491,26 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang return null; } } - + get yearRangeActive(): boolean { if(this.yearRange) { return this.formAsGroup && (this.getFormByName(this.yearRange.from.control)?.value || this.getFormByName(this.yearRange.to.control)?.value); } return false; } - + get errors(): any { if(this.formAsGroup) { return (this.formAsGroup.errors - ?this.formAsGroup.errors:(this.getFormByName(this.yearRange.from.control).errors - ?this.getFormByName(this.yearRange.from.control).errors:this.getFormByName(this.yearRange.to.control).errors)); + ?this.formAsGroup.errors:(this.getFormByName(this.yearRange.from.control).errors + ?this.getFormByName(this.yearRange.from.control).errors:this.getFormByName(this.yearRange.to.control).errors)); } else if(this.formAsControl) { return this.formAsControl.errors; } else { return this.searchControl.errors; } } - + reset() { this.secure = true; this.unsubscribe(); @@ -601,7 +601,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang }); } } - + unsubscribe() { this.subscriptions.forEach(subscription => { if (subscription instanceof Subscription) { @@ -609,7 +609,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } }); } - + updateValidators() { if (this.formAsArray) { this.formAsArray.controls.forEach(control => { @@ -621,7 +621,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang this.formControl.updateValueAndValidity(); } } - + remove(index: number, event) { if (this.focused) { this.formAsArray.removeAt(index); @@ -631,7 +631,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang event.stopPropagation(); } } - + private filter(value: string): Option[] { let options = this.optionsArray.filter(option => !option.hidden); if (this.type === "chips") { @@ -649,7 +649,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } return options; } - + add(event, addChips = false) { if (addChips && this.searchControl.value) { this.splitSearchControl(); @@ -657,7 +657,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang this.searchControl.setValue(''); } } - + splitSearchControl() { let values = [this.searchControl.value]; this.separators.forEach(separator => { @@ -681,17 +681,17 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang this.searchControl.setValue(''); } } - + getLabel(value: any): string { let option = this.optionsArray.find(option => HelperFunctions.equals(option.value, value)); return (option) ? option.label : (value); } - + getTooltip(value: any): string { let option = this.optionsArray.find(option => HelperFunctions.equals(option.value, value)); return (option) ? (option.tooltip ? option.tooltip : option.label) : (value); } - + focus(value: boolean, event = null) { if(!this.activeIndex) { this.activeIndex = 0; @@ -699,41 +699,43 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang if (this.focused) { this.formControl.markAsTouched(); } - this.focused = value; - this.cdr.detectChanges(); - if (this.focused) { - if (this.input?.length > 0) { - this.input.get(this.activeIndex).nativeElement.focus(); - } else if (this.textArea) { - this.textArea.nativeElement.focus(); - } else if (this.searchInput) { - this.searchInput.nativeElement.focus(); - this.activeElement.next(this.chips.last); - } - if (this.selectArrow) { - this.open(!this.opened); - } else if (this.type !== 'autocomplete' || this.showOptionsOnEmpty || !this.formControl.value) { - this.open(true); - } - } else { - this.activeIndex = null; - this.open(false); - if (this.input) { - this.input.forEach(input => { - input.nativeElement.blur(); - }) - } else if (this.textArea) { - this.textArea.nativeElement.blur(); - } else if (this.searchInput) { - this.searchInput.nativeElement.blur(); - } - if (this.searchControl) { - this.add(event, this.addExtraChips); + if(this.formControl.enabled) { + this.focused = value; + this.cdr.detectChanges(); + if (this.focused) { + if (this.input?.length > 0) { + this.input.get(this.activeIndex).nativeElement.focus(); + } else if (this.textArea) { + this.textArea.nativeElement.focus(); + } else if (this.searchInput) { + this.searchInput.nativeElement.focus(); + this.activeElement.next(this.chips.last); + } + if (this.selectArrow) { + this.open(!this.opened); + } else if (this.type !== 'autocomplete' || this.showOptionsOnEmpty || !this.formControl.value) { + this.open(true); + } + } else { + this.activeIndex = null; + this.open(false); + if (this.input) { + this.input.forEach(input => { + input.nativeElement.blur(); + }) + } else if (this.textArea) { + this.textArea.nativeElement.blur(); + } else if (this.searchInput) { + this.searchInput.nativeElement.blur(); + } + if (this.searchControl) { + this.add(event, this.addExtraChips); + } } + this.focusEmitter.emit(this.focused); } - this.focusEmitter.emit(this.focused); } - + open(value: boolean) { this.opened = value && this.formControl.enabled; this.cdr.detectChanges(); @@ -750,19 +752,19 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } } } - + resetSearch(event: any) { event.stopPropagation(); this.searchControl.setValue(''); this.focus(true, event); } - + resetValue(event: any) { event.stopPropagation(); this.formControl.setValue(''); this.focus(true, event); } - + selectOption(option: Option, event) { if (this.formControl.enabled) { if (this.formAsControl) { From 7e5317e920340db31fff4eca37497b5ab37e50c7 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Tue, 4 Jul 2023 10:16:08 +0300 Subject: [PATCH 124/140] redesign linking results (cards) to match the new style, fix a css selector for SDG page --- claims/claim-utils/claimResults.component.ts | 22 ++-- .../service/searchDatacite.service.ts | 1 - .../ClaimEntityMetadata.component.less | 11 ++ .../ClaimEntityProjectMetadata.component.ts | 34 ++++-- .../ClaimEntityResultMetadata.component.ts | 44 ++++--- .../selected/ClaimEntityTitle.component.ts | 110 +++++++++--------- .../selected/metadataPreview.component.html | 16 +-- sdg/sdg.component.less | 2 +- 8 files changed, 134 insertions(+), 106 deletions(-) create mode 100644 claims/linking/selected/ClaimEntityMetadata.component.less diff --git a/claims/claim-utils/claimResults.component.ts b/claims/claim-utils/claimResults.component.ts index 3b6177e2..815dabf9 100644 --- a/claims/claim-utils/claimResults.component.ts +++ b/claims/claim-utils/claimResults.component.ts @@ -6,13 +6,9 @@ declare var UIkit: any; @Component({ selector: 'claim-results', template: ` -
    -
    -
    -
    - {{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}} -
    +
    +
    @@ -20,27 +16,29 @@ declare var UIkit: any;
    - -
    -
    -
    `, - +
    + ` }) export class ClaimResultsComponent { @Input() results: ClaimEntity[]; @Input() selectedResults: ClaimEntity[]; @Input() localStoragePrefix: string = ""; @Input() basketLimit; - + + ngOnInit() { + } + public isSelected(item: ClaimEntity) { return !!this.selectedResults.find(result => item.id === result.id); } diff --git a/claims/claim-utils/service/searchDatacite.service.ts b/claims/claim-utils/service/searchDatacite.service.ts index 52854ed5..4361462f 100644 --- a/claims/claim-utils/service/searchDatacite.service.ts +++ b/claims/claim-utils/service/searchDatacite.service.ts @@ -50,7 +50,6 @@ export class SearchDataciteService { static parse(response): ClaimEntity[] { const results: ClaimEntity[] = []; - console.log(response); for (let i = 0; i < response.length; i++) { const item = response[i]; const entity: ClaimEntity = new ClaimEntity(); diff --git a/claims/linking/selected/ClaimEntityMetadata.component.less b/claims/linking/selected/ClaimEntityMetadata.component.less new file mode 100644 index 00000000..33e65cd1 --- /dev/null +++ b/claims/linking/selected/ClaimEntityMetadata.component.less @@ -0,0 +1,11 @@ +@import (reference) "~src/assets/openaire-theme/less/_import-variables"; + +.claim-entity-metadata { + + & > *:not(:last-child):not(.other-separator)::after { + content: "\2022"; + font-weight: normal; + margin-left: @global-xsmall-margin; + margin-right: @global-xsmall-margin; + } +} diff --git a/claims/linking/selected/ClaimEntityProjectMetadata.component.ts b/claims/linking/selected/ClaimEntityProjectMetadata.component.ts index fa83b344..0b90acc6 100644 --- a/claims/linking/selected/ClaimEntityProjectMetadata.component.ts +++ b/claims/linking/selected/ClaimEntityProjectMetadata.component.ts @@ -4,18 +4,28 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class'; @Component({ selector: 'claim-project-metadata', template: ` -
    -
    - Funder: {{entity.project.funderName}} -
    -
    - GrandID: {{entity.project.code}} -
    -
    - Duration: {{(entity.project.startDate) ? entity.project.startDate : 'Unknown'}}{{'-' + ((entity.project.endDate) ? entity.project.endDate : 'Unknown')}} -
    -
    - ` + + +
    +
    + Funder: {{entity.project.funderName}} +
    +
    + Project Code: {{entity.project.code}} +
    +
    +
    + `, + styleUrls: ['ClaimEntityMetadata.component.less'] }) diff --git a/claims/linking/selected/ClaimEntityResultMetadata.component.ts b/claims/linking/selected/ClaimEntityResultMetadata.component.ts index c74bb953..d4db19f4 100644 --- a/claims/linking/selected/ClaimEntityResultMetadata.component.ts +++ b/claims/linking/selected/ClaimEntityResultMetadata.component.ts @@ -4,29 +4,37 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class'; @Component({ selector: 'claim-result-metadata', template: ` -
    -
    - Authors: {{sliceArray(entity.result.authors)}} -
    -
    - Editors: {{sliceArray(entity.result.editors)}} -
    -
    - - Publisher: {{entity.result.publisher}} +
    + + +
    + {{sliceArray(entity.result.authors)}} +
    +
    + + {{getProjectDurationMessage(entity)}} +
    - ` + `, + styleUrls: ['ClaimEntityMetadata.component.less'] }) diff --git a/claims/linking/selected/ClaimEntityTitle.component.ts b/claims/linking/selected/ClaimEntityTitle.component.ts index 76fd338d..12231e53 100644 --- a/claims/linking/selected/ClaimEntityTitle.component.ts +++ b/claims/linking/selected/ClaimEntityTitle.component.ts @@ -1,64 +1,67 @@ import {Component, Input} from '@angular/core'; import {ClaimEntity} from '../../claim-utils/claimHelper.class'; -import {StringUtils} from "../../../utils/string-utils.class"; @Component({ selector: 'claim-title', - template: - ` -
    - - insert_drive_file - - assignment_turned_in - - people - -
    - - {{entity.title ? sliceString(entity.title) : '[No title available]'}} - {{entity.title ? sliceString(entity.title) : '[No title available]'}} - - - - {{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}} - - - {{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}} - + template: ` +
    + + + insert_drive_file + + + assignment_turned_in + + + people + + +
    +
    + + {{entity.title ? sliceString(entity.title) : '[No title available]'}} - - - {{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}} - - - {{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}} - - - - - - - - {{entity.context.community }} > {{entity.context.category}} > - - {{entity.context.concept.label}} - + + {{entity.title ? sliceString(entity.title) : '[No title available]'}} + + + + + {{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}} + + + {{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}} + + + + + {{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}} + + + {{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}} + + + + + + {{entity.context.community }} > {{entity.context.category}} > + + + {{entity.context.concept.label}} + + +
    -
    +
    ` }) export class ClaimEntityTitleComponent { - - @Input() entity: ClaimEntity; @Input() slice:boolean = false; @Input() sliceSize:number = 45; @@ -66,14 +69,13 @@ export class ClaimEntityTitleComponent { @Input() showIcon: boolean = false; ngOnInit() { - - } + sliceString(mystr:string): string { - if(this.slice){ + if(this.slice){ // return StringUtils.sliceString(mystr,this.sliceSize); - } - return mystr; + } + return mystr; } } diff --git a/claims/linking/selected/metadataPreview.component.html b/claims/linking/selected/metadataPreview.component.html index f5b5221f..2a8f38c3 100644 --- a/claims/linking/selected/metadataPreview.component.html +++ b/claims/linking/selected/metadataPreview.component.html @@ -12,8 +12,8 @@
    SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}}) - Edit + Edit sources
      @@ -51,10 +51,10 @@
      • -
        +
        Link couldn't be saved
        @@ -157,8 +157,8 @@ LINK TO ({{results.length | number}}) - Edit + Edit entities
        @@ -174,7 +174,7 @@
      • -
        +
        Link couldn't be saved
        diff --git a/sdg/sdg.component.less b/sdg/sdg.component.less index d24ff52d..56f50806 100644 --- a/sdg/sdg.component.less +++ b/sdg/sdg.component.less @@ -3,7 +3,7 @@ @sdgs: #E6233D, #DF9F00, #19A220, #D70023, #FF0B00, #00BFE8, #FFC300, #B10240, #FF5D00, #F50D86, #FF8A00, #CA8A03, #2B772B, #0098DF, #00B91C, #0069A2, #1C336A; -custom-sdg-dot:after { +.custom-sdg-dot:after { content: ""; background-image: url("~src/assets/common-assets/sdg/sdg-dot-img.svg"); display: inline-block; From 18b5ce220170d573213bc1fd3f86080497746bc6 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 4 Jul 2023 11:08:39 +0300 Subject: [PATCH 125/140] Fix bodyHeight in full screen modal. --- .../full-screen-modal.component.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/utils/modal/full-screen-modal/full-screen-modal.component.ts b/utils/modal/full-screen-modal/full-screen-modal.component.ts index e7e010fd..fe27d429 100644 --- a/utils/modal/full-screen-modal/full-screen-modal.component.ts +++ b/utils/modal/full-screen-modal/full-screen-modal.component.ts @@ -1,16 +1,16 @@ import { - AfterViewInit, ChangeDetectorRef, + AfterViewInit, + ChangeDetectorRef, Component, ElementRef, - EventEmitter, HostListener, + EventEmitter, + HostListener, Input, OnDestroy, - OnInit, Output, ViewChild } from "@angular/core"; -import {fromEvent, Subscription} from 'rxjs'; -import {delay} from "rxjs/operators"; +import {Subscription} from 'rxjs'; import {HelperFunctions} from "../../HelperFunctions.class"; import {LayoutService} from "../../../dashboard/sharedComponents/sidebar/layout.service"; @@ -43,7 +43,7 @@ declare var ResizeObserver;
        -
        +
        @@ -111,7 +111,7 @@ export class FullScreenModalComponent implements AfterViewInit, OnDestroy { /* Height = Viewport - header - (Body padding) */ changeHeight() { if(typeof window !== "undefined" && this.header) { - this.bodyHeight = window.innerHeight - this.header.nativeElement.clientHeight - (this.isMobile?40:80); + this.bodyHeight = window.innerHeight - this.header.nativeElement.offsetHeight; this.cdr.detectChanges(); } } From aa10b35f7aa54c3f2e40749f27010c4c7966cda0 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 4 Jul 2023 11:53:08 +0300 Subject: [PATCH 126/140] Fix ResizeObserver condition in landings and fs-modal --- .../dataProvider/dataProvider.component.ts | 6 +++--- .../organization/organization.component.ts | 3 ++- landingPages/project/project.component.ts | 7 ++++--- landingPages/result/resultLanding.component.ts | 8 ++++---- .../full-screen-modal.component.ts | 14 ++++++-------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts index 7b358153..2b4d1290 100644 --- a/landingPages/dataProvider/dataProvider.component.ts +++ b/landingPages/dataProvider/dataProvider.component.ts @@ -1,4 +1,4 @@ -import {ChangeDetectorRef, Component, ElementRef, HostListener, Input, ViewChild} from '@angular/core'; +import {ChangeDetectorRef, Component, ElementRef, Input, ViewChild} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Meta, Title} from '@angular/platform-browser'; @@ -26,7 +26,6 @@ import {ResultPreview} from "../../utils/result-preview/result-preview"; import {IndexInfoService} from "../../utils/indexInfo.service"; import {properties} from "../../../../environments/environment"; import {Subscriber, Subscription, zip} from "rxjs"; -import {TabComponent} from "../../utils/tabs/tab.component"; import {OpenaireEntities} from "../../utils/properties/searchFields"; import {MetricsService} from '../../services/metrics.service'; import {NumberUtils} from '../../utils/number-utils.class'; @@ -358,7 +357,8 @@ export class DataProviderComponent { this.subscriptions.forEach(subscription => { if (subscription instanceof Subscriber) { subscription.unsubscribe(); - } else if (subscription instanceof (ResizeObserver || IntersectionObserver)) { + } else if ((typeof ResizeObserver != 'undefined' && subscription instanceof ResizeObserver) || + (typeof IntersectionObserver != 'undefined' && subscription instanceof IntersectionObserver)) { subscription.disconnect(); } }); diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index 25c88990..26330d41 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -280,7 +280,8 @@ export class OrganizationComponent { this.subscriptions.forEach(subscription => { if (subscription instanceof Subscriber) { subscription.unsubscribe(); - } else if (subscription instanceof (ResizeObserver || IntersectionObserver)) { + } else if ((typeof ResizeObserver != 'undefined' && subscription instanceof ResizeObserver) || + (typeof IntersectionObserver != 'undefined' && subscription instanceof IntersectionObserver)) { subscription.disconnect(); } }); diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index cf46334d..bc24e86c 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -1,4 +1,4 @@ -import {ChangeDetectorRef, Component, ElementRef, HostListener, Input, ViewChild} from '@angular/core'; +import {ChangeDetectorRef, Component, ElementRef, Input, ViewChild} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Meta, Title} from '@angular/platform-browser'; @@ -25,7 +25,7 @@ import {StringUtils} from "../../utils/string-utils.class"; import {ResultPreview} from "../../utils/result-preview/result-preview"; import {SearchResult} from "../../utils/entities/searchResult"; import {IndexInfoService} from "../../utils/indexInfo.service"; -import {Subscriber, zip, Subscription} from "rxjs"; +import {Subscriber, Subscription, zip} from "rxjs"; import {properties} from "../../../../environments/environment"; import {Option} from "../../sharedComponents/input/input.component"; import {OpenaireEntities} from "../../utils/properties/searchFields"; @@ -380,7 +380,8 @@ export class ProjectComponent { this.subscriptions.forEach(subscription => { if (subscription instanceof Subscriber) { subscription.unsubscribe(); - } else if (subscription instanceof (ResizeObserver || IntersectionObserver)) { + } else if ((typeof ResizeObserver != 'undefined' && subscription instanceof ResizeObserver) || + (typeof IntersectionObserver != 'undefined' && subscription instanceof IntersectionObserver)) { subscription.disconnect(); } }); diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index a44acc1d..0f454bee 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -1,4 +1,4 @@ -import {ChangeDetectorRef, Component, ElementRef, EventEmitter, HostListener, Input, Output, ViewChild} from '@angular/core'; +import {ChangeDetectorRef, Component, ElementRef, Input, ViewChild} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Meta, Title} from '@angular/platform-browser'; @@ -18,8 +18,7 @@ import {IndexInfoService} from "../../utils/indexInfo.service"; import {Identifier, StringUtils} from "../../utils/string-utils.class"; import {properties} from "../../../../environments/environment"; import {ISVocabulariesService} from "../../utils/staticAutoComplete/ISVocabularies.service"; -import {forkJoin, Observable, Subscription, zip} from "rxjs"; -import {AnnotationComponent} from "../annotation/annotation.component"; +import {Subscription} from "rxjs"; import {ParsingFunctions} from "../landing-utils/parsingFunctions.class"; import {ConnectHelper} from "../../connect/connectHelper"; import {UserManagementService} from "../../services/user-management.service"; @@ -383,7 +382,8 @@ export class ResultLandingComponent { subscription.unsubscribe(); } else if (subscription instanceof Function) { subscription(); - } else if (subscription instanceof (ResizeObserver || IntersectionObserver)) { + } else if ((typeof ResizeObserver != 'undefined' && subscription instanceof ResizeObserver) || + (typeof IntersectionObserver != 'undefined' && subscription instanceof IntersectionObserver)) { subscription.disconnect(); } }); diff --git a/utils/modal/full-screen-modal/full-screen-modal.component.ts b/utils/modal/full-screen-modal/full-screen-modal.component.ts index fe27d429..f3bb60c9 100644 --- a/utils/modal/full-screen-modal/full-screen-modal.component.ts +++ b/utils/modal/full-screen-modal/full-screen-modal.component.ts @@ -76,8 +76,6 @@ export class FullScreenModalComponent implements AfterViewInit, OnDestroy { @ViewChild('modal') modal: ElementRef; @ViewChild('header') header: ElementRef; @ViewChild('body') body: ElementRef; - observer: any; - headerHeight: number; bodyHeight: number; private subscriptions: any[] = []; @@ -99,12 +97,13 @@ export class FullScreenModalComponent implements AfterViewInit, OnDestroy { ngAfterViewInit() { if(typeof window !== "undefined") { - this.observer = new ResizeObserver(entries => { + let observer = new ResizeObserver(entries => { for (let entry of entries) { this.changeHeight(); } }); - this.observer.observe(this.header.nativeElement); + observer.observe(this.header.nativeElement); + this.subscriptions.push(observer); } } @@ -117,9 +116,6 @@ export class FullScreenModalComponent implements AfterViewInit, OnDestroy { } ngOnDestroy() { - if(this.observer && this.observer instanceof ResizeObserver) { - this.observer.disconnect(); - } if(typeof document !== "undefined") { const element = document.getElementById("modal-container"); for (let i = element.childNodes.length - 1; i >= 0; --i) { @@ -132,8 +128,10 @@ export class FullScreenModalComponent implements AfterViewInit, OnDestroy { this.subscriptions.forEach(subscription => { if(subscription instanceof Subscription) { subscription.unsubscribe(); + } else if(typeof ResizeObserver != 'undefined' && subscription instanceof ResizeObserver) { + subscription.disconnect(); } - }) + }); } get isOpen() { From e9a62e1f61be86f29d66c3006e71bb6b2d3202b2 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 4 Jul 2023 12:02:54 +0300 Subject: [PATCH 127/140] Add ResizeObserver disconnect in terminology page. --- monitor/methodology/terminology.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monitor/methodology/terminology.component.ts b/monitor/methodology/terminology.component.ts index 0da0c18c..0cf50f76 100644 --- a/monitor/methodology/terminology.component.ts +++ b/monitor/methodology/terminology.component.ts @@ -184,6 +184,8 @@ export class TerminologyComponent implements OnInit, OnDestroy, AfterViewInit, A this.subscriptions.forEach(subscription => { if (subscription instanceof Subscription) { subscription.unsubscribe(); + } else if(typeof ResizeObserver != 'undefined' && subscription instanceof ResizeObserver) { + subscription.disconnect(); } }); } From 4bec61023736145debd4e8da5f6147798bd9a3f4 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 4 Jul 2023 14:20:50 +0300 Subject: [PATCH 128/140] Resource Service: Add target for links in resources. --- monitor/services/resources.service.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/monitor/services/resources.service.ts b/monitor/services/resources.service.ts index 875f34d6..841ff3a4 100644 --- a/monitor/services/resources.service.ts +++ b/monitor/services/resources.service.ts @@ -26,27 +26,27 @@ export class ResourcesService { constructor(private http: HttpClient) { } - private async getResourcesItemsAsync(prefix = '', portal: string = null): Promise { + private async getResourcesItemsAsync(prefix = '', portal: string = null, target = '_self'): Promise { let items = [ new MenuItem("methodology", "Methodology", "", "", false, [], null, {}, null, null, null, null, '_self'), ResourcesService.setLink(new MenuItem("methodological-approach", "Methodological Approach", - "", "", false, [], null, {}, null, null, null, null, '_self'), + "", "", false, [], null, {}, null, null, null, null, target), prefix + "/methodology/methodological-approach", portal), ResourcesService.setLink(new MenuItem("terminology", "Terminology and construction", - "", "", false, [], null, {}, null, null, null, null, '_self'), + "", "", false, [], null, {}, null, null, null, null, target), prefix + "/methodology/terminology", portal)]; items.push(new MenuItem("indicators-page", "Indicators", "", "", false, [], null, {})); items.push(ResourcesService.setLink(new MenuItem("indicator-themes", "Indicator Themes", - "", "", false, [], null, {}, null, null, null, null, '_self'), prefix + "/indicators/themes", portal)); + "", "", false, [], null, {}, null, null, null, null, target), prefix + "/indicators/themes", portal)); let promise = new Promise(resolve => { this.isPagesEnabled().subscribe(status => { ResourcesService.types.forEach((type, index) => { if (status[index]) { items.push(ResourcesService.setLink( new MenuItem("indicators-" + type.value, type.label, - "", "", false, [], null, {}, null, null, null, null, '_self'), + "", "", false, [], null, {}, null, null, null, null, target), prefix + "/indicators/" + type.value, portal) ); } @@ -61,13 +61,13 @@ export class ResourcesService { return items; } - setResources(items: MenuItem[], prefix = '', portal: string = null) { + setResources(items: MenuItem[], prefix = '', portal: string = null, target = '_self') { if (this.subscription) { this.subscription.unsubscribe(); } let resources = new MenuItem('resources', 'Resources', "", "", false, [], null, {}); let index = items.push(resources) - 1; - this.subscription = from(this.getResourcesItemsAsync(prefix, portal)).subscribe(resourcesItems => { + this.subscription = from(this.getResourcesItemsAsync(prefix, portal, target)).subscribe(resourcesItems => { items[index].items = resourcesItems; }); } From 2fa4c9e810667229c44a0d545f809fb1afa2d517 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 4 Jul 2023 19:10:15 +0300 Subject: [PATCH 129/140] [Library | explore-redesign]: dataProvider.service.ts & dataProvider.component.ts: Added method "getCollectedFulltexts()" in service and component to get and parse number of collected fulltexts from a new stats api - commented/ API is still in dev. --- .../dataProvider/dataProvider.component.ts | 15 +++++++++++++++ landingPages/dataProvider/dataProvider.service.ts | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts index 2b4d1290..97b20b4b 100644 --- a/landingPages/dataProvider/dataProvider.component.ts +++ b/landingPages/dataProvider/dataProvider.component.ts @@ -396,6 +396,7 @@ export class DataProviderComponent { this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url); if (typeof document !== 'undefined') { this.getDataProviderAggregationStatus(this.dataProviderInfo.originalId); + // this.getCollectedFulltexts(); this.countResultsWithFundingInfo(); } else { this.aggregationStatusIsInitialized = true; @@ -470,6 +471,20 @@ export class DataProviderComponent { )); } + // private getCollectedFulltexts() { + // this.subscriptions.push(this._dataproviderService.getCollectedFulltexts(this.datasourceId).subscribe( + // (data: string) => { + // this.dataProviderInfo.aggregationStatus = {"fulltexts": data}; + // this.aggregationStatusIsInitialized = true; + // }, + // err => { + // //console.log(err); + // this.aggregationStatusIsInitialized = true; + // this.handleError("Error getting "+this.getTypeName()+" collected fulltexts for id: " + this.datasourceId, err); + // } + // )); + // } + private countResultsWithFundingInfo() { this.subscriptions.push(this._searchResearchResultsService.countCollectedResultsWithFundingInfo(this.datasourceId).subscribe( fundedContent => { diff --git a/landingPages/dataProvider/dataProvider.service.ts b/landingPages/dataProvider/dataProvider.service.ts index eaaa6409..49d3e911 100644 --- a/landingPages/dataProvider/dataProvider.service.ts +++ b/landingPages/dataProvider/dataProvider.service.ts @@ -83,6 +83,11 @@ export class DataProviderService { .pipe(map(res => this.parseDataproviderAggregationStatus(res))); } + // getCollectedFulltexts(datasourceId: string) { + // return this.http.get(properties.pdfStatisticsAPIURL+"/api/stats/getNumberOfPayloadsForDatasource?datasourceId="+datasourceId) + // .pipe(map(res => res)) + // } + private handleError (error: HttpErrorResponse) { // in a real world app, we may send the error to some remote logging infrastructure // instead of just logging it to the console From 8029aafb36622108a2d72a3569124666ce7ca93a Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 4 Jul 2023 19:12:34 +0300 Subject: [PATCH 130/140] [Library & common-assets | explore-redesign]: addThis.component.ts: Replaced addthis external library with addtoany - addthis is no longer supported | general.less: css for addtoany social icons (classes .fully_rounded .a2a_svg). --- .../landing-utils/addThis.component.ts | 75 ++++++++++++------- 1 file changed, 47 insertions(+), 28 deletions(-) diff --git a/landingPages/landing-utils/addThis.component.ts b/landingPages/landing-utils/addThis.component.ts index 90ccac1d..fde71692 100644 --- a/landingPages/landing-utils/addThis.component.ts +++ b/landingPages/landing-utils/addThis.component.ts @@ -1,34 +1,28 @@ import { - ChangeDetectorRef, Component, - EventEmitter, Inject, Input, OnInit, - Output, RendererFactory2, - ViewChild, ViewEncapsulation } from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import {DOCUMENT} from "@angular/common"; import {Subscriber} from "rxjs"; -interface addthis { - layers: Refresh; - init: Function; - toolbox: Function; -} - -interface Refresh { - refresh: Function; -} - -declare var addthis: addthis; +declare var a2a; @Component({ selector: 'addThis', template: ` -
        +
        + + + + + + + +
        Do the share buttons not appear? Please make sure, any blocking addon is disabled, and then reload the page.
        @@ -38,7 +32,7 @@ export class AddThisComponent implements OnInit { subs = []; showWarning = false; @Input() url: string = null; - + constructor(private route: ActivatedRoute, @Inject(DOCUMENT) private document, private rendererFactory: RendererFactory2) { } @@ -50,15 +44,41 @@ export class AddThisComponent implements OnInit { value(); } } + // + // if(typeof document !== 'undefined') { + // const renderer = this.rendererFactory.createRenderer(this.document, { + // id: '-1', + // encapsulation: ViewEncapsulation.None, + // styles: [], + // data: {} + // }); + // const head = this.document.body; + // if (head === null) { + // throw new Error(' not found within DOCUMENT.'); + // } + // + // + // let script = null; + // head.childNodes.forEach(node => { + // if(node.id === "addToAnyScript") { + // // script = node; + // node.remove(); + // } + // }) + // // let script = head.nativeElement.getElementById("script"); + // // if(script) { + // // renderer.removeChild(head, script); + // // script.remove(); + // // } + // } } - + ngOnInit() { - + this.subs.push(this.route.queryParams.subscribe(data => { this.showWarning = false; try { - if (!this.document.getElementById('addThisScript') && typeof document !== 'undefined') { - // console.log(" create script AddThis"); + if (!this.document.getElementById('addToAnyScript') && typeof document !== 'undefined') { const renderer = this.rendererFactory.createRenderer(this.document, { id: '-1', encapsulation: ViewEncapsulation.None, @@ -70,26 +90,25 @@ export class AddThisComponent implements OnInit { throw new Error(' not found within DOCUMENT.'); } const script = renderer.createElement('script'); - renderer.setAttribute(script, "id", "addThisScript"); - renderer.setAttribute(script, "src", "https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-559d24521cd8c080"); + renderer.setAttribute(script, "id", "addToAnyScript"); + renderer.setAttribute(script, "src", "https://static.addtoany.com/menu/page.js"); renderer.setAttribute(script, "type", "text/javascript"); renderer.appendChild(head, script); } if (typeof document !== 'undefined') { - if (typeof addthis !== 'undefined' && addthis.layers && addthis.layers.refresh) { - // console.log("Add This: Call Refresh") - addthis.layers.refresh(); + if(typeof a2a !== 'undefined' && this.document.getElementById('addToAny'+(this.url ? ('_'+this.url) : '')) && !this.document.getElementById('addToAny'+(this.url ? ('_'+this.url) : '')).innerText) { + a2a.init_all(); } } this.subs.push(setTimeout(() => { - if (this.document.getElementById('addThis') && !this.document.getElementById('addThis').innerText) { + if (this.document.getElementById('addToAny'+(this.url ? ('_'+this.url) : '')) && !this.document.getElementById('addToAny'+(this.url ? ('_'+this.url) : '')).innerText) { this.showWarning = true; } }, 4000)); } catch (e) { // console.error(e) } - + })); } } From 13b7f90707e39e18bfb0dd2bdd19fccc59468490 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 5 Jul 2023 11:41:42 +0300 Subject: [PATCH 131/140] Forgot to add in previous commit composer.ts file - bug fix in imports --- utils/email/composer.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/utils/email/composer.ts b/utils/email/composer.ts index afcc07cd..6fead2f0 100644 --- a/utils/email/composer.ts +++ b/utils/email/composer.ts @@ -1,10 +1,6 @@ import {Email} from "./email"; import {Body} from "./body"; -import {FormArray} from "@angular/forms"; import {properties} from "../../../../environments/environment"; -import {Stakeholder} from "../../monitor/entities/stakeholder"; -import {Report} from "../../../../cache-indicators"; -import {error} from "protractor"; export class Composer { private static noteBodySize = "14px"; @@ -213,7 +209,7 @@ export class Composer { return email; } - public static composeEmailToReportCachingProcess(report: Report) { + public static composeEmailToReportCachingProcess(report: any) { let email: Email = new Email(); email.recipients = [report.creator]; email.subject = 'OpenAIRE | Monitor Dashboard - ' + report.name + '\'s caching process has been finished'; From 76cb586ebd44c3b6aef3cf29ddc21b944398e26d Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 6 Jul 2023 12:53:37 +0300 Subject: [PATCH 132/140] Add foslabel in searchFiles only for beta, dev. Change eoscifguidelines to refine. Input fix double icon in select with many values. --- sharedComponents/input/input.component.ts | 4 +- utils/properties/searchFields.ts | 136 ++++++++++++---------- 2 files changed, 79 insertions(+), 61 deletions(-) diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts index e1ec167a..9510f4aa 100644 --- a/sharedComponents/input/input.component.ts +++ b/sharedComponents/input/input.component.ts @@ -168,11 +168,11 @@ declare var UIkit; - - diff --git a/utils/properties/searchFields.ts b/utils/properties/searchFields.ts index 02183b1c..e8ace190 100644 --- a/utils/properties/searchFields.ts +++ b/utils/properties/searchFields.ts @@ -2,7 +2,7 @@ import {Filter} from "../../searchPages/searchUtils/searchHelperClasses.class"; import {properties} from "../../../../environments/environment"; export class SearchFields { - + //main Entities //RESULTS //Used for datasets and publications and software and orp @@ -11,10 +11,10 @@ export class SearchFields { public RESULT_RANGE_FIELDS = [ ["resultacceptanceyear", "resultacceptanceyear"] ]; - + // Remove Collected From Filter "collectedfrom","collectedfrom" public RESULT_REFINE_FIELDS = [ - "resultbestaccessright", "instancetypename", "fos", "relfunder", + "resultbestaccessright", "instancetypename", (properties.environment !== 'production' ? "foslabel" : "fos"), "relfunder", "relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id", "relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"]; @@ -59,7 +59,7 @@ export class SearchFields { }, ["eoscifguidelines"]: { name: "EOSC Subject", - type: "keyword", + type: "refine", param: "eoscSubj", operator: "es", equalityOperator: " exact ", @@ -81,9 +81,16 @@ export class SearchFields { equalityOperator: "=", filterType: null }, - ["pid"]: {name: "PID", type: "keyword", param: "pid", operator: "pd", equalityOperator: " exact ", filterType: null}, + ["pid"]: { + name: "PID", + type: "keyword", + param: "pid", + operator: "pd", + equalityOperator: " exact ", + filterType: null + }, ["resulthostingdatasourceid"]: { - name: "Hosting "+OpenaireEntities.DATASOURCE, + name: "Hosting " + OpenaireEntities.DATASOURCE, type: "entity", param: "hostedBy", operator: "hs", @@ -219,7 +226,7 @@ export class SearchFields { filterType: null }, ["collectedfromdatasourceid"]: { - name: "Collected from "+OpenaireEntities.DATASOURCE, + name: "Collected from " + OpenaireEntities.DATASOURCE, type: "entity", param: "collectedFrom", operator: "cl", @@ -257,9 +264,17 @@ export class SearchFields { operator: "fs", equalityOperator: " exact ", filterType: "checkbox" + }, + ["foslabel"]: { + name: "Field of Science [Beta]", + type: "vocabulary", + param: "foslabel", + operator: "fl", + equalityOperator: " exact ", + filterType: "checkbox" } }; - + //PROJECT public PROJECT_RANGE_FIELDS = [ ["projectendyear", "projectstartyear"] @@ -296,7 +311,7 @@ export class SearchFields { equalityOperator: "=", filterType: null }, - + ["funder"]: { name: "Funder", type: "refine", @@ -378,7 +393,7 @@ export class SearchFields { // filterType: "radio" // }, ["projectoamandatepublications"]: { - name: "OA "+OpenaireEntities.PUBLICATIONS+" Mandate", + name: "OA " + OpenaireEntities.PUBLICATIONS + " Mandate", type: "boolean", param: "oapubl", operator: "oap", @@ -386,7 +401,7 @@ export class SearchFields { filterType: "radio" }, ["projectoamandatedata"]: { - name: "OA "+OpenaireEntities.DATASETS+" Mandate", + name: "OA " + OpenaireEntities.DATASETS + " Mandate", type: "boolean", param: "oadata", operator: "oad", @@ -410,25 +425,25 @@ export class SearchFields { filterType: null }, ["collectedfromdatasourceid"]: { - name: "Collected from "+OpenaireEntities.DATASOURCE, + name: "Collected from " + OpenaireEntities.DATASOURCE, type: "entity", param: "collectedFrom", operator: "cl", equalityOperator: " exact ", filterType: null } - + }; - + //DATAPROVIDERS // add Collected From Filter "collectedfromname" public DATASOURCE_REFINE_FIELDS: string[] = ["eoscdatasourcetype", "datasourceodlanguages", "datasourceodcontenttypes", - "datasourcecompatibilityname", "country", "collectedfromname","datasourcethematic", + "datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic", "datasourcejurisdiction"]; public DATASOURCE_ADVANCED_FIELDS: string[] = ["q", "datasourceofficialname", "datasourceenglishname", "datasourceodsubjects", "datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes", "datasourcecompatibilityname", "relorganizationid", "collectedfromdatasourceid", "pid"]; - + public DATASOURCE_FIELDS: { [key: string]: FieldDetails } = { ["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null}, ["datasourceofficialname"]: { @@ -536,7 +551,7 @@ export class SearchFields { filterType: "checkbox" }, ["collectedfromdatasourceid"]: { - name: "Collected from "+OpenaireEntities.DATASOURCE, + name: "Collected from " + OpenaireEntities.DATASOURCE, type: "entity", param: "collectedFrom", operator: "cl", @@ -569,7 +584,7 @@ export class SearchFields { }, ["pid"]: {name: "PID", type: "keyword", param: "pid", operator: "pd", equalityOperator: " exact ", filterType: null} }; - + public DEPOSIT_DATASOURCE_KEYWORD_FIELDS: { "name": string, "equalityOperator": string } [] = [ {"name": "relorganizationname", "equalityOperator": "="}, {"name": "relorganizationshortname", "equalityOperator": "="}, @@ -579,8 +594,8 @@ export class SearchFields { {"name": "country", "equalityOperator": " exact "}, {"name": "datasourcesubject", "equalityOperator": " all "} ]; - public DEPOSIT_DATASOURCE_REFINE_FIELDS: string[] = ["datasourcetypename", "country", "datasourceodsubjects", "datasourceodcontenttypes", "datasourcecompatibilityname","datasourcethematic", "datasourcejurisdiction"]; - + public DEPOSIT_DATASOURCE_REFINE_FIELDS: string[] = ["datasourcetypename", "country", "datasourceodsubjects", "datasourceodcontenttypes", "datasourcecompatibilityname", "datasourcethematic", "datasourcejurisdiction"]; + public DEPOSIT_DATASOURCE_FIELDS: { [key: string]: FieldDetails } = { ["datasourcetypeuiname"]: { name: "Repository type", @@ -631,26 +646,26 @@ export class SearchFields { filterType: "checkbox" }, }; - + // public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"]; public COMPATIBLE_DATAPROVIDER_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes", - "datasourcecompatibilityname", "country", "collectedfromname","datasourcethematic", + "datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic", "datasourcejurisdiction"]; // public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"]; public ENTITY_REGISTRIES_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes", - "datasourcecompatibilityname", "country", "collectedfromname","datasourcethematic", + "datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic", "datasourcejurisdiction"]; // public JOURNAL_FIELDS: string[] = ["datasourcetypename", "datasourcecompatibilityname"]; public JOURNAL_FIELDS: string[] = ["datasourcetypename", "datasourceodlanguages", "datasourceodcontenttypes", - "datasourcecompatibilityname", "country", "collectedfromname","datasourcethematic", + "datasourcecompatibilityname", "country", "collectedfromname", "datasourcethematic", "datasourcejurisdiction"]; - + //ORGANIZATION - + public ORGANIZATION_REFINE_FIELDS: string[] = ["country"] public ORGANIZATION_ADVANCED_FIELDS: string[] = ["q", "organizationlegalname", "organizationlegalshortname", "country"]; - + public ORGANIZATION_FIELDS: { [key: string]: FieldDetails } = { ["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null}, ["organizationlegalname"]: { @@ -695,7 +710,7 @@ export class SearchFields { //add project field depending on funder public HIDDEN_FIELDS: string[] = ["fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id", "relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id", "relproject", "instancetypename"]; - + public DEPENDENT_FIELDS: { [key: string]: string } = { ["relproject"]: "relfunder", ["fundinglevel0_id"]: "funder", @@ -706,14 +721,14 @@ export class SearchFields { ["relfundinglevel2_id"]: "relfundinglevel1_id", ["instancetypename"]: "type" }; - - + + public ADVANCED_SEARCH_OPERATORS: string[] = ["and", "or"]; - + public COMMUNITIES_SEARCH_FIELDS: string[] = ["type", "access", "role"]; - + public STAKEHOLDER_SEARCH_FIELDS: string[] = ["type", "access", "role"]; - + constructor() { } @@ -741,16 +756,17 @@ export class SearchFields { return null; } } + getFieldName(fieldId: string, fieldType: string): string { - let field = this.getField(fieldId, fieldType); - return field?field.name:"UNDEFINED"; + let field = this.getField(fieldId, fieldType); + return field ? field.name : "UNDEFINED"; } sortFieldsByName(fieldIds: string[], fieldIdsMap: { [key: string]: FieldDetails }) { fieldIds.sort((a: string, b: string) => { - if(a == "q") { + if (a == "q") { return -1; - } else if(b == "q") { + } else if (b == "q") { return 1; } let nameA: string = fieldIdsMap[a].name; @@ -761,30 +777,31 @@ export class SearchFields { getFieldFilterType(fieldId: string, fieldType: string, usedBy: string = "search"): string { let field = this.getField(fieldId, fieldType); - return field?field.filterType:"checkbox"; + return field ? field.filterType : "checkbox"; } - + getFieldParam(fieldId: string, fieldType: string): string { let field = this.getField(fieldId, fieldType); - return field?field.param:"UNDEFINED"; + return field ? field.param : "UNDEFINED"; } - public static getParameterOrder(fieldId: string, params): number { + + public static getParameterOrder(fieldId: string, params): number { let fields = []; - let searchFields = new SearchFields(); - if (searchFields.RESULT_REFINE_FIELDS.indexOf(fieldId) !=-1) { - fields = searchFields.RESULT_REFINE_FIELDS; - } else if (searchFields.PROJECT_REFINE_FIELDS.indexOf(fieldId) !=-1) { - fields = searchFields.PROJECT_REFINE_FIELDS - } else if (searchFields.ORGANIZATION_REFINE_FIELDS.indexOf(fieldId) !=-1) { - fields = searchFields.ORGANIZATION_REFINE_FIELDS; - } else if (searchFields.DATASOURCE_REFINE_FIELDS.indexOf(fieldId) !=-1) { - fields = searchFields.DATASOURCE_REFINE_FIELDS; + let searchFields = new SearchFields(); + if (searchFields.RESULT_REFINE_FIELDS.indexOf(fieldId) != -1) { + fields = searchFields.RESULT_REFINE_FIELDS; + } else if (searchFields.PROJECT_REFINE_FIELDS.indexOf(fieldId) != -1) { + fields = searchFields.PROJECT_REFINE_FIELDS + } else if (searchFields.ORGANIZATION_REFINE_FIELDS.indexOf(fieldId) != -1) { + fields = searchFields.ORGANIZATION_REFINE_FIELDS; + } else if (searchFields.DATASOURCE_REFINE_FIELDS.indexOf(fieldId) != -1) { + fields = searchFields.DATASOURCE_REFINE_FIELDS; } let index = fields.indexOf(fieldId); - let paramIndex = 0; - if(index != -1){ - for(let keyValue of params){ - if(fields.indexOf(keyValue[0])>index){ + let paramIndex = 0; + if (index != -1) { + for (let keyValue of params) { + if (fields.indexOf(keyValue[0]) > index) { break; } paramIndex++ @@ -792,6 +809,7 @@ export class SearchFields { } return paramIndex; } + /* AND Funder: relfunder, relfundinglevel0_id, relfundinglevel1_id, relfundinglevel2_id @@ -818,15 +836,15 @@ export class SearchFields { Subjects: Supported Identifiers: */ - + getFieldOperator(fieldId: string): string { if (fieldId == "relfunder" || fieldId == "relfundinglevel0_id" || fieldId == "relfundinglevel1_id" || fieldId == "relfundinglevel2_id" - || fieldId == "relproject" || fieldId == "community" || fieldId == "projectendyear-range-projectstartyear") { + || fieldId == "relproject" || fieldId == "community" || fieldId == "projectendyear-range-projectstartyear") { return "and"; } else if (fieldId == "instancetypename" || fieldId == "eoscdatasourcetype" - || fieldId == "resultlanguagename" || fieldId == "datasourceodlanguages" - || fieldId == "datasourcecompatibilityname" || fieldId == "country" || fieldId == "datasourceodcontenttypes" - || fieldId == "resulthostingdatasource" || fieldId == "collectedfrom") { + || fieldId == "resultlanguagename" || fieldId == "datasourceodlanguages" + || fieldId == "datasourcecompatibilityname" || fieldId == "country" || fieldId == "datasourceodcontenttypes" + || fieldId == "resulthostingdatasource" || fieldId == "collectedfrom") { return "or"; } return "or"; From 8b14aaf325c4c18691be36a89dca882b945d8eb0 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Thu, 6 Jul 2023 15:28:53 +0300 Subject: [PATCH 133/140] [Monitor & Library | develop]: [Bug fix] Refactor code for showing help button or not. 1. quick-contact.service.ts: Initialize display to true (assume it is not intersecting, otherwise in pages without this section, it can't be initialized correctly). 2. home.component.ts: Removed field "showQuickContact" | In constructor set quickContactService.setDisplay(false) | Refactor intersectionObserver. 3. app-routing.module.ts: In "contact-us" route, set data: {hasQuickContact: false}. 4. app.component.ts: Updated checks for | Added public showQuickContact: boolean; to be initialized by layoutService.hasQuickContact. --- sharedComponents/quick-contact/quick-contact.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharedComponents/quick-contact/quick-contact.service.ts b/sharedComponents/quick-contact/quick-contact.service.ts index c31a742c..0ddcdcc7 100644 --- a/sharedComponents/quick-contact/quick-contact.service.ts +++ b/sharedComponents/quick-contact/quick-contact.service.ts @@ -5,7 +5,7 @@ import { BehaviorSubject, Observable } from "rxjs"; providedIn: "root" }) export class QuickContactService { - private display: BehaviorSubject = new BehaviorSubject(false); + private display: BehaviorSubject = new BehaviorSubject(true); public get isDisplayed(): Observable { return this.display.asObservable(); From 201792b0e3d73ade703bd4cbd10a81ea6677c294 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 6 Jul 2023 16:29:17 +0300 Subject: [PATCH 134/140] Landing tabs: Add border-left and radius-left, reduce gutter between sections and align section content with Tab name. --- .../dataProvider/dataProvider.component.html | 18 +++++++------- .../organization/organization.component.html | 24 +++++++++---------- landingPages/project/project.component.html | 14 +++++------ .../result/resultLanding.component.html | 20 ++++++++-------- utils/tabs/tabs.component.ts | 2 +- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index f540335c..c3a8fa2c 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -688,7 +688,7 @@ -
        +
        -
        +
        -
        +
        -
        +
        -
        +
        -
        +
        -
        +
        -
        +
        Statistics
        -
        +
        • Overview diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index 7ee7940e..f5fab784 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -207,13 +207,13 @@
        -
        +
        + id="dataProviders" class="landing-section">
        + id="publications" class="landing-section">
        + id="datasets" class="landing-section">
        + id="software" class="landing-section">
        + id="other" class="landing-section"> -
        +
        + class="landing-section">
        + class="landing-section">
        + class="landing-section">
        + class="landing-section">
        + class="landing-section"> -
        +
        -
        +
        -
        +
        -
        +
        -
        +
        @@ -801,7 +801,7 @@ -
        +
        Statistics
        -
        +