-
Notifications
You must be signed in to change notification settings - Fork 7
/
config.js
511 lines (475 loc) · 17.6 KB
/
config.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
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
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
(function () {
const openmctMCWSConfig = {
/**
* camUrl: url to the CAM server this instance uses for auth.
* ***** REQUIRED *****
*/
camUrl: '',
/**
* mcwsUrl: url for MCWS root.
* ***** REQUIRED *****
*/
mcwsUrl: '',
/**
* theme: either 'Snow', 'Espresso' or 'Maelstrom'
*/
theme: 'Snow',
/**
* Namespaces: each entry below adds a root folder.
*
* Namespace Properties:
* * key: string, unique key for this namespace.
* * name: string, user-visible name for this namespace.
* * url: string, URL to MCWS namespace which will store the contents of
* the namespace
* * userNamespace: boolean, optional, defaults to false. If true, this
* namespace will be used to create per-user folders.
*
* ***** URL REQUIRED *****
*/
namespaces: [
{
key: 'r50-dev',
name: 'R5.0 Shared',
url: ''
},
{
userNamespace: true,
key: 'r50-dev',
name: 'R5.0 Users',
url: ''
}
],
/**
* venueAware - options here enable venue aware mode and allow
* configuration of venue aware mode. Added in R4.0.
*
* Venue aware configuration allows pre-configuration with a
* list of venues and datasets such that users are prompted to select
* either an active venue or a historical session that they'd like to
* review.
*
* Enabling venue-aware mode disables manual creation of datasets.
*/
venueAware: {
/**
* enabled: {true, false}
*/
enabled: false,
/**
* venues: either a list of venue definitions or a url for a JSON
* venue definition file.
* If a url is provided, it will be queried at run time
* to determine the venues available.
*
* An example of a JSON venue definition file is provided in
* "ExampleVenueDefinitions.json".
*/
venues: "ExampleVenueDefinitions.json"
},
/**
* Taxonomy: options here effect how various telemetry types are
* displayed.
*/
taxonomy: {
/**
* evrDefaultBackgroundColor: default background color for EVRs.
* Set to `undefined` to use the theme default. Otherwise, specify
* a hex string for an RGB color, e.g. `#ababab`.
*/
evrDefaultBackgroundColor: undefined,
/**
* evrDefaultForegoundColor: default foreground color for EVRs.
* Set to `undefined` to use the theme default. Otherwise, specify
* a hex string for an RGB color, e.g. `#ababab`.
*/
evrDefaultForegoundColor: undefined,
/**
* evrBackgroundColorByLevel: specify the background color of EVRs
* by level. If a level is not defined here, it will use the
* default specified above. Keys are specific EVR levels, and values
* must be a a hex string for an RGB color, e.g. `#ababab`.
*/
evrBackgroundColorByLevel: {
/** FSW Specific */
FATAL: '#ff0000',
WARNING_HI: '#ff7f24',
WARNING_LO: '#ffff00',
COMMAND: '#00bfff',
ACTIVITY_HI: '#6d6d6d',
ACTIVITY_LO: '#dcdcdc',
DIAGNOSTIC: '#00ff00',
EVR_UNKNOWN: '#00ff00',
/** SSE Specific */
FAULT: '#ff0000',
WARNING: '#ff7f24'
},
/**
* evrForegroundColorByLevel: specify the foreground color of EVRs
* by level. If a level is not defined here, it will use the
* default specified above. Keys are specific EVR levels, and values
* must be a a hex string for an RGB color, e.g. `#ababab`.
*/
evrForegroundColorByLevel: {
/** FSW Specific */
FATAL: '#ffffff',
WARNING_HI: '#000000',
WARNING_LO: '#000000',
COMMAND: '#ffffff',
ACTIVITY_HI: '#ffffff',
ACTIVITY_LO: '#000000',
DIAGNOSTIC: '#000000',
EVR_UNKNOWN: '#000000',
/** SSE Specific */
FAULT: '#ffffff',
WARNING: '#000000'
}
},
/**
* Settings for time APIs and formats.
*/
time: {
/**
* Default conductor mode. Available options:
*
* * 'fixed' : fixed time bounds.
* * 'utc.local' : follow local utc clock. Only available when
* allowRealtime is true and scet or ert timeSystems
* are available.
* * 'scet.lad' : follow latest scet seen in telemetry data. Only
* available when allowLAD is true and scet
* timeSystem is enabled.
* * 'ert.lad' : follow latest ert seen in telemetry data. Only
* available when allowLAD is true and ert
* timeSystem is enabled.
* * 'sclk.lad' : follow latest sclk seen in telemetry data. Only
* available when allowLAD is true and sclk
* timeSystem is enabled.
* * 'msl.sol.lad' : follow latest mslsol seen in telemetry data. Only
* available when allowLAD is true and mslsol
* timeSystem is enabled.
*/
defaultMode: 'fixed',
/**
* utcFormat: available options
*
* * 'utc.day-of-year': 2015-015T12:34:56.999
* * 'utc' : 2015-01-15T12:34:56.999
*/
utcFormat: 'utc.day-of-year',
/**
* optional
*
* lmstEpoch: Epoch date for LMST Time System
*
* It has to be a Date.UTC instance as follows:
* lmstEpoch: Date.UTC(2020, 2, 18, 0, 0, 0)
*/
lmstEpoch: Date.UTC(2020, 2, 18, 0, 0, 0),
/**
* timeSystems: specify the time systems to use.
* Options are 'scet', 'ert', 'sclk', 'msl.sol' and 'lmst'.
*/
timeSystems: [
'scet',
'ert',
'sclk',
'lmst'
],
/**
* timeSystems advanced configuration:
* Replace the above basic configuration with timeSystem specific configurations
*
* key property is required and other options are optional
* timeSystem:
* * key: string, required
* * limit: number, optional - maximum duration between start and end bounds allow
* * presets: array, optional - preset bounds for convenience
* * * preset:
* * * * label: string, descriptive label for preset
* * * * bounds: start and end bounds for preset as numbers
* * * * * * * * start and end can be declared as a number or a function returning a number
*
* *advanced** example configuration below
*
timeSystems: [
{
key:'scet',
presets: [
{
label: 'Last 2 hours',
bounds: {
start: Date.now() - 1000 * 60 * 60 * 2,
end: Date.now()
}
},
{
label: 'Last 1 hour',
bounds: {
start: Date.now() - 1000 * 60 * 60,
end: Date.now()
}
}
],
limit: 1000 * 60 * 60 * 6
},
{
key:'ert',
presets: [
{
label: 'Last 2 hours',
bounds: {
start: Date.now() - 1000 * 60 * 60 * 2,
end: Date.now()
}
},
{
label: 'Last 1 hour',
bounds: {
start: Date.now() - 1000 * 60 * 60,
end: Date.now()
}
}
],
limit: 1000 * 60 * 60 * 6
},
{
key:'sclk',
presets: [
{
label: 'Last 2 hours',
bounds: {
start: Date.now() - 1000 * 60 * 60 * 2,
end: Date.now()
}
},
{
label: 'Last 1 hour',
bounds: {
start: Date.now() - 1000 * 60 * 60,
end: Date.now()
}
}
],
limit: 1000 / 5 * 60 * 60 * 6
},
{
key:'lmst',
presets: []
}
],
*/
/**
* allowRealtime: whether or not to allow utc-relative time conductor.
*/
allowRealtime: true,
/**
* allowLAD: whether or not to allow latest data relative time conductor.
*/
allowLAD: true,
/**
* records: number of previous bounds per timeSystem to save in time conductor history.
*/
records: 10
},
/**
* Data Product Temporary Workaround:
*
* If you want to view real-time product data, you must specify all
* product APIDs that you want to see in the below array. This config
* is only required for MCWS R3.2, and will not be required for
* MCWS R3.3.
*
* This list can be quickly extracted from apid.xml with the following
* python code:
*
* import xml.etree.ElementTree as ET
* tree = ET.parse('apid.xml')
* apids = [int(a.attrib['number']) for a in tree.getroot() if a.tag == 'apid']
*
*/
realtimeProductAPIDs: [],
/**
* Plugin Support: true enables a plugin.
*/
plugins: {
/**
* Enable/disable summary widgets. Added in R3.4.0.
*/
summaryWidgets: true
},
/**
* maxResults: a maximum results limit for historical queries
*/
// maxResults: 10000,
/**
* sessionHistoricalMaxResults: a maximum results limit for historical session queries
*/
sessionHistoricalMaxResults: 100,
/**
* batchHistoricalChannelQueries: default false
* set to true to batch channel historical queries in telemetry tables
*
* USE WITH CAUTION
* You can more easily overwhelm the backend with a larger single query
*/
batchHistoricalChannelQueries: false,
/**
* enable to not send sort param in historical queries
* only set this configuration to true if you are certain you wish to disable backend sort
*/
disableSortParam: false,
/**
* Url used to listen to message stream for StartOfSession and
* EndOfSession messages
*/
messageStreamUrl: '',
/**
* Use to set mission specific filters on messages by message type
*
* Filter Object Properties:
* * value: string, message type code value
* * label: string, user-visible label for identifying this filter option
*/
messageTypeFilters: [
/**
* {value: 'LossOfSync', label: 'Loss of Sync'},
* ...
* {value: 'InSync', label: 'In Sync'}
*/
],
/**
* Use to set up expected VCID's in the frame event stream.
* Frame Accountability View will highlight the unexpected VC's in orange.
*/
frameAccountabilityExpectedVcidList: [
/**
* 234223,
* 234234,
* 223423
*/
],
/**
* Use to warn the user and block historical query when the ert, scet or lmst based time-conductor timespan exceeds set limits
* units - milliseconds
* !!when set to undefined, user will not be warned and queries will not be blocked
*/
queryTimespanLimit: undefined,
/**
* Time since last received realtime datum.
* Any datum that is received after the set timespan will have a stale (isStale) property set.
* units - milliseconds
* !!when set to undefined, there will be no global staleness timespan set.
*/
globalStalenessInterval: undefined,
/**
* Register custom formatters for use in Telemetry View in Display Layout's
* Custom Formatters need to be an object with a unique String "key" property
* and a "format" function that accepts a value and returns formatted value
*
* Custom formatters can be accessed in Display Layout's format inspector view,
* with a pre-pended '&', e.g the 'hello-world' formatter can be accessed by '&hello-world'
*/
customFormatters: [
/**
* {
key: 'hello-world',
format: (value) => {
return `hello-world: ${value}`;
}
}
*/
],
/**
* Use to set deployment specific session configuration
*
* historicalSessionFilter Object Properties:
* * disable: Boolean, to disable historical session filtering
* * maxRecords: Number, a number greater than 0, for maximum historical session records to be returned
*
* realtimeSession Object Properties:
* * disable: Boolean, to disable realtime sessions. Note - this will disable all websocket connections
*/
sessions: {
historicalSessionFilter: {
disable: false,
maxRecords: 100,
denyUnfilteredQueries: false
},
realtimeSession: {
disable: false
}
},
/**
* Enable global filters for ALL telemetry requests that support the filter
*
* How to use:
* The global filters will be available from the Global Filters indicator
*/
/*
globalFilters: [
{
name: 'VCID',
key: 'vcid',
icon: 'icon-flag',
filter: {
comparator: 'equals',
singleSelectionThreshold: true,
possibleValues: [
{
label: 'A Side',
value: '1,2,3'
},
{
label: 'B Side',
value: '4,5,6'
}
]
}
},
{
name: 'Realtime',
key: 'realtime',
filter: {
comparator: 'equals',
singleSelectionThreshold: true,
possibleValues: [
{
label: 'Realtime',
value: true
},
{
label: 'Recorded',
value: false
}
]
}
}
],
*/
/**
* Table Performance Mode Configuration
* Can increase performance by limiting the maximum rows retained and displayed by tables
* Affects all bounded table types such as Telemetry and EVR tables
* Does not affect latest available tables such as Channel tables
* @typedef TablePerformanceOptions
* @type {object}
* @property {('performance'|'unlimited')} telemetryMode performance mode limits the maximum table rows
* @property {Boolean} persistModeChange whether changes in the UI are persisted with the table
* @property {Number} rowLimit the maximum number of rows in performance mode
*/
tablePerformanceOptions: {
telemetryMode: 'unlimited',
persistModeChange: false,
rowLimit: 50
},
/**
* Developer Settings-- do not modify these unless you know what
* they do!
*/
assetPath: 'node_modules/openmct/dist',
// proxyUrl: 'http://localhost:8080/',
// useDeveloperStorage: true
};
window.openmctMCWSConfig = openmctMCWSConfig;
})();