[Monitor|Trunk]

- Browse page Fix: pass single stakeholder instead of list

- Code cleaning:
	- remove unused files, imports, remove free guard
	- unsubscribe from observables
	- add timeout interceptor
	- call clearSubscriptions method in App component 



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@59840 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Argiro Kokogiannaki 2020-11-13 15:08:17 +00:00
parent ccaad504ed
commit 54b65ea4e9
33 changed files with 160 additions and 2435 deletions

View File

@ -57,7 +57,7 @@ export class AppComponent {
constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService,
private router: Router, private stakeholderService: StakeholderService, private router: Router, private stakeholderService: StakeholderService,
private userManagementService: UserManagementService) { private userManagementService: UserManagementService) {
router.events.forEach((event) => { this.subscriptions.push(router.events.forEach((event) => {
if (event instanceof NavigationStart) { if (event instanceof NavigationStart) {
HelperFunctions.scroll(); HelperFunctions.scroll();
} else if (event instanceof NavigationEnd) { } else if (event instanceof NavigationEnd) {
@ -69,7 +69,7 @@ export class AppComponent {
let params = r.snapshot.params; let params = r.snapshot.params;
this.params.next(params); this.params.next(params);
} }
}); }));
} }
ngOnInit() { ngOnInit() {
@ -95,6 +95,8 @@ export class AppComponent {
value.unsubscribe(); value.unsubscribe();
} }
}); });
this.userManagementService.clearSubscriptions();
this.stakeholderService.clearSubscriptions();
} }
public buildMenu() { public buildMenu() {

View File

@ -1,7 +1,7 @@
import {NgModule} from '@angular/core'; import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms'; import {FormsModule} from '@angular/forms';
import {CommonModule} from '@angular/common'; import {CommonModule} from '@angular/common';
import {HttpClientModule} from "@angular/common/http"; import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http";
import {BrowserModule} from '@angular/platform-browser'; import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {AppComponent} from './app.component'; import {AppComponent} from './app.component';
@ -15,10 +15,7 @@ import {ErrorModule} from './openaireLibrary/error/error.module';
import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module'; import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module';
import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver'; import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
import {CommunitiesService} from './openaireLibrary/connect/communities/communities.service';
import {LayoutService} from "./openaireLibrary/services/layout.service";
import {SubscribeModule} from './utils/subscribe/subscribe.module';
@NgModule({ @NgModule({
@ -32,13 +29,15 @@ import {SubscribeModule} from './utils/subscribe/subscribe.module';
NavigationBarModule, NavigationBarModule,
BottomModule, BottomModule,
CookieLawModule, CookieLawModule,
SubscribeModule.forRoot(),
BrowserModule.withServerTransition({appId: 'my-app'}), BrowserModule.withServerTransition({appId: 'my-app'}),
AppRoutingModule AppRoutingModule
], ],
declarations: [ AppComponent, OpenaireErrorPageComponent], declarations: [ AppComponent, OpenaireErrorPageComponent],
exports: [ AppComponent ], exports: [ AppComponent ],
providers:[EnvironmentSpecificResolver, CommunitiesService, LayoutService], providers:[EnvironmentSpecificResolver,
[{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
[{ provide: DEFAULT_TIMEOUT, useValue: 30000 }]
],
bootstrap: [AppComponent] bootstrap: [AppComponent]
}) })
// //

View File

@ -10,7 +10,7 @@ import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {AbstractControl, FormBuilder, FormGroup, ValidatorFn, Validators} from "@angular/forms"; import {AbstractControl, FormBuilder, FormGroup, ValidatorFn, Validators} from "@angular/forms";
import {properties} from "../../environments/environment"; import {Subscriber} from "rxjs";
@Component({ @Component({
selector: 'contact', selector: 'contact',
@ -46,14 +46,21 @@ export class ContactComponent implements OnInit {
private fb: FormBuilder, private fb: FormBuilder,
private helper: HelperService) { private helper: HelperService) {
} }
subscriptions = [];
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
subscription.unsubscribe();
}
});
}
ngOnInit() { ngOnInit() {
this._title.setTitle('OpenAIRE-Monitor | Contact Us'); this._title.setTitle('OpenAIRE-Monitor | Contact Us');
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => { this.subscriptions.push(this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
this.email = {body: '', subject: '', recipients: []}; this.email = {body: '', subject: '', recipients: []};
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe(); this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
} }
this.url = this.properties.domain + this.properties.baseLink + this._router.url; this.url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
@ -65,19 +72,19 @@ export class ContactComponent implements OnInit {
// this.getPageContents(); // this.getPageContents();
HelperFunctions.scroll(); HelperFunctions.scroll();
this.showLoading = false; this.showLoading = false;
}); }));
} }
private getPageContents() { private getPageContents() {
this.helper.getPageHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => { this.subscriptions.push(this.helper.getPageHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => {
this.pageContents = contents; this.pageContents = contents;
}) }));
} }
private getDivContents() { private getDivContents() {
this.helper.getDivHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => { this.subscriptions.push(this.helper.getDivHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => {
this.divContents = contents; this.divContents = contents;
}) }));
} }
public send(event) { public send(event) {
@ -114,7 +121,7 @@ export class ContactComponent implements OnInit {
private sendMail(admins: any) { private sendMail(admins: any) {
this.showLoading = true; this.showLoading = true;
this._emailService.contact(this.properties, this.subscriptions.push(this._emailService.contact(this.properties,
Composer.composeEmailForMonitor(this.contactForm.value, admins), Composer.composeEmailForMonitor(this.contactForm.value, admins),
this.contactForm.value.recaptcha).subscribe( this.contactForm.value.recaptcha).subscribe(
res => { res => {
@ -132,7 +139,7 @@ export class ContactComponent implements OnInit {
this.showLoading = false; this.showLoading = false;
this.contactForm.get('recaptcha').setValue(''); this.contactForm.get('recaptcha').setValue('');
} }
); ));
} }
public modalOpen() { public modalOpen() {

View File

@ -1,5 +1,4 @@
import { Component, Input } from '@angular/core'; import { Component } from '@angular/core';
import { Location } from '@angular/common';
@Component({ @Component({
selector: 'openaire-error', selector: 'openaire-error',

View File

@ -3,13 +3,12 @@ import { RouterModule } from '@angular/router';
import{HomeComponent} from './home.component'; import{HomeComponent} from './home.component';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule.forChild([ RouterModule.forChild([
{ path: '', component: HomeComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] } { path: '', component: HomeComponent, canDeactivate: [PreviousRouteRecorder] }
]) ])
] ]

View File

@ -1,4 +1,4 @@
import {Component, ElementRef, ViewChild, ViewEncapsulation} from '@angular/core'; import {Component, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
@ -18,6 +18,8 @@ import {LocalStorageService} from "../openaireLibrary/services/localStorage.serv
import {Stakeholder, Visibility} from "../openaireLibrary/monitor/entities/stakeholder"; import {Stakeholder, Visibility} from "../openaireLibrary/monitor/entities/stakeholder";
import {Session, User} from "../openaireLibrary/login/utils/helper.class"; import {Session, User} from "../openaireLibrary/login/utils/helper.class";
import {UserManagementService} from "../openaireLibrary/services/user-management.service"; import {UserManagementService} from "../openaireLibrary/services/user-management.service";
import {properties} from "../../environments/environment";
import {Subscriber} from "rxjs";
@Component({ @Component({
selector: 'home', selector: 'home',
@ -51,8 +53,6 @@ import {UserManagementService} from "../openaireLibrary/services/user-management
] ]
}) })
export class HomeComponent { export class HomeComponent {
public piwiksub: any;
public pageTitle = "OpenAIRE | Monitor"; public pageTitle = "OpenAIRE | Monitor";
public stakeholders: Stakeholder[] = []; public stakeholders: Stakeholder[] = [];
public selected: Stakeholder = null; public selected: Stakeholder = null;
@ -74,7 +74,8 @@ export class HomeComponent {
public softwareSize: any = null; public softwareSize: any = null;
public otherSize: any = null; public otherSize: any = null;
public fundersSize: any = null; public fundersSize: any = null;
numberSubs = []; subscriptions = [];
public state = 1; public state = 1;
private timeouts: any[] = []; private timeouts: any[] = [];
@ViewChild('AlertModal') modal; @ViewChild('AlertModal') modal;
@ -114,27 +115,25 @@ export class HomeComponent {
} }
public ngOnInit() { public ngOnInit() {
this.route.data this.properties = properties;
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
var url = this.properties.domain + this.properties.baseLink + this._router.url; var url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(url, false); this.seoService.createLinkForCanonicalURL(url, false);
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Monitor", this.properties.piwikSiteId).subscribe(); this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Monitor", this.properties.piwikSiteId).subscribe());
} }
this.getNumbers(); this.getNumbers();
this.getStakeholders(); this.getStakeholders();
// this.createGifs(); // this.createGifs();
//this.getDivContents(); //this.getDivContents();
// this.getPageContents(); // this.getPageContents();
this.localStorageService.get().subscribe(value => { this.subscriptions.push(this.localStorageService.get().subscribe(value => {
this.directLink = value; this.directLink = value;
}); }));
this.userManagementService.getUserInfo().subscribe(user => { this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user; this.user = user;
}) }));
});
if(typeof document != "undefined") { if(typeof document != "undefined") {
this.startAnimation(); this.startAnimation();
} }
@ -159,15 +158,15 @@ export class HomeComponent {
} }
private getPageContents() { private getPageContents() {
this.helper.getPageHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => { this.subscriptions.push(this.helper.getPageHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => {
this.pageContents = contents; this.pageContents = contents;
}) }));
} }
private getDivContents() { private getDivContents() {
this.helper.getDivHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => { this.subscriptions.push(this.helper.getDivHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => {
this.divContents = contents; this.divContents = contents;
}) }));
} }
public get stakeholdersNumber(): number { public get stakeholdersNumber(): number {
@ -179,7 +178,7 @@ export class HomeComponent {
} }
getNumbers() { getNumbers() {
this.numberSubs.push(this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"], "project", this.properties).subscribe( this.subscriptions.push(this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"], "project", this.properties).subscribe(
data => { data => {
if (data[1].length > 0 && data[1][0].filterId == "funder" && data[1][0].values) { if (data[1].length > 0 && data[1][0].filterId == "funder" && data[1][0].values) {
this.fundersSize = NumberUtils.roundNumber(data[1][0].values.length); this.fundersSize = NumberUtils.roundNumber(data[1][0].values.length);
@ -190,7 +189,7 @@ export class HomeComponent {
this.handleError("Error getting 'funder' field results of projects", err); this.handleError("Error getting 'funder' field results of projects", err);
})); }));
this.numberSubs.push(this._searchResearchResultsService.numOfSearchResults("publication", "", this.properties).subscribe( this.subscriptions.push(this._searchResearchResultsService.numOfSearchResults("publication", "", this.properties).subscribe(
data => { data => {
if (data && data > 0) { if (data && data > 0) {
this.publicationsSize = NumberUtils.roundNumber(data); this.publicationsSize = NumberUtils.roundNumber(data);
@ -202,7 +201,7 @@ export class HomeComponent {
} }
)); ));
this.numberSubs.push(this._searchResearchResultsService.numOfSearchResults("dataset", "", this.properties).subscribe( this.subscriptions.push(this._searchResearchResultsService.numOfSearchResults("dataset", "", this.properties).subscribe(
data => { data => {
if (data && data > 0) { if (data && data > 0) {
this.datasetsSize = NumberUtils.roundNumber(data); this.datasetsSize = NumberUtils.roundNumber(data);
@ -214,7 +213,7 @@ export class HomeComponent {
} }
)); ));
this.numberSubs.push(this._searchResearchResultsService.numOfSearchResults("software", "", this.properties).subscribe( this.subscriptions.push(this._searchResearchResultsService.numOfSearchResults("software", "", this.properties).subscribe(
data => { data => {
if (data && data > 0) { if (data && data > 0) {
this.softwareSize = NumberUtils.roundNumber(data); this.softwareSize = NumberUtils.roundNumber(data);
@ -225,7 +224,7 @@ export class HomeComponent {
} }
)); ));
this.numberSubs.push(this._searchResearchResultsService.numOfSearchResults("other", "", this.properties).subscribe( this.subscriptions.push(this._searchResearchResultsService.numOfSearchResults("other", "", this.properties).subscribe(
data => { data => {
if (data && data > 0) { if (data && data > 0) {
this.otherSize = NumberUtils.roundNumber(data); this.otherSize = NumberUtils.roundNumber(data);
@ -243,7 +242,7 @@ export class HomeComponent {
this.loading = true; this.loading = true;
this.status = this.errorCodes.LOADING; this.status = this.errorCodes.LOADING;
this.subscriberErrorMessage = ""; this.subscriberErrorMessage = "";
this._stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL).subscribe( this.subscriptions.push(this._stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL).subscribe(
stakeholders => { stakeholders => {
if (!stakeholders || stakeholders.length == 0) { if (!stakeholders || stakeholders.length == 0) {
this.status = this.errorCodes.NONE; this.status = this.errorCodes.NONE;
@ -256,7 +255,7 @@ export class HomeComponent {
this.status = this.handleError("Error getting funders", error); this.status = this.handleError("Error getting funders", error);
this.loading = false; this.loading = false;
} }
); ));
} }
private isStakeholderManager() { private isStakeholderManager() {
@ -292,10 +291,12 @@ export class HomeComponent {
return StringUtils.quote(param); return StringUtils.quote(param);
} }
public ngOnDestroy() { ngOnDestroy() {
if (this.piwiksub) { this.subscriptions.forEach(subscription => {
this.piwiksub.unsubscribe(); if (subscription instanceof Subscriber) {
subscription.unsubscribe();
} }
});
this.clearTimeouts(); this.clearTimeouts();
} }

View File

@ -5,7 +5,6 @@ import {RouterModule} from '@angular/router';
import {HomeComponent} from './home.component'; import {HomeComponent} from './home.component';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
@ -32,7 +31,7 @@ import {group, lock} from "../openaireLibrary/utils/icons/icons";
HomeComponent HomeComponent
], ],
providers: [ providers: [
FreeGuard, PreviousRouteRecorder, PreviousRouteRecorder,
PiwikService PiwikService
], ],
exports: [ exports: [

View File

@ -1,14 +1,13 @@
import {NgModule} from '@angular/core'; import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router'; import {RouterModule} from '@angular/router';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {LearnHowComponent} from "./learn-how.component"; import {LearnHowComponent} from "./learn-how.component";
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule.forChild([ RouterModule.forChild([
{ path: '', component: LearnHowComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] } { path: '', component: LearnHowComponent, canDeactivate: [PreviousRouteRecorder] }
]) ])
] ]

View File

@ -5,6 +5,8 @@ import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {properties} from "../../environments/environment";
import {Subscriber} from "rxjs";
@Component({ @Component({
selector: 'learn-how', selector: 'learn-how',
@ -12,7 +14,6 @@ import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
templateUrl: 'learn-how.component.html', templateUrl: 'learn-how.component.html',
}) })
export class LearnHowComponent { export class LearnHowComponent {
public piwiksub: any;
public pageContents = null; public pageContents = null;
public divContents = null; public divContents = null;
@ -20,7 +21,7 @@ export class LearnHowComponent {
public pageTitle: string = "OpenAIRE - Monitor | Learn How"; public pageTitle: string = "OpenAIRE - Monitor | Learn How";
properties: EnvProperties; properties: EnvProperties;
subscriptions = [];
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
private _router: Router, private _router: Router,
@ -32,11 +33,10 @@ export class LearnHowComponent {
} }
public ngOnInit() { public ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific;
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe(); this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
} }
this.url = this.properties.domain + this.properties.baseLink + this._router.url; this.url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
@ -45,25 +45,27 @@ export class LearnHowComponent {
this.updateDescription("OpenAIRE - Monitor, Funders, Statistics, EC - Learn How");`` this.updateDescription("OpenAIRE - Monitor, Funders, Statistics, EC - Learn How");``
//this.getDivContents(); //this.getDivContents();
//this.getPageContents(); //this.getPageContents();
});
} }
private getPageContents() { private getPageContents() {
this.helper.getPageHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => { this.subscriptions.push(this.helper.getPageHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => {
this.pageContents = contents; this.pageContents = contents;
}) }));
} }
private getDivContents() { private getDivContents() {
this.helper.getDivHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => { this.subscriptions.push(this.helper.getDivHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => {
this.divContents = contents; this.divContents = contents;
}) }));
} }
public ngOnDestroy() { ngOnDestroy() {
if (this.piwiksub) { this.subscriptions.forEach(subscription => {
this.piwiksub.unsubscribe(); if (subscription instanceof Subscriber) {
subscription.unsubscribe();
} }
});
} }

View File

@ -1,8 +1,6 @@
import { NgModule} from '@angular/core'; import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
@ -10,7 +8,6 @@ import {LearnHowComponent} from "./learn-how.component";
import {LearnHowRoutingModule} from "./learn-how-routing.module"; import {LearnHowRoutingModule} from "./learn-how-routing.module";
import {GifSliderModule} from "../openaireLibrary/utils/gif-slider/gif-slider.module"; import {GifSliderModule} from "../openaireLibrary/utils/gif-slider/gif-slider.module";
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module"; import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module"; import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module"; import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
@ -26,7 +23,7 @@ import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOServi
LearnHowComponent LearnHowComponent
], ],
providers:[ providers:[
FreeGuard, PreviousRouteRecorder, PiwikService, IsRouteEnabled PreviousRouteRecorder, PiwikService
] ]
}) })
export class LearnHowModule { } export class LearnHowModule { }

View File

@ -7,16 +7,13 @@ import { UserRoutingModule } from './user-routing.module';
import { UserModule} from '../openaireLibrary/login/user.module'; import { UserModule} from '../openaireLibrary/login/user.module';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import { SubscribeService } from '../openaireLibrary/utils/subscribe/subscribe.service';
import {EmailService} from "../openaireLibrary/utils/email/email.service";
import {SubscribeModule} from '../utils/subscribe/subscribe.module';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule,
UserRoutingModule, UserModule, SubscribeModule UserRoutingModule, UserModule,
], ],
providers:[PreviousRouteRecorder, SubscribeService, EmailService], providers:[PreviousRouteRecorder],
declarations: [ declarations: [
OpenaireUserComponent OpenaireUserComponent

View File

@ -1,16 +1,27 @@
import {Component, ElementRef, ViewChild} from '@angular/core'; import {Component} from '@angular/core';
import {Observable} from 'rxjs/Observable';
@Component({
selector: 'openaire-user',
template: `<user></user>`
})
export class OpenaireUserComponent {
}
/*
import {Component, ViewChild} from '@angular/core';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {UserComponent} from '../openaireLibrary/login/user.component'; import {UserComponent} from '../openaireLibrary/login/user.component';
import {SubscribeService} from '../openaireLibrary/utils/subscribe/subscribe.service'; import {SubscribeService} from '../openaireLibrary/utils/subscribe/subscribe.service';
import {EmailService} from "../openaireLibrary/utils/email/email.service"; import {EmailService} from "../openaireLibrary/utils/email/email.service";
import {Email} from "../openaireLibrary/utils/email/email";
import {Session} from '../openaireLibrary/login/utils/helper.class'; import {Session} from '../openaireLibrary/login/utils/helper.class';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {SubscribeComponent} from '../utils/subscribe/subscribe.component'; import {SubscribeComponent} from '../utils/subscribe/subscribe.component';
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
import {properties} from "../../environments/environment";
@Component({ @Component({
selector: 'openaire-user', selector: 'openaire-user',
@ -52,6 +63,7 @@ export class OpenaireUserComponent {
isSubscribed:boolean = false; isSubscribed:boolean = false;
public server: boolean = true; public server: boolean = true;
loggedIn:boolean = false; loggedIn:boolean = false;
sub;
constructor(private _subscribeService: SubscribeService, constructor(private _subscribeService: SubscribeService,
private _emailService: EmailService, private route: ActivatedRoute){} private _emailService: EmailService, private route: ActivatedRoute){}
public ngOnInit() { public ngOnInit() {
@ -59,11 +71,10 @@ export class OpenaireUserComponent {
this.server = false; this.server = false;
this.loggedIn = Session.isLoggedIn(); this.loggedIn = Session.isLoggedIn();
} }
this.route.data this.properties = properties;
.subscribe((data: { envSpecific: any }) => { this.sub = this.route.queryParams.subscribe(
this.route.queryParams.subscribe(
communityId => { communityId => {
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain); this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
if(!this.communityId) { if(!this.communityId) {
this.communityId = communityId['communityId']; this.communityId = communityId['communityId'];
} }
@ -71,10 +82,6 @@ export class OpenaireUserComponent {
this.usercomponent.redirect(); this.usercomponent.redirect();
} }
}); });
});
} }
login(){ login(){
this.usercomponent.logIn(); this.usercomponent.logIn();
@ -85,8 +92,6 @@ export class OpenaireUserComponent {
this.subscribeLoading = true; this.subscribeLoading = true;
this.subscribe.subscribe(); this.subscribe.subscribe();
} }
} }
@ -104,3 +109,4 @@ export class OpenaireUserComponent {
} }
} }
*/

View File

@ -12,8 +12,9 @@ import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
import {UserManagementService} from "../openaireLibrary/services/user-management.service"; import {UserManagementService} from "../openaireLibrary/services/user-management.service";
import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service";
import {NewSearchPageComponent} from "../openaireLibrary/searchPages/searchUtils/newSearchPage.component"; import {NewSearchPageComponent} from "../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
import {Stakeholder, StakeholderInfo} from "../openaireLibrary/monitor/entities/stakeholder"; import {StakeholderInfo} from "../openaireLibrary/monitor/entities/stakeholder";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
import {Subscriber} from "rxjs";
@Component({ @Component({
selector: 'search-stakeholders', selector: 'search-stakeholders',
@ -38,8 +39,7 @@ export class SearchStakeholdersComponent {
private errorMessages: ErrorMessagesComponent; private errorMessages: ErrorMessagesComponent;
public results: StakeholderInfo[] = []; public results: StakeholderInfo[] = [];
public totalResults: StakeholderInfo[] = []; public totalResults: StakeholderInfo[] = [];
public sub: any; public subscriptions = [];
public subResults: any;
public filters = []; public filters = [];
public searchFields: SearchFields = new SearchFields(); public searchFields: SearchFields = new SearchFields();
public searchUtils: SearchUtilsClass = new SearchUtilsClass(); public searchUtils: SearchUtilsClass = new SearchUtilsClass();
@ -76,7 +76,7 @@ export class SearchStakeholdersComponent {
public ngOnInit() { public ngOnInit() {
this.piwikSiteId = this.properties.piwikSiteId; this.piwikSiteId = this.properties.piwikSiteId;
this.baseUrl = this.properties.searchLinkToStakeholders; this.baseUrl = this.properties.searchLinkToStakeholders;
this.sub = this.route.queryParams.subscribe(params => { this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.searchPage.resultsPerPage = 10; this.searchPage.resultsPerPage = 10;
this.keyword = (params['fv0'] ? params['fv0'] : ''); this.keyword = (params['fv0'] ? params['fv0'] : '');
this.keyword = StringUtils.URIDecode(this.keyword); this.keyword = StringUtils.URIDecode(this.keyword);
@ -98,24 +98,24 @@ export class SearchStakeholdersComponent {
let queryParams = params;//this.searchPage.getQueryParamsFromUrl(params); let queryParams = params;//this.searchPage.getQueryParamsFromUrl(params);
if (typeof document !== 'undefined') { if (typeof document !== 'undefined') {
this.userManagementService.getUserInfo().subscribe(user => { this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user; this.user = user;
this.initFunders(queryParams); this.initFunders(queryParams);
}); }));
} else { } else {
this.initFunders(queryParams); this.initFunders(queryParams);
} }
}));
}
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
subscription.unsubscribe();
}
}); });
} }
public ngOnDestroy() {
if (this.sub) {
this.sub.unsubscribe();
}
if (this.subResults) {
this.subResults.unsubscribe();
}
}
/** /**
* Initialize stakeholders from Communities APIs * Initialize stakeholders from Communities APIs
@ -123,15 +123,15 @@ export class SearchStakeholdersComponent {
* @param params * @param params
*/ */
private initFunders(params) { private initFunders(params) {
this.subResults = this._stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL).subscribe( this.subscriptions.push(this._stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL).subscribe(
data => { data => {
if (!data) { if (!data) {
return; return;
} }
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
this.totalResults[i] = data[i]; this.totalResults[i] = data[i];
this.totalResults[i].isManager = this.isStakeholderManager(data); this.totalResults[i].isManager = this.isStakeholderManager(data[i]);
this.totalResults[i].isMember = this.isStakeholderMember(data); this.totalResults[i].isMember = this.isStakeholderMember(data[i]);
} }
this._getResults(params); this._getResults(params);
}, },
@ -141,7 +141,7 @@ export class SearchStakeholdersComponent {
this.disableForms = false; this.disableForms = false;
HelperFunctions.scroll(); HelperFunctions.scroll();
} }
); ));
} }

