Skip to content

Commit 4610d9a

Browse files
refactor: Add new environments (#2788)
AB#112828
1 parent 20d9013 commit 4610d9a

27 files changed

+365
-648
lines changed

apps/back-office/project.json

+29-67
Original file line numberDiff line numberDiff line change
@@ -171,86 +171,45 @@
171171
"includePaths": ["libs/styles/src/lib/themes/default"]
172172
}
173173
},
174-
"oort-prod": {
174+
"local-prod": {
175175
"fileReplacements": [
176176
{
177177
"replace": "apps/back-office/src/environments/environment.ts",
178-
"with": "apps/back-office/src/environments/environment.oort.prod.ts"
178+
"with": "apps/back-office/src/environments/environment.local.prod.ts"
179179
}
180180
],
181-
"budgets": [
182-
{
183-
"type": "initial",
184-
"maximumWarning": "12mb",
185-
"maximumError": "20mb"
186-
},
187-
{
188-
"type": "anyComponentStyle",
189-
"maximumWarning": "6kb",
190-
"maximumError": "20kb"
191-
}
192-
],
193-
"baseHref": "/admin/",
194-
"outputHashing": "all",
195-
"stylePreprocessorOptions": {
196-
"includePaths": ["libs/styles/src/lib/themes/oort"]
197-
}
198-
},
199-
"oort-dev": {
200-
"fileReplacements": [
201-
{
202-
"replace": "apps/back-office/src/environments/environment.ts",
203-
"with": "apps/back-office/src/environments/environment.oort.dev.ts"
204-
}
205-
],
206-
"budgets": [
207-
{
208-
"type": "initial",
209-
"maximumWarning": "12mb",
210-
"maximumError": "20mb"
211-
},
212-
{
213-
"type": "anyComponentStyle",
214-
"maximumWarning": "6kb",
215-
"maximumError": "20kb"
216-
}
217-
],
218-
"baseHref": "/admin/",
219-
"outputHashing": "all",
181+
"buildOptimizer": false,
182+
"optimization": false,
183+
"vendorChunk": true,
184+
"extractLicenses": false,
185+
"sourceMap": true,
186+
"namedChunks": true,
220187
"stylePreprocessorOptions": {
221-
"includePaths": ["libs/styles/src/lib/themes/oort"]
188+
"includePaths": ["libs/styles/src/lib/themes/default"]
222189
}
223190
},
224-
"oort-demo": {
191+
"local-uat": {
225192
"fileReplacements": [
226193
{
227194
"replace": "apps/back-office/src/environments/environment.ts",
228-
"with": "apps/back-office/src/environments/environment.oort.demo.ts"
195+
"with": "apps/back-office/src/environments/environment.local.uat.ts"
229196
}
230197
],
231-
"budgets": [
232-
{
233-
"type": "initial",
234-
"maximumWarning": "12mb",
235-
"maximumError": "20mb"
236-
},
237-
{
238-
"type": "anyComponentStyle",
239-
"maximumWarning": "6kb",
240-
"maximumError": "20kb"
241-
}
242-
],
243-
"baseHref": "/admin/",
244-
"outputHashing": "all",
198+
"buildOptimizer": false,
199+
"optimization": false,
200+
"vendorChunk": true,
201+
"extractLicenses": false,
202+
"sourceMap": true,
203+
"namedChunks": true,
245204
"stylePreprocessorOptions": {
246-
"includePaths": ["libs/styles/src/lib/themes/oort"]
205+
"includePaths": ["libs/styles/src/lib/themes/default"]
247206
}
248207
},
249-
"oort-local": {
208+
"local-dev": {
250209
"fileReplacements": [
251210
{
252211
"replace": "apps/back-office/src/environments/environment.ts",
253-
"with": "apps/back-office/src/environments/environment.oort.local.ts"
212+
"with": "apps/back-office/src/environments/environment.local.dev.ts"
254213
}
255214
],
256215
"buildOptimizer": false,
@@ -260,7 +219,7 @@
260219
"sourceMap": true,
261220
"namedChunks": true,
262221
"stylePreprocessorOptions": {
263-
"includePaths": ["libs/styles/src/lib/themes/oort"]
222+
"includePaths": ["libs/styles/src/lib/themes/default"]
264223
}
265224
},
266225
"development": {
@@ -275,16 +234,19 @@
275234
}
276235
}
277236
},
278-
"defaultConfiguration": "oort-prod"
237+
"defaultConfiguration": "azure-dev"
279238
},
280239
"serve": {
281240
"executor": "@angular-devkit/build-angular:dev-server",
282241
"configurations": {
283-
"oort-prod": {
284-
"browserTarget": "back-office:build:oort-prod"
242+
"local-prod": {
243+
"browserTarget": "back-office:build:local-prod"
244+
},
245+
"local-uat": {
246+
"browserTarget": "back-office:build:local-uat"
285247
},
286-
"oort-local": {
287-
"browserTarget": "back-office:build:oort-local"
248+
"local-dev": {
249+
"browserTarget": "back-office:build:local-dev"
288250
},
289251
"development": {
290252
"browserTarget": "back-office:build:development"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { AuthConfig } from 'angular-oauth2-oidc';
2+
import { theme } from '../themes/default/default.dev';
3+
import { sharedEnvironment } from './environment.shared';
4+
import { Environment } from './environment.type';
5+
6+
/**
7+
* Authentication configuration
8+
*/
9+
const authConfig: AuthConfig = {
10+
/* cSpell:disable */
11+
issuer:
12+
'https://login.microsoftonline.com/f610c0b7-bd24-4b39-810b-3dc280afb590/v2.0',
13+
redirectUri: 'http://localhost:4200/',
14+
postLogoutRedirectUri: 'http://localhost:4200/auth/',
15+
clientId: '021202ac-d23b-4757-83e3-f6ecde12266b',
16+
scope:
17+
'openid profile email offline_access offline_access api://75deca06-ae07-4765-85c0-23e719062833/access_as_user',
18+
// Last scope is used to authenticate against Common Services
19+
responseType: 'code',
20+
showDebugInformation: true,
21+
strictDiscoveryDocumentValidation: false,
22+
/* cSpell:enable */
23+
};
24+
25+
/**
26+
* Environment file for local development.
27+
*/
28+
export const environment: Environment = {
29+
/* cSpell:disable */
30+
...sharedEnvironment,
31+
production: false,
32+
href: 'http://localhost:4200',
33+
apiUrl: 'http://localhost:3000',
34+
subscriptionApiUrl: 'ws://localhost:3000',
35+
frontOfficeUri: 'https://hems-dev.who.int/apps/',
36+
backOfficeUri: 'http://localhost:4200/',
37+
module: 'backoffice',
38+
availableLanguages: ['en'],
39+
authConfig,
40+
esriApiKey:
41+
'AAPKf2bae9b3f32943e2a8d58b0b96ffea3fj8Vt8JYDt1omhzN_lONXPRHN8B89umU-pA9t7ze1rfCIiiEVXizYEiFRFiVrl6wg',
42+
theme,
43+
availableWidgets: [
44+
'donut-chart',
45+
'line-chart',
46+
'bar-chart',
47+
'column-chart',
48+
'pie-chart',
49+
'polar-chart',
50+
'radar-chart',
51+
'grid',
52+
'text',
53+
'map',
54+
'summaryCard',
55+
'tabs',
56+
],
57+
user: {
58+
attributes: ['country', 'region', 'location', 'department'],
59+
},
60+
admin0Url: 'https://hems-dev.who.int/app-builder/admin0.json',
61+
csApiUrl: 'https://hems-dev.who.int/csapi/api',
62+
csDocUrl: 'https://hems-dev.who.int/csdocui',
63+
/* cSpell:enable */
64+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { AuthConfig } from 'angular-oauth2-oidc';
2+
import { theme } from '../themes/default/default.dev';
3+
import { sharedEnvironment } from './environment.shared';
4+
import { Environment } from './environment.type';
5+
6+
/**
7+
* Authentication configuration
8+
*/
9+
const authConfig: AuthConfig = {
10+
/* cSpell:disable */
11+
issuer:
12+
'https://login.microsoftonline.com/f610c0b7-bd24-4b39-810b-3dc280afb590/v2.0',
13+
redirectUri: 'http://localhost:4200/',
14+
postLogoutRedirectUri: 'http://localhost:4200/auth/',
15+
clientId: '021202ac-d23b-4757-83e3-f6ecde12266b',
16+
scope:
17+
'openid profile email offline_access offline_access api://75deca06-ae07-4765-85c0-23e719062833/access_as_user',
18+
// Last scope is used to authenticate against Common Services
19+
responseType: 'code',
20+
showDebugInformation: true,
21+
strictDiscoveryDocumentValidation: false,
22+
/* cSpell:enable */
23+
};
24+
25+
/**
26+
* Environment file for local development.
27+
*/
28+
export const environment: Environment = {
29+
/* cSpell:disable */
30+
...sharedEnvironment,
31+
production: false,
32+
href: 'http://localhost:4200',
33+
apiUrl: 'http://localhost:3000',
34+
subscriptionApiUrl: 'ws://localhost:3000',
35+
frontOfficeUri: 'https://hems.who.int/apps/',
36+
backOfficeUri: 'http://localhost:4200/',
37+
module: 'backoffice',
38+
availableLanguages: ['en'],
39+
authConfig,
40+
esriApiKey:
41+
'AAPKf2bae9b3f32943e2a8d58b0b96ffea3fj8Vt8JYDt1omhzN_lONXPRHN8B89umU-pA9t7ze1rfCIiiEVXizYEiFRFiVrl6wg',
42+
theme,
43+
availableWidgets: [
44+
'donut-chart',
45+
'line-chart',
46+
'bar-chart',
47+
'column-chart',
48+
'pie-chart',
49+
'polar-chart',
50+
'radar-chart',
51+
'grid',
52+
'text',
53+
'map',
54+
'summaryCard',
55+
'tabs',
56+
],
57+
user: {
58+
attributes: ['country', 'region', 'location', 'department'],
59+
},
60+
admin0Url: 'https://hems.who.int/app-builder/admin0.json',
61+
csApiUrl: 'https://hems.who.int/csapi/api',
62+
csDocUrl: 'https://hems.who.int/csdocui',
63+
/* cSpell:enable */
64+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { AuthConfig } from 'angular-oauth2-oidc';
2+
import { theme } from '../themes/default/default.dev';
3+
import { sharedEnvironment } from './environment.shared';
4+
import { Environment } from './environment.type';
5+
6+
/**
7+
* Authentication configuration
8+
*/
9+
const authConfig: AuthConfig = {
10+
/* cSpell:disable */
11+
issuer:
12+
'https://login.microsoftonline.com/f610c0b7-bd24-4b39-810b-3dc280afb590/v2.0',
13+
redirectUri: 'http://localhost:4200/',
14+
postLogoutRedirectUri: 'http://localhost:4200/auth/',
15+
clientId: '021202ac-d23b-4757-83e3-f6ecde12266b',
16+
scope:
17+
'openid profile email offline_access offline_access api://75deca06-ae07-4765-85c0-23e719062833/access_as_user',
18+
// Last scope is used to authenticate against Common Services
19+
responseType: 'code',
20+
showDebugInformation: true,
21+
strictDiscoveryDocumentValidation: false,
22+
/* cSpell:enable */
23+
};
24+
25+
/**
26+
* Environment file for local development.
27+
*/
28+
export const environment: Environment = {
29+
/* cSpell:disable */
30+
...sharedEnvironment,
31+
production: false,
32+
href: 'http://localhost:4200',
33+
apiUrl: 'http://localhost:3000',
34+
subscriptionApiUrl: 'ws://localhost:3000',
35+
frontOfficeUri: 'https://hems-test.who.int/apps/',
36+
backOfficeUri: 'http://localhost:4200/',
37+
module: 'backoffice',
38+
availableLanguages: ['en'],
39+
authConfig,
40+
esriApiKey:
41+
'AAPKf2bae9b3f32943e2a8d58b0b96ffea3fj8Vt8JYDt1omhzN_lONXPRHN8B89umU-pA9t7ze1rfCIiiEVXizYEiFRFiVrl6wg',
42+
theme,
43+
availableWidgets: [
44+
'donut-chart',
45+
'line-chart',
46+
'bar-chart',
47+
'column-chart',
48+
'pie-chart',
49+
'polar-chart',
50+
'radar-chart',
51+
'grid',
52+
'text',
53+
'map',
54+
'summaryCard',
55+
'tabs',
56+
],
57+
user: {
58+
attributes: ['country', 'region', 'location', 'department'],
59+
},
60+
admin0Url: 'https://hems-test.who.int/app-builder/admin0.json',
61+
csApiUrl: 'https://hems-test.who.int/csapi/api',
62+
csDocUrl: 'https://hems-test.who.int/csdocui',
63+
/* cSpell:enable */
64+
};

apps/back-office/src/environments/environment.oort.demo.ts

-47
This file was deleted.

0 commit comments

Comments
 (0)