diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 3fedaf1..32ddf49 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -57,7 +57,7 @@ export class AppComponent { constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, private router: Router, private stakeholderService: StakeholderService, private userManagementService: UserManagementService) { - router.events.forEach((event) => { + this.subscriptions.push(router.events.forEach((event) => { if (event instanceof NavigationStart) { HelperFunctions.scroll(); } else if (event instanceof NavigationEnd) { @@ -69,7 +69,7 @@ export class AppComponent { let params = r.snapshot.params; this.params.next(params); } - }); + })); } ngOnInit() { @@ -95,6 +95,8 @@ export class AppComponent { value.unsubscribe(); } }); + this.userManagementService.clearSubscriptions(); + this.stakeholderService.clearSubscriptions(); } public buildMenu() { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1d4017f..342551e 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,7 +1,7 @@ import {NgModule} from '@angular/core'; import {FormsModule} from '@angular/forms'; 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 {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {AppComponent} from './app.component'; @@ -15,10 +15,7 @@ import {ErrorModule} from './openaireLibrary/error/error.module'; import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module'; import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver'; - -import {CommunitiesService} from './openaireLibrary/connect/communities/communities.service'; -import {LayoutService} from "./openaireLibrary/services/layout.service"; -import {SubscribeModule} from './utils/subscribe/subscribe.module'; +import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service"; @NgModule({ @@ -32,13 +29,15 @@ import {SubscribeModule} from './utils/subscribe/subscribe.module'; NavigationBarModule, BottomModule, CookieLawModule, - SubscribeModule.forRoot(), BrowserModule.withServerTransition({appId: 'my-app'}), AppRoutingModule ], declarations: [ AppComponent, OpenaireErrorPageComponent], exports: [ AppComponent ], - providers:[EnvironmentSpecificResolver, CommunitiesService, LayoutService], + providers:[EnvironmentSpecificResolver, + [{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }], + [{ provide: DEFAULT_TIMEOUT, useValue: 30000 }] + ], bootstrap: [AppComponent] }) // diff --git a/src/app/contact/contact.component.ts b/src/app/contact/contact.component.ts index 6db929e..338f5d8 100644 --- a/src/app/contact/contact.component.ts +++ b/src/app/contact/contact.component.ts @@ -10,7 +10,7 @@ import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class"; import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; import {AbstractControl, FormBuilder, FormGroup, ValidatorFn, Validators} from "@angular/forms"; -import {properties} from "../../environments/environment"; +import {Subscriber} from "rxjs"; @Component({ selector: 'contact', @@ -46,14 +46,21 @@ export class ContactComponent implements OnInit { private fb: FormBuilder, private helper: HelperService) { } - + subscriptions = []; + ngOnDestroy() { + this.subscriptions.forEach(subscription => { + if (subscription instanceof Subscriber) { + subscription.unsubscribe(); + } + }); + } ngOnInit() { 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.email = {body: '', subject: '', recipients: []}; 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.seoService.createLinkForCanonicalURL(this.url); @@ -65,19 +72,19 @@ export class ContactComponent implements OnInit { // this.getPageContents(); HelperFunctions.scroll(); this.showLoading = false; - }); + })); } 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; - }) + })); } 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; - }) + })); } public send(event) { @@ -114,9 +121,9 @@ export class ContactComponent implements OnInit { private sendMail(admins: any) { this.showLoading = true; - this._emailService.contact(this.properties, + this.subscriptions.push(this._emailService.contact(this.properties, Composer.composeEmailForMonitor(this.contactForm.value, admins), - this.contactForm.value.recaptcha).subscribe( + this.contactForm.value.recaptcha).subscribe( res => { this.showLoading = false; if (res) { @@ -132,7 +139,7 @@ export class ContactComponent implements OnInit { this.showLoading = false; this.contactForm.get('recaptcha').setValue(''); } - ); + )); } public modalOpen() { diff --git a/src/app/error/errorPage.component.ts b/src/app/error/errorPage.component.ts index e96d3dc..52073bc 100644 --- a/src/app/error/errorPage.component.ts +++ b/src/app/error/errorPage.component.ts @@ -1,6 +1,5 @@ -import { Component, Input } from '@angular/core'; -import { Location } from '@angular/common'; - +import { Component } from '@angular/core'; + @Component({ selector: 'openaire-error', template: ` diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index 099e07c..5c6ede4 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -3,13 +3,12 @@ import { RouterModule } from '@angular/router'; import{HomeComponent} from './home.component'; -import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: HomeComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] } + { path: '', component: HomeComponent, canDeactivate: [PreviousRouteRecorder] } ]) ] diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index f3fc26b..b564d4a 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -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 {Meta, Title} from '@angular/platform-browser'; 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 {Session, User} from "../openaireLibrary/login/utils/helper.class"; import {UserManagementService} from "../openaireLibrary/services/user-management.service"; +import {properties} from "../../environments/environment"; +import {Subscriber} from "rxjs"; @Component({ selector: 'home', @@ -51,8 +53,6 @@ import {UserManagementService} from "../openaireLibrary/services/user-management ] }) export class HomeComponent { - public piwiksub: any; - public pageTitle = "OpenAIRE | Monitor"; public stakeholders: Stakeholder[] = []; public selected: Stakeholder = null; @@ -74,7 +74,8 @@ export class HomeComponent { public softwareSize: any = null; public otherSize: any = null; public fundersSize: any = null; - numberSubs = []; + subscriptions = []; + public state = 1; private timeouts: any[] = []; @ViewChild('AlertModal') modal; @@ -112,29 +113,27 @@ export class HomeComponent { this.errorMessages = new ErrorMessagesComponent(); this.status = this.errorCodes.LOADING; } - + public ngOnInit() { - this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - var url = this.properties.domain + this.properties.baseLink + this._router.url; - this.seoService.createLinkForCanonicalURL(url, false); - this._meta.updateTag({content: url}, "property='og:url'"); - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Monitor", this.properties.piwikSiteId).subscribe(); - } - this.getNumbers(); - this.getStakeholders(); - // this.createGifs(); - //this.getDivContents(); - // this.getPageContents(); - this.localStorageService.get().subscribe(value => { - this.directLink = value; - }); - this.userManagementService.getUserInfo().subscribe(user => { - this.user = user; - }) - }); + this.properties = properties; + var url = this.properties.domain + this.properties.baseLink + this._router.url; + this.seoService.createLinkForCanonicalURL(url, false); + this._meta.updateTag({content: url}, "property='og:url'"); + if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { + this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Monitor", this.properties.piwikSiteId).subscribe()); + } + this.getNumbers(); + this.getStakeholders(); + // this.createGifs(); + //this.getDivContents(); + // this.getPageContents(); + this.subscriptions.push(this.localStorageService.get().subscribe(value => { + this.directLink = value; + })); + this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => { + this.user = user; + })); + if(typeof document != "undefined") { this.startAnimation(); } @@ -159,15 +158,15 @@ export class HomeComponent { } 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; - }) + })); } 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; - }) + })); } public get stakeholdersNumber(): number { @@ -179,7 +178,7 @@ export class HomeComponent { } getNumbers() { - this.numberSubs.push(this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"], "project", this.properties).subscribe( + this.subscriptions.push(this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"], "project", this.properties).subscribe( data => { if (data[1].length > 0 && data[1][0].filterId == "funder" && data[1][0].values) { this.fundersSize = NumberUtils.roundNumber(data[1][0].values.length); @@ -189,8 +188,8 @@ export class HomeComponent { //console.log(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 => { if (data && data > 0) { this.publicationsSize = NumberUtils.roundNumber(data); @@ -201,8 +200,8 @@ export class HomeComponent { this.handleError("Error getting number of publications", err); } )); - - this.numberSubs.push(this._searchResearchResultsService.numOfSearchResults("dataset", "", this.properties).subscribe( + + this.subscriptions.push(this._searchResearchResultsService.numOfSearchResults("dataset", "", this.properties).subscribe( data => { if (data && data > 0) { this.datasetsSize = NumberUtils.roundNumber(data); @@ -213,8 +212,8 @@ export class HomeComponent { this.handleError("Error getting number of research data", err); } )); - - this.numberSubs.push(this._searchResearchResultsService.numOfSearchResults("software", "", this.properties).subscribe( + + this.subscriptions.push(this._searchResearchResultsService.numOfSearchResults("software", "", this.properties).subscribe( data => { if (data && data > 0) { this.softwareSize = NumberUtils.roundNumber(data); @@ -224,8 +223,8 @@ export class HomeComponent { this.handleError("Error getting number of software data", err); } )); - - this.numberSubs.push(this._searchResearchResultsService.numOfSearchResults("other", "", this.properties).subscribe( + + this.subscriptions.push(this._searchResearchResultsService.numOfSearchResults("other", "", this.properties).subscribe( data => { if (data && data > 0) { this.otherSize = NumberUtils.roundNumber(data); @@ -243,7 +242,7 @@ export class HomeComponent { this.loading = true; this.status = this.errorCodes.LOADING; this.subscriberErrorMessage = ""; - this._stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL).subscribe( + this.subscriptions.push(this._stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL).subscribe( stakeholders => { if (!stakeholders || stakeholders.length == 0) { this.status = this.errorCodes.NONE; @@ -256,7 +255,7 @@ export class HomeComponent { this.status = this.handleError("Error getting funders", error); this.loading = false; } - ); + )); } private isStakeholderManager() { @@ -291,11 +290,13 @@ export class HomeComponent { public quote(param: string): string { return StringUtils.quote(param); } - - public ngOnDestroy() { - if (this.piwiksub) { - this.piwiksub.unsubscribe(); - } + + ngOnDestroy() { + this.subscriptions.forEach(subscription => { + if (subscription instanceof Subscriber) { + subscription.unsubscribe(); + } + }); this.clearTimeouts(); } diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index 689eb4a..2065169 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -5,7 +5,6 @@ import {RouterModule} from '@angular/router'; import {HomeComponent} from './home.component'; -import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; @@ -32,7 +31,7 @@ import {group, lock} from "../openaireLibrary/utils/icons/icons"; HomeComponent ], providers: [ - FreeGuard, PreviousRouteRecorder, + PreviousRouteRecorder, PiwikService ], exports: [ diff --git a/src/app/learn-how/learn-how-routing.module.ts b/src/app/learn-how/learn-how-routing.module.ts index 6451548..7f389e7 100644 --- a/src/app/learn-how/learn-how-routing.module.ts +++ b/src/app/learn-how/learn-how-routing.module.ts @@ -1,14 +1,13 @@ import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; -import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; import {LearnHowComponent} from "./learn-how.component"; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: LearnHowComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] } + { path: '', component: LearnHowComponent, canDeactivate: [PreviousRouteRecorder] } ]) ] diff --git a/src/app/learn-how/learn-how.component.ts b/src/app/learn-how/learn-how.component.ts index e089609..9b39787 100644 --- a/src/app/learn-how/learn-how.component.ts +++ b/src/app/learn-how/learn-how.component.ts @@ -5,6 +5,8 @@ import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; +import {properties} from "../../environments/environment"; +import {Subscriber} from "rxjs"; @Component({ selector: 'learn-how', @@ -12,7 +14,6 @@ import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; templateUrl: 'learn-how.component.html', }) export class LearnHowComponent { - public piwiksub: any; public pageContents = null; public divContents = null; @@ -20,7 +21,7 @@ export class LearnHowComponent { public pageTitle: string = "OpenAIRE - Monitor | Learn How"; properties: EnvProperties; - + subscriptions = []; constructor( private route: ActivatedRoute, private _router: Router, @@ -32,38 +33,39 @@ export class LearnHowComponent { } public ngOnInit() { - this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).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 - Monitor, Funders, Statistics, EC - Learn How");`` - //this.getDivContents(); - //this.getPageContents(); - }); + + this.properties = properties; + if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { + 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.seoService.createLinkForCanonicalURL(this.url); + this.updateUrl(this.url); + this.updateTitle(this.pageTitle); + this.updateDescription("OpenAIRE - Monitor, Funders, Statistics, EC - Learn How");`` + //this.getDivContents(); + //this.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; - }) + })); } 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; - }) + })); } - - public ngOnDestroy() { - if (this.piwiksub) { - this.piwiksub.unsubscribe(); - } + + ngOnDestroy() { + this.subscriptions.forEach(subscription => { + if (subscription instanceof Subscriber) { + subscription.unsubscribe(); + } + }); } diff --git a/src/app/learn-how/learn-how.module.ts b/src/app/learn-how/learn-how.module.ts index 9848b5a..60a1d75 100644 --- a/src/app/learn-how/learn-how.module.ts +++ b/src/app/learn-how/learn-how.module.ts @@ -1,8 +1,6 @@ import { NgModule} from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterModule } from '@angular/router'; - -import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; 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 {GifSliderModule} from "../openaireLibrary/utils/gif-slider/gif-slider.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 {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module"; @@ -26,7 +23,7 @@ import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOServi LearnHowComponent ], providers:[ - FreeGuard, PreviousRouteRecorder, PiwikService, IsRouteEnabled + PreviousRouteRecorder, PiwikService ] }) export class LearnHowModule { } diff --git a/src/app/login/libUser.module.ts b/src/app/login/libUser.module.ts index 2e51871..f52d019 100644 --- a/src/app/login/libUser.module.ts +++ b/src/app/login/libUser.module.ts @@ -7,16 +7,13 @@ import { UserRoutingModule } from './user-routing.module'; import { UserModule} from '../openaireLibrary/login/user.module'; 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({ imports: [ CommonModule, FormsModule, - UserRoutingModule, UserModule, SubscribeModule + UserRoutingModule, UserModule, ], - providers:[PreviousRouteRecorder, SubscribeService, EmailService], + providers:[PreviousRouteRecorder], declarations: [ OpenaireUserComponent diff --git a/src/app/login/user.component.ts b/src/app/login/user.component.ts index 360e770..24c0751 100644 --- a/src/app/login/user.component.ts +++ b/src/app/login/user.component.ts @@ -1,16 +1,27 @@ -import {Component, ElementRef, ViewChild} from '@angular/core'; -import {Observable} from 'rxjs/Observable'; +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-user', + template: `` +}) + +export class OpenaireUserComponent { + +} + +/* +import {Component, ViewChild} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import {UserComponent} from '../openaireLibrary/login/user.component'; import {SubscribeService} from '../openaireLibrary/utils/subscribe/subscribe.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 {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {SubscribeComponent} from '../utils/subscribe/subscribe.component'; import {ConnectHelper} from '../openaireLibrary/connect/connectHelper'; +import {properties} from "../../environments/environment"; @Component({ selector: 'openaire-user', @@ -52,6 +63,7 @@ export class OpenaireUserComponent { isSubscribed:boolean = false; public server: boolean = true; loggedIn:boolean = false; + sub; constructor(private _subscribeService: SubscribeService, private _emailService: EmailService, private route: ActivatedRoute){} public ngOnInit() { @@ -59,22 +71,17 @@ export class OpenaireUserComponent { this.server = false; this.loggedIn = Session.isLoggedIn(); } - this.route.data - .subscribe((data: { envSpecific: any }) => { - this.route.queryParams.subscribe( - communityId => { - this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain); - if(!this.communityId) { - this.communityId = communityId['communityId']; - } - if(this.subscribe.subscribed){ - this.usercomponent.redirect(); - } - }); + this.properties = properties; + this.sub = this.route.queryParams.subscribe( + communityId => { + this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain); + if(!this.communityId) { + this.communityId = communityId['communityId']; + } + if(this.subscribe.subscribed){ + this.usercomponent.redirect(); + } }); - - - } login(){ this.usercomponent.logIn(); @@ -85,8 +92,6 @@ export class OpenaireUserComponent { this.subscribeLoading = true; this.subscribe.subscribe(); - - } } @@ -104,3 +109,4 @@ export class OpenaireUserComponent { } } +*/ diff --git a/src/app/search-stakeholders/search-stakeholders.component.ts b/src/app/search-stakeholders/search-stakeholders.component.ts index 3e381ed..ef60830 100644 --- a/src/app/search-stakeholders/search-stakeholders.component.ts +++ b/src/app/search-stakeholders/search-stakeholders.component.ts @@ -12,8 +12,9 @@ import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class"; import {UserManagementService} from "../openaireLibrary/services/user-management.service"; import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; 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 {Subscriber} from "rxjs"; @Component({ selector: 'search-stakeholders', @@ -38,8 +39,7 @@ export class SearchStakeholdersComponent { private errorMessages: ErrorMessagesComponent; public results: StakeholderInfo[] = []; public totalResults: StakeholderInfo[] = []; - public sub: any; - public subResults: any; + public subscriptions = []; public filters = []; public searchFields: SearchFields = new SearchFields(); public searchUtils: SearchUtilsClass = new SearchUtilsClass(); @@ -76,7 +76,7 @@ export class SearchStakeholdersComponent { public ngOnInit() { this.piwikSiteId = this.properties.piwikSiteId; 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.keyword = (params['fv0'] ? params['fv0'] : ''); this.keyword = StringUtils.URIDecode(this.keyword); @@ -98,24 +98,24 @@ export class SearchStakeholdersComponent { let queryParams = params;//this.searchPage.getQueryParamsFromUrl(params); if (typeof document !== 'undefined') { - this.userManagementService.getUserInfo().subscribe(user => { + this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => { this.user = user; this.initFunders(queryParams); - }); + })); } else { 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 @@ -123,15 +123,15 @@ export class SearchStakeholdersComponent { * @param params */ private initFunders(params) { - this.subResults = this._stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL).subscribe( + this.subscriptions.push(this._stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL).subscribe( data => { if (!data) { return; } for (let i = 0; i < data.length; i++) { this.totalResults[i] = data[i]; - this.totalResults[i].isManager = this.isStakeholderManager(data); - this.totalResults[i].isMember = this.isStakeholderMember(data); + this.totalResults[i].isManager = this.isStakeholderManager(data[i]); + this.totalResults[i].isMember = this.isStakeholderMember(data[i]); } this._getResults(params); }, @@ -141,7 +141,7 @@ export class SearchStakeholdersComponent { this.disableForms = false; HelperFunctions.scroll(); } - ); + )); } diff --git a/src/app/search-stakeholders/search-stakeholders.module.ts b/src/app/search-stakeholders/search-stakeholders.module.ts index de3e150..b3da92a 100644 --- a/src/app/search-stakeholders/search-stakeholders.module.ts +++ b/src/app/search-stakeholders/search-stakeholders.module.ts @@ -2,7 +2,6 @@ import {NgModule} from "@angular/core"; import {CommonModule} from "@angular/common"; import {FormsModule} from "@angular/forms"; import {SearchStakeholdersComponent} from "./search-stakeholders.component"; -import {SearchPageModule} from "../openaireLibrary/searchPages/searchUtils/searchPage.module"; import {SearchFormModule} from "../openaireLibrary/searchPages/searchUtils/searchForm.module"; import {SearchStakeholdersRoutingModule} from "./search-stakeholders-routing.module"; import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; @@ -11,7 +10,7 @@ import {NewSearchPageModule} from "../openaireLibrary/searchPages/searchUtils/ne @NgModule({ imports: [ CommonModule, FormsModule, - SearchFormModule, SearchPageModule, + SearchFormModule, SearchStakeholdersRoutingModule, NewSearchPageModule ], declarations: [ diff --git a/src/app/utils/customization/customization.component.ts b/src/app/utils/customization/customization.component.ts deleted file mode 100644 index 2ed8168..0000000 --- a/src/app/utils/customization/customization.component.ts +++ /dev/null @@ -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: ` - - - ` -}) - -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); - } -} diff --git a/src/app/utils/customization/customization.module.ts b/src/app/utils/customization/customization.module.ts deleted file mode 100644 index a2785d6..0000000 --- a/src/app/utils/customization/customization.module.ts +++ /dev/null @@ -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 - ] - } - } -} diff --git a/src/app/utils/piwikHelper.ts b/src/app/utils/piwikHelper.ts deleted file mode 100644 index 390c493..0000000 --- a/src/app/utils/piwikHelper.ts +++ /dev/null @@ -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]; - } - -} diff --git a/src/app/utils/subscribe/invite/invite-routing.module.ts b/src/app/utils/subscribe/invite/invite-routing.module.ts deleted file mode 100644 index 09dba94..0000000 --- a/src/app/utils/subscribe/invite/invite-routing.module.ts +++ /dev/null @@ -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 { } diff --git a/src/app/utils/subscribe/invite/invite.component.html b/src/app/utils/subscribe/invite/invite.component.html deleted file mode 100644 index 94b27ec..0000000 --- a/src/app/utils/subscribe/invite/invite.component.html +++ /dev/null @@ -1,199 +0,0 @@ - - -
-
- -
- -
-
Invite users to subscribe
-
- -
- - - - -
- - - - - - - - - - - - -
From * : - - -
Please add your name. -
-
To * : - - -
- separate multiple emails with a comma -
-
Please add - valid email/s. -
-
Please add a recipient. -
-
-
- - - - - - - - - - - - - - - -
Message: - - - - - - - - - - -
-
- - {{body.signature}} - - {{body.fromMessage}}... - - - {{body.fromMessage}} - {{body.fromName}} - -
www.openaire.eu -
-
- - - - - - - - - - - -
-
* - Required fields -
-
-
- -
-
- -
- - Back - -
- -
-
- -
-
-
-
- -
-
- -
- - - - - -
Please add - valid email/s. -
-
Please add a recipient. -
- -
separate with commas
-
- - {{" "}} - - - - - - Customize - -
-
-
diff --git a/src/app/utils/subscribe/invite/invite.component.ts b/src/app/utils/subscribe/invite/invite.component.ts deleted file mode 100644 index e09c2dc..0000000 --- a/src/app/utils/subscribe/invite/invite.component.ts +++ /dev/null @@ -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(); - - // 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'"); - } -} diff --git a/src/app/utils/subscribe/invite/invite.module.ts b/src/app/utils/subscribe/invite/invite.module.ts deleted file mode 100644 index e0fcbda..0000000 --- a/src/app/utils/subscribe/invite/invite.module.ts +++ /dev/null @@ -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 { } diff --git a/src/app/utils/subscribe/subscribe.component.ts b/src/app/utils/subscribe/subscribe.component.ts deleted file mode 100644 index 1961f9e..0000000 --- a/src/app/utils/subscribe/subscribe.component.ts +++ /dev/null @@ -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: ` - - -
- -

Please login first to subscribe

-
- - -
- - - Members {{subscribers}} - - - - ` -}) - -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: 'An error occured. Please try again!', - 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: 'An error occured. Please try again!', - 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: 'An error occured. Please try again!', - 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: 'An error occured. Please try again!', - 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); - } -} diff --git a/src/app/utils/subscribe/subscribe.module.ts b/src/app/utils/subscribe/subscribe.module.ts deleted file mode 100644 index ea9d6e9..0000000 --- a/src/app/utils/subscribe/subscribe.module.ts +++ /dev/null @@ -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 - ] - } - } -} diff --git a/src/assets/Connect animations.gif b/src/assets/Connect animations.gif deleted file mode 100644 index d16d015..0000000 Binary files a/src/assets/Connect animations.gif and /dev/null differ diff --git a/src/assets/customizationOptions.json b/src/assets/customizationOptions.json deleted file mode 100644 index b65830c..0000000 --- a/src/assets/customizationOptions.json +++ /dev/null @@ -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 - } - } -} diff --git a/src/assets/env-properties.json b/src/assets/env-properties.json deleted file mode 100644 index 3fa8d31..0000000 --- a/src/assets/env-properties.json +++ /dev/null @@ -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/" -} diff --git a/src/assets/funders.json b/src/assets/funders.json deleted file mode 100644 index a0124a6..0000000 --- a/src/assets/funders.json +++ /dev/null @@ -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" - } - -] diff --git a/src/assets/funders2.json b/src/assets/funders2.json deleted file mode 100644 index 6a857df..0000000 --- a/src/assets/funders2.json +++ /dev/null @@ -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" - } -] diff --git a/src/assets/manager.svg b/src/assets/manager.svg deleted file mode 100644 index ac7fb12..0000000 --- a/src/assets/manager.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/sitemap.xml b/src/assets/sitemap.xml deleted file mode 100644 index 35438b8..0000000 --- a/src/assets/sitemap.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - - weekly - 0.5 - - - ![CDATA[https://demo.openaire.eu/participate/deposit-publications] - weekly - 0.5 - - - ![CDATA[https://demo.openaire.eu/participate/deposit-datasets] - weekly - 0.5 - - diff --git a/src/assets/stakeholders.json b/src/assets/stakeholders.json deleted file mode 100644 index b318543..0000000 --- a/src/assets/stakeholders.json +++ /dev/null @@ -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": [] - } - ] - } - ] -} diff --git a/src/environments/environment.beta.ts b/src/environments/environment.beta.ts index e8b5da4..5c9bca7 100644 --- a/src/environments/environment.beta.ts +++ b/src/environments/environment.beta.ts @@ -49,7 +49,7 @@ export let properties: EnvProperties = { cookieDomain: ".openaire.eu", - feedbackmail: "openaire.test@gmail.com", + feedbackmail: "feedback@openaire.eu", cacheUrl: "https://demo.openaire.eu/cache/get?url=", @@ -105,7 +105,7 @@ export let properties: EnvProperties = { reCaptchaSiteKey: "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P", - admins: ["argirok@di.uoa.gr","kiatrop@di.uoa.gr"], + admins: ["feedback@openaire.eu"], lastIndexUpdate: "2019-08-07", indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/", altMetricsAPIURL: "https://api.altmetric.com/v1/doi/", diff --git a/src/robots.prod.txt b/src/robots.prod.txt index c6742d8..5e546c8 100644 --- a/src/robots.prod.txt +++ b/src/robots.prod.txt @@ -1,2 +1,2 @@ User-Agent: * -Disallow: / +Crawl-delay: 30