View File

@ -2,7 +2,6 @@ import {NgModule} from "@angular/core";
import {CommonModule} from "@angular/common"; import {CommonModule} from "@angular/common";
import {FormsModule} from "@angular/forms"; import {FormsModule} from "@angular/forms";
import {SearchStakeholdersComponent} from "./search-stakeholders.component"; import {SearchStakeholdersComponent} from "./search-stakeholders.component";
import {SearchPageModule} from "../openaireLibrary/searchPages/searchUtils/searchPage.module";
import {SearchFormModule} from "../openaireLibrary/searchPages/searchUtils/searchForm.module"; import {SearchFormModule} from "../openaireLibrary/searchPages/searchUtils/searchForm.module";
import {SearchStakeholdersRoutingModule} from "./search-stakeholders-routing.module"; import {SearchStakeholdersRoutingModule} from "./search-stakeholders-routing.module";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
@ -11,7 +10,7 @@ import {NewSearchPageModule} from "../openaireLibrary/searchPages/searchUtils/ne
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule,
SearchFormModule, SearchPageModule, SearchFormModule,
SearchStakeholdersRoutingModule, NewSearchPageModule SearchStakeholdersRoutingModule, NewSearchPageModule
], ],
declarations: [ declarations: [

View File

@ -1,238 +0,0 @@
import {Component, Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {LayoutService} from "../../openaireLibrary/services/layout.service";
import {CustomizationOptions} from "../../openaireLibrary/connect/community/CustomizationOptions";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../piwikHelper";
import {StringUtils} from "../../openaireLibrary/utils/string-utils.class";
declare var appendCss: any;
@Component({
selector: 'customization',
template: `
<!-- <p>This is customizing layout component</p>-->
`
})
export class CustomizationComponent {
@Input() communityId;
layout: CustomizationOptions;
constructor(private route: ActivatedRoute,
private router: Router, private _layoutService: LayoutService
) {
}
public ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.route.queryParams.subscribe(params => {
if(params['layout']) {
this.layout = JSON.parse(StringUtils.URIDecode(params['layout']));
this.buildCss();
}else{
// this.properties = data.envSpecific;
//com.communityId,
// data.envSpecific.adminToolsAPIURL + '/'
this._layoutService.mockLayout().subscribe(
layout => {
this.layout = layout;
this.buildCss();
}
);
}
});
});
}
private buildCss() {
console.log(this.layout);
document.documentElement.style.setProperty('--portal-main-color', this.layout.mainColor);
document.documentElement.style.setProperty('--portal-dark-color', this.layout.secondaryColor);
let css = `
/*Panel background*/
.communityPanelBackground:not(bottom) {
border-style: ` + (this.layout.panel.background.borderStyle != null ? this.layout.panel.background.borderStyle : 'solid') + `;
border-color:` + (this.layout.panel.background.borderColor != null ? this.layout.panel.background.borderColor : 'transparent') + `;
border-width: ` + (this.layout.panel.background.borderWidth != null ? this.layout.panel.background.borderWidth: '1') + `px;`+`
}
.communityPanelBackground, .communityPanelBackground .uk-section-primary {
background-color: ` + (this.layout.panel.background.color?this.layout.panel.background.color:this.layout.mainColor) + `;
}
/*Panel fonts*/
.communityPanelBackground {
color:` + (this.layout.panel.fonts.color != null ? this.layout.panel.fonts.color : 'white') + ` !important;` +
(this.layout.panel.fonts.family != null ? ('font-family: ' + this.layout.panel.fonts.family + ' !important;') : '') +
(this.layout.panel.fonts.size != null ? ('font-size: ' + this.layout.panel.fonts.size + 'px !important;') : '') +
(this.layout.panel.fonts.weight != null ? ('font-weight: ' + this.layout.panel.fonts.weight + '!important;') : '') +
`
}
.communityPanelBackground div.uk-modal {
color:#666 !important;
}
.communityPanelBackground .uk-h6:not(.ignoreCommunityPanelBackground),.communityPanelBackground .uk-h5:not(.ignoreCommunityPanelBackground),.communityPanelBackground .uk-h4:not(.ignoreCommunityPanelBackground),.communityPanelBackground .uk-h3:not(.ignoreCommunityPanelBackground), .communityPanelBackground .uk-h2:not(.ignoreCommunityPanelBackground),.communityPanelBackground .uk-h1:not(.ignoreCommunityPanelBackground) {
color: ` + (this.layout.panel.title.color != null ? this.layout.panel.title.color : 'white') + ` !important;` +
(this.layout.panel.title.weight != null ? ('font-weight: ' + this.layout.panel.title.weight + '!important;') : '') +
`
}
.communityPanelBackground .uk-h5:not(.ignoreCommunityPanelBackground){
`+
(this.layout.panel.title.family != null ? ('font-family: ' + this.layout.panel.title.family + ' !important;') : '') +
(this.layout.panel.title.size != null ? ('font-size: ' + this.layout.panel.title.size + 'px !important;') : '') +
`
}
/* Panel links */
.communityPanelBackground .uk-link:not(.ignoreCommunityPanelBackground), .communityPanelBackground a:not(.uk-button):not(.uk-button-text):not(.ignoreCommunityPanelBackground), .portal-card a {
color: `
+ (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.color?this.layout.links.darkBackground.color:'white') :(this.layout.links.lightBackground.color?this.layout.links.lightBackground.color:'var(--portal-main-color)') ) + ` !important;`
+ (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.family?('font-family: ' + this.layout.links.darkBackground.family + ' !important;') : '') :'' )
+ (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.size?('font-size: ' + this.layout.links.darkBackground.size + 'px !important;') : '') :'' )
+`
}
/* Panel links - hover */
.communityPanelBackground .uk-link:not(.ignoreCommunityPanelBackground):hover, .communityPanelBackground a:not(.uk-button):not(.uk-button-text):not(.ignoreCommunityPanelBackground):hover, .portal-card a:hover {
color: `
+ (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.onHover.color?this.layout.links.darkBackground.onHover.color:`rgba(255, 255, 255, 0.5)`) :(this.layout.links.lightBackground.onHover.color?this.layout.links.lightBackground.onHover.color:'var(--portal-dark-color)') ) + ` !important;`
+ `
}
.uk-link, a:not(.uk-button), .uk-navbar-dropdown-nav > li > a, .uk-navbar-nav > li > a, .loginLink,
.uk-tab > .uk-active > a, .uk-tab > * > a:focus, .uk-tab > * > a:hover {
color:` + (this.layout.links.lightBackground.color != null ? this.layout.links.lightBackground.color : `var(--portal-main-color)`) + `
}
.uk-link:hover, a:not(.uk-button):hover,
.uk-navbar-dropdown-nav > li > a:focus, .uk-navbar-dropdown-nav > li > a:hover, .uk-navbar-nav > li > a:hover, .uk-navbar-nav > li > a:focus, .uk-navbar-nav > li > a:active, .uk-navbar-nav > li:hover > a,
.uk-navbar-dropdown-nav > li.uk-active > a, .uk-tab > .uk-active > a, .uk-navbar-nav > li.uk-active > a, .uk-navbar-container:not(.uk-navbar-transparent) .uk-navbar-nav > li.uk-active > a {
color:` + (this.layout.links.lightBackground.onHover.color != null ? this.layout.links.lightBackground.onHover.color : `var(--portal-dark-color)`) + `
}
.communityBorder {
border-color: ` + (this.layout.box.borderColor != null ? this.layout.box.borderColor : `var(--portal-main-color)`) + `;
border-style: ` + (this.layout.box.borderStyle != null ? this.layout.box.borderStyle : `solid`) + `;
border-width: ` + (this.layout.box.borderWidth != null ? this.layout.box.borderWidth : `2`) + `px;
border-radius: ` + (this.layout.box.borderRadius != null ? this.layout.box.borderRadius : `6`) + `px;
}
/*Panel Elements & cards*/
.communityPanelBackground .uk-card:not(.ignoreCommunityPanelBackground), .communityPanelBackground .uk-label:not(.ignoreCommunityPanelBackground) {
background-color: ` + (this.layout.panel.panelElements.backgroundColor != null ? this.layout.panel.panelElements.backgroundColor : `rgba(255, 255, 255, 0.5)`) + `;
border-color: ` + (this.layout.panel.panelElements.borderColor != null ? this.layout.panel.panelElements.borderColor : `rgba(255, 255, 255, 0.5)`) + `;
}
.communityPanelBackground .uk-label:not(.ignoreCommunityPanelBackground) a{
border-color: ` +
+ (this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.color?this.layout.links.darkBackground.color:'rgba(255, 255, 255, 0.8)') :(this.layout.links.lightBackground.color?this.layout.links.lightBackground.color:'var(--portal-main-color)') ) +
+ `;
border-bottom: 1px solid;
}
.communityPanelBackground .uk-label:not(.ignoreCommunityPanelBackground) a:hover{
border-color: ` +
(this.layout.panel.onDarkBackground ? (this.layout.links.darkBackground.onHover.color?this.layout.links.darkBackground.onHover.color:'rgba(255, 255, 255, 0.5)') :(this.layout.links.lightBackground.onHover.color?this.layout.links.lightBackground.onHover.color:'var(--portal-dark-color)') )+
+ `;
}
.communityPanelBackground .uk-card:not(.ignoreCommunityPanelBackground), .communityPanelBackground .uk-label:not(.ignoreCommunityPanelBackground) {
color: ` + (this.layout.panel.panelElements.color != null ? this.layout.panel.panelElements.color : `rgba(255, 255, 255, 0.5)`) + `;
}
.uk-button:not(.uk-button-text){
border-radius:` + (this.layout.buttons.lightBackground.borderRadius != null ? this.layout.buttons.lightBackground.borderRadius : `4`) + `px;
}
.uk-button:not(.uk-button-text):not(.uk-button-default):not(.uk-button-primary), .portal-button {
background-color:` + (this.layout.buttons.lightBackground.backgroundColor != null ? this.layout.buttons.lightBackground.backgroundColor : `#003052`) + `;
color: ` + (this.layout.buttons.lightBackground.color != null ? this.layout.buttons.lightBackground.color : `white`) + `;
border-color: ` + (this.layout.buttons.lightBackground.borderColor != null ? this.layout.buttons.lightBackground.borderColor : `transparent`) + `;
border-style: ` + (this.layout.buttons.lightBackground.borderStyle != null ? this.layout.buttons.lightBackground.borderStyle : `solid`) + `;
border-width: ` + (this.layout.buttons.lightBackground.borderWidth != null ? this.layout.buttons.lightBackground.borderWidth : `1`) + `px;
}
.uk-button:not(.uk-button-text):not(.uk-button-default):not(.uk-button-primary):hover, .portal-button:hover {
background-color: ` + (this.layout.buttons.lightBackground.onHover.backgroundColor != null ? this.layout.buttons.lightBackground.onHover.backgroundColor : `#154B71`) + `;
color: ` + (this.layout.buttons.lightBackground.onHover.color != null ? this.layout.buttons.lightBackground.onHover.color : `white`) + `;
border-color: ` + (this.layout.buttons.lightBackground.onHover.color != null ? this.layout.buttons.lightBackground.onHover.color : `transparent`) + `;
}
/*Buttons*/
.communityPanelBackground .uk-button:not(.ignoreCommunityPanelBackground) {
background-color: `
+ (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.backgroundColor?this.layout.buttons.darkBackground.backgroundColor:'white') :(this.layout.buttons.lightBackground.backgroundColor?this.layout.buttons.lightBackground.backgroundColor:'var(--portal-main-color)') )
+` !important;
color: `
+ (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.color?this.layout.buttons.darkBackground.color:'var(--portal-main-color)') :(this.layout.buttons.lightBackground.color?this.layout.buttons.lightBackground.color:'white') )
+ ` !important;
border-color: `
+ (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.borderColor?this.layout.buttons.darkBackground.borderColor:'white') :(this.layout.buttons.lightBackground.borderColor?this.layout.buttons.lightBackground.borderColor:'var(--portal-main-color)') )
+ ` !important;
border-style: ` +
(this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.borderStyle?this.layout.buttons.darkBackground.borderStyle:'solid') :(this.layout.buttons.lightBackground.borderStyle?this.layout.buttons.lightBackground.borderStyle:'solid') )
+ ` !important;
border-width: ` +
(this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.borderWidth?this.layout.buttons.darkBackground.borderWidth:'1px') :(this.layout.buttons.lightBackground.borderWidth?this.layout.buttons.lightBackground.borderWidth:'1px') )
+ ` !important;
border-radius:` +
(this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.borderRadius?this.layout.buttons.darkBackground.borderRadius:'4px') :(this.layout.buttons.lightBackground.borderRadius?this.layout.buttons.lightBackground.borderRadius:'4px') )+
+ ` !important;
font-weight:`
// (this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.fontWeight?this.layout.buttons.darkBackground.fontWeight:'4px') :(this.layout.buttons.lightBackground.borderRadius?this.layout.buttons.lightBackground.borderRadius:'4px') )+
// (this.layout.panel.buttons.fontWeight != null ? this.layout.panel.buttons.fontWeight : `600`) + `;
+`
}
.communityPanelBackground .uk-button:not(.ignoreCommunityPanelBackground):hover {
background-color: ` +
(this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.onHover.backgroundColor?this.layout.buttons.darkBackground.onHover.backgroundColor:' #eeeeee') :(this.layout.buttons.lightBackground.onHover.backgroundColor?this.layout.buttons.lightBackground.onHover.backgroundColor:'var(--portal-dark-color)') )
+ ` !important;
color: ` +
(this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.onHover.color?this.layout.buttons.darkBackground.onHover.color:' var(--portal-main-color) ') :(this.layout.buttons.lightBackground.onHover.color?this.layout.buttons.lightBackground.onHover.color:'white') )
+ ` !important;
border-color:`
+(this.layout.panel.onDarkBackground ? (this.layout.buttons.darkBackground.onHover.borderColor?this.layout.buttons.darkBackground.onHover.borderColor:' #eeeeee ') :(this.layout.buttons.lightBackground.onHover.borderColor?this.layout.buttons.lightBackground.onHover.borderColor:'var(--portal-dark-color)') )
+ ` !important;
}
.uk-navbar-dropdown {
background-color: white;
color: #666;
box-shadow: 0 5px 12px rgba(0, 0, 0, .15);
/*border:var(--portal-main-color) 1px solid;*/
}
.customTabs .uk-tab > .uk-active > a {
border-color: var(--portal-main-color);
}
.customTabs .uk-tab > .uk-active > a {
border-color: var(--portal-main-color);
}
.uk-tab > * > a:focus, .uk-tab > * > a:hover {
border-color: var(--portal-dark-color);
}
`
appendCss(css);
}
}

