diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 15b0b73..25520aa 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -1,6 +1,7 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {OpenaireErrorPageComponent} from './error/errorPage.component';
+import {isDevelopmentGuard} from './openaireLibrary/error/isDevelopmentGuard.guard';
const routes: Routes = [
{path: '', loadChildren: () => import('./home/home.module').then(m => m.HomeModule)},
@@ -29,6 +30,11 @@ const routes: Routes = [
path: 'get-started',
loadChildren: () => import('./get-started/get-started.module').then(m => m.GetStartedModule)
},
+ {
+ path: 'faq',
+ loadChildren: () => import('./faq/faq.module').then(m => m.FaqModule),
+ canLoad: [isDevelopmentGuard]
+ },
{
path: 'my-dashboards',
loadChildren: () => import('./my-stakeholders/my-stakeholders.module').then(m => m.MyStakeholdersModule)},
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index b66abc1..c22d5a0 100755
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -19,6 +19,7 @@ import {HttpInterceptorService} from "./openaireLibrary/http-interceptor.service
import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service";
import {SharedModule} from "./openaireLibrary/shared/shared.module";
import {AlertModalModule} from "./openaireLibrary/utils/modal/alertModal.module";
+import {isDevelopmentGuard} from './openaireLibrary/error/isDevelopmentGuard.guard';
@NgModule({
@@ -42,6 +43,7 @@ import {AlertModalModule} from "./openaireLibrary/utils/modal/alertModal.module"
declarations: [AppComponent, OpenaireErrorPageComponent],
exports: [AppComponent],
providers: [
+ isDevelopmentGuard,
{
provide: HTTP_INTERCEPTORS,
useClass: HttpInterceptorService,
diff --git a/src/app/faq/faq-routing.module.ts b/src/app/faq/faq-routing.module.ts
new file mode 100644
index 0000000..6ad91b6
--- /dev/null
+++ b/src/app/faq/faq-routing.module.ts
@@ -0,0 +1,14 @@
+import {NgModule} from '@angular/core';
+import {RouterModule} from '@angular/router';
+
+import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
+import {FaqComponent} from "./faq.component";
+
+@NgModule({
+ imports: [
+ RouterModule.forChild([
+ { path: '', component: FaqComponent, canDeactivate: [PreviousRouteRecorder] }
+ ])
+ ]
+})
+export class FaqRoutingModule { }
diff --git a/src/app/faq/faq.component.html b/src/app/faq/faq.component.html
new file mode 100644
index 0000000..33867bc
--- /dev/null
+++ b/src/app/faq/faq.component.html
@@ -0,0 +1,8 @@
+
+
+
Frequently asked questions.
+
\ No newline at end of file
diff --git a/src/app/faq/faq.component.ts b/src/app/faq/faq.component.ts
new file mode 100644
index 0000000..da77da3
--- /dev/null
+++ b/src/app/faq/faq.component.ts
@@ -0,0 +1,85 @@
+import {Component} from '@angular/core';
+import {ActivatedRoute, Router} from '@angular/router';
+import {Meta, Title} from '@angular/platform-browser';
+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";
+import {Breadcrumb} from '../openaireLibrary/utils/breadcrumbs/breadcrumbs.component';
+
+@Component({
+ selector: 'faq',
+ templateUrl: 'faq.component.html'
+})
+export class FaqComponent {
+ public pageContents = null;
+ public divContents = null;
+
+ public url: string = null;
+ public pageTitle: string = "OpenAIRE - Monitor | FAQ";
+ public description: string = "OpenAIRE - Monitor | FAQ";
+ public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'FAQ'}];
+ public properties: EnvProperties = properties;
+ subscriptions = [];
+
+ constructor(
+ private route: ActivatedRoute,
+ private _router: Router,
+ private _meta: Meta,
+ private _title: Title,
+ private seoService: SEOService,
+ private _piwikService: PiwikService,
+ private helper: HelperService) {
+ }
+
+ public ngOnInit() {
+ 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(this.description);
+ //this.getDivContents();
+ //this.getPageContents();
+ }
+
+ private getPageContents() {
+ this.subscriptions.push(this.helper.getPageHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => {
+ this.pageContents = contents;
+ }));
+ }
+
+ private getDivContents() {
+ this.subscriptions.push(this.helper.getDivHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => {
+ this.divContents = contents;
+ }));
+ }
+
+ ngOnDestroy() {
+ this.subscriptions.forEach(subscription => {
+ if (subscription instanceof Subscriber) {
+ subscription.unsubscribe();
+ }
+ });
+ }
+
+
+ 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/faq/faq.module.ts b/src/app/faq/faq.module.ts
new file mode 100644
index 0000000..2debc5b
--- /dev/null
+++ b/src/app/faq/faq.module.ts
@@ -0,0 +1,30 @@
+import {NgModule} from '@angular/core';
+import {CommonModule} from '@angular/common';
+import {RouterModule} from '@angular/router';
+import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
+import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
+
+import {FaqComponent} from "./faq.component";
+import {FaqRoutingModule} from "./faq-routing.module";
+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 {BreadcrumbsModule} from '../openaireLibrary/utils/breadcrumbs/breadcrumbs.module';
+import {IconsModule} from "../openaireLibrary/utils/icons/icons.module";
+
+@NgModule({
+ imports: [
+ CommonModule, RouterModule, FaqRoutingModule, HelperModule,
+ Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule, IconsModule
+ ],
+ declarations: [
+ FaqComponent
+ ],
+ exports: [
+ FaqComponent
+ ],
+ providers:[
+ PreviousRouteRecorder, PiwikService
+ ]
+})
+export class FaqModule { }
diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary
index 911614f..3b46fc7 160000
--- a/src/app/openaireLibrary
+++ b/src/app/openaireLibrary
@@ -1 +1 @@
-Subproject commit 911614fb947ab20b7958ba461ca4f7b3ec1ed023
+Subproject commit 3b46fc74c15e26bc1feb3ad71ba7473b9a9aaceb
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 04ea5d6..f9dfe92 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -45,8 +45,8 @@ export let properties: EnvProperties = {
cookieDomain: ".di.uoa.gr",
feedbackmail: "openaire.test@gmail.com",
cacheUrl: "http://scoobydoo.di.uoa.gr:3000/get?url=",
- monitorServiceAPIURL: "http://duffy.di.uoa.gr:8080/uoa-monitor-service",
- adminToolsAPIURL: "http://duffy.di.uoa.gr:8080/uoa-monitor-service/",
+ monitorServiceAPIURL: "http://duffy.di.uoa.gr:19380/uoa-monitor-service",
+ adminToolsAPIURL: "http://duffy.di.uoa.gr:19380/uoa-monitor-service/",
adminToolsPortalType: "monitor",
adminToolsCommunity: "monitor",
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/search/",