iframes in metrics tab (landing pages) updated | loading in metrics tabs addes | paging (used in search results) updated | appbox in publication landing page updated

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@45429 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2017-01-17 16:43:00 +00:00
parent d4e1832d9a
commit 77d912b2fc
14 changed files with 159 additions and 110 deletions

View File

@ -39,7 +39,7 @@ import {SearchOrganizationsService} from '../services/searchOrganizations.servic
(selectedValueChanged)="valueChanged($event)">
</entities-autocomplete>
<button class="uk-button" type="submit" (click)="organizationSelected(selectedId)" >
Next <i class="uk-icon-arrow-circle-right"></i>
Locate
</button>
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
</form>

View File

@ -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
<metrics *ngIf="tabs[0].content=='metricsTab' && metricsClicked"
[id]="id" [type]="'datasources'" [name]="name">
</metrics>
<i-frame *ngIf="tabs[0].content=='metricsTab' && metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame>
<i-frame *ngIf="tabs[0].content=='metricsTab' && metricsClicked" [url]=downloadsFrameUrl width="100%" height="250"></i-frame>
</li>
<li *ngFor="let tab of tabs; let i=index" id="{{tab.content}}">
@ -135,6 +137,8 @@ import { SearchDataprovidersService } from '../../services/searchDataproviders.s
<metrics *ngIf="i>0 && tab.content=='metricsTab' && metricsClicked"
[id]="id" [type]="'datasources'" [name]="name">
</metrics>
<i-frame *ngIf="i>0 && tab.content=='metricsTab' && metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame>
<i-frame *ngIf="i>0 && tab.content=='metricsTab' && metricsClicked" [url]=downloadsFrameUrl width="100%" height="250"></i-frame>
</li>
</ul>
`
@ -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") {

View File

@ -99,6 +99,8 @@
</li>
<li id="metricsTab">
<metrics *ngIf="metricsClicked" [id]="datasetId" [type]="'results'"></metrics>
<i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame>
<i-frame *ngIf="metricsClicked" [url]=downloadsFrameUrl width="100%" height="250"></i-frame>
</li>
</ul>
</div>

View File

@ -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;

View File

@ -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: `
<div *ngIf="metrics == undefined" class = "uk-alert uk-alert-warning">
Metrics are currently unavailable
</div>
<!--div *ngIf="i>0 && tab.content=='metricsTab' && metrics != undefined" class="uk-panel uk-panel-box"-->
<!--/div-->
@ -21,27 +19,37 @@ import {MetricsService } from '../services/metrics.service';
<dt>Total Views: </dt>
<dd>{{metrics.totalViews}}</dd>
</dl-->
<!--div *ngIf="metrics == undefined" class="uk-alert uk-alert-warning">
Metrics are currently unavailable
</div-->
<div *ngIf="status == errorCodes.LOADING" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="status == errorCodes.NONE" class="uk-alert uk-alert-primary" role="alert">No Results found</div>
<div *ngIf="status == errorCodes.ERROR" class="uk-alert uk-alert-warning" role="alert">An Error Occured</div>
<div *ngIf="status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger" role="alert">Service not available</div>
<table *ngIf="metrics != undefined"
class="uk-table uk-panel-box">
<thead>
<tr>
<th *ngIf="type=='results'" class="uk-text-center">Total Downloads</th>
<th *ngIf="type!='results'" class="uk-text-center">
Total <span [innerHTML]="name"></span> Publication Downloads
</th>
<th *ngIf="type=='results'" class="uk-text-center">Total Views</th>
<th *ngIf="type!='results'" class="uk-text-center">
Total <span [innerHTML]="name"></span> Publication Views
</th>
<th *ngIf="type=='results'" class="uk-text-center">Total Downloads</th>
<th *ngIf="type!='results'" class="uk-text-center">
Total <span [innerHTML]="name"></span> Publication Downloads
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="uk-text-center">
{{metrics.totalDownloads}}
{{metrics.totalViews}}
</td>
<td class="uk-text-center">
{{metrics.totalViews}}
{{metrics.totalDownloads}}
</td>
</tr>
</tbody>
@ -52,8 +60,8 @@ import {MetricsService } from '../services/metrics.service';
<thead>
<tr>
<th class="uk-text-center">From</th>
<th class="uk-text-center">Number Of Downloads</th>
<th class="uk-text-center">Number Of Views</th>
<th class="uk-text-center">Number Of Downloads</th>
</tr>
</thead>
<tbody>
@ -64,10 +72,10 @@ import {MetricsService } from '../services/metrics.service';
</a>
</td>
<td class="uk-text-center">
{{metrics.infos.get(key).numOfDownloads}}
{{metrics.infos.get(key).numOfViews}}
</td>
<td class="uk-text-center">
{{metrics.infos.get(key).numOfViews}}
{{metrics.infos.get(key).numOfDownloads}}
</td>
</tr>
</tbody>
@ -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;
}
}
);
}