View File

@ -1,28 +0,0 @@
import {ModuleWithProviders, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RouterModule} from '@angular/router';
import {CustomizationComponent} from "./customization.component";
import {LayoutService} from "../../openaireLibrary/services/layout.service";
@NgModule({
imports: [
CommonModule, RouterModule
],
declarations: [
CustomizationComponent
],
exports: [
CustomizationComponent
]
})
export class CustomizationModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: CustomizationModule,
providers: [
LayoutService
]
}
}
}

View File

@ -1,41 +0,0 @@
export class PiwikHelper{
public static siteIDs={
"connect": 80,
"dh-ch":81,
"ee":82,
"egi":83,
"elixir-gr":84,
"fam":85,
"instruct":86,
"mes":87,
"ni":88,
"oa-pg":89,
"rda":90,
"aginfra":93,
"clarin":100,
"dariah":103
};
public static siteIDsProduction={
"connect": 112,
"dh-ch":198,
"ee":200,
"egi":'',
"elixir-gr":'',
"fam":197,
"instruct":'',
"mes":196,
"ni":199,
"oa-pg":'',
"rda":'',
"aginfra":'',
"clarin":'',
"dariah":''
};
public static getSiteId(communityId:string, environment:string){
if(environment == 'production'){
return this.siteIDsProduction[communityId];
}
return this.siteIDs[communityId];
}
}

