conf refactor

This commit is contained in:
Diamantis Tziotzios 2018-11-27 16:13:56 +02:00
parent 68dddddf45
commit 05a6ddd90f
40 changed files with 539 additions and 274 deletions

View File

@ -24,7 +24,7 @@ import java.util.Properties;
*/ */
@Configuration @Configuration
@EnableTransactionManagement @EnableTransactionManagement
@Profile("production") @Profile({ "production", "staging" })
@ComponentScan(basePackages = {"eu.eudat.data.entities"}) @ComponentScan(basePackages = {"eu.eudat.data.entities"})
public class ProductionDatabaseConfiguration { public class ProductionDatabaseConfiguration {

View File

@ -48,7 +48,7 @@ public class DynamicProjectConfigurationDevelImpl implements DynamicProjectConfi
JAXBContext jaxbContext = JAXBContext.newInstance(Configuration.class); JAXBContext jaxbContext = JAXBContext.newInstance(Configuration.class);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
is = new URL("file:///C:/Users/ikalyvas/Documents/OpenAIRE-EUDAT-DMP-service-pilot/dmp-backend/web/src/main/resources/ProjectConfiguration.xml").openStream(); is = new URL("file:///"+current + "/web/src/main/resources/ProjectConfiguration.xml").openStream();
this.configuration = (Configuration) jaxbUnmarshaller.unmarshal(is); this.configuration = (Configuration) jaxbUnmarshaller.unmarshal(is);
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();

View File

@ -22,7 +22,7 @@ import java.util.List;
* Created by ikalyvas on 3/23/2018. * Created by ikalyvas on 3/23/2018.
*/ */
@Service("dynamicProjectConfiguration") @Service("dynamicProjectConfiguration")
@Profile("production") @Profile({ "production", "staging" })
public class DynamicProjectConfigurationProdImpl implements DynamicProjectConfiguration { public class DynamicProjectConfigurationProdImpl implements DynamicProjectConfiguration {
private Configuration configuration; private Configuration configuration;

View File

@ -31,7 +31,7 @@ public class DevelConfigLoader implements ConfigLoader {
JAXBContext jaxbContext = JAXBContext.newInstance(ExternalUrls.class); JAXBContext jaxbContext = JAXBContext.newInstance(ExternalUrls.class);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
is = new URL("file:///C:/Users/ikalyvas/Documents/OpenAIRE-EUDAT-DMP-service-pilot/dmp-backend/web/src/main/resources/ExternalUrls.xml").openStream(); is = new URL("file:///"+current+"/web/src/main/resources/ExternalUrls.xml").openStream();
externalUrls = (ExternalUrls) jaxbUnmarshaller.unmarshal(is); externalUrls = (ExternalUrls) jaxbUnmarshaller.unmarshal(is);
} catch (Exception ex) { } catch (Exception ex) {

View File

@ -17,7 +17,7 @@ import java.nio.file.Paths;
* Created by ikalyvas on 2/9/2018. * Created by ikalyvas on 2/9/2018.
*/ */
@Service("configLoader") @Service("configLoader")
@Profile("production") @Profile({ "production", "staging" })
public class ProductionConfigLoader implements ConfigLoader { public class ProductionConfigLoader implements ConfigLoader {
private ExternalUrls externalUrls; private ExternalUrls externalUrls;

View File

@ -1,9 +1,9 @@
dmp.domain = http://localhost:4200 dmp.domain = http://localhost:4200
####################PERSISTENCE OVERRIDES CONFIGURATIONS########## ####################PERSISTENCE OVERRIDES CONFIGURATIONS##########
database.url=jdbc:postgresql://dbserver02.local.cite.gr:5432/dmptool database.url=
database.username=dmtadm database.username=
database.password=t00L4DM@18! database.password=
spring.datasource.maxIdle: 2 spring.datasource.maxIdle: 2
spring.datasource.max-active: 4 spring.datasource.max-active: 4
spring.datasource.max-wait: 10000 spring.datasource.max-wait: 10000

View File

@ -1,9 +1,9 @@
dmp.domain = http://devel.opendmp.eu dmp.domain = https://opendmp.eu
####################PERSISTENCE OVERRIDES CONFIGURATIONS########## ####################PERSISTENCE OVERRIDES CONFIGURATIONS##########
database.url=jdbc:postgresql://develdb1.madgik.di.uoa.gr:5432/dmptool database.url=
database.username=dmptool database.username=
database.password=dmpt00lu$r database.password=
####################ELASTIIC SEARCH TAGS OVERRIDES CONFIGURATIONS########## ####################ELASTIIC SEARCH TAGS OVERRIDES CONFIGURATIONS##########
elasticsearch.host = tags-elastic-search elasticsearch.host = tags-elastic-search
@ -18,4 +18,40 @@ pdf.converter.url=http://docsbox-web/
####################CONFIGURATION FILES OVERRIDES CONFIGURATIONS########## ####################CONFIGURATION FILES OVERRIDES CONFIGURATIONS##########
configuration.externalUrls=/tmp/ExternalUrls.xml configuration.externalUrls=/tmp/ExternalUrls.xml
configuration.dynamicProjectUrl=/tmp/ProjectConfiguration.xml configuration.dynamicProjectUrl=/tmp/ProjectConfiguration.xml
configuration.h2020template=/tmp/h2020.docx configuration.h2020template=/tmp/h2020.docx
####################SPRING MAIL CONFIGURATIONS#################
spring.mail.default-encoding=UTF-8
spring.mail.host=
spring.mail.username=
spring.mail.password=
spring.mail.port=25
spring.mail.protocol=smtp
spring.mail.test-connection=false
spring.mail.properties.mail.smtp.auth=false
spring.mail.properties.mail.smtp.starttls.enable=true
#############FACEBOOK LOGIN CONFIGURATIONS#########
facebook.login.clientId=
facebook.login.clientSecret=
facebook.login.namespace=
#############GOOGLE LOGIN CONFIGURATIONS#########
google.login.clientId=
#############LINKEDIN LOGIN CONFIGURATIONS#########
linkedin.login.clientId=
linkedin.login.clientSecret=
linkedin.login.redirect_uri=https://opendmp.eu/login/linkedin
#############TWITTER LOGIN CONFIGURATIONS#########
twitter.login.clientId=
twitter.login.clientSecret=
twitter.login.redirect_uri=https://opendmp.eu/login/twitter
#############B2 ACCESS CONFIGURATIONS#########
b2access.externallogin.user_info_url=https://b2access-integration.fz-juelich.de:443/oauth2/userinfo
b2access.externallogin.access_token_url=https://b2access-integration.fz-juelich.de:443/oauth2/token
b2access.externallogin.redirect_uri=https://opendmp.eu/api/oauth/authorized/b2access
b2access.externallogin.clientid=
b2access.externallogin.clientSecret=

View File

@ -0,0 +1,54 @@
dmp.domain = https://devel.opendmp.eu
####################PERSISTENCE OVERRIDES CONFIGURATIONS##########
database.url=
database.username=
database.password=
####################ELASTIIC SEARCH TAGS OVERRIDES CONFIGURATIONS##########
elasticsearch.host = tags-elastic-search
elasticsearch.port = 9200
####################ELK OVERRIDES CONFIGURATIONS##########
http-logger.server-address = http://logstash:31311
####################PDF OVERRIDES CONFIGURATIONS##########
pdf.converter.url=http://docsbox-web/
####################CONFIGURATION FILES OVERRIDES CONFIGURATIONS##########
configuration.externalUrls=/tmp/ExternalUrls.xml
configuration.dynamicProjectUrl=/tmp/ProjectConfiguration.xml
configuration.h2020template=/tmp/h2020.docx
####################SPRING MAIL CONFIGURATIONS#################
spring.mail.default-encoding=UTF-8
spring.mail.host=
spring.mail.port=25
spring.mail.protocol=smtp
spring.mail.test-connection=false
spring.mail.properties.mail.smtp.auth=false
#############FACEBOOK LOGIN CONFIGURATIONS#########
facebook.login.clientId=
facebook.login.clientSecret=
facebook.login.namespace=
#############GOOGLE LOGIN CONFIGURATIONS#########
google.login.clientId=
#############LINKEDIN LOGIN CONFIGURATIONS#########
linkedin.login.clientId=
linkedin.login.clientSecret=
linkedin.login.redirect_uri=https://devel.opendmp.eu/login/linkedin
#############TWITTER LOGIN CONFIGURATIONS#########
twitter.login.clientId=
twitter.login.clientSecret=
twitter.login.redirect_uri=https://devel.opendmp.eu/login/twitter
#############B2 ACCESS CONFIGURATIONS#########
b2access.externallogin.user_info_url=https://b2access-integration.fz-juelich.de:443/oauth2/userinfo
b2access.externallogin.access_token_url=https://b2access-integration.fz-juelich.de:443/oauth2/token
b2access.externallogin.redirect_uri=https://devel.opendmp.eu/api/oauth/authorized/b2access
b2access.externallogin.clientid=
b2access.externallogin.clientSecret=

View File

@ -8,15 +8,15 @@ eu.eudat.logic.proxy.allowed.host=https://eestore.paas2.uninett.no
####################INVITATION MAIL CONFIGURATIONS############## ####################INVITATION MAIL CONFIGURATIONS##############
####################GENERIC MAIL CONFIGURATIONS################# ####################GENERIC MAIL CONFIGURATIONS#################
mail.subject=Invitation to DMP Plan {dmpname} mail.subject=Invitation to DMP Plan {dmpname}
mail.from=citesagrdev@gmail.com mail.from=
####################SPRING MAIL CONFIGURATIONS################# ####################SPRING MAIL CONFIGURATIONS#################
spring.mail.default-encoding=UTF-8 spring.mail.default-encoding=UTF-8
spring.mail.host=smtp.gmail.com spring.mail.host=
spring.mail.username=citesagrdev@gmail.com spring.mail.username=
spring.mail.password=w3l0v3CITe spring.mail.password=
spring.mail.port=587 spring.mail.port=
spring.mail.protocol=smtp spring.mail.protocol=
spring.mail.test-connection=false spring.mail.test-connection=false
spring.mail.properties.mail.smtp.auth=true spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true spring.mail.properties.mail.smtp.starttls.enable=true
@ -28,29 +28,29 @@ autouser.root.password=root
autouser.root.username=root autouser.root.username=root
#############FACEBOOK LOGIN CONFIGURATIONS######### #############FACEBOOK LOGIN CONFIGURATIONS#########
facebook.login.clientId=110586756143149 facebook.login.clientId=
facebook.login.clientSecret=522a847f05c873d0222c85109e24f55a facebook.login.clientSecret=
facebook.login.namespace=eudat facebook.login.namespace=
#############GOOGLE LOGIN CONFIGURATIONS######### #############GOOGLE LOGIN CONFIGURATIONS#########
google.login.clientId=524432312250-sc9qsmtmbvlv05r44onl6l93ia3k9deo.apps.googleusercontent.com google.login.clientId=
#############LINKEDIN LOGIN CONFIGURATIONS######### #############LINKEDIN LOGIN CONFIGURATIONS#########
linkedin.login.clientId=86bl8vfk77clh9 linkedin.login.clientId=
linkedin.login.clientSecret=2OCO9e3wKylW05Tt linkedin.login.clientSecret=
linkedin.login.redirect_uri=http://opendmp.eu/login/linkedin linkedin.login.redirect_uri=http://opendmp.eu/login/linkedin
#############TWITTER LOGIN CONFIGURATIONS######### #############TWITTER LOGIN CONFIGURATIONS#########
twitter.login.clientId=HiR4hQH9HNubKC5iKQy0l4mAZ twitter.login.clientId=
twitter.login.clientSecret=9KZHgkqUO2QFnELSL14jeUvfUacWX23rqD8OW8X0xoRDXOSfKH twitter.login.clientSecret=
twitter.login.redirect_uri=http://opendmp.eu/login/twitter twitter.login.redirect_uri=http://opendmp.eu/login/twitter
#############B2 ACCESS CONFIGURATIONS######### #############B2 ACCESS CONFIGURATIONS#########
b2access.externallogin.user_info_url=https://b2access-integration.fz-juelich.de:443/oauth2/userinfo b2access.externallogin.user_info_url=https://b2access-integration.fz-juelich.de:443/oauth2/userinfo
b2access.externallogin.access_token_url=https://b2access-integration.fz-juelich.de:443/oauth2/token b2access.externallogin.access_token_url=https://b2access-integration.fz-juelich.de:443/oauth2/token
b2access.externallogin.redirect_uri=http://opendmp.eu/api/oauth/authorized/b2access b2access.externallogin.redirect_uri=http://opendmp.eu/api/oauth/authorized/b2access
b2access.externallogin.clientid=eudatdmptool b2access.externallogin.clientid=
b2access.externallogin.clientSecret=A3b*1*92 b2access.externallogin.clientSecret=
#############FILE STORAGE CONFIGURATIONS######### #############FILE STORAGE CONFIGURATIONS#########
files.storage.temp = temp files.storage.temp = temp

View File

@ -1,7 +0,0 @@
import { environment } from '../environments/environment';
export const HostConfiguration = {
Server: environment.Server,
App: environment.App,
CacheLifeTimeMillis: 30000,
HelpServiceUrl: environment.HelpService.Url
};

View File

@ -1,22 +1,17 @@
import { Component, ViewChild, OnInit, AfterViewInit, ViewEncapsulation } from '@angular/core'; import { AfterViewInit, Component, ViewEncapsulation } from '@angular/core';
import { MatPaginator, MatSort, MatSnackBar } from '@angular/material'; import { AbstractControl, FormArray, FormControl, FormGroup } from '@angular/forms';
import { Router, ActivatedRoute, Params } from '@angular/router'; import { MatSnackBar } from '@angular/material';
import { TranslateService } from '@ngx-translate/core'; import { ActivatedRoute, Params, Router } from '@angular/router';
import { DataSource } from '@angular/cdk/table';
import { Observable } from 'rxjs';
import { DataManagementPlanService } from '../../services/data-management-plan/data-management-plan.service';
import { ProjectModel } from '../../models/projects/ProjectModel';
import { JsonSerializer } from '../../utilities/JsonSerializer';
import { FormGroup, AbstractControl, FormControl, FormArray } from '@angular/forms';
import { SnackBarNotificationComponent } from '../../shared/components/notificaiton/snack-bar-notification.component';
import { BaseErrorModel } from '../../models/error/BaseErrorModel';
import { TdDialogService } from '@covalent/core'; import { TdDialogService } from '@covalent/core';
import { HostConfiguration } from '../../app.constants'; import { TranslateService } from '@ngx-translate/core';
import { DataManagementPlanProfileService } from '../../services/data-management-plan-profile/datamanagement-profile.service'; import { environment } from '../../../environments/environment';
import { DataManagementPlanProfileModel } from '../../models/data-management-plan-profile/DataManagementPlanProfileModel'; import { DataManagementPlanProfileModel } from '../../models/data-management-plan-profile/DataManagementPlanProfileModel';
import { DMPProfileFieldDataType, DMPProfileType, DataManagementProfileField } from '../../models/data-management-plan-profile/DataManagementProfileField'; import { DataManagementProfileField, DMPProfileFieldDataType, DMPProfileType } from '../../models/data-management-plan-profile/DataManagementProfileField';
import { BaseErrorModel } from '../../models/error/BaseErrorModel';
import { DataManagementPlanProfileService } from '../../services/data-management-plan-profile/datamanagement-profile.service';
import { SnackBarNotificationComponent } from '../../shared/components/notificaiton/snack-bar-notification.component';
import { JsonSerializer } from '../../utilities/JsonSerializer';
import { Utilities } from '../../utilities/utilities'; import { Utilities } from '../../utilities/utilities';
import { DataManagementPlanProfileListingModel } from '../../models/data-management-plan-profile/DataManagementPlanProfileListingModel';
@ -32,7 +27,7 @@ export class DataManagementPlanProfileEditorComponent implements AfterViewInit {
isNew = true; isNew = true;
dataManagementPlanProfileModel: DataManagementPlanProfileModel; dataManagementPlanProfileModel: DataManagementPlanProfileModel;
formGroup: FormGroup = null; formGroup: FormGroup = null;
host = HostConfiguration.Server; host = environment.Server;
baseErrorModel: BaseErrorModel; baseErrorModel: BaseErrorModel;
constructor( constructor(
private dmpProfileService: DataManagementPlanProfileService, private dmpProfileService: DataManagementPlanProfileService,

View File

@ -1,24 +1,20 @@
import { Component, ViewChild, OnInit, AfterViewInit, ViewEncapsulation } from '@angular/core'; import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { MatPaginator, MatSort, MatSnackBar } from '@angular/material'; import { AbstractControl, FormArray, FormControl, FormGroup } from '@angular/forms';
import { Router, ActivatedRoute, Params } from '@angular/router'; import { MatSnackBar } from '@angular/material';
import { TranslateService } from '@ngx-translate/core'; import { ActivatedRoute, Params, Router } from '@angular/router';
import { DataSource } from '@angular/cdk/table';
import { Observable } from 'rxjs';
import { DataManagementPlanService } from '../../services/data-management-plan/data-management-plan.service';
import { ProjectModel, ProjectType } from '../../models/projects/ProjectModel';
import { ProjectService } from '../../services/project/project.service';
import { JsonSerializer } from '../../utilities/JsonSerializer';
import { FormGroup, AbstractControl, FormControl, FormArray } from '@angular/forms';
import { SnackBarNotificationComponent } from '../../shared/components/notificaiton/snack-bar-notification.component';
import { BaseErrorModel } from '../../models/error/BaseErrorModel';
import { TdDialogService } from '@covalent/core'; import { TdDialogService } from '@covalent/core';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
import { BaseErrorModel } from '../../models/error/BaseErrorModel';
import { ProjectModel, ProjectType } from '../../models/projects/ProjectModel';
import { ProjectFileUploaderService } from '../../services/files/project-file-uploader.service'; import { ProjectFileUploaderService } from '../../services/files/project-file-uploader.service';
import { HostConfiguration } from '../../app.constants';
import { LanguageResolverService } from '../../services/language-resolver/language-resolver.service'; import { LanguageResolverService } from '../../services/language-resolver/language-resolver.service';
import { IBreadCrumbComponent } from '../../shared/components/breadcrumb/definition/IBreadCrumbComponent'; import { ProjectService } from '../../services/project/project.service';
import { BreadcrumbItem } from '../../shared/components/breadcrumb/definition/breadcrumb-item'; import { BreadcrumbItem } from '../../shared/components/breadcrumb/definition/breadcrumb-item';
import { IBreadCrumbComponent } from '../../shared/components/breadcrumb/definition/IBreadCrumbComponent';
import { SnackBarNotificationComponent } from '../../shared/components/notificaiton/snack-bar-notification.component';
import { JsonSerializer } from '../../utilities/JsonSerializer';
@Component({ @Component({
selector: 'app-project-editor-component', selector: 'app-project-editor-component',
@ -32,7 +28,7 @@ export class ProjectEditorComponent implements OnInit, IBreadCrumbComponent {
isNew = true; isNew = true;
project: ProjectModel; project: ProjectModel;
formGroup: FormGroup = null; formGroup: FormGroup = null;
host = HostConfiguration.Server; host = environment.Server;
editMode = false; editMode = false;
constructor( constructor(
private projectService: ProjectService, private projectService: ProjectService,

View File

@ -1,20 +1,19 @@
import { DataTableRequest } from '../../models/data-table/DataTableRequest'; import { DataSource } from '@angular/cdk/table';
import { ProjectListingModel } from '../../models/projects/ProjectListingModel'; import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { ProjectCriteria } from '../../models/criteria/project/ProjectCriteria'; import { MatPaginator, MatSnackBar, MatSort } from '@angular/material';
import { ProjectService } from '../../services/project/project.service';
import { Component, ViewChild, OnInit, AfterViewInit, ViewEncapsulation } from '@angular/core';
import { MatPaginator, MatSort, MatSnackBar } from '@angular/material';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { DataSource } from '@angular/cdk/table';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { ProjectCriteriaComponent } from '../../shared/components/criteria/projects/projects-criteria.component'; import { environment } from '../../../environments/environment';
import { HostConfiguration } from '../../app.constants'; import { ProjectCriteria } from '../../models/criteria/project/ProjectCriteria';
import { LanguageService } from '../../services/language/language.service'; import { DataTableRequest } from '../../models/data-table/DataTableRequest';
import { ProjectListingModel } from '../../models/projects/ProjectListingModel';
import { ProjectStateType } from '../../models/projects/ProjectStateType';
import { LanguageResolverService } from '../../services/language-resolver/language-resolver.service'; import { LanguageResolverService } from '../../services/language-resolver/language-resolver.service';
import { ProjectService } from '../../services/project/project.service';
import { BreadcrumbItem } from '../../shared/components/breadcrumb/definition/breadcrumb-item'; import { BreadcrumbItem } from '../../shared/components/breadcrumb/definition/breadcrumb-item';
import { IBreadCrumbComponent } from '../../shared/components/breadcrumb/definition/IBreadCrumbComponent'; import { IBreadCrumbComponent } from '../../shared/components/breadcrumb/definition/IBreadCrumbComponent';
import { ProjectStateType } from '../../models/projects/ProjectStateType'; import { ProjectCriteriaComponent } from '../../shared/components/criteria/projects/projects-criteria.component';
import { JsonSerializer } from '../../utilities/JsonSerializer'; import { JsonSerializer } from '../../utilities/JsonSerializer';
@Component({ @Component({
@ -31,7 +30,7 @@ export class ProjectListingComponent implements OnInit, IBreadCrumbComponent {
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;
@ViewChild(ProjectCriteriaComponent) criteria: ProjectCriteriaComponent; @ViewChild(ProjectCriteriaComponent) criteria: ProjectCriteriaComponent;
host = HostConfiguration.Server; host = environment.Server;
dataSource: ProjectDataSource | null; dataSource: ProjectDataSource | null;
displayedColumns: String[] = ['avatar', 'name', 'abbreviation', 'start', 'end', 'dmps']; displayedColumns: String[] = ['avatar', 'name', 'abbreviation', 'start', 'end', 'dmps'];

View File

@ -1,16 +1,15 @@
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpHeaders } from '@angular/common/http';
import { HttpClient } from '@angular/common/http';
import { HostConfiguration } from '../../app.constants';
import { Principal } from '../../models/login/Principal';
import { Credential } from '../../models/login/Credential';
import { Observable } from 'rxjs/Rx';
import { MatSnackBar } from '@angular/material'; import { MatSnackBar } from '@angular/material';
import { TranslateService } from '@ngx-translate/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { JsonSerializer } from '../../utilities/JsonSerializer'; import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs/Rx';
import { environment } from '../../../environments/environment';
import { Credential } from '../../models/login/Credential';
import { LoginInfo } from '../../models/login/LoginInfo'; import { LoginInfo } from '../../models/login/LoginInfo';
import { Principal } from '../../models/login/Principal';
import { SnackBarNotificationComponent } from '../../shared/components/notificaiton/snack-bar-notification.component'; import { SnackBarNotificationComponent } from '../../shared/components/notificaiton/snack-bar-notification.component';
import { JsonSerializer } from '../../utilities/JsonSerializer';
@Injectable() @Injectable()
export class AuthService { export class AuthService {
@ -24,7 +23,7 @@ export class AuthService {
public router: Router public router: Router
) { ) {
this.actionUrl = HostConfiguration.Server + 'auth/'; this.actionUrl = environment.Server + 'auth/';
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');

View File

@ -1,14 +1,11 @@
import 'rxjs/add/operator/map'; import { HttpHeaders } from '@angular/common/http';
import { HttpClient, HttpHeaders } 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 'rxjs/add/operator/map';
import { environment } from '../../../environments/environment';
import { DashboardStatisticsModel } from '../../models/dashboard/DashboardStatisticsModel'; import { DashboardStatisticsModel } from '../../models/dashboard/DashboardStatisticsModel';
import { SearchBarItem } from '../../models/dashboard/SearchBarItem'; import { SearchBarItem } from '../../models/dashboard/SearchBarItem';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
export class DashboardService { export class DashboardService {
@ -18,7 +15,7 @@ export class DashboardService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'dashboard/'; this.actionUrl = environment.Server + 'dashboard/';
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');

View File

@ -1,7 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service'; import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
import { HostConfiguration } from '../../app.constants';
import { DataTableRequest } from '../../models/data-table/DataTableRequest'; import { DataTableRequest } from '../../models/data-table/DataTableRequest';
import { DataTableData } from '../../models/data-table/DataTableData'; import { DataTableData } from '../../models/data-table/DataTableData';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@ -9,6 +8,7 @@ import { DataManagementPlanProfileCriteria } from '../../models/criteria/dmp-pro
import { DataManagementPlanProfileListingModel } from '../../models/data-management-plan-profile/DataManagementPlanProfileListingModel'; import { DataManagementPlanProfileListingModel } from '../../models/data-management-plan-profile/DataManagementPlanProfileListingModel';
import { DataManagementPlanProfileModel } from '../../models/data-management-plan-profile/DataManagementPlanProfileModel'; import { DataManagementPlanProfileModel } from '../../models/data-management-plan-profile/DataManagementPlanProfileModel';
import { RequestItem } from '../../models/criteria/RequestItem'; import { RequestItem } from '../../models/criteria/RequestItem';
import { environment } from '../../../environments/environment';
@Injectable() @Injectable()
export class DataManagementPlanProfileService { export class DataManagementPlanProfileService {
@ -18,7 +18,7 @@ export class DataManagementPlanProfileService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'dmpprofile/'; this.actionUrl = environment.Server + 'dmpprofile/';
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');

View File

@ -1,18 +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 { RequestItem } from '../../models/criteria/RequestItem';
import { DatasetProfileModel } from '../../models/datasets/DatasetProfileModel';
import { DatasetProfileCriteria } from '../../models/criteria/dataset-profile/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() @Injectable()
export class DataManagementPlanService { export class DataManagementPlanService {
@ -22,7 +21,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');

View File

@ -1,9 +1,9 @@
import { DataRepositoryModel } from '../../models/dataRepositories/DataRepositoryModel';
import { Observable } from 'rxjs';
import { HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { HostConfiguration } from '../../app.constants';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
import { DataRepositoryModel } from '../../models/dataRepositories/DataRepositoryModel';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
export class DataRepositoryService { export class DataRepositoryService {
@ -13,7 +13,7 @@ export class DataRepositoryService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'datarepos/'; this.actionUrl = environment.Server + 'datarepos/';
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');

View File

@ -1,11 +1,10 @@
import { Component, Input, OnInit, AfterViewChecked, ViewChild } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http'; import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { DatasetProfileAdmin } from '../services/datasetProfileAdmin/datasetProfileAfmin.service';
import { HostConfiguration } from '../app.constants';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { RequestItem } from '../models/criteria/RequestItem'; import { environment } from '../../environments/environment';
import { AutocompleteLookupItem } from '../models/auto-complete/AutocompleteLookupItem'; import { AutocompleteLookupItem } from '../models/auto-complete/AutocompleteLookupItem';
import { RequestItem } from '../models/criteria/RequestItem';
import { DatasetProfileAdmin } from '../services/datasetProfileAdmin/datasetProfileAfmin.service';
@Injectable() @Injectable()
export class DatasetProfileService { export class DatasetProfileService {
@ -14,7 +13,7 @@ export class DatasetProfileService {
private headers: HttpHeaders; private headers: HttpHeaders;
constructor(private httpClient: HttpClient, private datasetProfileAdmin: DatasetProfileAdmin) { constructor(private httpClient: HttpClient, private datasetProfileAdmin: DatasetProfileAdmin) {
this.actionUrl = HostConfiguration.Server + 'datasetwizard/'; this.actionUrl = environment.Server + 'datasetwizard/';
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');
@ -26,7 +25,7 @@ export class DatasetProfileService {
} }
queryAutocomplete(lookUpItem: RequestItem<AutocompleteLookupItem>): Observable<any> { queryAutocomplete(lookUpItem: RequestItem<AutocompleteLookupItem>): Observable<any> {
return this.httpClient.post(HostConfiguration.Server + 'search/autocomplete', lookUpItem); return this.httpClient.post(environment.Server + 'search/autocomplete', lookUpItem);
} }
} }

View File

@ -1,17 +1,16 @@
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
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-profile/DatasetProfileCriteria';
import { RequestItem } from '../../models/criteria/RequestItem';
import { DataManagementPlanModel } from '../../models/data-managemnt-plans/DataManagementPlanModel';
import { DatasetProfileModel } from '../../models/datasetprofile/DatasetProfileModel';
import { DatasetProfileDefinitionModel } from '../../models/DatasetProfileDefinitionModel'; import { DatasetProfileDefinitionModel } from '../../models/DatasetProfileDefinitionModel';
import { DatasetWizardModel } from '../../models/datasets/DatasetWizardModel'; import { DatasetWizardModel } from '../../models/datasets/DatasetWizardModel';
import { DatasetProfileCriteria } from '../../models/criteria/dataset-profile/DatasetProfileCriteria';
import 'rxjs/add/operator/map';
import { HttpHeaders, HttpResponse, HttpClient } 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 { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
import { Observable } from 'rxjs';
import { DataManagementPlanModel } from '../../models/data-managemnt-plans/DataManagementPlanModel';
import { DataManagementPlanCriteria } from '../../models/criteria/data-management-plan/DataManagementPlanCriteria';
import { RequestItem } from '../../models/criteria/RequestItem';
import { DatasetProfileModel } from '../../models/datasetprofile/DatasetProfileModel';
import { ResponseContentType } from '@angular/http';
@Injectable() @Injectable()
@ -22,7 +21,7 @@ export class DatasetWizardService {
constructor(private http: BaseHttpService, private httpClient: HttpClient) { constructor(private http: BaseHttpService, private httpClient: HttpClient) {
this.actionUrl = HostConfiguration.Server + 'datasetwizard/'; this.actionUrl = environment.Server + 'datasetwizard/';
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');

View File

@ -1,16 +1,15 @@
import 'rxjs/add/operator/map'; import { HttpHeaders } from '@angular/common/http';
import { HttpClient, HttpHeaders } 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 { DatasetListingModel } from '../../models/datasets/DatasetListingModel';
import { DatasetModel } from '../../models/datasets/DatasetModel';
import { DatasetCriteria } from '../../models/criteria/dataset/DatasetCriteria'; import { DatasetCriteria } from '../../models/criteria/dataset/DatasetCriteria';
import { DataTableData } from '../../models/data-table/DataTableData';
import { DataTableRequest } from '../../models/data-table/DataTableRequest';
import { DatasetProfileModel } from '../../models/datasetprofile/DatasetProfileModel'; import { DatasetProfileModel } from '../../models/datasetprofile/DatasetProfileModel';
import { DatasetListingModel } from '../../models/datasets/DatasetListingModel';
import { FacetSearchCriteriaModel } from '../../models/facet-search/FacetSearchCriteriaModel'; import { FacetSearchCriteriaModel } from '../../models/facet-search/FacetSearchCriteriaModel';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@ -22,7 +21,7 @@ export class DatasetService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'datasets/'; this.actionUrl = environment.Server + 'datasets/';
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');
@ -42,7 +41,7 @@ export class DatasetService {
} }
getDatasetProfiles(): Observable<DatasetProfileModel[]> { getDatasetProfiles(): Observable<DatasetProfileModel[]> {
return this.http.get<DatasetProfileModel[]>(HostConfiguration.Server + 'datasetprofiles/getAll', { headers: this.headers }); return this.http.get<DatasetProfileModel[]>(environment.Server + 'datasetprofiles/getAll', { headers: this.headers });
} }
} }

View File

@ -1,16 +1,14 @@
import { HttpClient, HttpHeaders } from '@angular/common/http'; import { HttpHeaders } 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 { environment } from '../../../environments/environment';
import { DatasetProfileCriteria } from '../../models/criteria/dataset-profile/DatasetProfileCriteria';
import { DataTableData } from '../../models/data-table/DataTableData'; import { DataTableData } from '../../models/data-table/DataTableData';
import { DatasetModel } from '../../models/datasets/DatasetModel'; import { DataTableRequest } from '../../models/data-table/DataTableRequest';
import { DatasetCriteria } from '../../models/criteria/dataset/DatasetCriteria';
import { DatasetProfileModelAdmin } from '../../models/datasetProfileAdmin/DatasetProfileModelAdmin'; import { DatasetProfileModelAdmin } from '../../models/datasetProfileAdmin/DatasetProfileModelAdmin';
import { DatasetListingModel } from '../../models/datasets/DatasetListingModel'; import { DatasetListingModel } from '../../models/datasets/DatasetListingModel';
import { DatasetProfileCriteria } from '../../models/criteria/dataset-profile/DatasetProfileCriteria'; import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
@ -21,7 +19,7 @@ export class DatasetProfileAdmin {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'admin/'; this.actionUrl = environment.Server + 'admin/';
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');
@ -48,6 +46,6 @@ export class DatasetProfileAdmin {
} }
clone(id: string): Observable<DatasetProfileModelAdmin> { clone(id: string): Observable<DatasetProfileModelAdmin> {
return this.http.post<DatasetProfileModelAdmin>(HostConfiguration.Server + 'datasetprofile/clone/' + id, {}, { headers: this.headers }); return this.http.post<DatasetProfileModelAdmin>(environment.Server + 'datasetprofile/clone/' + id, {}, { headers: this.headers });
} }
} }

View File

@ -1,14 +1,13 @@
import { ProjectCriteria } from '../../models/criteria/project/ProjectCriteria';
import { RequestItem } from '../../models/criteria/RequestItem';
import { ExternalDatasetModel } from '../../models/external-dataset/ExternalDatasetModel';
import { DataTableData } from '../../models/data-table/DataTableData';
import { ExternalDatasetCriteria } from '../../models/criteria/external-dataset/ExternalDatasetCriteria';
import { DataTableRequest } from '../../models/data-table/DataTableRequest';
import { Injectable } from '@angular/core';
import { HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service'; import { Injectable } from '@angular/core';
import { HostConfiguration } from './../../app.constants';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
import { ExternalDatasetCriteria } from '../../models/criteria/external-dataset/ExternalDatasetCriteria';
import { RequestItem } from '../../models/criteria/RequestItem';
import { DataTableData } from '../../models/data-table/DataTableData';
import { DataTableRequest } from '../../models/data-table/DataTableRequest';
import { ExternalDatasetModel } from '../../models/external-dataset/ExternalDatasetModel';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
@ -19,7 +18,7 @@ export class ExternalDatasetService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'externaldatasets/'; this.actionUrl = environment.Server + 'externaldatasets/';
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');

View File

@ -1,9 +1,9 @@
import { ExternalSourcesConfiguration } from '../../models/external-sources/ExternalSourcesConfiguration';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
import { HostConfiguration } from '../../app.constants';
import { HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
import { ExternalSourcesConfiguration } from '../../models/external-sources/ExternalSourcesConfiguration';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
@ -14,7 +14,7 @@ export class ExternalSourcesConfigurationService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'common/'; this.actionUrl = environment.Server + 'common/';
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');

View File

@ -1,18 +1,17 @@
import 'rxjs/add/operator/map'; import { HttpHeaders } from '@angular/common/http';
import { HttpClient, HttpHeaders } 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 { ExternalSourcesItemModel } from '../../models/external-sources/ExternalSourcesItemModel'; import 'rxjs/add/operator/map';
import { BaseCriteria } from '../../models/criteria/BaseCriteria'; import { environment } from '../../../environments/environment';
import { RequestItem } from '../../models/criteria/RequestItem'; import { DataRepositoryCriteria } from '../../models/criteria/data-repository/DataRepositoryCriteria';
import { ResearcherCriteria } from '../../models/criteria/researchers/ResearcherCriteria';
import { ExternalDatasetCriteria } from '../../models/criteria/external-dataset/ExternalDatasetCriteria'; import { ExternalDatasetCriteria } from '../../models/criteria/external-dataset/ExternalDatasetCriteria';
import { RegistryCriteria } from '../../models/criteria/registry/RegistryCriteria'; import { RegistryCriteria } from '../../models/criteria/registry/RegistryCriteria';
import { DataRepositoryCriteria } from '../../models/criteria/data-repository/DataRepositoryCriteria'; import { RequestItem } from '../../models/criteria/RequestItem';
import { ResearcherCriteria } from '../../models/criteria/researchers/ResearcherCriteria';
import { ServicesCriteria } from '../../models/criteria/services/ServicesCriteria'; import { ServicesCriteria } from '../../models/criteria/services/ServicesCriteria';
import { TagsCriteria } from '../../models/criteria/tags/TagsCriteria'; import { TagsCriteria } from '../../models/criteria/tags/TagsCriteria';
import { ExternalSourcesItemModel } from '../../models/external-sources/ExternalSourcesItemModel';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
@ -23,7 +22,7 @@ export class ExternalSourcesService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'external/'; this.actionUrl = environment.Server + 'external/';
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');
@ -61,7 +60,7 @@ export class ExternalSourcesService {
} }
public searchDMPResearchers(requestItem: RequestItem<ResearcherCriteria>): Observable<ExternalSourcesItemModel[]> { public searchDMPResearchers(requestItem: RequestItem<ResearcherCriteria>): Observable<ExternalSourcesItemModel[]> {
return this.http.post<ExternalSourcesItemModel[]>(HostConfiguration.Server + '/researchers/getWithExternal', requestItem, { headers: this.headers }); return this.http.post<ExternalSourcesItemModel[]>(environment.Server + '/researchers/getWithExternal', requestItem, { headers: this.headers });
} }
public searchDMPOrganizations(like: string): Observable<ExternalSourcesItemModel[]> { public searchDMPOrganizations(like: string): Observable<ExternalSourcesItemModel[]> {

View File

@ -1,15 +1,11 @@
import 'rxjs/add/operator/map'; import { HttpHeaders } from '@angular/common/http';
import { HttpClient, HttpHeaders } 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 { ExternalSourcesItemModel } from '../../models/external-sources/ExternalSourcesItemModel'; import 'rxjs/add/operator/map';
import { BaseCriteria } from '../../models/criteria/BaseCriteria'; import { environment } from '../../../environments/environment';
import { RequestItem } from '../../models/criteria/RequestItem';
import { ResearcherCriteria } from '../../models/criteria/researchers/ResearcherCriteria';
import { FileUploader } from '../../shared/components/file-uploader/FileUploader';
import { ContentFile } from '../../models/files/ContentFile'; import { ContentFile } from '../../models/files/ContentFile';
import { FileUploader } from '../../shared/components/file-uploader/FileUploader';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
@ -21,7 +17,7 @@ export class ProjectFileUploaderService implements FileUploader {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'files/'; this.actionUrl = environment.Server + 'files/';
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');

View File

@ -4,12 +4,13 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http'; import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Rx'; import { Observable } from 'rxjs/Rx';
import { environment } from '../../../environments/environment';
import { PageHelpContent } from '../../models/help-content/page-help-content'; import { PageHelpContent } from '../../models/help-content/page-help-content';
import { CachedContentItem } from './CachedContentItem'; import { CachedContentItem } from './CachedContentItem';
import { HostConfiguration } from '../../app.constants';
@Injectable() @Injectable()
export class HelpContentService { export class HelpContentService {
private _helpServiceUrl = HostConfiguration.HelpServiceUrl; private _helpServiceUrl = environment.HelpService.Url;
cache = new Map<String, CachedContentItem>(); cache = new Map<String, CachedContentItem>();
constructor(private http: Http) { constructor(private http: Http) {
@ -49,6 +50,6 @@ export class HelpContentService {
isValidCachedItem(route) { isValidCachedItem(route) {
const cachedTimestamp = this.cache.get(route).timestamp; const cachedTimestamp = this.cache.get(route).timestamp;
const currentTimestamp = Date.now(); const currentTimestamp = Date.now();
if (currentTimestamp - cachedTimestamp > HostConfiguration.CacheLifeTimeMillis) { return false; } else { return true; } if (currentTimestamp - cachedTimestamp > 30000) { return false; } else { return true; }
} }
} }

View File

@ -1,12 +1,12 @@
import { Invitation } from '../../models/invitation/Invitation';
import { UserInvitationCriteria } from '../../models/criteria/invitation/UserInvitationCriteria';
import { User } from '../../models/invitation/User';
import { HostConfiguration } from '../../app.constants';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
import { Injectable } from '@angular/core';
import { HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
import { UserInvitationCriteria } from '../../models/criteria/invitation/UserInvitationCriteria';
import { RequestItem } from '../../models/criteria/RequestItem'; import { RequestItem } from '../../models/criteria/RequestItem';
import { Invitation } from '../../models/invitation/Invitation';
import { User } from '../../models/invitation/User';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
export class InvitationService { export class InvitationService {
@ -16,7 +16,7 @@ export class InvitationService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'invite/'; this.actionUrl = environment.Server + 'invite/';
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');

View File

@ -1,13 +1,9 @@
import { Injectable } from '@angular/core';
import { HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service'; import { Injectable } from '@angular/core';
import { HostConfiguration } from '../../app.constants';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { Invitation } from '../../models/invitation/Invitation'; import { environment } from '../../../environments/environment';
import { User } from '../../models/invitation/User';
import { RequestItem } from '../../models/criteria/RequestItem';
import { UserInvitationCriteria } from '../../models/criteria/invitation/UserInvitationCriteria';
import { Language } from '../../models/language/Language'; import { Language } from '../../models/language/Language';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
@ -17,7 +13,7 @@ export class LanguageService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'common/'; this.actionUrl = environment.Server + 'common/';
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');

View File

@ -1,16 +1,15 @@
import 'rxjs/add/operator/map'; import { HttpHeaders } from '@angular/common/http';
import { HttpClient, HttpHeaders } 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 { ProjectListingModel } from '../../models/projects/ProjectListingModel';
import { ProjectModel } from '../../models/projects/ProjectModel';
import { BaseHttpResponseModel } from '../../models/http/BaseHttpResponseModel';
import { ProjectCriteria } from '../../models/criteria/project/ProjectCriteria'; import { ProjectCriteria } from '../../models/criteria/project/ProjectCriteria';
import { RequestItem } from '../../models/criteria/RequestItem'; import { RequestItem } from '../../models/criteria/RequestItem';
import { DataTableData } from '../../models/data-table/DataTableData';
import { DataTableRequest } from '../../models/data-table/DataTableRequest';
import { ProjectListingModel } from '../../models/projects/ProjectListingModel';
import { ProjectModel } from '../../models/projects/ProjectModel';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
@ -21,7 +20,7 @@ export class ProjectService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'projects/'; this.actionUrl = environment.Server + 'projects/';
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');

View File

@ -1,9 +1,9 @@
import { RegisterModel } from '../../models/registers/RegisterModel';
import { Observable } from 'rxjs';
import { HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { HostConfiguration } from '../../app.constants';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
import { RegisterModel } from '../../models/registers/RegisterModel';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
export class RegistryService { export class RegistryService {
@ -13,7 +13,7 @@ export class RegistryService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'registries/'; this.actionUrl = environment.Server + 'registries/';
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');

View File

@ -1,13 +1,8 @@
import { Invitation } from '../../models/invitation/Invitation';
import { UserInvitationCriteria } from '../../models/criteria/invitation/UserInvitationCriteria';
import { User } from '../../models/invitation/User';
import { HostConfiguration } from '../../app.constants';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
import { Injectable } from '@angular/core';
import { HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs'; import { Injectable } from '@angular/core';
import { RequestItem } from '../../models/criteria/RequestItem'; import { environment } from '../../../environments/environment';
import { ResearcherModel } from '../../models/researcher/ResearcherModel'; import { ResearcherModel } from '../../models/researcher/ResearcherModel';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
export class ResearcherService { export class ResearcherService {
@ -17,7 +12,7 @@ export class ResearcherService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'researchers/'; this.actionUrl = environment.Server + 'researchers/';
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');

View File

@ -1,9 +1,9 @@
import { Injectable } from '@angular/core';
import { HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service'; import { Injectable } from '@angular/core';
import { HostConfiguration } from '../../app.constants';
import { ServiceModel } from '../../models/services/ServiceModel';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
import { ServiceModel } from '../../models/services/ServiceModel';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
export class ServicesDataService { export class ServicesDataService {
@ -13,7 +13,7 @@ export class ServicesDataService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'services/'; this.actionUrl = environment.Server + 'services/';
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');

View File

@ -1,15 +1,13 @@
import { UserListingModel } from '../../models/users/UserListingModel'; import { HttpHeaders } from '@angular/common/http';
import { UserCriteria } from '../../models/criteria/users/UserCriteria';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
import 'rxjs/add/operator/map';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { DataTableRequest } from '../../models/data-table/DataTableRequest'; import { environment } from '../../../environments/environment';
import { UserCriteria } from '../../models/criteria/users/UserCriteria';
import { DataTableData } from '../../models/data-table/DataTableData'; import { DataTableData } from '../../models/data-table/DataTableData';
import { HostConfiguration } from '../../app.constants'; import { DataTableRequest } from '../../models/data-table/DataTableRequest';
import { UserListingModel } from '../../models/users/UserListingModel';
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable() @Injectable()
export class UserReferenceService { export class UserReferenceService {
@ -19,7 +17,7 @@ export class UserReferenceService {
constructor(private http: BaseHttpService) { constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + '/user/'; this.actionUrl = environment.Server + '/user/';
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');

View File

@ -15,13 +15,9 @@ export class TwitterLoginConfiguration extends LoginProviderConfiguration {
export class LinkedInConfiguration extends LoginProviderConfiguration { export class LinkedInConfiguration extends LoginProviderConfiguration {
public oauthUrl: string; public oauthUrl: string;
public redirectUri: string; public redirectUri: string;
public accessTokenUri: string;
public clientSecret: string;
} }
export class B2AccessConfiguration extends LoginProviderConfiguration { export class B2AccessConfiguration extends LoginProviderConfiguration {
public oauthUrl: string; public oauthUrl: string;
public redirectUri: string; public redirectUri: string;
public accessTokenUri: string;
public clientSecret: string;
} }

View File

@ -1,18 +1,17 @@
import { Credential } from '../../models/login/Credential';
import { HostConfiguration } from '../../app.constants';
import { LoginProviderConfiguration } from './LoginProviderConfiguration';
import { AuthService } from '../../services/auth/auth.service';
import { LoginOptions } from './LoginOptions';
import { LoginServiceConfiguration } from './LoginServiceConfiguration';
import { LoginProviders } from '../../models/login/LoginInfo';
import { Optional, NgZone, Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { MatSnackBar } from '@angular/material';
import { SnackBarNotificationComponent } from '../../shared/components/notificaiton/snack-bar-notification.component';
import { Router, ActivatedRoute, Params } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { HttpClient, HttpHeaders } from '@angular/common/http'; import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable, NgZone, Optional } from '@angular/core';
import { MatSnackBar } from '@angular/material';
import { ActivatedRoute, Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { environment } from '../../../environments/environment';
import { Credential } from '../../models/login/Credential';
import { LoginProviders } from '../../models/login/LoginInfo';
import { AuthService } from '../../services/auth/auth.service';
import { SnackBarNotificationComponent } from '../../shared/components/notificaiton/snack-bar-notification.component';
import { CultureService } from '../../utilities/culture/culture-service'; import { CultureService } from '../../utilities/culture/culture-service';
import { LoginOptions } from './LoginOptions';
import { LoginProviderConfiguration } from './LoginProviderConfiguration';
import { LoginServiceConfiguration } from './LoginServiceConfiguration';
declare const gapi: any; declare const gapi: any;
declare const FB: any; declare const FB: any;
@ -158,7 +157,7 @@ export class LoginService {
let headers = new HttpHeaders(); let headers = new HttpHeaders();
headers = headers.set('Content-Type', 'application/json'); headers = headers.set('Content-Type', 'application/json');
headers = headers.set('Accept', 'application/json'); headers = headers.set('Accept', 'application/json');
this.httpClient.get(HostConfiguration.Server + 'auth/twitterRequestToken', { headers: headers }).subscribe((data: any) => { this.httpClient.get(environment.Server + 'auth/twitterRequestToken', { headers: headers }).subscribe((data: any) => {
window.location.href = this.config.twitterConfiguration.oauthUrl + '?oauth_token=' + data.payload.value; window.location.href = this.config.twitterConfiguration.oauthUrl + '?oauth_token=' + data.payload.value;
}); });
} }
@ -186,7 +185,7 @@ export class LoginService {
let headers = new HttpHeaders(); let headers = new HttpHeaders();
headers = headers.set('Content-Type', 'application/json'); headers = headers.set('Content-Type', 'application/json');
headers = headers.set('Accept', 'application/json'); headers = headers.set('Accept', 'application/json');
this.httpClient.post(HostConfiguration.Server + 'auth/b2AccessRequestToken', { code: code }, { headers: headers }) this.httpClient.post(environment.Server + 'auth/b2AccessRequestToken', { code: code }, { headers: headers })
.subscribe((data: any) => { .subscribe((data: any) => {
this.authService.login({ ticket: data.payload.accessToken, provider: LoginProviders.B2Accesss, data: null }).subscribe( this.authService.login({ ticket: data.payload.accessToken, provider: LoginProviders.B2Accesss, data: null }).subscribe(
res => this.onLogInSuccess(res), res => this.onLogInSuccess(res),

View File

@ -1,10 +1,28 @@
export const environment = { export const environment = {
production: true, production: true,
Server: 'https://opendmp.eu/srv/api/', Server: 'https://devel.opendmp.eu/srv/api/',
App: 'https://opendmp.eu/', App: 'https://devel.opendmp.eu/',
HelpService: { HelpService: {
Enabled: false, Enabled: false,
Url: 'https://opendmp.eu/content-service/', Url: 'https://devel.opendmp.eu/content-service/',
}, },
defaultCulture: 'en-US' defaultCulture: 'en-US',
loginProviders: {
facebookConfiguration: { clientId: '' },
googleConfiguration: { clientId: '' },
linkedInConfiguration: {
clientId: '',
oauthUrl: 'https://www.linkedin.com/oauth/v2/authorization',
redirectUri: 'http://localhost:4200/login/linkedin',
},
twitterConfiguration: {
clientId: '',
oauthUrl: 'https://api.twitter.com/oauth/authenticate'
},
b2accessConfiguration: {
clientId: '',
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz',
redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access'
}
}
}; };

View File

@ -6,5 +6,23 @@ export const environment = {
Enabled: false, Enabled: false,
Url: 'https://devel.opendmp.eu/content-service/', Url: 'https://devel.opendmp.eu/content-service/',
}, },
defaultCulture: 'en-US' defaultCulture: 'en-US',
loginProviders: {
facebookConfiguration: { clientId: '' },
googleConfiguration: { clientId: '' },
linkedInConfiguration: {
clientId: '',
oauthUrl: 'https://www.linkedin.com/oauth/v2/authorization',
redirectUri: 'http://localhost:4200/login/linkedin',
},
twitterConfiguration: {
clientId: '',
oauthUrl: 'https://api.twitter.com/oauth/authenticate'
},
b2accessConfiguration: {
clientId: '',
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz',
redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access'
}
}
}; };

View File

@ -5,11 +5,31 @@
export const environment = { export const environment = {
production: false, production: false,
Server: 'http://devel-21.local.cite.gr:8080/api/', Server: 'http://localhost:8080/api/',
App: 'http://localhost:4200/', App: 'http://localhost:4200/',
HelpService: { HelpService: {
Enabled: false, Enabled: false,
Url: 'localhost:5000/', Url: 'localhost:5000/',
}, },
defaultCulture: 'en-US' defaultCulture: 'en-US',
loginProviders: {
facebookConfiguration: { clientId: '' },
googleConfiguration: { clientId: '' },
linkedInConfiguration: {
clientId: '',
oauthUrl: 'https://www.linkedin.com/oauth/v2/authorization',
redirectUri: 'http://localhost:4200/login/linkedin',
accessTokenUri: 'https://www.linkedin.com/oauth/v2/accessToken',
clientSecret: ''
},
twitterConfiguration: {
clientId: '',
oauthUrl: 'https://api.twitter.com/oauth/authenticate'
},
b2accessConfiguration: {
clientId: 'eudatdmptool',
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz',
redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access'
}
}
}; };

168
docker-compose.dev.yml Normal file
View File

@ -0,0 +1,168 @@
---
version: '3'
services:
##########################ELASTIC######################################################################
elasticsearch-dmp:
image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}
container_name: elasticsearch-dmp
volumes:
- ./elastic-config/elasticsearch-custom.yml:/usr/share/elasticsearch/config/elasticsearch.yml
environment: ['http.host=0.0.0.0','transport.host=0.0.0.0','discovery.type=single-node']
ports: ['0.0.0.0:9201:9200','0.0.0.0:9301:9300']
networks: ['elasticsearch-dmp']
volumes:
- esdata-dmp:/usr/share/elasticsearch/data
##########################ELK-STACK######################################################################
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}
container_name: elasticsearch
environment: ['http.host=0.0.0.0', 'transport.host=127.0.0.1', 'ELASTIC_PASSWORD=${ELASTIC_PASSWORD}','discovery.type=single-node']
ports: ['0.0.0.0:9200:9200']
networks: ['stack']
volumes:
- esdata:/usr/share/elasticsearch/data
kibana:
image: docker.elastic.co/kibana/kibana:${TAG}
container_name: kibana
ports: ['0.0.0.0:5601:5601']
networks: ['stack']
depends_on: ['elasticsearch']
logstash:
image: docker.elastic.co/logstash/logstash:${TAG}
container_name: logstash
volumes:
- ./ELK.Docker/config/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
ports: ['0.0.0.0:31311:31311']
networks: ['stack']
depends_on: ['elasticsearch', 'setup_logstash']
#filebeat:
# image: docker.elastic.co/beats/filebeat:${TAG}
# container_name: filebeat
# command: -e -E 'output.elasticsearch.password=${ELASTIC_PASSWORD}'
# networks: ['stack']
# depends_on: ['elasticsearch', 'setup_filebeat']
#heartbeat:
# image: docker.elastic.co/beats/heartbeat:${TAG}
# container_name: heartbeat
# command: -e -E 'output.elasticsearch.password=${ELASTIC_PASSWORD}'
# networks: ['stack']
# depends_on: ['elasticsearch', 'setup_heartbeat']
# Run a short-lived container to set up Logstash.
setup_logstash:
image: centos:7
container_name: setup_logstash
volumes: ['./ELK.Docker/scripts/setup-logstash.sh:/usr/local/bin/setup-logstash.sh:ro']
command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-logstash.sh | tr -d "\r" | bash']
environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
networks: ['stack']
depends_on: ['elasticsearch']
setup_kibana:
image: centos:7
container_name: setup_kibana
volumes: ['./ELK.Docker/scripts/setup-kibana.sh:/usr/local/bin/setup-kibana.sh:ro']
command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-kibana.sh | tr -d "\r" | bash']
environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
networks: ['stack']
depends_on: ['elasticsearch']
#setup_filebeat:
# image: docker.elastic.co/beats/filebeat:${TAG}
# container_name: setup_filebeat
# volumes: ['./ELK.Docker/scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s filebeat']
# environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
# networks: ['stack']
# depends_on: ['kibana']
#setup_heartbeat:
# image: docker.elastic.co/beats/heartbeat:${TAG}
# container_name: setup_heartbeat
# volumes: ['./ELK.Docker/scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s heartbeat']
# environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
# networks: ['stack']
# depends_on: ['kibana']
##########################DOCSBOX######################################################################
# web:
# restart: always
# build: ./docsbox-master/docsbox
# expose:
# - "8000"
# links:
# - redis:redis
# volumes:
# - docsbox:/home/docsbox
# - media:/home/docsbox/media
# command: gunicorn -b :8000 docsbox:app
# networks: ['stack']
# rqworker:
# restart: always
# build: ./docsbox-master/docsbox
# links:
# - redis:redis
# volumes:
# - web
# command: rq worker -c docsbox.settings
# networks: ['stack']
# rqscheduler:
# restart: always
# build: ./docsbox-master/docsbox
# links:
# - redis:redis
# volumes:
# - web
# command: rqscheduler -H redis -p 6379 -d 0
# networks: ['stack']
# nginx:
# restart: always
# build: ./docsbox-master/nginx/
# ports:
# - "81:80"
# volumes:
# - web
# links:
# - web:web
# networks: ['stack']
# redis:
# restart: always
# image: redis:latest
# expose:
# - "6379"
# volumes:
# - redisdata:/data
# networks: ['stack']
##########################SETTINGS######################################################################
volumes:
esdata:
driver: local
esdata-dmp:
driver: local
#redisdata:
# driver: local
# docsbox:
# driver: local
# media:
# driver: local
networks:
stack: {}
elasticsearch-dmp: {}