-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathviewConfig.js
67 lines (54 loc) · 2.24 KB
/
viewConfig.js
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
/**
* Copyright (c) 2016, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or
* https://opensource.org/licenses/BSD-3-Clause
*/
/**
* ./viewConfig.js
*
* Configuration Settings for Views
*/
'use strict'; // eslint-disable-line strict
const pe = process.env; // eslint-disable-line no-process-env
/*
* Browser clients can get jittery or start to feel stuck when receiving large
* bursts of realtime events when each event requires some client-side
* processing and DOM manipulation and graphics re-rendering.
* We use realtimeEventThrottleMilliseconds to bundle up multiple
* server-side events into a single client-side event, so that the lens
* implementation can minimize the graphics re-rendering.
*/
const DEFAULT_THROTTLE_MILLISECS = 4000;
const realtimeEventThrottleMilliseconds =
pe.realtimeEventThrottleMilliseconds || DEFAULT_THROTTLE_MILLISECS;
/*
* Designate a separate real-time application for serving up real-time events.
* If not specified, the default is "/" which means real-time events are served
* via the main Refocus application itself.
*/
const realtimeApplication = pe.REALTIME_APPLICATION || '/';
const realtimeApplicationImc = pe.REALTIME_APPLICATION_IMC || '/';
/**
* By supplying a mapping from a specific url parameter to different roomTypes
* we can select the correct roomType for a specific user or use case.
*/
const roomTypeMapping = pe.ROOMTYPE_MAPPING || '{}';
const defaultRoomType = pe.DEFAULT_ROOMTYPE || '';
module.exports = {
// Password stored in the db for SSO users (never used for authentication).
dummySsoPassword: pe.DUMMY_SSO_PASSWORD || 'ssopassword',
// Make the Google Analytics trackingId available in /view.
trackingId: pe.GOOGLE_ANALYTICS_ID || 'N/A',
// Make the real-time app endpoint available in /view for perspectives
realtimeApplication,
// Make the real-time app endpoint available in /view for Imc rooms
realtimeApplicationImc,
// Make the throttle time available in /view.
realtimeEventThrottleMilliseconds,
// Make the roomType mapping available in /view for IMC rooms
roomTypeMapping,
// Make the default roomType available in /view for IMC rooms
defaultRoomType,
};