Skip to content
Snippets Groups Projects
Commit 9fec58a8 authored by Homada.Boumedane's avatar Homada.Boumedane
Browse files

refactor(dlcm-portal): refactor environment config

refactor environment config
parent fa26de8e
No related branches found
No related tags found
No related merge requests found
...@@ -7,18 +7,18 @@ import {ThemeEnum} from "@app/shared/enums/theme.enum"; ...@@ -7,18 +7,18 @@ import {ThemeEnum} from "@app/shared/enums/theme.enum";
export const defaultEnvironment = { export const defaultEnvironment = {
appTitle: "DLCM - Portal", appTitle: "DLCM - Portal",
production: false, production: false,
theme: ThemeEnum.dlcm,
defaultLanguage: LanguagesEnum.en,
defaultPageSizeOption: 5,
pageSizeOptions: [5, 10, 25, 50, 100],
// Base URL For Module Applications
ADMIN_APPLICATION: "https://to-set/administration", ADMIN_APPLICATION: "https://to-set/administration",
ACCESS_APPLICATION: "https://to-set/accession", ACCESS_APPLICATION: "https://to-set/accession",
INGEST_APPLICATION: "https://to-set/ingestion", INGEST_APPLICATION: "https://to-set/ingestion",
PREINGEST_APPLICATION: "https://to-set/accession", PREINGEST_APPLICATION: "https://to-set/accession",
STORAGION_APPLICATION: "https://to-set/storagion", STORAGION_APPLICATION: "https://to-set/storagion",
theme: ThemeEnum.dlcm,
defaultLanguage: LanguagesEnum.en,
pageSizeOptions: [5, 10, 25, 50, 100],
defaultPageSizeOption: 5,
// OAuth2 properties // OAuth2 properties
oauthOidc: false, oauthOidc: false,
oauthRequestAccessToken: true, oauthRequestAccessToken: true,
......
import {ThemeEnum} from "@app/shared/enums/theme.enum"; import {ThemeEnum} from "@app/shared/enums/theme.enum";
import {defaultEnvironment} from "./environment.defaults"; import {defaultEnvironment} from "./environment.defaults";
export const environment: typeof defaultEnvironment = { export const environment = {
...defaultEnvironment, ...defaultEnvironment,
theme: ThemeEnum.yareta,
// Override OAuth2 properties
appTitle: "DLCM - Portal",
production: true, production: true,
theme: ThemeEnum.yareta,
ADMIN_APPLICATION: "https://test.dlcm.ch/administration", ADMIN_APPLICATION: "https://test.dlcm.ch/administration",
ACCESS_APPLICATION: "https://test.dlcm.ch/accession", ACCESS_APPLICATION: "https://test.dlcm.ch/accession",
INGEST_APPLICATION: "https://test.dlcm.ch/ingestion", INGEST_APPLICATION: "https://test.dlcm.ch/ingestion",
PREINGEST_APPLICATION: "https://test.dlcm.ch/accession", PREINGEST_APPLICATION: "https://test.dlcm.ch/accession",
STORAGION_APPLICATION: "https://test.dlcm.ch/storagion", STORAGION_APPLICATION: "https://test.dlcm.ch/storagion",
oauthTokenEndpoint: "https://test.dlcm.ch/authorization/oauth/token",
oauthDummyClientSecret: "123abc", // OAuth2 properties
oauthClientId: "dlcm-test-angular", tokenEndpoint: "https://test.dlcm.ch/authorization/oauth/token",
oauthScope: "READ", dummyClientSecret: "123abc",
oauthRequireHttps: false, clientId: "dlcm-test-angular",
oauthLoginUrl: "https://test.dlcm.ch/authorization/oauth/authorize", responseType: "token",
oauthRedirectUrl: "https://test.dlcm.ch/portal/", scope: "READ",
requireHttps: false,
loginUrl: "https://test.dlcm.ch/authorization/oauth/authorize",
redirectUrl: "https://test.dlcm.ch/portal/",
}; };
...@@ -10,14 +10,19 @@ import {environmentLocal} from "./environment.local"; ...@@ -10,14 +10,19 @@ import {environmentLocal} from "./environment.local";
export const environment: typeof defaultEnvironment = { export const environment: typeof defaultEnvironment = {
...defaultEnvironment, ...defaultEnvironment,
theme: ThemeEnum.dlcm, theme: ThemeEnum.dlcm,
oauthTokenEndpoint: "http://localhost/dlcm-authorization/oauth/token",
oauthDummyClientSecret: "123abc", // Override OAuth2 properties
oauthClientId: "local-dev-angular", tokenEndpoint: "https://localhost/authorization/oauth/token",
oauthScope: "READ", dummyClientSecret: "123abc",
oauthRequireHttps: false, clientId: "local-dev-angular",
oauthLoginUrl: "http://localhost/dlcm-authorization/oauth/authorize", responseType: "token",
oauthRedirectUrl: window.location.origin, scope: "READ",
...environmentLocal, requireHttps: false,
loginUrl: "https://localhost/authorization/oauth/authorize",
redirectUrl: window.location.origin,
//Override properties inside environment.local.ts
...environmentLocal
}; };
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment