[Library|Trunk]

Metrics:
- comment Openaire views



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60789 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2021-04-05 10:49:47 +00:00
parent deff0f595e
commit 84f4ca48fa
4 changed files with 11 additions and 11 deletions

View File

@ -526,7 +526,7 @@ export class DataProviderComponent {
} }
public get hasMetrics(): boolean { public get hasMetrics(): boolean {
return !(this.totalViews && this.totalDownloads && this.pageViews) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0; return !(this.totalViews && this.totalDownloads/* && this.pageViews*/) || this.totalViews > 0 || this.totalDownloads > 0 /*|| this.pageViews > 0*/;
} }
public openStatistics() { public openStatistics() {

View File

@ -26,15 +26,15 @@ import {animate, state, style, transition, trigger} from "@angular/animations";
are derived from aggregating individual research results metrics. are derived from aggregating individual research results metrics.
</i> </i>
</div> </div>
<div class="uk-child-width-1-3@m uk-grid-small uk-grid-divider uk-grid-match" uk-grid> <div class="uk-child-width-1-2@m uk-grid-small uk-grid-divider uk-grid-match" uk-grid>
<div class="uk-text-center uk-first-column"> <div class="uk-text-center uk-first-column">
<div class="number">{{metrics.totalDownloads | number}}</div> <div class="number">{{metrics.totalDownloads | number}}</div>
<div>Downloads</div> <div>Downloads</div>
</div> </div>
<div class="uk-text-center"> <!--<div class="uk-text-center">
<div class="number">{{pageViews | number}}</div> <div class="number">{{pageViews | number}}</div>
<div>OpenAIRE views</div> <div>OpenAIRE views</div>
</div> </div>-->
<div class="uk-text-center"> <div class="uk-text-center">
<div class="number">{{metrics.totalViews | number}}</div> <div class="number">{{metrics.totalViews | number}}</div>
<div>Total views</div> <div>Total views</div>
@ -63,15 +63,15 @@ import {animate, state, style, transition, trigger} from "@angular/animations";
</td> </td>
<td class="uk-text-center"> <td class="uk-text-center">
{{metrics.infos.get(key).numOfViews | number}} {{metrics.infos.get(key).numOfViews | number}}
<span *ngIf="metrics.infos.get(key).numOfViews > 0 && metrics.infos.get(key).openaireViews > 0"> <!-- <span *ngIf="metrics.infos.get(key).numOfViews > 0 && metrics.infos.get(key).openaireViews > 0">
( {{metrics.infos.get(key).openaireViews | number}} from OpenAIRE ) ( {{metrics.infos.get(key).openaireViews | number}} from OpenAIRE )
</span> </span>-->
</td> </td>
<td class="uk-text-center"> <td class="uk-text-center">
{{metrics.infos.get(key).numOfDownloads | number}} {{metrics.infos.get(key).numOfDownloads | number}}
<span *ngIf="metrics.infos.get(key).numOfDownloads > 0 && metrics.infos.get(key).openaireDownloads > 0"> <!--<span *ngIf="metrics.infos.get(key).numOfDownloads > 0 && metrics.infos.get(key).openaireDownloads > 0">
( {{metrics.infos.get(key).openaireDownloads | number}} from OpenAIRE ) ( {{metrics.infos.get(key).openaireDownloads | number}} from OpenAIRE )
</span> </span>-->
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -223,7 +223,7 @@ export class MetricsComponent {
} }
public get total(): number { public get total(): number {
return +this.pageViews + +this.metrics.totalViews + +this.metrics.totalDownloads; return /*+this.pageViews +*/ +this.metrics.totalViews + +this.metrics.totalDownloads;
} }
private getMetrics() { private getMetrics() {

View File

@ -467,7 +467,7 @@ export class ProjectComponent {
} }
public get hasMetrics(): boolean { public get hasMetrics(): boolean {
return !(this.totalViews && this.totalDownloads && this.pageViews) || this.totalViews > 0 || this.totalDownloads > 0||this.pageViews > 0; return !(this.totalViews && this.totalDownloads/* && this.pageViews*/) || this.totalViews > 0 || this.totalDownloads > 0/*||this.pageViews > 0*/;
} }
public openStatistics() { public openStatistics() {

View File

@ -433,7 +433,7 @@ export class ResultLandingComponent {
} }
public get hasMetrics(): boolean { public get hasMetrics(): boolean {
return !(this.totalViews && this.totalDownloads && this.pageViews) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0; return !(this.totalViews && this.totalDownloads /*&& this.pageViews*/) || this.totalViews > 0 || this.totalDownloads > 0 /*|| this.pageViews > 0*/;
} }
private updateDescription(description: string) { private updateDescription(description: string) {