View File

@ -1,17 +0,0 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {InviteComponent} from './invite.component';
import {LoginGuard} from '../../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from "../../../openaireLibrary/error/isRouteEnabled.guard";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: InviteComponent, canActivate: [LoginGuard, /*IsRouteEnabled*/], canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class InviteRoutingModule { }

View File

@ -1,199 +0,0 @@
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
<div *ngIf="longView == true">
<div class="uk-section uk-padding-remove-top tm-middle uk-container" id="tm-main">
<div class="uk-container uk-margin-bottom">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<div id="invite" class=" uk-card uk-card-default uk-padding uk-margin-top">
<div class="uk-text-large uk-text-center uk-width-5-6@l uk-width ">Invite users to subscribe</div>
<div class="uk-margin-top">
<errorMessages [status]="[status]" [type]="'community'"></errorMessages>
</div>
<div *ngIf="missingCommunityId" class="uk-alert uk-alert-warning" role="alert">{{missingCommunityId}}</div>
<div *ngIf="successfulSentMessage" class="uk-alert uk-alert-success"
role="alert">{{successfulSentMessage}} {{successfulSentRecipients}}</div>
<div *ngIf="failureSentMessage" class="uk-alert uk-alert-warning"
role="alert">{{failureSentMessage}} {{failureSentRecipients}}</div>
<div *ngIf="inviteErrorMessage" class="uk-alert uk-alert-warning" role="alert">{{inviteErrorMessage}}</div>
<div *ngIf="communityId != null && status == errorCodes.DONE">
<table class="uk-table uk-align-center">
<tbody>
<!-- <tr>
<td>
</td>
<td>
<li>Invite by email</li>
</td>
</tr> -->
<tr>
<td for="from" class="uk-text-bold uk-width-1-4 uk-text-right">From <span
class="uk-text-danger uk-text-bold">*</span> :
</td>
<td class="uk-text-left uk-width-expand">
<input placeholder="Type your name" type="text" (click)="resetMessages()"
class="form-control uk-input uk-width-large@l uk-width-medium@s" [(ngModel)]="body.fromName"
id="from" required>
<div *ngIf="!body.fromName" class="uk-width-large uk-text-danger uk-text-small">Please add your name.
</div>
</td>
</tr>
<tr>
<td for="recipients" class="uk-text-bold uk-text-right">To <span
class="uk-text-danger uk-text-bold">*</span> :
</td>
<td class="uk-text-left">
<input placeholder="email" type="text" (click)="resetMessages(); areValid=true"
class="form-control uk-input uk-width-large@l uk-width-medium@s" [(ngModel)]="recipients"
id="recipients"
required>
<div *ngIf="areValid && !showAddRecipientMessage" class="uk-width-medium uk-text-muted uk-text-small">
separate multiple emails with a comma
</div>
<div *ngIf="recipients && !areValid" class="uk-width-large uk-text-danger uk-text-small">Please add
valid email/s.
</div>
<div *ngIf="isEmpty(recipients) && showAddRecipientMessage"
class="uk-width-large uk-text-danger uk-text-small">Please add a recipient.
</div>
</td>
</tr>
</tbody>
</table>
<div class="boundary-align uk-panel uk-placeholder">
<table class="uk-table uk-align-center">
<tbody>
<!-- <tr>
<td class="uk-text-bold uk-width-1-4@xl uk-width-1-4@m uk-width-1-4@s uk-text-right"></td>
<td class="uk-text-left">
<{{body.salutation}}<br>-->
<!-- <span *ngIf="body.fromName == ''" class="uk-text-muted">
<i>{{body.fromMessage}}...</i>
</span>
<span *ngIf="body.fromName !=''">
{{body.fromMessage}}
<b>{{body.fromName}}</b>
</span>
</td>
</tr> -->
<tr>
<td for="email.body" class="uk-text-bold uk-text-right">Message:</td>
<td *ngIf="allowEdit()" class="uk-text-left">
<ckeditor (click)="resetMessages()"
class="form-control" [(ngModel)]="body.paragraphs" id="message"
debounce="400"
[config]="{ extraAllowedContent: '* [uk-*](*) ; span', disallowedContent: 'script; *[on*]', removeButtons: 'Save,NewPage,DocProps,Preview,Print',
extraPlugins: 'divarea'}">
<!-- <id="contentTag"-->
<!--(ready)="onReady($event)"-->
<!--(focus)="onFocus($event)"-->
<!--[config]="{uiColor: '#99000'}"-->
<!--(blur)="onBlur($event)"-->
<!--(change)="onChange($event)"-->
</ckeditor>
</td>
<td *ngIf="!allowEdit()" class="uk-text-left">
<div [innerHtml]="body.paragraphs"></div>
</td>
</tr>
<tr>
<td></td>
<td class="uk-text-left">
<!-- {{body.closing}}<br> -->
{{body.signature}}
<span *ngIf="body.fromName == ''" class="uk-text-muted">
<i>{{body.fromMessage}}...</i>
</span>
<span *ngIf="body.fromName !=''">
{{body.fromMessage}}
<b>{{body.fromName}}</b>
</span>
<br><a href="https://www.openaire.eu">www.openaire.eu</a>
</td>
</tr>
</tbody>
</table>
</div>
<table class="uk-table uk-align-center">
<tbody>
<tr>
<td class="uk-text-bold uk-width-3-5@xl uk-width-3-5@m uk-width-3-5@s uk-text-right"></td>
<td>
<div class="uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-text-danger uk-text-bold">*
Required fields
</div>
</td>
</tr>
<tr>
<td class="uk-text-right"></td>
<td>
<div
class="uk-grid-margin uk-first-column uk-align-center uk-text-left uk-padding uk-padding-remove-top uk-padding-remove-bottom">
<button class="uk-button portal-button" (click)="invite()">Invite</button>
</div>
</td>
</tr>
</tbody>
</table>
<div class="uk-text-left">
<span uk-icon="chevron-left"></span><span class="uk-margin-small-left">
<a [queryParams]="communityIdParam" routerLinkActive="router-link-active"
routerLink="/">Back</a>
</span>
</div>
</div>
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
</div>
</div>
</div>
<div class="uk-inline">
<button *ngIf="!longView" [class]=" ((buttonSizeSmall)?'uk-button-small':'') + ' uk-button uk-button-primary'">
Invite users
</button>
<div uk-dropdown="mode: click" class="uk-form uk-margin-small uk-alert uk-background-default" id="toggle-usage">
<div class="uk-margin-top">
<errorMessages [status]="[status]" [type]="'community'"></errorMessages>
</div>
<div *ngIf="missingCommunityId" class="uk-width-large uk-text-warning uk-text-small uk-margin-top"
role="alert">{{missingCommunityId}}</div>
<div *ngIf="successfulSentMessage" class="uk-width-large uk-text-success uk-text-small uk-margin-top"
role="alert">{{successfulSentMessage}} {{successfulSentRecipients}}</div>
<div *ngIf="failureSentMessage" class="uk-width-large uk-text-warning uk-text-small uk-margin-top"
role="alert">{{failureSentMessage}} {{failureSentRecipients}}</div>
<div *ngIf="inviteErrorMessage" class="uk-width-large uk-text-warning uk-text-small uk-margin-top"
role="alert">{{inviteErrorMessage}}</div>
<div *ngIf="recipients && !areValid" class="uk-width-large uk-text-danger uk-text-small uk-margin-top">Please add
valid email/s.
</div>
<div *ngIf="isEmpty(recipients) && showAddRecipientMessage"
class="uk-width-large uk-text-danger uk-text-small uk-margin-top">Please add a recipient.
</div>
<input (click)="resetMessages(); areValid=true" placeholder="Type e-mails" type="text"
class="form-control uk-input uk-form-small uk-form" [(ngModel)]="recipients" id="recipients"
required>
<div class="uk-width-medium uk-text-muted uk-text-small">separate with commas</div>
<div class="uk-margin-small-top uk-text-center ">
<button class=" uk-button portal-button ignoreCommunityPanelBackground uk-button-small " (click)="invite()">Invite</button>
{{" "}}
<a class=" uk-button uk-button-default uk-button-small ignoreCommunityPanelBackground " [queryParams]="communityIdParam"
routerLinkActive="router-link-active" routerLink="/invite">
<span class="uk-margin-xsmall-left uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="cog"
ratio="0.8"><circle fill="none" stroke="#000" cx="9.997" cy="10" r="3.31"></circle><path
fill="none" stroke="#000"
d="M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z"></path></svg>
</span>
Customize
</a>
</div>
</div>
</div>

