diff --git a/portal-2/src/app/deposit/deposit.component.ts b/portal-2/src/app/deposit/deposit.component.ts
index 96a8e3eb..4b3e5b98 100644
--- a/portal-2/src/app/deposit/deposit.component.ts
+++ b/portal-2/src/app/deposit/deposit.component.ts
@@ -39,7 +39,7 @@ import {SearchOrganizationsService} from '../services/searchOrganizations.servic
(selectedValueChanged)="valueChanged($event)">
0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}
diff --git a/portal-2/src/app/landingPages/dataProvider/tabs.component.ts b/portal-2/src/app/landingPages/dataProvider/tabs.component.ts
index b1970c75..1811e69d 100644
--- a/portal-2/src/app/landingPages/dataProvider/tabs.component.ts
+++ b/portal-2/src/app/landingPages/dataProvider/tabs.component.ts
@@ -10,6 +10,8 @@ import { SearchProjectsService } from '../../services/searchProjects.service';
import { SearchDataprovidersComponent } from '../../searchPages/simple/searchDataproviders.component';
import { SearchDataprovidersService } from '../../services/searchDataproviders.service';
+import {OpenaireProperties} from '../../utils/properties/openaireProperties';
+
@Component({
selector: 'tabs',
template: `
@@ -100,8 +102,8 @@ import { SearchDataprovidersService } from '../../services/searchDataproviders.s
-
-
+
+
@@ -135,6 +137,8 @@ import { SearchDataprovidersService } from '../../services/searchDataproviders.s
0 && tab.content=='metricsTab' && metricsClicked"
[id]="id" [type]="'datasources'" [name]="name">
+ 0 && tab.content=='metricsTab' && metricsClicked" [url]=viewsFrameUrl width="100%" height="250">
+ 0 && tab.content=='metricsTab' && metricsClicked" [url]=downloadsFrameUrl width="100%" height="250">
`
@@ -163,6 +167,8 @@ export class TabsComponent {
public reloadDataproviders: boolean = true;
public reloadRelatedDatasources: boolean = true;
public metricsClicked: boolean;
+ private viewsFrameUrl: string;
+ private downloadsFrameUrl: string;
public searchPublicationsComponent : SearchPublicationsComponent;
public searchDatasetsComponent: SearchDatasetsComponent;
@@ -188,6 +194,8 @@ export class TabsComponent {
this.count(1, 0);
this.metricsClicked = false;
+ this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"dtsrcOpenAIRETimeline", "dtsrcName":"'+this.id+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"OpenAIRE","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]},{"query":"dtsrcRepoTimeline", "dtsrcName":"'+this.id+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
+ this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"dtsrcDownloadsTimeline","dtsrcName":"'+this.id+'","table":"","fields":[{"fld":"sum","agg":"sum","type":"chart","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
}
if(this.resultsBy == "collectedFrom") {
diff --git a/portal-2/src/app/landingPages/dataset/dataset.component.html b/portal-2/src/app/landingPages/dataset/dataset.component.html
index 710bbcc1..b2373577 100644
--- a/portal-2/src/app/landingPages/dataset/dataset.component.html
+++ b/portal-2/src/app/landingPages/dataset/dataset.component.html
@@ -99,6 +99,8 @@
+
+
diff --git a/portal-2/src/app/landingPages/dataset/dataset.component.ts b/portal-2/src/app/landingPages/dataset/dataset.component.ts
index c3a1da0d..7258e859 100644
--- a/portal-2/src/app/landingPages/dataset/dataset.component.ts
+++ b/portal-2/src/app/landingPages/dataset/dataset.component.ts
@@ -13,9 +13,28 @@ import {InlineClaimResultComponent} from '../../claimPages/inlineClaims/inlineCl
})
export class DatasetComponent {
- constructor (private _datasetService: DatasetService, private route: ActivatedRoute) {
- console.info('dataset constructor');
- }
+ public datasetInfo: DatasetInfo;
+ private showStyle: boolean = false;
+ private showAllReferences: boolean = false;
+ private showAllRelResData: boolean = false;
+ private showAllSimilPubl: boolean = false;
+ private showAllBioentities: boolean = false;
+ private datasetId : string ;
+ private result ;
+ sub: any;
+ private metricsClicked: boolean;
+ private viewsFrameUrl: string;
+ private downloadsFrameUrl: string;
+
+ /*@ViewChild (InlineClaimProjectComponent) inlineClaimProject : InlineClaimProjectComponent ;
+ @ViewChild (InlineClaimContextComponent) inlineClaimContext : InlineClaimContextComponent ;
+ @ViewChild (InlineClaimResultComponent) inlineClaimResult : InlineClaimResultComponent ;
+ */
+ public warningMessage = "";
+ public errorMessage = "";
+
+ constructor (private _datasetService: DatasetService, private route: ActivatedRoute) {}
+
ngOnInit() {
this.sub = this.route.queryParams.subscribe(params => {
this.datasetId = params['datasetId'];
@@ -28,32 +47,18 @@ export class DatasetComponent {
});
this.metricsClicked = false;
+ this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resOpenAIRETimeline", "resTitle":"'+this.datasetId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"OpenAIRE","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]},{"query":"resRepoTimeline", "resTitle":"'+this.datasetId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
+ this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloadTimeline", "resTitle":"'+this.datasetId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
}
- public datasetInfo: DatasetInfo;
- private showStyle: boolean = false;
- private showAllReferences: boolean = false;
- private showAllRelResData: boolean = false;
- private showAllSimilPubl: boolean = false;
- private showAllBioentities: boolean = false;
- private datasetId : string ;
- private result ;
- private metricsClicked: boolean;
-
- /*@ViewChild (InlineClaimProjectComponent) inlineClaimProject : InlineClaimProjectComponent ;
- @ViewChild (InlineClaimContextComponent) inlineClaimContext : InlineClaimContextComponent ;
- @ViewChild (InlineClaimResultComponent) inlineClaimResult : InlineClaimResultComponent ;
-*/
- public warningMessage = "";
- public errorMessage = "";
ngOnDestroy() {
this.sub.unsubscribe();
}
- sub: any;
+
getDatasetInfo(id:string) {
this.warningMessage = '';
this.errorMessage=""
- console.info("do request");
+
this._datasetService.getDatasetInfo(id).subscribe(
data => {
this.datasetInfo = data;
diff --git a/portal-2/src/app/landingPages/metrics.component.ts b/portal-2/src/app/landingPages/metrics.component.ts
index f0acb837..2310fda5 100644
--- a/portal-2/src/app/landingPages/metrics.component.ts
+++ b/portal-2/src/app/landingPages/metrics.component.ts
@@ -1,13 +1,11 @@
import {Component, Input} from '@angular/core';
import {Metrics} from '../utils/entities/metrics';
import {MetricsService } from '../services/metrics.service';
+import {ErrorCodes} from '../utils/properties/openaireProperties';
@Component({
selector: 'metrics',
template: `
-
- Metrics are currently unavailable
-
@@ -21,27 +19,37 @@ import {MetricsService } from '../services/metrics.service';
Total Views:
{{metrics.totalViews}}
+
+
+
+ Loading...
+ No Results found
+ An Error Occured
+ Service not available
+
- Total Downloads |
-
- Total Publication Downloads
- |
Total Views |
Total Publication Views
|
+ Total Downloads |
+
+ Total Publication Downloads
+ |
- {{metrics.totalDownloads}}
+ {{metrics.totalViews}}
|
- {{metrics.totalViews}}
+ {{metrics.totalDownloads}}
|
@@ -52,8 +60,8 @@ import {MetricsService } from '../services/metrics.service';
From |
- Number Of Downloads |
Number Of Views |
+ Number Of Downloads |
@@ -64,10 +72,10 @@ import {MetricsService } from '../services/metrics.service';
- {{metrics.infos.get(key).numOfDownloads}}
+ {{metrics.infos.get(key).numOfViews}}
|
- {{metrics.infos.get(key).numOfViews}}
+ {{metrics.infos.get(key).numOfDownloads}}
|
@@ -79,11 +87,15 @@ export class MetricsComponent {
@Input() id: string;
@Input() type: string;
@Input() name: string = "";
- metrics: Metrics;
+ private metrics: Metrics;
+ private errorCodes:ErrorCodes;
+ private status: number;
constructor (private _metricsService: MetricsService) {}
ngOnInit() {
+ this.errorCodes = new ErrorCodes();
+ this.status = this.errorCodes.LOADING;
this.getMetrics();
}
@@ -99,9 +111,14 @@ export class MetricsComponent {
this._metricsService.getMetrics(this.id, this.type).subscribe(
data => {
this.metrics = data;
+ this.status = this.errorCodes.DONE;
},
err => {
console.log(err);
+ this.status = this.errorCodes.ERROR;
+ if(err.status == '404') {
+ this.status = this.errorCodes.NOT_AVAILABLE;
+ }
}
);
}
diff --git a/portal-2/src/app/landingPages/project/project.component.html b/portal-2/src/app/landingPages/project/project.component.html
index a630a3d6..b649d778 100644
--- a/portal-2/src/app/landingPages/project/project.component.html
+++ b/portal-2/src/app/landingPages/project/project.component.html
@@ -142,7 +142,9 @@
-
+
+
+
diff --git a/portal-2/src/app/landingPages/project/project.component.ts b/portal-2/src/app/landingPages/project/project.component.ts
index 97d67083..259d72dd 100644
--- a/portal-2/src/app/landingPages/project/project.component.ts
+++ b/portal-2/src/app/landingPages/project/project.component.ts
@@ -24,8 +24,9 @@ export class ProjectComponent{
public projectInfo: ProjectInfo;
private projectName: string;
private metricsClicked: boolean;
- private statsClicked: boolean;
private viewsFrameUrl: string;
+ private downloadsFrameUrl: string;
+ private statsClicked: boolean;
private chartScientificResultsUrl: string;
private chartAccessModeUrl: string;
private chartDatasourcesUrl: string;
@@ -125,8 +126,9 @@ export class ProjectComponent{
this.projectInfo = data;
this.project= { funderId: "", funderName: this.projectInfo.funder, projectId: this.projectId, projectName: this.projectInfo.title, projectAcronym: this.projectInfo.acronym, startDate: this.projectInfo.startDate, endDate: this.projectInfo.endDate };
- this.projectName = (this.projectInfo.acronym != undefined && this.projectInfo.acronym != '') ? this.projectInfo.acronym : this.projectInfo.title;
- this.viewsFrameUrl = ('http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"project_stats_monthly","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Number of views for project '+this.projectName+'","yaxisheaders":["sum of views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"id","values":["'+this.projectId+'"],"to":"-1"}]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true');
+ //this.projectName = (this.projectInfo.acronym != undefined && this.projectInfo.acronym != '') ? this.projectInfo.acronym : this.projectInfo.title;
+ this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projViewsTimeline","projTitle":"'+this.projectId+'","table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
+ this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projDownloadsTimeline","projTitle":"'+this.projectId+'","table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
//stats tab charts
this.chartScientificResultsUrl='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"projScient","projTitle":"'+this.projectId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "spline", "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=600&h=250';
this.chartAccessModeUrl='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"projOA","projTitle":"'+this.projectId+'", "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": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=600&h=250';
diff --git a/portal-2/src/app/landingPages/publication/publication.component.html b/portal-2/src/app/landingPages/publication/publication.component.html
index 22d1e5ee..c03073fd 100644
--- a/portal-2/src/app/landingPages/publication/publication.component.html
+++ b/portal-2/src/app/landingPages/publication/publication.component.html
@@ -231,7 +231,8 @@
-
+
+
@@ -250,31 +251,6 @@
-
-
- - Collected from
- -
-
- View less
-
-
- -
-
- {{item['name']}}
-
-
- -
-
- View less
-
-
- - 5" class="uk-text-right">
-
- View more
-
-
-
-
0">
- Download from
@@ -291,13 +267,15 @@
{{key}}
+ [title]="publicationInfo.downloadFrom.get(key)['accessMode']"
+ target="_blank">
[{{i+1}}]
+ href="{{publicationInfo.downloadFrom.get(key)['url']}}"
+ target="_blank">
{{key}}
@@ -327,13 +305,14 @@
+ href="{{publicationInfo.publishedIn.get(key)['url']}}"
+ target="_blank">
{{key}}
@@ -417,6 +396,33 @@
+
+
+
+ - Collected from
+
+ -
+
+ {{item['name']}}
+
+
+ -
+
+ View less
+
+
+ - 5">...
+ - 5" class="uk-text-right">
+
+ View more
+
+
+
+
diff --git a/portal-2/src/app/landingPages/publication/publication.component.ts b/portal-2/src/app/landingPages/publication/publication.component.ts
index 364719f5..b5c2d5b5 100644
--- a/portal-2/src/app/landingPages/publication/publication.component.ts
+++ b/portal-2/src/app/landingPages/publication/publication.component.ts
@@ -20,35 +20,12 @@ export class PublicationComponent {
public showAllFundedBy: boolean = false;
public showAllPublishedIn: boolean = false;
- constructor (private _publicationService: PublicationService,
- private route: ActivatedRoute) {
- }
- ngOnInit() {
- this.sub = this.route.queryParams.subscribe(data => {
- this.articleId = data['articleId'];
- console.info("Article id is :"+this.articleId);
- if(this.articleId){
- this.getPublicationInfo(this.articleId);
- }else{
- console.info("Article id not found");
- }
- });
-
- this.metricsClicked = false;
- //this.viewsFrameUrl = 'http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"result_stats_monthly","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":0,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Number of views for '+this.publicationInfo.title.name+'","yaxisheaders":["sum of views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"result_stats_monthly(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
- this.openaireViewsFrameUrl = 'http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"result_stats_monthly_charts","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"OpenAIRE","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"result_stats_monthly_charts(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]},{"table":"repo_view_stats_monthly_charts","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"repo_view_stats_monthly_charts(source)-(piwik_id)datasource_piwik(openaire_id)-(id)datasource-name","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":0,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"repo_view_stats_monthly_charts(id)-(orid)result_oids(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
-
-}
-
- ngOnDestroy() {
- this.sub.unsubscribe();
- }
sub: any;getPublicationView
articleId: string;
public publicationInfo: PublicationInfo;
private metricsClicked: boolean;
private viewsFrameUrl: string;
- private openaireViewsFrameUrl: string;
+ private downloadsFrameUrl: string;
public showAllReferences: boolean = false;
public showAllRelResData: boolean = false;
@@ -62,13 +39,36 @@ export class PublicationComponent {
public result ;
-/* @ViewChild (InlineClaimProjectComponent) inlineClaimProject : InlineClaimProjectComponent ;
+ /* @ViewChild (InlineClaimProjectComponent) inlineClaimProject : InlineClaimProjectComponent ;
@ViewChild (InlineClaimContextComponent) inlineClaimContext : InlineClaimContextComponent ;
@ViewChild (InlineClaimResultComponent) inlineClaimResult : InlineClaimResultComponent ;
-*/
+ */
public warningMessage = "";
public errorMessage = "";
+ constructor (private _publicationService: PublicationService,
+ private route: ActivatedRoute) {}
+
+ ngOnInit() {
+ this.sub = this.route.queryParams.subscribe(data => {
+ this.articleId = data['articleId'];
+ console.info("Article id is :"+this.articleId);
+ if(this.articleId){
+ this.getPublicationInfo(this.articleId);
+ }else{
+ console.info("Article id not found");
+ }
+ });
+
+ this.metricsClicked = false;
+ this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resOpenAIRETimeline", "resTitle":"'+this.articleId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"OpenAIRE","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]},{"query":"resRepoTimeline", "resTitle":"'+this.articleId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
+ this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloadTimeline", "resTitle":"'+this.articleId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
+ }
+
+ ngOnDestroy() {
+ this.sub.unsubscribe();
+ }
+
getPublicationInfo(id:string) {
this.warningMessage = '';
this.errorMessage=""
diff --git a/portal-2/src/app/searchPages/searchUtils/searchDownload.component.ts b/portal-2/src/app/searchPages/searchUtils/searchDownload.component.ts
index d5d4725c..1fd23492 100644
--- a/portal-2/src/app/searchPages/searchUtils/searchDownload.component.ts
+++ b/portal-2/src/app/searchPages/searchUtils/searchDownload.component.ts
@@ -37,7 +37,7 @@ export class SearchDownloadComponent {
}
ngOnInit() {
- this.downloadURLAPI = OpenaireProperties.getCsvApi();
+ this.downloadURLAPI = OpenaireProperties.getCsvAPIURL();
}
confirmClose(data){
diff --git a/portal-2/src/app/searchPages/searchUtils/searchPaging.component.ts b/portal-2/src/app/searchPages/searchUtils/searchPaging.component.ts
index ead58de6..c66d459b 100644
--- a/portal-2/src/app/searchPages/searchUtils/searchPaging.component.ts
+++ b/portal-2/src/app/searchPages/searchUtils/searchPaging.component.ts
@@ -4,7 +4,7 @@ import {Observable} from 'rxjs/Observable';
@Component({
selector: 'search-paging',
template: `
-
+
diff --git a/portal-2/src/app/searchPages/searchUtils/searchResult.component.ts b/portal-2/src/app/searchPages/searchUtils/searchResult.component.ts
index 26eb675e..2bde4392 100644
--- a/portal-2/src/app/searchPages/searchUtils/searchResult.component.ts
+++ b/portal-2/src/app/searchPages/searchUtils/searchResult.component.ts
@@ -5,7 +5,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
@Component({
selector: 'search-result',
template: `
-
+
Loading...
No Results found
An Error Occured
@@ -114,7 +114,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
Countries: {{result.countries}}
-
+
`
diff --git a/portal-2/src/app/utils/pagingFormatter.component.ts b/portal-2/src/app/utils/pagingFormatter.component.ts
index 75fb595b..8cefd4bc 100644
--- a/portal-2/src/app/utils/pagingFormatter.component.ts
+++ b/portal-2/src/app/utils/pagingFormatter.component.ts
@@ -10,8 +10,10 @@ import {DomSanitizer} from '@angular/platform-browser';
0 ) && (getTotalPages() > 1) && ( 0 < currentPage && currentPage <= getTotalPages() ) " class="uk-pagination">
- - 1" >
-
+ - 1" >
+
+ - 1" >
+
- 0">{{currentPage -2}}
@@ -22,8 +24,8 @@ import {DomSanitizer} from '@angular/platform-browser';
- {{currentPage +3}}
- {{currentPage +4}}
- - currentPage">
-
+
- currentPage">
+
diff --git a/portal-2/src/app/utils/properties/openaireProperties.ts b/portal-2/src/app/utils/properties/openaireProperties.ts
index 093c97c0..06d35bfd 100644
--- a/portal-2/src/app/utils/properties/openaireProperties.ts
+++ b/portal-2/src/app/utils/properties/openaireProperties.ts
@@ -28,6 +28,7 @@ export class OpenaireProperties {
// Services - APIs
private static metricsAPIURL = "http://vatopedi.di.uoa.gr:8080/stats/";
+ private static framesAPIURL = "http://vatopedi.di.uoa.gr/stats2/";
private static loginAPIURL = "http://mpagasas.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticate?username=";
@@ -50,7 +51,7 @@ export class OpenaireProperties {
// private static searchServiveURL = "http://services.openaire.eu:8380/search/";
//private static searchServiveURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/";
- private static csvServiceAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";//publications?format=csv
+ private static csvAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";//publications?format=csv
private static searchCrossrefAPIURL = "http://api.crossref.org/works";
private static searchDataciteAPIURL = "http://search.datacite.org/api";
@@ -142,6 +143,14 @@ export class OpenaireProperties {
// return this.searchAPIURL;
// }
// Services - APIs' getters
+ public static getCsvAPIURL(): string {
+ return this.csvAPIURL;
+ }
+
+ public static getFramesAPIURL(): string {
+ return this.framesAPIURL;
+ }
+
public static getMetricsAPIURL(): string {
return this.metricsAPIURL;
}
@@ -233,10 +242,6 @@ export class OpenaireProperties {
public static getHelpdesk():string{
return this.helpdesk;
}
-
- public static getCsvApi(): string {
- return this.csvServiceAPIURL;
- }
}
export class ErrorCodes {
public LOADING = 0;