126 lines
5.1 KiB
TypeScript
126 lines
5.1 KiB
TypeScript
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 { DatasetService } from './services/dataset/dataset.service';
|
|
import { AuthService } from './services/auth/auth.service';
|
|
import { PaginationService } from './services/pagination.service';
|
|
import { VisibilityRulesService } from './utilities/visibility-rules/visibility-rules.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';
|
|
import { HostConfiguration } from './app.constants';
|
|
import { BaseHttpModule } from './utilities/cite-http-service-module/cite-http.module';
|
|
|
|
import { LoginOptions } from './user-management/utilties/LoginOptions';
|
|
import { LoginModule } from './user-management/login.module';
|
|
import { ProjectsModule } from './projects/projects.module';
|
|
|
|
import { DataManagementPlanModule } from './dmps/dmps.module';
|
|
import { DynamicFormModule } from './form/dynamic-form.module';
|
|
import { DatasetModule } from './datasets/dataset.module';
|
|
import { SharedModule } from './shared/shared.module';
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
import { FigurecardComponent } from './shared/components/figurecard/figurecard.component';
|
|
import { HomepageComponent } from './homepage/homepage.component';
|
|
import { PageNotFoundComponent } from './not-found.component';
|
|
import { AppComponent } from './app.component';
|
|
import { NgModule } from "@angular/core";
|
|
import { DatasetProfileModule } from './dataset-profile-form/dataset-profile.module';
|
|
import { WelcomepageComponent } from './welcomepage/welcomepage.component';
|
|
import { HelpContentService } from './services/help-content/help-content.service';
|
|
import { B2AccessLoginComponent } from './user-management/login/b2access/b2access-login.component';
|
|
import { RecentActivityComponent } from './users/activity/recent-activity.component';
|
|
import { LanguageResolverService } from './services/language-resolver/language-resolver.service';
|
|
import { LanguageService } from './services/language/language.service';
|
|
import { UsersModule } from './users/users.module';
|
|
import { HelpContentComponent } from './shared/help-content/help-content.component';
|
|
import { AuthGuard } from './shared/guards/auth.guard';
|
|
import { UrlUtilities } from './utilities/UrlUtilities';
|
|
|
|
@NgModule({
|
|
declarations: [
|
|
AppComponent,
|
|
PageNotFoundComponent,
|
|
HomepageComponent,
|
|
RecentActivityComponent,
|
|
WelcomepageComponent,
|
|
HelpContentComponent,
|
|
B2AccessLoginComponent
|
|
],
|
|
imports: [
|
|
BrowserModule,
|
|
ReactiveFormsModule,
|
|
|
|
FormsModule,
|
|
HttpModule,
|
|
HttpClientModule,
|
|
BaseHttpModule.forRoot(),
|
|
|
|
CommonModule,
|
|
AppRoutingModule,
|
|
BrowserAnimationsModule,
|
|
TranslateModule.forRoot({
|
|
loader: {
|
|
provide: TranslateLoader,
|
|
useFactory: HttpLoaderFactory,
|
|
deps: [HttpClient]
|
|
}
|
|
}),
|
|
BrowserAnimationsModule,
|
|
MaterialModule,
|
|
SharedModule,
|
|
|
|
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",
|
|
redirectUri: "http://dl043.madgik.di.uoa.gr/api/oauth/authorized/b2access",
|
|
accessTokenUri: "https://b2access-integration.fz-juelich.de:443/oauth2/token"
|
|
}
|
|
}),
|
|
|
|
],
|
|
providers: [
|
|
AuthGuard,
|
|
AuthService,
|
|
BaseHttpService,
|
|
UrlUtilities,
|
|
DashboardService,
|
|
HelpContentService,
|
|
LanguageService,
|
|
LanguageResolverService
|
|
],
|
|
bootstrap: [AppComponent]
|
|
})
|
|
export class AppModule {
|
|
constructor() {
|
|
}
|
|
}
|
|
|
|
export function HttpLoaderFactory(httpClient: HttpClient) {
|
|
return new TranslateHttpLoader(httpClient, 'assets/lang/', '.json');
|
|
}
|