[Trunk | Library]
1. rangeFilter.component.html: [Bug fix] Last 5 years used to calculate 6 years and last 10 years used to calculate 11 years. 2. projectInfo.ts & project.service.ts: In "funding" object added "callIdentifier" which is parsed only for funder "EC". 3. project.component.html: Checks for statistics updated | "Research results" renamed to "Research outcomes" | Show "funding.callIdentifier" if existing. 4. project.component.ts & organization.component.ts & dataProvider.component.ts: Initalize "errorMessage" when service returns error != 404. 5. statisticsTab.component.ts: Checks for charts updated | Timeline chart dates grouped by 6 (up to 80 years). 6. dataProvider.component.html: Checks for statistics updated. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58286 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
9d69da41fd
commit
86e3c978b9
|
@ -336,7 +336,8 @@
|
|||
<span class="uk-text-middle">Related Content Providers</span>
|
||||
</div>
|
||||
<!-- *ngIf="dataProviderInfo.tabs2.indexOf('Statistics') != -1"-->
|
||||
<div
|
||||
<div *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
(click)="openStatistics()" class="clickable uk-margin-right">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
|
||||
<path d="M0 0h24v24H0z" fill="none"></path>
|
||||
|
@ -606,7 +607,9 @@
|
|||
[showForm]="showFeedback" (show)="showFeedback = $event"></feedback>
|
||||
<!-- Statistics -->
|
||||
<!-- && dataProviderInfo.tabs2 && dataProviderInfo.tabs2.indexOf('Statistics') != -1-->
|
||||
<modal-alert *ngIf="dataProviderInfo"
|
||||
<modal-alert *ngIf="dataProviderInfo &&
|
||||
(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
classBody="uk-width-xxlarge uk-padding-remove-right" #statisticsModal>
|
||||
<landing-header [properties]="properties" [title]="dataProviderInfo.title.name"
|
||||
[subTitle]="(dataProviderInfo.officialName
|
||||
|
|
|
@ -232,7 +232,7 @@ export class DataProviderComponent {
|
|||
if(err.status == 404) {
|
||||
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "dataprovider"}});
|
||||
}
|
||||
//this.errorMessage = 'No dataProvider found';
|
||||
this.errorMessage = 'No dataProvider found';
|
||||
this.showLoading = false;
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToDataProviders);
|
||||
}
|
||||
|
|
|
@ -15,12 +15,14 @@ import {EnvProperties} from '../../utils/properties/env-properties';
|
|||
<!-- || fetchDatasets.searchUtils.status == errorCodes.DONE-->
|
||||
<!-- || fetchSoftware.searchUtils.status == errorCodes.DONE-->
|
||||
<!-- || fetchOther.searchUtils.status == errorCodes.DONE)">-->
|
||||
<ng-container *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchDatasets.searchUtils.totalResults > 0 ||
|
||||
fetchSoftware.searchUtils.totalResults > 0 || fetchOther.searchUtils.totalResults > 0)">
|
||||
<div class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Research Results Timeline</span>
|
||||
<span class="uk-text-bold uk-text-small">Research outcomes Timeline</span>
|
||||
<i-frame [url]=docsTimelineUrl ></i-frame>
|
||||
</div>
|
||||
<div class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Research Results Types</span>
|
||||
<span class="uk-text-bold uk-text-small">Research outcomes Types</span>
|
||||
<i-frame [url]=docsTypesUrl ></i-frame>
|
||||
</div>
|
||||
<!-- </ng-container>-->
|
||||
|
@ -29,19 +31,18 @@ import {EnvProperties} from '../../utils/properties/env-properties';
|
|||
<!-- || fetchSoftware.searchUtils.totalResults > 0 || fetchOther.searchUtils.totalResults > 0)"-->
|
||||
<div
|
||||
class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Funders in Research Results of content provider</span>
|
||||
<span class="uk-text-bold uk-text-small">Funders in research outcomes of content provider</span>
|
||||
<i-frame [url]=docsFunderUrl ></i-frame>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<!-- <div *ngIf="fetchPublications.searchUtils.totalResults > 0 "-->
|
||||
<div
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0 "
|
||||
class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Projects with most Publications</span>
|
||||
<i-frame [url]=pubsProjectsUrl ></i-frame>
|
||||
</div>
|
||||
|
||||
<!-- <div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)"-->
|
||||
<div
|
||||
<div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)"
|
||||
class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Projects with most Research Data</span>
|
||||
<i-frame [url]=dataProjectsUrl></i-frame>
|
||||
|
@ -70,9 +71,9 @@ export class StatisticsTabComponent {
|
|||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
var properties = data.envSpecific;
|
||||
|
||||
this.docsTimelineUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcYear","dtsrcName":"'+this.datasourceId+'","table": "result", "fields": [{"fld": "number", "agg": "count", "type": "line", "yaxis":1, "c":true}], "xaxis":{"name": "year", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": -30, "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Results"], "in": [{"f":0, "text": "Yearly"}], "filters": [{"name":"year","max":"2016","min":"1997"},{"name": "result_datasources-datasource-name", "values":[""], "to": "-1"}],"having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": "Year"}&w=90%&h=90%';
|
||||
this.docsTypesUrl = properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcPubs","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Results"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
||||
this.docsFunderUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcPubsFund","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Results"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
||||
this.docsTimelineUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcYear","dtsrcName":"'+this.datasourceId+'","table": "result", "fields": [{"fld": "number", "agg": "count", "type": "line", "yaxis":1, "c":true}], "xaxis":{"name": "year", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":80, "sort": "xaxis", "xStyle":{"r": -30, "s": "6", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Outcomes"], "in": [{"f":0, "text": "Yearly"}], "filters": [{"name":"year","max":"2016","min":"1997"},{"name": "result_datasources-datasource-name", "values":[""], "to": "-1"}],"having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": "Year"}&w=90%&h=90%';
|
||||
this.docsTypesUrl = properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcPubs","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Outcomes"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
||||
this.docsFunderUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcPubsFund","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Outcomes"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
||||
this.dataProjectsUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcProjData","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Data"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
||||
this.pubsProjectsUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcProjPubs","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
||||
});
|
||||
|
|
|
@ -294,7 +294,7 @@ export class OrganizationComponent {
|
|||
});
|
||||
}
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToOrganizations);
|
||||
//this.errorMessage = 'No organization found';
|
||||
this.errorMessage = 'No organization found';
|
||||
this.showLoading = false;
|
||||
}
|
||||
);
|
||||
|
|
|
@ -143,10 +143,14 @@
|
|||
<span class="uk-text-muted">Funder: </span>
|
||||
{{projectInfo.funding.funderName}}
|
||||
</span>
|
||||
<span *ngIf="projectInfo.funding.code" class="uk-display-inline-block">
|
||||
<span *ngIf="projectInfo.funding.code" class="uk-margin-right uk-display-inline-block">
|
||||
<span class="uk-text-muted">Project code: </span>
|
||||
{{projectInfo.funding.code}}
|
||||
</span>
|
||||
<span *ngIf="projectInfo.funding.callIdentifier" class="uk-display-inline-block">
|
||||
<span class="uk-text-muted">Call for proposal: </span>
|
||||
{{projectInfo.funding.callIdentifier}}
|
||||
</span>
|
||||
</li>
|
||||
<li *ngIf="projectInfo.funding">
|
||||
<span *ngIf="projectInfo.funding.fundingStream" class="uk-margin-right">
|
||||
|
@ -676,7 +680,9 @@
|
|||
</div>
|
||||
|
||||
<!-- Statistics -->
|
||||
<modal-alert *ngIf="projectInfo"
|
||||
<modal-alert *ngIf="projectInfo &&
|
||||
(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
classBody="uk-width-xxlarge uk-padding-remove-right" #statisticsModal>
|
||||
<landing-header [properties]="properties" [title]="projectName"
|
||||
[subTitle]="projectInfo.acronym ? projectInfo.title : ''"
|
||||
|
@ -695,15 +701,15 @@
|
|||
(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE
|
||||
|| fetchSoftware.searchUtils.status == errorCodes.DONE || fetchOrps.searchUtils.status == errorCodes.DONE)">
|
||||
<div class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Produced research results per year</span>
|
||||
<span class="uk-text-bold uk-text-small">Produced research outcomes per year</span>
|
||||
<i-frame [url]=chartScientificResultsUrl></i-frame>
|
||||
</div>
|
||||
<div class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Access mode of research results</span>
|
||||
<span class="uk-text-bold uk-text-small">Access mode of research outcomes</span>
|
||||
<i-frame [url]=chartAccessModeUrl></i-frame>
|
||||
</div>
|
||||
<div class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Research results per datasource</span>
|
||||
<span class="uk-text-bold uk-text-small">Research outcomes per datasource</span>
|
||||
<i-frame [url]=chartDatasourcesUrl></i-frame>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -329,7 +329,7 @@ export class ProjectComponent {
|
|||
|
||||
private getProjectInfo(id: string) {
|
||||
this.warningMessage = '';
|
||||
this.errorMessage = ""
|
||||
this.errorMessage = "";
|
||||
this.showLoading = true;
|
||||
|
||||
this.projectInfo = null;
|
||||
|
@ -347,7 +347,7 @@ export class ProjectComponent {
|
|||
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
|
||||
}
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects);
|
||||
//this.errorMessage = 'No project found';
|
||||
this.errorMessage = 'No project found';
|
||||
this.showLoading = false;
|
||||
}
|
||||
);
|
||||
|
@ -355,7 +355,7 @@ export class ProjectComponent {
|
|||
|
||||
private getProjectInfoByGrantId(grantId: string, funder: string) {
|
||||
this.warningMessage = '';
|
||||
this.errorMessage = ""
|
||||
this.errorMessage = "";
|
||||
this.showLoading = true;
|
||||
|
||||
this.projectInfo = null;
|
||||
|
@ -372,6 +372,9 @@ export class ProjectComponent {
|
|||
err => {
|
||||
//console.log(err);
|
||||
this.handleError("Error getting project for grant id: " + grantId + " and funder: " + funder, err);
|
||||
if(err.status == 404) {
|
||||
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
|
||||
}
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects);
|
||||
this.errorMessage = 'No project found';
|
||||
this.showLoading = false;
|
||||
|
|
|
@ -98,8 +98,8 @@ export class ProjectService {
|
|||
|
||||
parseProjectInfo (data: any, properties:EnvProperties):any {
|
||||
this.projectInfo = new ProjectInfo();
|
||||
this.projectInfo.funding = {funderName: "", funderShortName: "", code: "", fundingStream: "",
|
||||
budget: "", contribution: "", currency: ""};
|
||||
this.projectInfo.funding = {funderName: "", funderShortName: "", code: "", callIdentifier: "",
|
||||
fundingStream: "", budget: "", contribution: "", currency: ""};
|
||||
|
||||
// ['result']['header']['dri:objIdentifier']
|
||||
if(data[3] != null) {
|
||||
|
@ -157,6 +157,7 @@ export class ProjectService {
|
|||
this.projectInfo.openAccessMandatePublications = data[0].oamandatepublications;
|
||||
this.projectInfo.specialClause39 = data[0].ecsc39;
|
||||
this.projectInfo.openAccessMandateDatasets = data[0].ecarticle29_3;
|
||||
this.projectInfo.funding.callIdentifier = data[0].callidentifier;
|
||||
}
|
||||
this.projectInfo.funding.budget = data[0].totalcost;//"10000";
|
||||
this.projectInfo.funding.contribution = data[0].fundedamount;//"200100";
|
||||
|
|
|
@ -3,7 +3,8 @@ export class ProjectInfo {
|
|||
acronym: string;
|
||||
title: string;
|
||||
|
||||
funding: {funderName: string, funderShortName: string, code: string, fundingStream: string, budget: string, contribution: string, currency: string};
|
||||
funding: {funderName: string, funderShortName: string, code: string, callIdentifier: string,
|
||||
fundingStream: string, budget: string, contribution: string, currency: string};
|
||||
startDate: number;
|
||||
endDate: number;
|
||||
currentDate: number;
|
||||
|
|
|
@ -47,12 +47,12 @@
|
|||
</button>
|
||||
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
|
||||
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-5) ? ' uk-text-bold' : '')"
|
||||
(click)="yearChanged(5)">Last 5 years
|
||||
(click)="yearChanged(4)">Last 5 years
|
||||
</button>
|
||||
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
|
||||
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-10) ? ' uk-text-bold' : '')"
|
||||
|
||||
(click)="yearChanged(10)">Last 10 years
|
||||
(click)="yearChanged(9)">Last 10 years
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue