-
Notifications
You must be signed in to change notification settings - Fork 521
Expand file tree
/
Copy pathenvironment.test.ts
More file actions
433 lines (412 loc) · 11.7 KB
/
environment.test.ts
File metadata and controls
433 lines (412 loc) · 11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
// This configuration is only used for unit tests, end-to-end tests use environment.production.ts
import { BuildConfig } from 'src/config/build-config.interface';
import { RestRequestMethod } from '../app/core/data/rest-request-method';
import { NotificationAnimationsType } from '../app/shared/notifications/models/notification-animations-type';
export const environment: BuildConfig = {
production: false,
// Angular SSR (Server Side Rendering) settings
ssr: {
enabled: true,
enablePerformanceProfiler: false,
inlineCriticalCss: false,
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ],
enableSearchComponent: false,
enableBrowseComponent: false,
},
// Angular express server settings.
ui: {
ssl: false,
host: 'dspace.com',
port: 80,
// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: '/angular-dspace',
baseUrl: 'http://dspace.com/angular-dspace',
// The rateLimiter settings limit each IP to a 'max' of 500 requests per 'windowMs' (1 minute).
rateLimiter: {
windowMs: 1 * 60 * 1000, // 1 minute
max: 500, // limit each IP to 500 requests per windowMs
},
useProxies: true,
},
// The REST API server settings.
rest: {
ssl: true,
host: 'rest.com',
port: 443,
// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: '/api',
baseUrl: 'https://rest.com/api',
},
actuators: {
endpointPath: '/actuator/health',
},
// Caching settings
cache: {
// NOTE: how long should objects be cached for by default
msToLive: {
default: 15 * 60 * 1000, // 15 minutes
},
// msToLive: 1000, // 15 minutes
control: 'max-age=60',
autoSync: {
defaultTime: 0,
maxBufferSize: 100,
timePerMethod: { [RestRequestMethod.PATCH]: 3 } as any, // time in seconds
},
// In-memory cache of server-side rendered pages. Disabled in test environment (max=0)
serverSide: {
debug: false,
headers: ['Link'],
botCache: {
max: 0,
timeToLive: 24 * 60 * 60 * 1000, // 1 day
allowStale: true,
},
anonymousCache: {
max: 0,
timeToLive: 10 * 1000, // 10 seconds
allowStale: true,
},
},
},
// Authentication settings
auth: {
// Authentication UI settings
ui: {
// the amount of time before the idle warning is shown
timeUntilIdle: 20000,
// the amount of time the user has to react after the idle warning is shown before they are logged out.
idleGracePeriod: 20000, // 20 sec
},
// Authentication REST settings
rest: {
// If the rest token expires in less than this amount of time, it will be refreshed automatically.
// This is independent from the idle warning.
timeLeftBeforeTokenRefresh: 20000, // 20 sec
},
},
// Form settings
form: {
spellCheck: true,
// NOTE: Map server-side validators to comparative Angular form validators
validatorMap: {
required: 'required',
regex: 'pattern',
},
},
// Notifications
notifications: {
rtl: false,
position: ['top', 'right'],
maxStack: 8,
// NOTE: after how many seconds notification is closed automatically. If set to zero notifications are not closed automatically
timeOut: 5000,
clickToClose: true,
// NOTE: 'fade' | 'fromTop' | 'fromRight' | 'fromBottom' | 'fromLeft' | 'rotate' | 'scale'
animate: NotificationAnimationsType.Scale,
},
// Submission settings
submission: {
autosave: {
// NOTE: which metadata trigger an autosave
metadata: ['dc.title', 'dc.identifier.doi', 'dc.identifier.pmid', 'dc.identifier.arxiv'],
// NOTE: every how many minutes submission is saved automatically
timer: 5,
},
duplicateDetection: {
alwaysShowSection: false,
},
typeBind: {
field: 'dc.type',
},
icons: {
metadata: [
{
name: 'mainField',
style: 'fas fa-user',
},
{
name: 'relatedField',
style: 'fas fa-university',
},
{
name: 'otherRelatedField',
style: 'fas fa-circle',
},
{
name: 'default',
style: '',
},
],
authority: {
confidence: [
{
value: 600,
style: 'text-success',
icon: 'fa-circle-check',
},
{
value: 500,
style: 'text-info',
icon: 'fa-gear',
},
{
value: 400,
style: 'text-warning',
icon: 'fa-circle-question',
},
{
value: 'default',
style: 'text-muted',
icon: 'fa-circle-xmark',
},
],
},
},
},
// NOTE: will log all redux actions and transfers in console
debug: false,
// Default Language in which the UI will be rendered if the user's browser language is not an active language
defaultLanguage: 'en',
// Languages. DSpace Angular holds a message catalog for each of the following languages.
// When set to active, users will be able to switch to the use of this language in the user interface.
languages: [{
code: 'en',
label: 'English',
active: true,
}, {
code: 'de',
label: 'Deutsch',
active: true,
}, {
code: 'cs',
label: 'Čeština',
active: true,
}, {
code: 'nl',
label: 'Nederlands',
active: true,
}, {
code: 'pt',
label: 'Português',
active: true,
}, {
code: 'fr',
label: 'Français',
active: true,
}, {
code: 'lv',
label: 'Latviešu',
active: true,
}, {
code: 'bn',
label: 'বাংলা',
active: true,
}, {
code: 'el',
label: 'Ελληνικά',
active: true,
}, {
code: 'disabled',
label: 'Disabled',
active: false,
}],
// Browse-By Pages
browseBy: {
// Amount of years to display using jumps of one year (current year - oneYearLimit)
oneYearLimit: 10,
// Limit for years to display using jumps of five years (current year - fiveYearLimit)
fiveYearLimit: 30,
// The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
defaultLowerLimit: 1900,
// Whether to add item thumbnail images to BOTH browse and search result lists.
showThumbnails: true,
// The number of entries in a paginated browse results list.
// Rounded to the nearest size in the list of selectable sizes on the
// settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
pageSize: 20,
},
communityList: {
pageSize: 20,
},
homePage: {
recentSubmissions: {
pageSize: 5,
//sort record of recent submission
sortField: 'dc.date.accessioned',
},
topLevelCommunityList: {
pageSize: 5,
},
showDiscoverFilters: false,
},
item: {
edit: {
undoTimeout: 10000, // 10 seconds
},
// Show the item access status label in items lists
showAccessStatuses: false,
bitstream: {
// Number of entries in the bitstream list in the item view page.
// Rounded to the nearest size in the list of selectable sizes on the
// settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
pageSize: 5,
},
},
community: {
searchSection: {
showSidebar: true,
},
},
collection: {
searchSection: {
showSidebar: true,
},
edit: {
undoTimeout: 10000, // 10 seconds
},
},
themes: [
{
name: 'full-item-page-theme',
regex: 'items/aa6c6c83-3a83-4953-95d1-2bc2e67854d2/full',
},
{
name: 'error-theme',
regex: 'collections/aaaa.*',
},
{
name: 'handle-theme',
handle: '10673/1233',
},
{
name: 'regex-theme',
regex: 'collections\/e8043bc2.*',
},
{
name: 'uuid-theme',
uuid: '0958c910-2037-42a9-81c7-dca80e3892b4',
},
{
name: 'base',
},
],
bundle: {
standardBundles: ['ORIGINAL', 'THUMBNAIL', 'LICENSE'],
},
mediaViewer: {
image: true,
video: true,
},
info: {
enableEndUserAgreement: true,
enablePrivacyStatement: true,
enableCOARNotifySupport: true,
},
markdown: {
enabled: false,
mathjax: false,
},
comcolSelectionSort: {
sortField:'dc.title',
sortDirection:'ASC',
},
qualityAssuranceConfig: {
sourceUrlMapForProjectSearch: {
openaire: 'https://explore.openaire.eu/search/project?projectId=',
},
pageSize: 5,
},
vocabularies: [
{
filter: 'subject',
vocabulary: 'srsc',
enabled: true,
},
],
suggestion: [],
search: {
advancedFilters: {
enabled: false,
filter: ['title', 'author', 'subject', 'entityType'],
},
},
notifyMetrics: [
{
title: 'admin-notify-dashboard.received-ldn',
boxes: [
{
color: '#B8DAFF',
title: 'admin-notify-dashboard.NOTIFY.incoming.accepted',
config: 'NOTIFY.incoming.accepted',
description: 'admin-notify-dashboard.NOTIFY.incoming.accepted.description',
},
{
color: '#D4EDDA',
title: 'admin-notify-dashboard.NOTIFY.incoming.processed',
config: 'NOTIFY.incoming.processed',
description: 'admin-notify-dashboard.NOTIFY.incoming.processed.description',
},
{
color: '#FDBBC7',
title: 'admin-notify-dashboard.NOTIFY.incoming.failure',
config: 'NOTIFY.incoming.failure',
description: 'admin-notify-dashboard.NOTIFY.incoming.failure.description',
},
{
color: '#FDBBC7',
title: 'admin-notify-dashboard.NOTIFY.incoming.untrusted',
config: 'NOTIFY.incoming.untrusted',
description: 'admin-notify-dashboard.NOTIFY.incoming.untrusted.description',
},
{
color: '#43515F',
title: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems',
textColor: '#fff',
config: 'NOTIFY.incoming.involvedItems',
description: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems.description',
},
],
},
{
title: 'admin-notify-dashboard.generated-ldn',
boxes: [
{
color: '#D4EDDA',
title: 'admin-notify-dashboard.NOTIFY.outgoing.delivered',
config: 'NOTIFY.outgoing.delivered',
description: 'admin-notify-dashboard.NOTIFY.outgoing.delivered.description',
},
{
color: '#B8DAFF',
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued',
config: 'NOTIFY.outgoing.queued',
description: 'admin-notify-dashboard.NOTIFY.outgoing.queued.description',
},
{
color: '#FDEEBB',
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry',
config: 'NOTIFY.outgoing.queued_for_retry',
description: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry.description',
},
{
color: '#FDBBC7',
title: 'admin-notify-dashboard.NOTIFY.outgoing.failure',
config: 'NOTIFY.outgoing.failure',
description: 'admin-notify-dashboard.NOTIFY.outgoing.failure.description',
},
{
color: '#43515F',
title: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems',
textColor: '#fff',
config: 'NOTIFY.outgoing.involvedItems',
description: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems.description',
},
],
},
],
liveRegion: {
messageTimeOutDurationMs: 30000,
isVisible: false,
},
};