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 { CommonModule } from '@angular/common';
import { HttpClient, HttpClientModule } from '@angular/common/http'; import { HttpClient, HttpClientModule } from '@angular/common/http';
import { HttpModule } from '@angular/http'; import { LOCALE_ID, NgModule } from '@angular/core';
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 { FormsModule, ReactiveFormsModule } from '@angular/forms'; 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 { 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 { HomepageComponent } from './homepage/homepage.component';
import { PageNotFoundComponent } from './not-found.component'; import { PageNotFoundComponent } from './not-found.component';
import { AppComponent } from './app.component'; import { AuthService } from './services/auth/auth.service';
import { NgModule, LOCALE_ID } from '@angular/core'; import { BreadCrumbResolverService } from './services/breadcrumb/breadcrumb-resolver.service';
import { WelcomepageComponent } from './welcomepage/welcomepage.component'; import { DashboardService } from './services/dashboard/dashboard.service';
import { HelpContentService } from './services/help-content/help-content.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 { LanguageResolverService } from './services/language-resolver/language-resolver.service';
import { LanguageService } from './services/language/language.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 { AuthGuard } from './shared/guards/auth.guard';
import { UrlUtilities } from './utilities/UrlUtilities'; import { AsideHelpContentComponent, HelpContentComponent } from './shared/help-content/help-content.component';
import { BreadCrumbResolverService } from './services/breadcrumb/breadcrumb-resolver.service'; import { MaterialModule } from './shared/material/material.module';
import { MAT_DATE_LOCALE } from '@angular/material'; 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 { CultureService } from './utilities/culture/culture-service';
import { UrlUtilities } from './utilities/UrlUtilities';
import { WelcomepageComponent } from './welcomepage/welcomepage.component';
@NgModule({ @NgModule({
@ -77,22 +77,21 @@ import { CultureService } from './utilities/culture/culture-service';
LoginOptions.twitterOauth, LoginOptions.twitterOauth,
LoginOptions.b2Access LoginOptions.b2Access
], ],
facebookConfiguration: { clientId: '110586756143149' }, facebookConfiguration: { clientId: environment.loginProviders.facebookConfiguration.clientId },
googleConfiguration: { clientId: '524432312250-sc9qsmtmbvlv05r44onl6l93ia3k9deo.apps.googleusercontent.com' }, googleConfiguration: { clientId: environment.loginProviders.googleConfiguration.clientId },
linkedInConfiguration: { linkedInConfiguration: {
clientId: '86bl8vfk77clh9', clientId: environment.loginProviders.linkedInConfiguration.clientId,
oauthUrl: 'https://www.linkedin.com/oauth/v2/authorization', oauthUrl: environment.loginProviders.linkedInConfiguration.oauthUrl,
redirectUri: HostConfiguration.App + 'login/linkedin', redirectUri: environment.loginProviders.linkedInConfiguration.redirectUri,
accessTokenUri: 'https://www.linkedin.com/oauth/v2/accessToken', },
clientSecret: '2OCO9e3wKylW05Tt' twitterConfiguration: {
clientId: environment.loginProviders.twitterConfiguration.clientId,
oauthUrl: environment.loginProviders.twitterConfiguration.oauthUrl
}, },
twitterConfiguration: { clientId: 'HiR4hQH9HNubKC5iKQy0l4mAZ', oauthUrl: 'https://api.twitter.com/oauth/authenticate' },
b2accessConfiguration: { b2accessConfiguration: {
clientId: 'eudatdmptool', clientId: environment.loginProviders.b2accessConfiguration.clientId,
clientSecret: 'A3b*1*92', oauthUrl: environment.loginProviders.b2accessConfiguration.oauthUrl,
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz', redirectUri: environment.loginProviders.b2accessConfiguration.redirectUri
redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access',
accessTokenUri: 'https://b2access-integration.fz-juelich.de:443/oauth2/token'
} }
}), }),

View File

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