[Trunk | Library]:

1. dataProvider.component.html: Add label "OpenAIRE Text Mining" if aggregationStatus.fulltexts > 0.
2. dataProvider.component.html & dataProvider.service.ts & dataProviderInfo.ts: Parse and show aggregationStatus.lastUpdateDate (last index date).


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57003 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2019-09-09 10:45:35 +00:00
parent 9f3dafd895
commit f34e657f99
3 changed files with 23 additions and 3 deletions

View File

@ -53,6 +53,8 @@
{{dataProviderInfo.compatibility.name}}
</span>
</span>{{" "}}
<span *ngIf="dataProviderInfo.aggregationStatus && dataProviderInfo.aggregationStatus.fulltexts && dataProviderInfo.aggregationStatus.fulltexts > 0"
class="uk-label custom-label label-type label-dataprovider ">OpenAIRE Text Mining</span>{{" "}}
<ul class="uk-list">
<showPublisher [properties]="properties"
@ -67,6 +69,11 @@
<span class="uk-text-bold">Collected full-texts: </span>
{{dataProviderInfo.aggregationStatus.fulltexts | number}}
</li>
<li
*ngIf="dataProviderInfo.aggregationStatus && dataProviderInfo.aggregationStatus.lastUpdateDate && dataProviderInfo.aggregationStatus.lastUpdateDate != null">
<span class="uk-text-bold">Last update of records in OpenAIRE: </span>
{{dataProviderInfo.aggregationStatus.lastUpdateDate | date}}
</li>
<li *ngIf="dataProviderInfo.oaiPmhURL"><span class="uk-text-bold">OAI-PMH: </span>
<span class="uk-button-text">
<a target="_blank" href="{{dataProviderInfo.oaiPmhURL}}">

View File

@ -62,12 +62,24 @@ export class DataProviderService {
}
parseDataproviderAggregationStatus(data: any): any {
var aggregationStatus: {"fundedContent": string, "indexRecords": string, "fulltexts": string} = null;
var aggregationStatus: {"fundedContent": string, "indexRecords": string, "fulltexts": string, "lastUpdateDate": string} = null;
if(data != null && data[0] != null) {
aggregationStatus = {"fundedContent": "-1", "indexRecords": "-1", "fulltexts": "-1"};
aggregationStatus = {"fundedContent": "-1", "indexRecords": "-1", "fulltexts": "-1", "lastUpdateDate": null};
aggregationStatus.fundedContent = data[0].fundedContent;
aggregationStatus.indexRecords = data[0].indexRecords;
aggregationStatus.fulltexts = data[0].fulltexts;
if(data[0].hasOwnProperty("aggregationHistory")) {
let length = Array.isArray(data[0]["aggregationHistory"]) ? data[0]["aggregationHistory"].length : 1;
for(let i=0; i<length; i++) {
var aggregationHistory = Array.isArray(data[0]["aggregationHistory"]) ? data[0]["aggregationHistory"][i] : data[0]["aggregationHistory"];
if(aggregationHistory.indexedVersion == true) {
aggregationStatus.lastUpdateDate = aggregationHistory.date;
break;
}
}
}
}
return aggregationStatus;
}

View File

@ -11,7 +11,8 @@ export class DataProviderInfo {
countries: string[];
journal: {"journal": "", "issn": string, "lissn": string, "eissn": string};
aggregationStatus: {"fundedContent": string, "indexRecords": string, "fulltexts": string}; //collected from datasource api
//collected from datasource api
aggregationStatus: {"fundedContent": string, "indexRecords": string, "fulltexts": string, "lastUpdateDate": string};
tabs: {"name": string, "content": string}[];
tabs2: string[] =[];