View File

@ -1,316 +0,0 @@
import {Component, Input, OnInit} from '@angular/core';
import {FormBuilder} from "@angular/forms";
import {ActivatedRoute, Router} from '@angular/router';
import {ConnectHelper} from '../../../openaireLibrary/connect/connectHelper';
import {Email} from '../../../openaireLibrary/utils/email/email';
import {Body} from '../../../openaireLibrary/utils/email/body';
import {Validator} from '../../../openaireLibrary/utils/email/validator';
import {Composer} from '../../../openaireLibrary/utils/email/composer';
import {EnvProperties} from '../../../openaireLibrary/utils/properties/env-properties';
import {EmailService} from '../../../openaireLibrary/utils/email/email.service';
import {CommunityService} from "../../../openaireLibrary/connect/community/community.service";
import {ErrorCodes} from '../../../openaireLibrary/utils/properties/errorCodes';
import {ErrorMessagesComponent} from '../../../openaireLibrary/utils/errorMessages.component';
import {Session, User} from '../../../openaireLibrary/login/utils/helper.class';
import {HelperFunctions} from "../../../openaireLibrary/utils/HelperFunctions.class";
import {HelperService} from "../../../openaireLibrary/utils/helper/helper.service";
import {Meta, Title} from "@angular/platform-browser";
import {SEOService} from "../../../openaireLibrary/sharedComponents/SEO/SEO.service";
import {PiwikService} from "../../../openaireLibrary/utils/piwik/piwik.service";
import {PiwikHelper} from "../../piwikHelper";
import {UserManagementService} from "../../../openaireLibrary/services/user-management.service";
import {properties} from "../../../../environments/environment";
@Component({
selector: 'invite',
templateUrl: './invite.component.html',
})
export class InviteComponent implements OnInit {
@Input() longView: boolean = true;
@Input() communityId = null;
@Input() buttonSizeSmall = true;
private properties: EnvProperties = null;
public community = null;
//public showLoading: boolean = true;
public errorMessage: string = '';
public successfulSentMessage: string = '';
public successfulSentRecipients: string[] = [];
public failureSentMessage: string = '';
public failureSentRecipients: string[] = [];
public inviteErrorMessage: string = '';
public missingCommunityId: string = '';
public showAddRecipientMessage: boolean = false;
public showAddNameMessage: boolean = false;
public email: Email;
public body: Body;
public recipients: string;
public fullname: string;
public areValid: boolean = true;
private ckeditorContent: string;
// public defaultBody ='';
public communityIdParam = {};
public status: number = 1;
public errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
public pageContents = null;
public divContents = null;
public url: string = null;
public pageTitle: string = "Invite";
piwiksub: any;
private user: User;
constructor(
private route: ActivatedRoute,
private _router: Router,
public _fb: FormBuilder,
private _emailService: EmailService,
private _communityService: CommunityService,
private helper: HelperService,
private _meta: Meta,
private _title: Title,
private seoService: SEOService,
private _piwikService: PiwikService,
private userManageService: UserManagementService) {
this.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent();
this.status = this.errorCodes.LOADING;
}
public ngOnInit() {
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.errorMessage = "";
this.missingCommunityId = "";
this.status = this.errorCodes.LOADING;
this.userManageService.getUserInfo().subscribe(user => {
this.user = user;
this.route.queryParams.subscribe(
communityId => {
//if(!this.communityId && typeof document !== 'undefined'){
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
if (!this.communityId) {
this.communityId = communityId['communityId'];
}
if (this.longView) {
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId, this.properties.environment)).subscribe();
}
this.url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);
this.updateTitle(this.pageTitle);
this.updateDescription("OpenAIRE - Connect, Community Gateway, research community, invite");
}
this.communityIdParam = (this.properties.environment != "development") ? {} : {communityId: this.communityId};
if (this.communityId != null && this.communityId != '') {
//this.getDivContents();
this.getPageContents();
this._communityService.getCommunity(this.properties, this.properties.communityAPI + this.communityId).subscribe(
community => {
this.community = community;
this.fullname = this.user.fullname;
//console.log("Fullname from session " + Session.getUserFullName());
this.body = Composer.initializeInvitationsBody(this.communityId, this.community.title, this.fullname);
this.email = Composer.initializeInvitationsEmail(community.title);
this.recipients = "";
this.status = this.errorCodes.DONE;
},
error => {
//this.handleError(error)
this.handleError("Error getting community with id: " + this.communityId, error);
this.status = this.errorMessages.getErrorCode(error.status);
}
);
} else {
this.status = this.errorCodes.DONE;
this.missingCommunityId = "There is no community selected!";
}
});
HelperFunctions.scroll();
});
});
}
ngOnDestroy() {
if (this.piwiksub) {
this.piwiksub.unsubscribe();
}
}
private getPageContents() {
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.pageContents = contents;
})
}
private getDivContents() {
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.divContents = contents;
})
}
public invite() {
this.successfulSentMessage = "";
this.failureSentMessage = "";
this.inviteErrorMessage = "";
this.status = this.errorCodes.LOADING;
HelperFunctions.scroll();
if (!this.isEmpty(this.recipients) && this.body.fromName != "") {
if (this.validateEmails()) {
this.composeEmail();
this._emailService.sendEmail(this.properties, this.email).subscribe(
res => {
this.status = this.errorCodes.DONE;
//console.log("Emails Sent: ",res);
/*if(res == 0) {
} else if(res > 1) {
this.successfulSentMessage = res + " emails sent successfully!";
} else {
this.successfulSentMessage = res + " email sent successfully!";
}*/
if (res['success']) {
this.successfulSentMessage = "Email sent successfully to: ";
this.successfulSentRecipients = res['success'];
}
if (res['failure']) {
this.failureSentMessage = "There was an error sending email to: ";
this.failureSentRecipients = res['failure'];
}
this.body = Composer.initializeInvitationsBody(this.communityId, this.community.title, this.fullname);
this.email = Composer.initializeInvitationsEmail(this.community.title);
this.recipients = "";
},
error => {
//console.log(error);
this.handleError("Error inviting emails: " + JSON.stringify(this.recipients) + " to community with id: " + this.communityId + " by: " + this.fullname, error);
this.status = this.errorCodes.DONE;
this.inviteErrorMessage = "There was an error sending emails. Please try again.";
}
);
} else {
this.email.recipients = [];
this.status = this.errorCodes.DONE;
}
} else {
this.showAddRecipientMessage = true;
this.status = this.errorCodes.DONE;
}
}
public isEmpty(data: string): boolean {
if (data != undefined && !data.replace(/\s/g, '').length)
return true;
else
return false;
}
public resetMessages() {
this.errorMessage = "";
this.successfulSentMessage = "";
this.failureSentMessage = "";
this.inviteErrorMessage = "";
}
public validateEmails(): boolean {
if (this.parseEmails()) {
if (Validator.hasValidEmails(this.email.recipients)) {
return this.areValid;
}
}
this.areValid = false;
return this.areValid;
}
public parseEmails(): boolean {
let email = new Array<string>();
// remove spaces
this.recipients = this.recipients.replace(/\s/g, '');
// remove commas
email = this.recipients.split(",");
// remove empty fields
for (let i = 0; i < email.length; i++) {
if (!(email[i] == "")) {
this.email.recipients.push(email[i]);
}
}
return true;
}
public composeEmail() {
this.email.body = Composer.formatEmailBodyForInvitation(this.body);
}
/*
public handleError(error) {
if(error.status == '401') {
this.status = this.errorCodes.FORBIDDEN;
} else if(error.status == '403') {
this.status = this.errorCodes.FORBIDDEN;
} else if(error.status == '404') {
this.status = this.errorCodes.NOT_FOUND;
} else if(error.status == '500') {
this.status = this.errorCodes.ERROR;
} else {
this.status = this.errorCodes.NOT_AVAILABLE;
}
console.log('Server responded: ' + error);
}
*/
allowEdit() {
if (!this.user) {
return false;
}
var email = this.user.email;
var index = -1;
if (email && this.community != null && this.community.managers != null) {
index = this.community.managers.indexOf(email);
}
return Session.isPortalAdministrator(this.user) || Session.isCommunityCurator(this.user) || index != -1;
}
private handleError(message: string, error) {
console.error("Invite Page (or component): " + message, error);
}
private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
}
private updateTitle(title: string) {
var _title = ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");
}
private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'");
}
}

View File

@ -1,40 +0,0 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
import {CKEditorModule} from 'ng2-ckeditor';
import {InviteComponent} from './invite.component';
import {InviteRoutingModule} from './invite-routing.module';
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {LoginGuard} from '../../../openaireLibrary/login/loginGuard.guard';
import {EmailService} from '../../../openaireLibrary/utils/email/email.service';
import {CommunityService} from '../../../openaireLibrary/connect/community/community.service';
import {ErrorMessagesModule} from '../../../openaireLibrary/utils/errorMessages.module';
import {IsRouteEnabled} from "../../../openaireLibrary/error/isRouteEnabled.guard";
import {HelperModule} from "../../../openaireLibrary/utils/helper/helper.module";
import {Schema2jsonldModule} from "../../../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
import {SEOServiceModule} from "../../../openaireLibrary/sharedComponents/SEO/SEOService.module";
import {PiwikService} from "../../../openaireLibrary/utils/piwik/piwik.service";
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule, InviteRoutingModule, CKEditorModule, ErrorMessagesModule,
HelperModule, Schema2jsonldModule, SEOServiceModule
],
declarations: [
InviteComponent
],
providers: [
LoginGuard, PreviousRouteRecorder,
EmailService, CommunityService, IsRouteEnabled,
PiwikService
],
exports: [
InviteComponent
]
})
export class InviteModule { }

View File

@ -1,241 +0,0 @@
import {Component, EventEmitter, Input, Output, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {AlertModal} from '../../openaireLibrary/utils/modal/alert';
import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
import {SubscribeService} from '../../openaireLibrary/utils/subscribe/subscribe.service';
import {EmailService} from "../../openaireLibrary/utils/email/email.service";
import {Session, User} from '../../openaireLibrary/login/utils/helper.class';
import {Email} from "../../openaireLibrary/utils/email/email";
import {Composer} from "../../openaireLibrary/utils/email/composer";
import {LoginErrorCodes} from '../../openaireLibrary/login/utils/guardHelper.class';
import {UserManagementService} from "../../openaireLibrary/services/user-management.service";
declare var UIkit: any;
@Component({
selector: 'subscribe',
template: `
<span *ngIf="subscribed != null && !showNumbers && showTemplate">
<div *ngIf="!subscribed && showLoginAlert" class="uk-alert-warning uk-animation-slide-bottom" uk-alert="">
<a class="uk-alert-close" uk-close></a>
<p>Please login first to subscribe</p>
</div>
<button *ngIf="!subscribed" [class]="'uk-button uk-button-primary' + (loading ? ' uk-disabled' : '')"
(click)="subscribe()"> Subscribe</button>
<button *ngIf="subscribed" [class]="'uk-button uk-button-primary' + (loading ? ' uk-disabled' : '')"
(click)="confirmOpen()"> Unsubscribe</button>
</span>
<span *ngIf="showNumbers && subscribers !=null && subscribers > 0 && showTemplate">
<span class="lowOpacityColor"> Members</span> {{subscribers}}
</span>
<modal-alert (alertOutput)="confirmClose($event)">
</modal-alert>
`
})
export class SubscribeComponent {
// @Input() showSubscribe:boolean = true;
@Input() showNumbers: boolean;
@Input() communityId: string;
@Input() showTemplate: boolean = true;
@Output() subscribeEvent = new EventEmitter();
public community = null;
public emailToInformManagers: Email;
loading: boolean = false;
subscribed: boolean = null;
properties: EnvProperties;
subscribers: number = null;
showLoginAlert: Boolean = false;
@ViewChild(AlertModal) alert;
private user: User;
constructor(private route: ActivatedRoute,
private _subscribeService: SubscribeService,
private _emailService: EmailService,
private _communityService: CommunityService,
private router: Router,
private userManagementService: UserManagementService
) {
}
public ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.userManagementService.getUserInfo().subscribe( user => {
this.user = user;
if (!this.showNumbers) {
let email = (this.user)?this.user.email:null;
if (email == null) {
this.subscribed = false;
} else {
if (this.communityId) {
this._subscribeService.isSubscribedToCommunity(this.properties, this.communityId).subscribe(
res => {
this.subscribed = res;
if (this.subscribed) {
this.subscribeEvent.emit({
value: "ok"
});
}
},
error => {
this.handleError("Error getting response if email: " + email + " is subscribed to community with id: " + this.communityId, error);
});
}
}
} else {
if (this.communityId) {
this._subscribeService.getCommunitySubscribers(this.properties, this.communityId).subscribe(
res => {
this.subscribers = (res && res.subscribers && res.subscribers.length) ? res.subscribers.length : 0;
},
error => {
this.handleError("Error getting community subscribers for community with id: " + this.communityId, error);
});
}
}
if (this.communityId) {
this.emailToInformManagers = {body: "", subject: "", recipients: []};
this._communityService.getCommunity(this.properties, this.properties.communityAPI + this.communityId).subscribe(
community => {
this.community = community;
},
error => {
//console.log('System error retrieving community profile', error)
this.handleError("Error getting community with id: " + this.communityId, error);
}
);
}
});
});
}
subscribe() {
var email = (this.user)?this.user.email:null;
if (email == null) {
this.subscribed = false;
// this.showLoginAlert = true;
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.ACTION_REQUIRES_LOGIN,
"redirectUrl": this.router.url
}
});
} else {
this.loading = true;
this.showLoginAlert = false;
this._subscribeService.subscribeToCommunity(this.properties, this.communityId).subscribe(
res => {
this.loading = false;
if (res.status && res.status != 200) {
this.subscribeEvent.emit({
value: "error"
});
UIkit.notification({
message: '<strong>An error occured. Please try again!<strong>',
status: 'warning',
timeout: 3000,
pos: 'top-center'
});
} else {
if (!this.subscribed) {
this.subscribed = true;
this.subscribeEvent.emit({
value: "ok"
});
this._emailService.notifyForNewManagers(this.properties, this.communityId, Composer.composeEmailToInformManagers(this.community.title, this.communityId, this.community.managers, email, this.properties.adminPortalURL)).subscribe(
res => {
//console.log("The email has been sent successfully!")
},
error => {
//console.log(error)
this.handleError("Error notifying managers about new subscribers for community with id: " + this.communityId, error);
}
);
}
}
},
error => {
this.loading = false;
this.subscribeEvent.emit({
value: "error"
});
UIkit.notification({
message: '<strong>An error occured. Please try again!<strong>',
status: 'warning',
timeout: 3000,
pos: 'top-center'
});
//console.log(error)
this.handleError("Error subscribing email: " + email + " to community with id: " + this.communityId, error);
});
}
}
unsubscribe() {
var email = (this.user)?this.user.email:null;
if (email == null) {
this.subscribed = false;
} else {
this.loading = true;
//this.properties.adminToolsAPIURL
this._subscribeService.unSubscribeToCommunity(this.properties, this.communityId).subscribe(
res => {
this.loading = false;
if (res.status && res.status != 200) {
UIkit.notification({
message: '<strong>An error occured. Please try again!<strong>',
status: 'warning',
timeout: 3000,
pos: 'top-center'
});
} else {
//console.log(res);
if (this.subscribed) {
console.log('here')
this.subscribed = false;
}
}
},
error => {
this.loading = false;
UIkit.notification({
message: '<strong>An error occured. Please try again!<strong>',
status: 'warning',
timeout: 3000,
pos: 'top-center'
});
//console.log(error)
this.handleError("Error unsubscribing email: " + email + " from community with id: " + this.communityId, error);
});
}
}
confirmOpen() {
this.alert.cancelButton = true;
this.alert.okButton = true;
this.alert.alertTitle = "Unsubscribe community ";
this.alert.message = "Do you want to proceed? ";
this.alert.okButtonText = "Yes";
this.alert.cancelButtonText = "No";
this.alert.open();
}
confirmClose(data) {
this.unsubscribe();
}
private handleError(message: string, error) {
console.error("Subscribe (component): " + message, error);
}
}

View File

@ -1,32 +0,0 @@
import {ModuleWithProviders, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RouterModule} from '@angular/router';
import {SubscribeService} from '../../openaireLibrary/utils/subscribe/subscribe.service';
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
import {EmailService} from "../../openaireLibrary/utils/email/email.service";
import {SubscribeComponent} from './subscribe.component';
import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module';
@NgModule({
imports: [
CommonModule, RouterModule, AlertModalModule
],
declarations: [
SubscribeComponent
],
exports: [
SubscribeComponent
]
})
export class SubscribeModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: SubscribeModule,
providers: [
SubscribeService, EmailService, CommunityService
]
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

View File

@ -1,80 +0,0 @@
{
"mainColor": "#4C9CD5",
"secondaryColor": "#24857F",
"panel": {
"background": {
"borderStyle": null,
"borderColor": null,
"borderWidth": null
}, "fonts": {
"color": "white",
"family": null,
"size": null
},
"title": {
"color": "white",
"family": null,
"size": null
},
"links": {
"color": "rgba(255, 255, 255, 0.98)",
"family": null,
"size": null,
"onHover": {
"color": null
}
},
"buttons": {
"backgroundColor": "white",
"fontWeight": null,
"color": null,
"borderStyle": null,
"borderColor": null,
"borderWidth": "1px",
"borderRadius": "4px",
"onHover": {
"backgroundColor": "#eeeeee",
"color": null,
"borderColor": null
}
},
"panelElements": {
"backgroundColor": "rgba(255, 255, 255, 0.5)",
"borderColor": "rgba(255, 255, 255, 0.5)",
"color": "white"
}
},
"box": {
"borderColor": null,
"borderStyle": "solid",
"borderWidth": "2px",
"borderRadius": "6px"
},
"links": {
"color": null,
"family": null,
"decoration": null,
"onHover": {
"color": null
}
},
"buttons": {
"backgroundColor": null,
"color": null,
"borderStyle": null,
"borderColor": null,
"borderWidth": null,
"borderRadius": null,
"onHover": {
"backgroundColor": null,
"color": null,
"borderColor": null
}
}
}

