2018-01-30 10:35:26 +01:00
|
|
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
|
|
import { BaseHttpService } from './utilities/cite-http-service-module/base-http.service';
|
|
|
|
import { DashboardService } from './services/dashboard/dashboard.service';
|
|
|
|
import { AuthService } from './services/auth/auth.service';
|
|
|
|
import { MaterialModule } from './shared/material/material.module';
|
|
|
|
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
|
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
|
|
import { AppRoutingModule } from './app-routing.module';
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
|
|
import { HttpModule } from '@angular/http';
|
2018-01-10 17:05:23 +01:00
|
|
|
import { HostConfiguration } from './app.constants';
|
2018-05-28 11:50:42 +02:00
|
|
|
import { BaseHttpModule } from './utilities/cite-http-service-module/cite-http.module';
|
|
|
|
|
2018-01-10 17:05:23 +01:00
|
|
|
import { LoginOptions } from './user-management/utilties/LoginOptions';
|
|
|
|
import { LoginModule } from './user-management/login.module';
|
2018-05-28 11:50:42 +02:00
|
|
|
|
2018-01-30 10:35:26 +01:00
|
|
|
import { SharedModule } from './shared/shared.module';
|
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
|
import { BrowserModule } from '@angular/platform-browser';
|
2017-11-27 14:40:16 +01:00
|
|
|
import { HomepageComponent } from './homepage/homepage.component';
|
2018-01-30 10:35:26 +01:00
|
|
|
import { PageNotFoundComponent } from './not-found.component';
|
|
|
|
import { AppComponent } from './app.component';
|
2018-08-30 13:09:36 +02:00
|
|
|
import { NgModule, LOCALE_ID } from '@angular/core';
|
2018-05-14 08:44:35 +02:00
|
|
|
import { WelcomepageComponent } from './welcomepage/welcomepage.component';
|
2018-02-16 08:45:18 +01:00
|
|
|
import { HelpContentService } from './services/help-content/help-content.service';
|
2018-02-23 11:36:51 +01:00
|
|
|
import { B2AccessLoginComponent } from './user-management/login/b2access/b2access-login.component';
|
2018-05-14 08:44:35 +02:00
|
|
|
import { RecentActivityComponent } from './users/activity/recent-activity.component';
|
2018-03-28 15:24:47 +02:00
|
|
|
import { LanguageResolverService } from './services/language-resolver/language-resolver.service';
|
|
|
|
import { LanguageService } from './services/language/language.service';
|
2018-07-11 15:47:36 +02:00
|
|
|
import { HelpContentComponent, AsideHelpContentComponent } from './shared/help-content/help-content.component';
|
2018-05-28 11:50:42 +02:00
|
|
|
import { AuthGuard } from './shared/guards/auth.guard';
|
2018-06-05 10:18:01 +02:00
|
|
|
import { UrlUtilities } from './utilities/UrlUtilities';
|
2018-06-27 12:29:21 +02:00
|
|
|
import { BreadCrumbResolverService } from './services/breadcrumb/breadcrumb-resolver.service';
|
2018-08-30 13:09:36 +02:00
|
|
|
import { MAT_DATE_LOCALE } from '@angular/material';
|
|
|
|
import { CultureService } from './utilities/culture/culture-service';
|
2017-12-14 17:43:57 +01:00
|
|
|
|
2018-10-02 16:33:58 +02:00
|
|
|
|
2017-09-14 12:37:36 +02:00
|
|
|
@NgModule({
|
2018-07-23 17:56:09 +02:00
|
|
|
declarations: [
|
|
|
|
AppComponent,
|
|
|
|
PageNotFoundComponent,
|
|
|
|
HomepageComponent,
|
|
|
|
RecentActivityComponent,
|
|
|
|
WelcomepageComponent,
|
|
|
|
HelpContentComponent,
|
|
|
|
AsideHelpContentComponent,
|
|
|
|
B2AccessLoginComponent,
|
|
|
|
],
|
|
|
|
imports: [
|
|
|
|
BrowserModule,
|
|
|
|
ReactiveFormsModule,
|
|
|
|
FormsModule,
|
|
|
|
HttpModule,
|
|
|
|
HttpClientModule,
|
|
|
|
BaseHttpModule.forRoot(),
|
2018-05-28 11:50:42 +02:00
|
|
|
|
2018-07-23 17:56:09 +02:00
|
|
|
CommonModule,
|
|
|
|
AppRoutingModule,
|
|
|
|
BrowserAnimationsModule,
|
|
|
|
TranslateModule.forRoot({
|
|
|
|
loader: {
|
|
|
|
provide: TranslateLoader,
|
|
|
|
useFactory: HttpLoaderFactory,
|
|
|
|
deps: [HttpClient]
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
BrowserAnimationsModule,
|
|
|
|
MaterialModule,
|
|
|
|
SharedModule,
|
2018-05-28 11:50:42 +02:00
|
|
|
|
2018-07-23 17:56:09 +02:00
|
|
|
LoginModule.forRoot({
|
|
|
|
loginProviders: [
|
|
|
|
LoginOptions.facebookOauth,
|
|
|
|
LoginOptions.googleOauth,
|
|
|
|
LoginOptions.linkedInOauth,
|
|
|
|
LoginOptions.twitterOauth,
|
|
|
|
LoginOptions.b2Access
|
|
|
|
],
|
|
|
|
facebookConfiguration: { clientId: '110586756143149' },
|
|
|
|
googleConfiguration: { clientId: '524432312250-sc9qsmtmbvlv05r44onl6l93ia3k9deo.apps.googleusercontent.com' },
|
|
|
|
linkedInConfiguration: {
|
|
|
|
clientId: '86bl8vfk77clh9',
|
|
|
|
oauthUrl: 'https://www.linkedin.com/oauth/v2/authorization',
|
|
|
|
redirectUri: HostConfiguration.App + 'login/linkedin',
|
|
|
|
accessTokenUri: 'https://www.linkedin.com/oauth/v2/accessToken',
|
|
|
|
clientSecret: '2OCO9e3wKylW05Tt'
|
|
|
|
},
|
|
|
|
twitterConfiguration: { clientId: 'HiR4hQH9HNubKC5iKQy0l4mAZ', oauthUrl: 'https://api.twitter.com/oauth/authenticate' },
|
|
|
|
b2accessConfiguration: {
|
|
|
|
clientId: 'eudatdmptool',
|
|
|
|
clientSecret: 'A3b*1*92',
|
|
|
|
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz',
|
2018-09-18 14:41:24 +02:00
|
|
|
redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access',
|
2018-07-23 17:56:09 +02:00
|
|
|
accessTokenUri: 'https://b2access-integration.fz-juelich.de:443/oauth2/token'
|
|
|
|
}
|
|
|
|
}),
|
2018-05-28 11:50:42 +02:00
|
|
|
|
2018-07-23 17:56:09 +02:00
|
|
|
],
|
|
|
|
providers: [
|
|
|
|
AuthGuard,
|
|
|
|
AuthService,
|
|
|
|
BaseHttpService,
|
|
|
|
UrlUtilities,
|
|
|
|
DashboardService,
|
|
|
|
HelpContentService,
|
|
|
|
LanguageService,
|
|
|
|
LanguageResolverService,
|
2018-10-05 17:00:54 +02:00
|
|
|
BreadCrumbResolverService,
|
|
|
|
CultureService,
|
|
|
|
{
|
|
|
|
provide: MAT_DATE_LOCALE,
|
|
|
|
deps: [CultureService],
|
|
|
|
useFactory: (cultureService) => cultureService.getCurrentCulture()
|
|
|
|
},
|
|
|
|
{
|
|
|
|
provide: LOCALE_ID,
|
|
|
|
deps: [CultureService],
|
|
|
|
useFactory: (cultureService) => cultureService.getCurrentCulture()
|
|
|
|
},
|
2018-07-23 17:56:09 +02:00
|
|
|
],
|
|
|
|
bootstrap: [AppComponent]
|
2017-09-14 12:37:36 +02:00
|
|
|
})
|
|
|
|
export class AppModule {
|
2018-07-23 17:56:09 +02:00
|
|
|
constructor() {
|
|
|
|
}
|
2017-09-14 12:37:36 +02:00
|
|
|
}
|
2017-12-14 11:41:26 +01:00
|
|
|
|
|
|
|
export function HttpLoaderFactory(httpClient: HttpClient) {
|
2018-07-23 17:56:09 +02:00
|
|
|
return new TranslateHttpLoader(httpClient, 'assets/lang/', '.json');
|
2017-12-14 11:41:26 +01:00
|
|
|
}
|