View File

@ -142,7 +142,9 @@
</li>
<li id="metricsTab">
<metrics *ngIf="metricsClicked" [id]="projectId" [type]="'projects'" [name]="projectName"></metrics>
<i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="800" height="350"></i-frame>
<!--i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="800" height="350"></i-frame-->
<i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame>
<i-frame *ngIf="metricsClicked" [url]=downloadsFrameUrl width="100%" height="250"></i-frame>
</li>
</ul>
</div>

View File

@ -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';

View File

@ -231,7 +231,8 @@
<li id="metricsTab">
<metrics *ngIf="metricsClicked" [id]="articleId" [type]="'results'"></metrics>
<!--i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame-->
<i-frame *ngIf="metricsClicked" [url]=openaireViewsFrameUrl width="100%" height="250"></i-frame>
<i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame>
<i-frame *ngIf="metricsClicked" [url]=downloadsFrameUrl width="100%" height="250"></i-frame>
</li>
</ul>
</div>
@ -250,31 +251,6 @@
</dd>
</dl>
</li>
<li *ngIf="publicationInfo.collectedFrom != undefined">
<dl class="uk-description-list-line functionsSection">
<dt>Collected from</dt>
<dd *ngIf="showAllCollectedFrom" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View less
</a>
</dd>
<dd *ngFor="let item of publicationInfo.collectedFrom let i=index">
<a *ngIf="i<5 || showAllCollectedFrom" href="{{item['url']}}">
{{item['name']}}
</a>
</dd>
<dd *ngIf="showAllCollectedFrom" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View less
</a>
</dd>
<dd *ngIf="!showAllCollectedFrom && publicationInfo.collectedFrom.length > 5" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View more
</a>
</dd>
</dl>
</li>
<li *ngIf="publicationInfo.downloadFrom != undefined && publicationInfo.downloadFrom.size > 0">
<dl class="uk-description-list-line functionsSection">
<dt class="title">Download from</dt>
@ -291,13 +267,15 @@
{{key}}
<span *ngFor="let url of publicationInfo.downloadFrom.get(key)['url']; let i=index;">
<a href="{{url}}" [class]="publicationInfo.downloadFrom.get(key)['accessMode']"
[title]="publicationInfo.downloadFrom.get(key)['accessMode']">
[title]="publicationInfo.downloadFrom.get(key)['accessMode']"
target="_blank">
[{{i+1}}]
</a>
</span>
</div>
<a *ngIf="publicationInfo.downloadFrom.get(key)['url'].length == 1"
href="{{publicationInfo.downloadFrom.get(key)['url']}}">
href="{{publicationInfo.downloadFrom.get(key)['url']}}"
target="_blank">
{{key}}
</a>
</span>
@ -327,13 +305,14 @@
<div *ngIf="publicationInfo.publishedIn.get(key)['url'].length > 1">
{{key}}
<span *ngFor="let url of publicationInfo.publishedIn.get(key)['url']; let i=index">
<a href="{{url}}">
<a href="{{url}}" target="_blank">
[{{i+1}}]
</a>
</span>
</div>
<a *ngIf="publicationInfo.publishedIn.get(key)['url'].length == 1"
href="{{publicationInfo.publishedIn.get(key)['url']}}">
href="{{publicationInfo.publishedIn.get(key)['url']}}"
target="_blank">
{{key}}
</a>
</div>
@ -417,6 +396,33 @@
<button (click)=" toggleClaimContext()" class = "uk-button uk-button-primary uk-button-mini" >Add Concepts</button>
<inline-claim-context inlineType ="publication" [inlineEntity]="result" (contextAdded)="contextAdded($event)" ></inline-claim-context-->
</li>
<li *ngIf="publicationInfo.collectedFrom != undefined">
<dl class="uk-description-list-line functionsSection">
<dt>Collected from</dt>
<!--dd *ngIf="showAllCollectedFrom" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View less
</a>
</dd-->
<dd *ngFor="let item of publicationInfo.collectedFrom let i=index">
<a *ngIf="i<5 || showAllCollectedFrom" href="{{item['url']}}">
{{item['name']}}
</a>
</dd>
<dd *ngIf="showAllCollectedFrom" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View less
</a>
</dd>
<dd *ngIf="!showAllCollectedFrom && publicationInfo.collectedFrom.length > 5">...</dd>
<dd *ngIf="!showAllCollectedFrom && publicationInfo.collectedFrom.length > 5" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View more
</a>
</dd>
</dl>
</li>
</ul>
</div>
</div>

View File

@ -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=""

View File

@ -37,7 +37,7 @@ export class SearchDownloadComponent {
}
ngOnInit() {
this.downloadURLAPI = OpenaireProperties.getCsvApi();
this.downloadURLAPI = OpenaireProperties.getCsvAPIURL();
}
confirmClose(data){

View File

@ -4,7 +4,7 @@ import {Observable} from 'rxjs/Observable';
@Component({
selector: 'search-paging',
template: `
<div class= "searchPaging uk-margin-top uk-margin-bottom">
<div class= "searchPaging uk-panel">
<div class="uk-float-right" *ngIf="results && searchUtils.totalResults > searchUtils.size">
<paging [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [baseUrl]="baseUrl" [size]="searchUtils.size"> </paging>
</div>

View File

@ -5,7 +5,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
@Component({
selector: 'search-result',
template: `
<ul class="uk-list uk-margin">
<ul class="uk-list uk-list-line uk-margin">
<div *ngIf="status == errorCodes.LOADING" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="status == errorCodes.NONE" class="uk-alert uk-alert-primary" role="alert">No Results found</div>
<div *ngIf="status == errorCodes.ERROR" class="uk-alert uk-alert-warning" role="alert">An Error Occured</div>
@ -114,7 +114,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
Countries: {{result.countries}}
</div>
<hr>
<!--hr-->
</li>
</ul>
`

View File

@ -10,8 +10,10 @@ import {DomSanitizer} from '@angular/platform-browser';
<ul *ngIf=" ( getTotalPages() > 0 ) && (getTotalPages() > 1) && ( 0 < currentPage && currentPage <= getTotalPages() ) " class="uk-pagination">
<li *ngIf=" currentPage > 1" ><a [href]="onPage((1))" aria-label="Previous">
<span><i class="uk-icon-angle-double-left"></i></span></a></li>
<li *ngIf=" currentPage > 1" ><a [href]="onPage((1))" aria-label="Previous">
<span><i class="uk-icon-angle-double-left"></i></span></a></li>
<li *ngIf=" currentPage > 1" ><a [href]="onPage((currentPage -1))" aria-label="Previous">
<span><i class="uk-icon-angle-left"></i></span></a></li>
<!--<li *ngIf=" currentPage > 1"><a [href]="onPage((currentPage -1))">\<</a></li>-->
<li *ngIf=" currentPage -2 > 0"><a [href]="onPage((currentPage -2))">{{currentPage -2}}</a></li>
@ -22,8 +24,8 @@ import {DomSanitizer} from '@angular/platform-browser';
<li *ngIf=" (currentPage -2 <= 0)&&(currentPage +3 <= getTotalPages()) "><a [href]="onPage((currentPage +3))">{{currentPage +3}}</a></li>
<li *ngIf=" (currentPage -1 <= 0)&&(currentPage +4 <= getTotalPages()) "><a [href]="onPage((currentPage +4))">{{currentPage +4}}</a></li>
<li *ngIf="getTotalPages() > currentPage"><a [href]="onPage((getTotalPages()))" aria-label="Next">
<i class="uk-icon-angle-double-right"></i>
<li *ngIf="getTotalPages() > currentPage"><a [href]="onPage((currentPage +1))" aria-label="Next">
<i class="uk-icon-angle-right"></i>
</a></li>

View File

@ -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;