[Trunk|Connect]
Community Page: remove sticky toolbar for mobile view Change statistics: add them in the result tabs per type Add Other stats in the bottom: show the rest charts not visible in active tab App component: comment layout service Statistics Component: empty community page template to allow changes in Community Page git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@55283 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
d1fcb2bc76
commit
ebd7d8efaa
|
@ -8,7 +8,7 @@ import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/en
|
|||
import {CommunitiesService} from "./openaireLibrary/connect/communities/communities.service";
|
||||
import {Session} from './openaireLibrary/login/utils/helper.class';
|
||||
import {ConnectHelper} from './openaireLibrary/connect/connectHelper';
|
||||
import {LayoutService} from "./openaireLibrary/services/layout.service";
|
||||
// import {LayoutService} from "./openaireLibrary/services/layout.service";
|
||||
|
||||
@Component({
|
||||
//changeDetection: ChangeDetectionStrategy.Default,
|
||||
|
@ -28,7 +28,7 @@ import {LayoutService} from "./openaireLibrary/services/layout.service";
|
|||
<router-outlet></router-outlet>
|
||||
</main>
|
||||
</div>
|
||||
<feedback *ngIf= "isClient && properties" portalName="Connect" [feedbackQuestionaire]=properties.feedbackQuestionaire></feedback>
|
||||
<!--feedback *ngIf= "isClient && properties" portalName="Connect" [feedbackQuestionaire]=properties.feedbackQuestionaire></feedback-->
|
||||
<cookie-law *ngIf= "isClient" position="bottom">
|
||||
OpenAIRE uses cookies in order to function properly.<br>
|
||||
Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible.
|
||||
|
@ -54,10 +54,10 @@ export class AppComponent {
|
|||
properties:EnvProperties;
|
||||
showMenu:boolean = false;
|
||||
communities = null;
|
||||
layout = null;
|
||||
// layout = null;
|
||||
// community: {id:string, name:string, logoUrl:string};
|
||||
constructor( private route: ActivatedRoute, private propertiesService:EnvironmentSpecificService,
|
||||
private _communitiesService:CommunitiesService, private _layoutService: LayoutService) {
|
||||
private _communitiesService:CommunitiesService){//, private _layoutService: LayoutService) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -77,13 +77,13 @@ export class AppComponent {
|
|||
if((data['communityId'] && data['communityId']!="" && com.communityId == data['communityId'])
|
||||
|| (ConnectHelper.getCommunityFromDomain(this.properties.domain) == com.communityId ) ){
|
||||
community = com;
|
||||
this._layoutService.getLayout(com.communityId,
|
||||
this.properties.adminToolsAPIURL + '/').subscribe (
|
||||
layout => {
|
||||
this.layout = layout;
|
||||
document.documentElement.style.setProperty('--portal-main-color', this.layout.color);
|
||||
}
|
||||
);
|
||||
// this._layoutService.getLayout(com.communityId,
|
||||
// this.properties.adminToolsAPIURL + '/').subscribe (
|
||||
// layout => {
|
||||
// this.layout = layout;
|
||||
// document.documentElement.style.setProperty('--portal-main-color', this.layout.color);
|
||||
// }
|
||||
// );
|
||||
this.community = {id: community.communityId, name: (community.shortTitle)?community.shortTitle:community.title, logoUrl:community.logoUrl};
|
||||
this.menuItems= [
|
||||
// {rootItem: new MenuItem("dashboard","Dashboard","","/",false,[],[],this.properties.environment!="development"?{}:{communityId:community.communityId}),
|
||||
|
|
|
@ -34,7 +34,8 @@ import {LayoutService} from "./openaireLibrary/services/layout.service";
|
|||
ErrorModule,
|
||||
CKEditorModule,
|
||||
FormsModule,
|
||||
NavigationBarModule, FeedbackModule, BottomModule,
|
||||
NavigationBarModule, //FeedbackModule,
|
||||
BottomModule,
|
||||
CookieLawModule,
|
||||
BrowserModule.withServerTransition({appId: 'my-app'}),
|
||||
AppRoutingModule
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
<div id="stickhere">
|
||||
</div>
|
||||
<div *ngIf="communityInfo" class="uk-section uk-margin-top uk-padding-remove-bottom" uk-sticky="top: #stickhere">
|
||||
<div class="uk-background-muted uk-padding-small">
|
||||
<div *ngIf="communityInfo" class="uk-section uk-margin-top uk-padding-remove-bottom uk-visible@m " uk-sticky="top: #stickhere">
|
||||
<div class="communityToolBar uk-padding-small uk-margin-small-top">
|
||||
<div class="uk-container uk-text-center uk-margin-small-top uk-margin-small-bottom">
|
||||
<manage *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=" " [buttonSizeSmall]=false></manage>
|
||||
<subscribe *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=""></subscribe>
|
||||
<invite *ngIf="showInvite()" [longView]=false [buttonSizeSmall]=false></invite>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="communityInfo" class="uk-section uk-margin-top uk-padding-remove-bottom uk-hidden@m" >
|
||||
<div class="communityToolBar uk-padding-small">
|
||||
<div class="uk-container uk-text-center uk-margin-small-top uk-margin-small-bottom">
|
||||
<manage *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=" " [buttonSizeSmall]=false></manage>
|
||||
<subscribe *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=""></subscribe>
|
||||
|
@ -16,18 +25,14 @@
|
|||
<div *ngIf="communityId == null || communityId == ''" class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-alert uk-alert-primary">
|
||||
No community chosen
|
||||
</div>
|
||||
<!-- <div class="uk-clearfix uk-margin-bottom">
|
||||
<manage *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=" uk-float-right"></manage>
|
||||
<subscribe *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=" uk-float-right"></subscribe>
|
||||
</div> -->
|
||||
<div *ngIf="communityId != null && communityId != '' && community != null">
|
||||
<div *ngIf="community.title != null" class="uk-article-title">
|
||||
<div *ngIf="community.title != null" class="uk-text-bold uk-h4">
|
||||
<p> {{community.title}}</p>
|
||||
</div>
|
||||
<div *ngIf="community.title == null && community.shortTitle != null" class="uk-article-title">
|
||||
<div *ngIf="community.title == null && community.shortTitle != null" class="uk-text-bold uk-h4">
|
||||
<p> {{community.shortTitle}}</p>
|
||||
</div>
|
||||
<div *ngIf="community.description != null" class="uk-text-lead">
|
||||
<div *ngIf="community.description != null" class="uk-text-large">
|
||||
<p> {{community.description}}</p>
|
||||
</div>
|
||||
<div class="uk-grid uk-grid-divider">
|
||||
|
@ -53,7 +58,7 @@
|
|||
<div *ngIf="communityId != null && communityId != ''" class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-grid uk-grid-medium ">
|
||||
|
||||
<div *ngIf="publicationTotal != null && isEntityEnabled('publication') && isRouteEnabled('/search/find/publications')" class="uk-padding-remove-left">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-flex">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 ">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/publications" ><span class="uk-text-bold">{{publicationTotal|number}}</span>
|
||||
<br><span class="uk-text-small">publications</span></a>
|
||||
</div>
|
||||
|
@ -66,14 +71,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="softwareTotal != null && isEntityEnabled('software') && isRouteEnabled('/search/find/software')" class="uk-padding-remove-left">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-flex">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 ">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/software"><span class="uk-text-bold">{{softwareTotal|number}}</span>
|
||||
<br><span class="uk-text-small">software</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="orpTotal != null && isEntityEnabled('orp') && isRouteEnabled('/search/find/other')" class="uk-padding-remove-left">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-flex">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 ">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/other"><span class="uk-text-bold">{{orpTotal|number}}</span>
|
||||
<br><span class="uk-text-small">other products</span></a>
|
||||
</div>
|
||||
|
@ -81,14 +86,14 @@
|
|||
|
||||
|
||||
<div *ngIf="projectTotal != null && isEntityEnabled('project') && isRouteEnabled('/search/find/projects')" class="uk-padding-remove-left">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-flex">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 ">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/projects"><span class="uk-text-bold">{{projectTotal|number}}</span>
|
||||
<br><span class="uk-text-small">projects</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="contentProviderTotal != null && isEntityEnabled('datasource') && isRouteEnabled('/search/find/dataproviders')" class="uk-padding-remove-left">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-flex">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 ">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/dataproviders"><span class="uk-text-bold">{{contentProviderTotal|number}}</span>
|
||||
<br><span class="uk-text-small">content providers</span></a>
|
||||
</div>
|
||||
|
@ -99,12 +104,10 @@
|
|||
<div *ngIf="community.subjects != null">
|
||||
<span *ngFor="let subject of community.subjects.slice(0,10) let i=index">
|
||||
<span *ngIf="subject != ''" class="uk-label uk-margin-small-bottom">{{subject}}</span>
|
||||
<!-- <span *ngIf=" i<9 && i<(community.subjects.length-1)"> </span> -->
|
||||
</span>
|
||||
<span *ngIf="showAll">
|
||||
<span *ngFor="let subject of community.subjects.slice(10) let i=index">
|
||||
<span *ngIf="subject != ''" class="uk-label uk-margin-small-bottom">{{subject}}</span>
|
||||
<!-- <span *ngIf="i<(community.subjects.length-1)"> </span> -->
|
||||
</span>
|
||||
</span>
|
||||
<span *ngIf="!showAll && community.subjects.length > 10">
|
||||
|
@ -133,7 +136,7 @@
|
|||
</div>
|
||||
|
||||
<ul class="uk-tab uk-margin-top" data-uk-tab="{connect: '#resultTabs'">
|
||||
<li *ngIf="isEntityEnabled('publication')" class="uk-active"><a href="#">publications</a></li>
|
||||
<li *ngIf="isEntityEnabled('publication')" (click)="searchPublications()" class="uk-active"><a href="#">publications</a></li>
|
||||
<li *ngIf="isEntityEnabled('dataset')" (click)="searchResearchData()"><a href="#">research data</a></li>
|
||||
<li *ngIf="isEntityEnabled('software')" (click)="searchSoftware()"><a href="#">software</a></li>
|
||||
<li *ngIf="isEntityEnabled('orp')" (click)="searchOrps()"><a href="#">other research products</a></li>
|
||||
|
@ -143,17 +146,68 @@
|
|||
<li *ngIf="isEntityEnabled('publication')">
|
||||
<div class="uk-grid">
|
||||
<results-comp [(results)]=publicationResults [(total)]=publicationTotal resultType="publication" [community]=community [params]=params class="uk-width-expand"></results-comp>
|
||||
<div class="uk-width-1-2@m uk-width-1-1@s">
|
||||
<div *ngIf=" activeTab == 'publication' && statistics !=null && statistics.allowedEntities && statistics.statisticsSum && statistics.allowedCharts && statistics.statisticsSum['publication'] && statistics.allowedCharts['publication'] && statistics.statisticsSum['publication'].total>0 && statistics.allowedCharts['publication'].length>0" class="uk-width-1-2@m uk-width-1-1@s">
|
||||
<div *ngFor="let chart of statistics.allowedCharts['publication']" class=" uk-first-column">
|
||||
<iframe [src]=statistics.chartsUrlMap[chart] width="750" height="450" scrolling="no"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li *ngIf="isEntityEnabled('dataset')">
|
||||
<div class="uk-grid">
|
||||
<results-comp [(results)]=researchDataResults [(total)]=researchDataTotal resultType="dataset" [community]=community [params]=params class="uk-width-expand"></results-comp>
|
||||
<div *ngIf="activeTab == 'dataset' && statistics !=null && statistics.allowedEntities && statistics.statisticsSum && statistics.allowedCharts &&
|
||||
statistics.statisticsSum['dataset'] && statistics.allowedCharts['dataset'] && statistics.statisticsSum['dataset'].total>0 && statistics.allowedCharts['dataset'].length>0"
|
||||
class="uk-width-1-2@m uk-width-1-1@s">
|
||||
<div *ngFor="let chart of statistics.allowedCharts['dataset']" class="uk-width-1-2@l uk-width-1-1@m uk-first-column">
|
||||
<iframe [src]=statistics.chartsUrlMap[chart] width="750" height="450" scrolling="no"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li *ngIf="isEntityEnabled('software')">
|
||||
<div class="uk-grid">
|
||||
<results-comp [(results)]=softwareResults [(total)]=softwareTotal resultType="software" [community]=community [params]=params class="uk-width-expand"></results-comp>
|
||||
<div *ngIf="statistics !=null && statistics.allowedEntities && statistics.statisticsSum && statistics.allowedCharts && statistics.statisticsSum['software'] && statistics.allowedCharts['software'] && statistics.statisticsSum['software'].total>0 && statistics.allowedCharts['software'].length>0" class="uk-width-1-2@m uk-width-1-1@s">
|
||||
<div *ngFor="let chart of statistics.allowedCharts['software']" class="uk-width-1-2@l uk-width-1-1@m uk-first-column">
|
||||
<iframe [src]=statistics.chartsUrlMap[chart] width="750" height="450" scrolling="no"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li *ngIf="isEntityEnabled('orp')">
|
||||
<div class="uk-grid">
|
||||
<results-comp [(results)]=orpResults [(total)]=orpTotal resultType="other" [community]=community [params]=params class="uk-width-expand"></results-comp>
|
||||
<div *ngIf=" activeTab == 'orp' && statistics !=null && statistics.allowedEntities && statistics.statisticsSum && statistics.allowedCharts && statistics.statisticsSum['orp'] && statistics.allowedCharts['orp'] && statistics.statisticsSum['orp'].total>0 && statistics.allowedCharts['orp'].length>0" class="uk-width-1-2@m uk-width-1-1@s">
|
||||
<div *ngFor="let chart of statistics.allowedCharts['orp']" class="uk-width-1-2@l uk-width-1-1@m uk-first-column">
|
||||
<iframe [src]=statistics.chartsUrlMap[chart] width="750" height="450" scrolling="no"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li *ngIf="isEntityEnabled('dataset')"><results-comp [(results)]=researchDataResults [(total)]=researchDataTotal resultType="dataset" [community]=community [params]=params></results-comp></li>
|
||||
<li *ngIf="isEntityEnabled('software')"><results-comp [(results)]=softwareResults [(total)]=softwareTotal resultType="software" [community]=community [params]=params></results-comp></li>
|
||||
<li *ngIf="isEntityEnabled('orp')"><results-comp [(results)]=orpResults [(total)]=orpTotal resultType="other" [community]=community [params]=params></results-comp></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr>
|
||||
<div *ngIf="statistics && statistics.allowedEntities && countOtherGraphs()>0">
|
||||
<div class="uk-text-large">
|
||||
Other Graphs
|
||||
</div>
|
||||
<div *ngIf="statistics && statistics.allowedEntities" class="uk-margin-top uk-grid">
|
||||
<ng-container *ngFor="let entity of statistics.allowedEntities">
|
||||
<ng-container *ngIf="statistics.statisticsSum[entity].total>0 && statistics.allowedCharts[entity].length>0 && activeTab!=entity">
|
||||
|
||||
<ng-container *ngIf="statistics.allowedCharts[entity] " >
|
||||
<div *ngFor="let chart of statistics.allowedCharts[entity]" class="uk-width-1-2@m uk-first-column">
|
||||
<iframe [src]=statistics.chartsUrlMap[chart] width="750" height="450" scrolling="no"></iframe>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<statistics-for-dashboard [currentMode]="'showInDashboard'"></statistics-for-dashboard>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
@ -161,3 +215,4 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<statistics-for-dashboard [currentMode]="'showInDashboard'"></statistics-for-dashboard>
|
||||
|
|
|
@ -63,7 +63,8 @@ export class CommunityComponent {
|
|||
public subResearchData;
|
||||
public subSoftware;
|
||||
public subOrps;
|
||||
|
||||
@ViewChild (StatisticsForDashboardComponent) statistics : StatisticsForDashboardComponent =null;
|
||||
public activeTab = "publication";
|
||||
constructor (
|
||||
private element: ElementRef,
|
||||
private route: ActivatedRoute,
|
||||
|
@ -226,6 +227,7 @@ export class CommunityComponent {
|
|||
}
|
||||
|
||||
public searchPublications() {
|
||||
this.activeTab = "publication";
|
||||
if (this.publicationTotal > 0 && this.publicationResults == null) {
|
||||
this._searchEntriesService.getResults(this.properties.searchAPIURLLAst+'publications?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
|
||||
publicationResults => {
|
||||
|
@ -241,6 +243,7 @@ export class CommunityComponent {
|
|||
}
|
||||
|
||||
public searchResearchData() {
|
||||
this.activeTab = "dataset";
|
||||
if (this.researchDataTotal > 0 && this.researchDataResults == null) {
|
||||
this._searchEntriesService.getResults(this.properties.searchAPIURLLAst+'datasets?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
|
||||
researchDataResults => {
|
||||
|
@ -255,6 +258,7 @@ export class CommunityComponent {
|
|||
}
|
||||
|
||||
public searchSoftware() {
|
||||
this.activeTab = "software";
|
||||
if (this.softwareTotal > 0 && this.softwareResults == null) {
|
||||
this._searchEntriesService.getResults(this.properties.searchAPIURLLAst+'software?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
|
||||
softwareResults => {
|
||||
|
@ -269,6 +273,7 @@ export class CommunityComponent {
|
|||
}
|
||||
|
||||
public searchOrps() {
|
||||
this.activeTab = "orp";
|
||||
if (this.orpTotal > 0 && this.orpResults == null) {
|
||||
this._searchEntriesService.getResults(this.properties.searchAPIURLLAst+'other?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
|
||||
orpResults => {
|
||||
|
@ -324,7 +329,19 @@ export class CommunityComponent {
|
|||
entities.push("other research products");
|
||||
}
|
||||
return "Search"+ ((entities.length > 0 )?(" for "+entities.join(', ')+"..."):"");
|
||||
|
||||
|
||||
}
|
||||
|
||||
countOtherGraphs(){
|
||||
var count = 0;
|
||||
if(this.statistics && this.statistics.allowedEntities){
|
||||
for(var entity of this.statistics.allowedEntities){
|
||||
if(this.statistics.statisticsSum[entity].total>0 && this.statistics.allowedCharts[entity].length>0 && this.activeTab!=entity){
|
||||
count+=this.statistics.allowedCharts[entity].length;
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
<div class="uk-margin-top">
|
||||
<!--div class="uk-margin-large-top">
|
||||
<h2 class="uk-h3 uk-text-primary uk-heading-line">
|
||||
<span>Most recent statistics</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div *ngIf="!statisticsSum || (statisticsSum.total_projects==0) || (allowedEntities.length == 0)" class="uk-alert uk-alert-info" style="margin-top:40px;">
|
||||
No statistics are available for {{ communityId.toUpperCase() }}
|
||||
</div-->
|
||||
<div>
|
||||
<div *ngFor="let entity of allowedEntities">
|
||||
<div *ngIf="statisticsSum[entity].total>0 && allowedCharts[entity].length>0">
|
||||
<!-- <div class="uk-text-uppercase uk-text-bold uk-heading-divider">
|
||||
<h3>{{ entitiesMap.get(entity) }}</h3>
|
||||
</div> -->
|
||||
<div class="uk-margin-large-top">
|
||||
<h2 class="uk-h3 uk-text-primary">
|
||||
{{ entitiesMap.get(entity) }}
|
||||
</h2>
|
||||
</div>
|
||||
<div *ngIf="allowedCharts[entity]" class="uk-grid">
|
||||
<div *ngFor="let chart of allowedCharts[entity]" class="uk-width-1-2@l uk-width-1-1@m uk-first-column">
|
||||
<iframe [src]=chartsUrlMap[chart] width="750" height="450"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -212,7 +212,7 @@ export class StatisticsComponent {
|
|||
createChartUrlMap() {
|
||||
this.chartsUrlMap = {
|
||||
publicationTimeline : this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&persistent=false&data=com=query&data={"query":"comTimelinePubs","comId":"${this.communityId}","table":"result","fields":[{"fld":"number","agg":"count","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["Publications"],"fieldsheaders":["publications"],"in":[{"f":0,"text":"Yearly"}],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Publications through the years","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`),
|
||||
publicationGraph: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAPubs","comId":"${this.communityId}","table":"result","fields":[{"fld":"number","agg":"count","type":"pie","yaxis":1,"c":false}],"xaxis":{"name":"bestlicense","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"order":"d","yaxisheaders":[""],"fieldsheaders":[""],"in":[],"filters":[],"having":[],"incfilters":[],"inchaving":[],"title":"Publications by access mode","subtitle":"","xaxistitle":"","nulls":true}&w=70%&h=70%`),
|
||||
publicationGraph: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAPubs","comId":"${this.communityId}","table":"result","fields":[{"fld":"number","agg":"count","type":"pie","yaxis":1,"c":false}],"xaxis":{"name":"bestlicense","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"order":"d","yaxisheaders":[""],"fieldsheaders":[""],"in":[],"filters":[],"having":[],"incfilters":[],"inchaving":[],"title":"Publications by access mode","subtitle":"","xaxistitle":"","nulls":true}&w=70%&h=80%`),
|
||||
publicationProjectcolumn: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectPubs","comId":"${this.communityId}","table":"result","fields":[{"fld":"number","agg":"count","type":"bar","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["publications"],"fieldsheaders":["publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Publications per project","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%`),
|
||||
publicationProjectpie: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectPubs","comId":"${this.communityId}","table":"result","fields":[{"fld":"number","agg":"count","type":"pie","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":[""],"fieldsheaders":["publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Publications per project","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`),
|
||||
publicationProjecttable: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectPubs","comId":"${this.communityId}","table":"result","fields":[{"fld":"number","agg":"count","type":"bar","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["Publications"],"fieldsheaders":["Publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`),
|
||||
|
@ -285,7 +285,8 @@ export class StatisticsComponent {
|
|||
|
||||
@Component({
|
||||
selector: 'statistics-for-dashboard',
|
||||
templateUrl: 'statistics-for-dashboard.component.html',
|
||||
template:''
|
||||
// templateUrl: 'statistics-for-dashboard.component.html',
|
||||
})
|
||||
|
||||
export class StatisticsForDashboardComponent extends StatisticsComponent {
|
||||
|
|
|
@ -68,3 +68,7 @@
|
|||
background: url('./home.jpg') !important;
|
||||
|
||||
}
|
||||
|
||||
.communityToolBar{
|
||||
background-color:#dedede;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue