conf moved to environment

This commit is contained in:
Diamantis Tziotzios 2018-11-27 16:03:57 +02:00
parent c7115f752a
commit 1d7ff00c5d
2 changed files with 46 additions and 47 deletions

View File

@ -1,39 +1,39 @@
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';
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 { SharedModule } from './shared/shared.module';
import { LOCALE_ID, NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { MAT_DATE_LOCALE } from '@angular/material';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HomepageComponent } from './homepage/homepage.component';
import { PageNotFoundComponent } from './not-found.component';
import { AppComponent } from './app.component';
import { NgModule, LOCALE_ID } from '@angular/core';
import { WelcomepageComponent } from './welcomepage/welcomepage.component';
import { AuthService } from './services/auth/auth.service';
import { BreadCrumbResolverService } from './services/breadcrumb/breadcrumb-resolver.service';
import { DashboardService } from './services/dashboard/dashboard.service';
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 { HelpContentComponent, AsideHelpContentComponent } from './shared/help-content/help-content.component';
import { AuthGuard } from './shared/guards/auth.guard';
import { UrlUtilities } from './utilities/UrlUtilities';
import { BreadCrumbResolverService } from './services/breadcrumb/breadcrumb-resolver.service';
import { MAT_DATE_LOCALE } from '@angular/material';
import { AsideHelpContentComponent, HelpContentComponent } from './shared/help-content/help-content.component';
import { MaterialModule } from './shared/material/material.module';
import { SharedModule } from './shared/shared.module';
import { LoginModule } from './user-management/login.module';
import { B2AccessLoginComponent } from './user-management/login/b2access/b2access-login.component';
import { LoginOptions } from './user-management/utilties/LoginOptions';
import { RecentActivityComponent } from './users/activity/recent-activity.component';
import { BaseHttpService } from './utilities/cite-http-service-module/base-http.service';
import { BaseHttpModule } from './utilities/cite-http-service-module/cite-http.module';
import { CultureService } from './utilities/culture/culture-service';
import { UrlUtilities } from './utilities/UrlUtilities';
import { WelcomepageComponent } from './welcomepage/welcomepage.component';
@NgModule({
@ -77,22 +77,21 @@ import { CultureService } from './utilities/culture/culture-service';
LoginOptions.twitterOauth,
LoginOptions.b2Access
],
facebookConfiguration: { clientId: '110586756143149' },
googleConfiguration: { clientId: '524432312250-sc9qsmtmbvlv05r44onl6l93ia3k9deo.apps.googleusercontent.com' },
facebookConfiguration: { clientId: environment.loginProviders.facebookConfiguration.clientId },
googleConfiguration: { clientId: environment.loginProviders.googleConfiguration.clientId },
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'
clientId: environment.loginProviders.linkedInConfiguration.clientId,
oauthUrl: environment.loginProviders.linkedInConfiguration.oauthUrl,
redirectUri: environment.loginProviders.linkedInConfiguration.redirectUri,
},
twitterConfiguration: {
clientId: environment.loginProviders.twitterConfiguration.clientId,
oauthUrl: environment.loginProviders.twitterConfiguration.oauthUrl
},
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://opendmp.eu/api/oauth/authorized/b2access',
accessTokenUri: 'https://b2access-integration.fz-juelich.de:443/oauth2/token'
clientId: environment.loginProviders.b2accessConfiguration.clientId,
oauthUrl: environment.loginProviders.b2accessConfiguration.oauthUrl,
redirectUri: environment.loginProviders.b2accessConfiguration.redirectUri
}
}),

View File

@ -1,17 +1,17 @@
import 'rxjs/add/operator/map';
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { HostConfiguration } from './../../app.constants';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
import { Observable } from 'rxjs';
import { DataTableRequest } from '../../models/data-table/DataTableRequest';
import { DataTableData } from '../../models/data-table/DataTableData';
import { DataManagementPlanModel } from '../../models/data-managemnt-plans/DataManagementPlanModel';
import { DataManagementPlanListingModel } from '../../models/data-managemnt-plans/DataManagementPlanListingModel';
import 'rxjs/add/operator/map';
import { environment } from '../../../environments/environment';
import { DataManagementPlanCriteria } from '../../models/criteria/data-management-plan/DataManagementPlanCriteria';
import { DatasetProfileCriteria } from '../../models/criteria/dataset/DatasetProfileCriteria';
import { DatasetProfileCriteria } from '../../models/criteria/dataset-profile/DatasetProfileCriteria';
import { RequestItem } from '../../models/criteria/RequestItem';
import { DataManagementPlanListingModel } from '../../models/data-managemnt-plans/DataManagementPlanListingModel';
import { DataManagementPlanModel } from '../../models/data-managemnt-plans/DataManagementPlanModel';
import { DataTableData } from '../../models/data-table/DataTableData';
import { DataTableRequest } from '../../models/data-table/DataTableRequest';
import { DatasetProfileModel } from '../../models/datasets/DatasetProfileModel';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable()
@ -22,7 +22,7 @@ export class DataManagementPlanService {
constructor(private http: BaseHttpService, private httpClient: HttpClient) {
this.actionUrl = HostConfiguration.Server + 'dmps/';
this.actionUrl = environment.Server + 'dmps/';
this.headers = new HttpHeaders();
this.headers = this.headers.set('Content-Type', 'application/json');