Project

General

Profile

« Previous | Next » 

Revision 53366

Dataprovider Landing page: Parse 'fulltexts' field returned from Datasource API - 'Aggregation Status' and show it as 'Collected full-texts'.

View differences:

modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.component.html
41 41
            </span>
42 42

  
43 43
            <ul class="uk-list">
44
                <li *ngIf="dataProviderInfo.aggregationStatus && dataProviderInfo.aggregationStatus.fundedContent != -1"><span class="uk-text-bold">Results with funding information: </span>
44
                <li *ngIf="dataProviderInfo.aggregationStatus && dataProviderInfo.aggregationStatus.fundedContent && dataProviderInfo.aggregationStatus.fundedContent != -1"><span class="uk-text-bold">Results with funding information: </span>
45 45
                    {{dataProviderInfo.aggregationStatus.fundedContent | number}}
46 46
                </li>
47
                <li *ngIf="dataProviderInfo.aggregationStatus && dataProviderInfo.aggregationStatus.indexRecords != -1"><span class="uk-text-bold">Collected full-texts: </span>
48
                    {{dataProviderInfo.aggregationStatus.indexRecords | number}}
47
                <li *ngIf="dataProviderInfo.aggregationStatus && dataProviderInfo.aggregationStatus.fulltexts && dataProviderInfo.aggregationStatus.fulltexts != -1"><span class="uk-text-bold">Collected full-texts: </span>
48
                    {{dataProviderInfo.aggregationStatus.fulltexts | number}}
49 49
                </li>
50 50
                <li *ngIf="dataProviderInfo.oaiPmhURL"><span class="uk-text-bold">OAI-PMH: </span>
51 51
                        <span class="uk-button-text">
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.service.ts
54 54
    }
55 55

  
56 56
    parseDataproviderAggregationStatus(data: any): any {
57
        var aggregationStatus: {"fundedContent": string, "indexRecords": string} = null;
57
        var aggregationStatus: {"fundedContent": string, "indexRecords": string, "fulltexts": string} = null;
58 58
        if(data != null && data[0] != null) {
59
          aggregationStatus = {"fundedContent": "-1", "indexRecords": "-1"};
59
          aggregationStatus = {"fundedContent": "-1", "indexRecords": "-1", "fulltexts": "-1"};
60 60
          aggregationStatus.fundedContent = data[0].fundedContent;
61 61
          aggregationStatus.indexRecords = data[0].indexRecords;
62
          aggregationStatus.fulltexts = data[0].fulltexts;
62 63
        }
63 64
        return aggregationStatus;
64 65
    }
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/entities/dataProviderInfo.ts
10 10
    originalId: string;
11 11
    countries: string[];
12 12

  
13
    aggregationStatus: {"fundedContent": string, "indexRecords": string}; //collected from datasource api
13
    aggregationStatus: {"fundedContent": string, "indexRecords": string, "fulltexts": string}; //collected from datasource api
14 14

  
15 15
    tabs: {"name": string, "content": string}[];
16 16
    tabs2: string[] =[];

Also available in: Unified diff