View File

@ -1,119 +0,0 @@
{
"environment" : "development",
"enablePiwikTrack" : false,
"useCache" : false,
"showContent" : true,
"metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/",
"framesAPIURL" : "https://beta.openaire.eu/stats3/",
"statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/",
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
"statisticsFrameNewAPIURL": "https://stats.madgik.di.uoa.gr/stats-api/",
"useNewStatistisTool":false,
"claimsAPIURL" : "http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
"searchResourcesAPIURL" : "https://beta.services.openaire.eu/search/v2/api/resources",
"openCitationsAPIURL" : "https://services.openaire.eu/opencitations/getCitations?id=",
"csvAPIURL" : "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/reports",
"searchCrossrefAPIURL" : "https://api.crossref.org/works",
"searchDataciteAPIURL" : "https://api.datacite.org/works",
"searchOrcidURL" : "https://pub.orcid.org/v2.1/",
"orcidURL" : "https://orcid.org/",
"doiURL" : "https://dx.doi.org/",
"cordisURL" : "http://cordis.europa.eu/projects/",
"openDoarURL": "http://v2.sherpa.ac.uk/id/repository/",
"r3DataURL": "http://service.re3data.org/repository/",
"zenodo" : "https://zenodo.org/",
"zenodoCommunities" : "https://zenodo.org/api/communities/",
"openAccess" : "https://www.openaire.eu/support/faq#article-id-234",
"openAccessRepo" : "https://www.openaire.eu/support/faq#article-id-310",
"fp7Guidlines" : "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme",
"h2020Guidlines" : "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020",
"ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
"helpdesk" : "https://www.openaire.eu/support/helpdesk",
"uploadService" : "http://scoobydoo.di.uoa.gr:8000/upload",
"utilsService" : "http://mpagasas.di.uoa.gr:8000",
"vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",
"piwikBaseUrl" :"https://analytics.openaire.eu/piwik.php?idsite=",
"piwikSiteId" : "80",
"loginUrl" :"http://scoobydoo.di.uoa.gr:8080/dnet-login/openid_connect_login",
"userInfoUrl" : "http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
"logoutUrl" :"https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",
"cookieDomain" :".di.uoa.gr",
"feedbackmail" :"openaire.test@gmail.com",
"cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
"monitorServiceAPIURL" :"http://dl170.madgik.di.uoa.gr:8080/uoa-monitor-service",
"adminToolsAPIURL" :"http://mpagasas.di.uoa.gr:8080/uoa-admin-tools",
"adminToolsCommunity" :"monitor",
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
"contextsAPI":"https://dev-openaire.d4science.org/openaire/context",
"communityAPI": "https://dev-openaire.d4science.org/openaire/community/",
"communitiesAPI": "https://dev-openaire.d4science.org/openaire/community/communities",
"csvLimit": 2000,
"pagingLimit": 20,
"resultsPerPage": 10,
"baseLink" : "",
"domain" : "http://dl170.madgik.di.uoa.gr/monitor",
"searchLinkToPublication" : "/search/publication?articleId=",
"searchLinkToProject" : "/search/project?projectId=",
"searchLinkToDataProvider" : "/search/dataprovider?datasourceId=",
"searchLinkToDataset" : "/search/dataset?datasetId=",
"searchLinkToSoftwareLanding" : "/search/software?softwareId=",
"searchLinkToOrganization" : "/search/organization?organizationId=",
"searchLinkToOrp" : "/search/other?orpId=",
"searchLinkToCommunities" : "/search/find/communities",
"searchLinkToPublications" : "/search/find/publications",
"searchLinkToDataProviders" : "/search/find/dataproviders",
"searchLinkToProjects" : "/search/find/projects",
"searchLinkToDatasets" : "/search/find/datasets",
"searchLinkToSoftware" : "/search/find/software",
"searchLinkToOrps" : "/search/find/other",
"searchLinkToOrganizations" : "/search/find/organizations",
"searchLinkToCompatibleDataProviders" : "/search/content-providers",
"searchLinkToEntityRegistriesDataProviders" : "/search/entity-registries",
"searchLinkToEntityRegistriesDataProvidersTable" : "/search/entity-registries-table",
"searchLinkToJournals" : "/search/journals",
"searchLinkToJournalsTable" : "/search/journals-table",
"searchLinkToAdvancedPublications" : "/search/advanced/publications",
"searchLinkToAdvancedProjects" : "/search/advanced/projects",
"searchLinkToAdvancedDatasets" : "/search/advanced/datasets",
"searchLinkToAdvancedSoftware" : "/search/advanced/software",
"searchLinkToAdvancedOrps" : "/search/advanced/other",
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
"sendMailUrl": "http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools/sendMail/",
"notifyForNewManagers": "http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools/notifyForNewManagers/",
"notifyForNewSubscribers": "http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools/notifyForNewSubscribers/",
"lastIndexInformationLink" : "https://beta.openaire.eu/aggregation-and-content-provision-workflows",
"showLastIndexInformationLink" : true,
"widgetLink" : "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
"claimsInformationLink": "https://beta.openaire.eu/linking",
"depositLearnHowPage": "/participate/deposit/learn-how",
"depositSearchPage": "/participate/deposit/search",
"shareInZenodoPage": "/participate/deposit/zenodo",
"reCaptchaSiteKey": "6LcVtFIUAAAAAB2ac6xYivHxYXKoUvYRPi-6_rLu",
"admins" : ["kostis30fylloy@gmail.com","argirok@di.uoa.gr"],
"lastIndexUpdate": "2019-05-16",
"indexInfoAPI": "https://beta.services.openaire.eu/openaire/info/"
}

View File

@ -1,43 +0,0 @@
[
{
"title": "European Commision",
"shortTitle":"EC",
"alias": "ec",
"queryId": "ec",
"type": "funder",
"logoUrl": "./assets/images/ec.png",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date":"2019-11-01",
"status":"public",
"jurisdiction": "European Union",
"jurisdictionLogo": "eu"
},
{
"title": "Austrian Science Fund",
"shortTitle":"FWF",
"alias": "fwf",
"queryId": "wfw",
"type": "funder",
"logoUrl": "./assets/images/fwf.png",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date":"2019-11-01",
"status":"public",
"jurisdiction": "Austria",
"jurisdictionLogo": "europe"
},
{
"title": "Australian Research Council",
"shortTitle":"ARC",
"alias": "arc",
"queryId": "arc",
"type": "funder",
"logoUrl": "./assets/images/arc1.gif",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date":"2019-11-01",
"status":"public",
"jurisdiction": "Australia",
"jurisdictionLogo": "international"
}
]

View File

@ -1,56 +0,0 @@
[
{
"title": "European Commision",
"shortTitle":"EC",
"alias": "ec",
"queryId": "ec",
"type": "funder",
"logoUrl": "./assets/images/ec.png",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date":"2019-11-01",
"status":"public",
"jurisdiction": "European Union",
"jurisdictionLogo": "eu"
},
{
"title": "Austrian Science Fund",
"shortTitle":"FWF",
"alias": "fwf",
"queryId": "wfw",
"type": "funder",
"logoUrl": "./assets/images/fwf.png",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date":"2019-11-01",
"status":"public",
"jurisdiction": "Austria",
"jurisdictionLogo": "europe"
},
{
"title": "Australian Research Council",
"shortTitle":"ARC",
"alias": "arc",
"queryId": "arc",
"type": "funder",
"logoUrl": "./assets/images/arc1.gif",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date":"2019-11-01",
"status":"public",
"jurisdiction": "Australia",
"jurisdictionLogo": "international"
}
,
{
"title": "Wellcome Trust",
"shortTitle":"WT",
"alias": "wt",
"queryId": "wt",
"type": "funder",
"logoUrl": "",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date":"2019-11-01",
"status":"public",
"jurisdiction": "United Kingdom",
"jurisdictionLogo": "europe"
}
]

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 82.278 58.7"><defs><style>.a{fill:#fff;}.a,.b{stroke:#ebb13e;stroke-miterlimit:10;stroke-width:3px;}.b{fill:none;}</style></defs><g transform="translate(1 2)"><g transform="translate(-9.464 -954.4)"><path class="a" d="M60,979.6a12.864,12.864,0,0,0,1.9-2.1.91.91,0,0,0,0-1.2c-.9-1.1-1.5-1.9-1.9-2.5.2-.5.4-1,.6-1.4l3.3-.5a.9.9,0,0,0,.8-1l-.1-4.2a1.063,1.063,0,0,0-.9-1l-3.2-.5a11.111,11.111,0,0,0-.7-1.6c.1-.1.2-.3.4-.4a5.548,5.548,0,0,0,.6-.8l.3-.4a6.783,6.783,0,0,0,.6-.9,1.083,1.083,0,0,0,0-1.1,19.927,19.927,0,0,0-3.2-3.3,1.059,1.059,0,0,0-1.3-.1l-2.6,2c-.5-.2-.9-.4-1.4-.6l-.5-3.3a.974.974,0,0,0-1-.8H47.5a.974.974,0,0,0-1,.8c-.2,1.1-.4,2.2-.5,3.4l-1.5.6-2.4-1.9c-.1-.1-.2-.1-.3-.2-.6-.3-1.1,0-2.4,1.3a17.966,17.966,0,0,0-1.9,2,.91.91,0,0,0,0,1.2l.2.2a22.13,22.13,0,0,1,1.7,2.3,4.714,4.714,0,0,0-.6,1.5l-3.4.6a.9.9,0,0,0-.8,1l.1,4.2a1.063,1.063,0,0,0,.9,1l3.3.5a11.111,11.111,0,0,0,.7,1.6c-.2.3-.6.7-.9,1.2l-.3.4a6.783,6.783,0,0,0-.6.9,1.083,1.083,0,0,0,0,1.1,32.6,32.6,0,0,0,3.1,3.3,1.23,1.23,0,0,0,1.3.1l2.6-2a11.209,11.209,0,0,0,1.3.5l.5,3.3a.974.974,0,0,0,1,.8h4.2a1.077,1.077,0,0,0,1-.8v-.1a30.679,30.679,0,0,0,.4-3.1l1.5-.6,3,2.5Z"/><path class="a" d="M50.1,965.6a2.9,2.9,0,1,1-2.9,2.9A3.039,3.039,0,0,1,50.1,965.6Z"/></g><circle class="a" cx="7.435" cy="7.435" r="7.435" transform="translate(61.335 13.246)"/><circle class="a" cx="7.435" cy="7.435" r="7.435" transform="translate(4.169 13.246)"/><path class="b" d="M63.951,58.112h0A16.5,16.5,0,0,0,47.438,41.6H34.112A16.5,16.5,0,0,0,17.6,58.112h0" transform="translate(-0.588 -1.412)"/><path class="b" d="M65.5,41.6h0A16.567,16.567,0,0,1,82.012,58.112h0" transform="translate(-2.234 -1.412)"/><path class="b" d="M17.012,41.6h0A16.567,16.567,0,0,0,.5,58.112h0" transform="translate(0 -1.412)"/></g></svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,113 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc><![CDATA[https://demo.openaire.eu]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/participate/deposit-publications-data]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/participate/claim]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/publications]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/other]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/datasets]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/projects]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/people]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/organizations]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/dataproviders]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/publications]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/other]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/datasets]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/projects]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/people]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/organizations]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/dataproviders]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/content-providers]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/entity-registries]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>![CDATA[https://demo.openaire.eu/participate/deposit-publications]</loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>![CDATA[https://demo.openaire.eu/participate/deposit-datasets]</loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
</urlset>

View File

@ -1,717 +0,0 @@
{
"stakeholders": [
{
"id": "1",
"type": "funder",
"index_id": "EC",
"index_name": "European Comission",
"index_shortName": "EC",
"alias": "EC",
"isDefaultProfile": false,
"isActive": true,
"isPublic": true,
"creationDate": "08-10-2019",
"updateDate": "08-10-2019",
"managers": null,
"topics": [
{
"name": "OpenScience",
"alias": "openScience",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
"isActive": true,
"isPublic": true,
"categories": [
{
"name": "Overview",
"alias": "overview",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
"isOverview": true,
"isActive": true,
"isPublic": true,
"subCategories": [
{
"name": null,
"description": null,
"alias": null,
"isActive": true,
"isPublic": true,
"numbers": [
{
"id": "1",
"type": "number",
"name": "Total",
"description": "Total number of publications",
"tags": [
"publications"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/{index_shortName}",
"jsonPath": [
"statistics",
"publications"
]
}
]
},
{
"id": "2",
"type": "number",
"name": "Open",
"description": "Total number of open access publications",
"tags": [
"publication",
"open access"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/{index_shortName}",
"jsonPath": [
"statistics",
"open_access"
]
}
]
},
{
"id": "3",
"type": "number",
"name": "Embargo",
"description": "Total number of embargoed publications",
"tags": [
"publication",
"embargo"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/{index_shortName}",
"jsonPath": [
"statistics",
"embargo"
]
}
]
}
],
"charts": [
{
"id": "4",
"type": "charts",
"name": "Number of publications by project",
"description": "Number of publications by project",
"tags": [
"publication",
"project"
],
"width": "large",
"indicatorPaths": [
{
"type": "bar graph",
"url": "https://www.openaire.eu/stats/chart.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22column%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22EC%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
},
{
"type": "table",
"url": "https://www.openaire.eu/stats/gtable.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22pie%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22European%20Commission%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
}
]
}
]
},
{
"name": "Open",
"description": "open",
"alias": "open",
"isActive": true,
"isPublic": true,
"numbers": [
{
"id": "1",
"type": "number",
"name": "Total",
"description": "Total number of publications",
"tags": [
"publications"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/ec",
"jsonPath": [
"statistics",
"publications"
]
}
]
},
{
"id": "2",
"type": "number",
"name": "Open",
"description": "Total number of open access publications",
"tags": [
"publication",
"open access"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/ec",
"jsonPath": [
"statistics",
"open_access"
]
}
]
},
{
"id": "3",
"type": "number",
"name": "Embargo",
"description": "Total number of embargoed publications",
"tags": [
"publication",
"embargo"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/ec",
"jsonPath": [
"statistics",
"embargo"
]
}
]
}
],
"charts": [
{
"id": "4",
"type": "charts",
"name": "Number of publications by project",
"description": "Number of publications by project",
"tags": [
"publication",
"project"
],
"width": "large",
"indicatorPaths": [
{
"type": "bar graph",
"url": "https://www.openaire.eu/stats/chart.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22column%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22EC%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
},
{
"type": "table",
"url": "https://www.openaire.eu/stats/gtable.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22pie%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22European%20Commission%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
}
]
}
]
}
]
},
{
"name": "Publications",
"alias": "publications",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
"isOverview": false,
"isActive": true,
"isPublic": true,
"subCategories": [
{
"name": null,
"description": null,
"alias": null,
"isActive": true,
"isPublic": true,
"numbers": [
{
"id": "1",
"type": "number",
"name": "Total",
"description": "Total number of publications",
"tags": [
"publications"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/ec",
"jsonPath": [
"statistics",
"publications"
]
}
]
},
{
"id": "2",
"type": "number",
"name": "Open",
"description": "Total number of open access publications",
"tags": [
"publication",
"open access"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/ec",
"jsonPath": [
"statistics",
"open_access"
]
}
]
},
{
"id": "3",
"type": "number",
"name": "Embargo",
"description": "Total number of embargoed publications",
"tags": [
"publication",
"embargo"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/ec",
"jsonPath": [
"statistics",
"embargo"
]
}
]
}
],
"charts": [
{
"id": "4",
"type": "charts",
"name": "Number of publications by project",
"description": "Number of publications by project",
"tags": [
"publication",
"project"
],
"width": "large",
"indicatorPaths": [
{
"type": "bar graph",
"url": "https://www.openaire.eu/stats/chart.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22column%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22EC%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
},
{
"type": "table",
"url": "https://www.openaire.eu/stats/gtable.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22pie%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22European%20Commission%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
}
]
}
]
}
]
},
{
"name": "Research data",
"alias": "researchData",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
"isOverview": false,
"isActive": true,
"isPublic": true,
"subCategories": [
{
"name": null,
"description": null,
"alias": null,
"isActive": true,
"isPublic": true,
"numbers": [
],
"charts": [
]
}
]
},
{
"name": "Software",
"alias": "software",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
"isOverview": false,
"isActive": true,
"isPublic": true,
"subCategories": [
{
"name": null,
"description": null,
"alias": null,
"isActive": true,
"isPublic": true,
"numbers": [
],
"charts": [
]
}
]
},
{
"name": "Other",
"alias": "other",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
"isOverview": false,
"isActive": true,
"isPublic": true,
"subCategories": [
{
"name": null,
"description": null,
"alias": null,
"isActive": true,
"isPublic": true,
"numbers": [
],
"charts": [
]
}
]
}
]
},
{
"name": "Collaboration",
"alias": "collaboration",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
"isActive": true,
"isPublic": true,
"categories": [
{
"name": "Overview",
"alias": "overview",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
"isOverview": true,
"isActive": true,
"isPublic": true,
"subCategories": [
{
"name": null,
"description": null,
"alias": null,
"isActive": true,
"isPublic": true,
"numbers": [
{
"id": "1",
"type": "number",
"name": "Total",
"description": "Total number of publications",
"tags": [
"publications"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/{index_shortName}",
"jsonPath": [
"statistics",
"publications"
]
}
]
},
{
"id": "2",
"type": "number",
"name": "Open",
"description": "Total number of open access publications",
"tags": [
"publication",
"open access"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/{index_shortName}",
"jsonPath": [
"statistics",
"open_access"
]
}
]
},
{
"id": "3",
"type": "number",
"name": "Embargo",
"description": "Total number of embargoed publications",
"tags": [
"publication",
"embargo"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/{index_shortName}",
"jsonPath": [
"statistics",
"embargo"
]
}
]
}
],
"charts": [
{
"id": "4",
"type": "charts",
"name": "Number of publications by project",
"description": "Number of publications by project",
"tags": [
"publication",
"project"
],
"width": "large",
"indicatorPaths": [
{
"type": "bar graph",
"url": "https://www.openaire.eu/stats/chart.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22column%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22EC%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
},
{
"type": "table",
"url": "https://www.openaire.eu/stats/gtable.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22pie%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22European%20Commission%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
}
]
}
]
}
]
}
]
},
{
"name": "Impact/Correlation",
"alias": "impact-correlation",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
"isActive": true,
"isPublic": true,
"categories": [
{
"name": "Overview",
"alias": "overview",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...",
"isOverview": true,
"isActive": true,
"isPublic": true,
"subCategories": [
{
"name": null,
"description": null,
"alias": null,
"isActive": true,
"isPublic": true,
"numbers": [
{
"id": "1",
"type": "number",
"name": "Total",
"description": "Total number of publications",
"tags": [
"publications"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/{index_shortName}",
"jsonPath": [
"statistics",
"publications"
]
}
]
},
{
"id": "2",
"type": "number",
"name": "Open",
"description": "Total number of open access publications",
"tags": [
"publication",
"open access"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/{index_shortName}",
"jsonPath": [
"statistics",
"open_access"
]
}
]
},
{
"id": "3",
"type": "number",
"name": "Embargo",
"description": "Total number of embargoed publications",
"tags": [
"publication",
"embargo"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/{index_shortName}",
"jsonPath": [
"statistics",
"embargo"
]
}
]
}
],
"charts": [
{
"id": "4",
"type": "charts",
"name": "Number of publications by project",
"description": "Number of publications by project",
"tags": [
"publication",
"project"
],
"width": "large",
"indicatorPaths": [
{
"type": "bar graph",
"url": "https://www.openaire.eu/stats/chart.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22column%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22EC%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
},
{
"type": "table",
"url": "https://www.openaire.eu/stats/gtable.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22pie%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22European%20Commission%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
}
]
}
]
}
]
}
]
}
]
}
],
"indicators": [
{
"id": "1",
"type": "number",
"name": "Total",
"description": "Total number of publications",
"tags": [
"publications"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/ec",
"jsonPath": [
"statistics",
"publications"
]
}
]
},
{
"id": "2",
"type": "number",
"name": "Open",
"description": "Total number of open access publications",
"tags": [
"publication",
"open access"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/ec",
"jsonPath": [
"statistics",
"open_access"
]
}
]
},
{
"id": "3",
"type": "number",
"name": "Embargo",
"description": "Total number of embargoed publications",
"tags": [
"publication",
"embargo"
],
"width": "small",
"indicatorPaths": [
{
"type": "",
"url": "/funders/ec",
"jsonPath": [
"statistics",
"embargo"
]
}
]
},
{
"id": "4",
"type": "charts",
"name": "Number of publications by project",
"description": "Number of publications by project",
"tags": [
"publication",
"project"
],
"width": "large",
"indicatorPaths": [
{
"type": "bar graph",
"url": "https://www.openaire.eu/stats/chart.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22column%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22EC%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
},
{
"type": "table",
"url": "https://www.openaire.eu/stats/gtable.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22pie%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_projects-project-title%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2230%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funder%22,%22values%22:[%22European%20Commission%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22}],%22having%22:[],%22xStyle%22:{%22r%22:-90,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:10,%22wt%22:%22-%22},%22title%22:%22European%20Commission%20Publications%20by%20project%20(top%2030)%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22project%22,%22order%22:%22d%22}",
"jsonPath": []
}
]
}
]
}

View File

@ -49,7 +49,7 @@ export let properties: EnvProperties = {
cookieDomain: ".openaire.eu", cookieDomain: ".openaire.eu",
feedbackmail: "openaire.test@gmail.com", feedbackmail: "feedback@openaire.eu",
cacheUrl: "https://demo.openaire.eu/cache/get?url=", cacheUrl: "https://demo.openaire.eu/cache/get?url=",
@ -105,7 +105,7 @@ export let properties: EnvProperties = {
reCaptchaSiteKey: "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P", reCaptchaSiteKey: "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P",
admins: ["argirok@di.uoa.gr","kiatrop@di.uoa.gr"], admins: ["feedback@openaire.eu"],
lastIndexUpdate: "2019-08-07", lastIndexUpdate: "2019-08-07",
indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/", indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/",
altMetricsAPIURL: "https://api.altmetric.com/v1/doi/", altMetricsAPIURL: "https://api.altmetric.com/v1/doi/",

View File

@ -1,2 +1,2 @@
User-Agent: * User-Agent: *
Disallow: / Crawl-delay: 30