[Monitor | Trunk]: Add interceptors
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@59860 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
54b65ea4e9
commit
95ff2e4639
|
@ -2,7 +2,7 @@ import {NgModule} from '@angular/core';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http";
|
import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http";
|
||||||
import {BrowserModule} from '@angular/platform-browser';
|
import {BrowserModule, BrowserTransferStateModule} from '@angular/platform-browser';
|
||||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
import {OpenaireErrorPageComponent} from './error/errorPage.component';
|
import {OpenaireErrorPageComponent} from './error/errorPage.component';
|
||||||
|
@ -16,6 +16,8 @@ import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigation
|
||||||
|
|
||||||
import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
||||||
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
|
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
|
||||||
|
import {HttpInterceptorService} from "./openaireLibrary/http-interceptor.service";
|
||||||
|
import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
||||||
|
@ -29,12 +31,23 @@ import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-int
|
||||||
NavigationBarModule,
|
NavigationBarModule,
|
||||||
BottomModule,
|
BottomModule,
|
||||||
CookieLawModule,
|
CookieLawModule,
|
||||||
|
BrowserTransferStateModule,
|
||||||
BrowserModule.withServerTransition({appId: 'my-app'}),
|
BrowserModule.withServerTransition({appId: 'my-app'}),
|
||||||
AppRoutingModule
|
AppRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [ AppComponent, OpenaireErrorPageComponent],
|
declarations: [ AppComponent, OpenaireErrorPageComponent],
|
||||||
exports: [ AppComponent ],
|
exports: [ AppComponent ],
|
||||||
providers:[EnvironmentSpecificResolver,
|
providers:[EnvironmentSpecificResolver,
|
||||||
|
{
|
||||||
|
provide: HTTP_INTERCEPTORS,
|
||||||
|
useClass: HttpInterceptorService,
|
||||||
|
multi: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provide: HTTP_INTERCEPTORS,
|
||||||
|
useClass: ErrorInterceptorService,
|
||||||
|
multi: true
|
||||||
|
},
|
||||||
[{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
|
[{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
|
||||||
[{ provide: DEFAULT_TIMEOUT, useValue: 30000 }]
|
[{ provide: DEFAULT_TIMEOUT, useValue: 30000 }]
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue