|
84 | 84 | evrDefaultBackgroundColor: undefined, |
85 | 85 |
|
86 | 86 | /** |
87 | | - * evrDefaultForegoundColor: default foreground color for EVRs. |
| 87 | + * evrDefaultForegroundColor: default foreground color for EVRs. |
88 | 88 | * Set to `undefined` to use the theme default. Otherwise, specify |
89 | 89 | * a hex string for an RGB color, e.g. `#ababab`. |
90 | 90 | */ |
91 | | - evrDefaultForegoundColor: undefined, |
| 91 | + evrDefaultForegroundColor: undefined, |
92 | 92 |
|
93 | 93 | /** |
94 | 94 | * evrBackgroundColorByLevel: specify the background color of EVRs |
|
181 | 181 | */ |
182 | 182 | lmstEpoch: Date.UTC(2020, 2, 18, 0, 0, 0), |
183 | 183 |
|
| 184 | + /* |
| 185 | + * subscriptionMCWSFilterDelay: delay in milliseconds for combining filters for the same subscription |
| 186 | + * endpoint connection. Smaller value = quicker display of realtime data (ex, 10ms in a |
| 187 | + * low latency environment), higher value = avoids potentially creating and subsequently tearing down new websocket connections if filter changes are happening faster than server response times |
| 188 | + * (ex, 100ms+ in a high latency environment) |
| 189 | + */ |
| 190 | + subscriptionMCWSFilterDelay: 100, |
| 191 | + |
184 | 192 | /** |
185 | 193 | * timeSystems: specify the time systems to use. |
186 | 194 | * Options are 'scet', 'ert', 'sclk', 'msl.sol' and 'lmst'. |
|
193 | 201 | * |
194 | 202 | * key property is required and other options are optional |
195 | 203 | * timeSystem: |
196 | | - * * key: string, required |
| 204 | + * * key: string, required. Time system. Options are 'scet', 'ert', 'sclk', 'msl.sol' and 'lmst'. |
197 | 205 | * * limit: number, optional - maximum duration between start and end bounds allow |
198 | | - * * presets: array, optional - preset bounds for convenience |
199 | | - * * * preset: |
200 | | - * * * * label: string, descriptive label for preset |
| 206 | + * * modeSettings: object, optional - presets for convenience. |
| 207 | + * * * fixed: object, optional - valid objects are bounds objects and presets array. |
| 208 | + * * * realtime: object, optional - valid objects are clockOffsets and presets array. |
| 209 | + * * * lad:object, optional - valid objects are clockOffsets. |
| 210 | + * * * * |
| 211 | + * * * * Optional objects: |
201 | 212 | * * * * bounds: start and end bounds for preset as numbers |
202 | | - * * * * * * * * start and end can be declared as a number or a function returning a number |
203 | | - * |
| 213 | + * * * * * * * * start: and end: can be declared as a number or a function returning a number |
| 214 | + * * * * presets: array of objects consisting of: |
| 215 | + * * * * * bounds: - required. |
| 216 | + * * * * * label: - required, string |
| 217 | + * * * * clockOffsets: object, optional. Start and end relative to active clock. |
| 218 | + * * * * start: and end: numbers relative to active clock's 0. Start is negative, end is positive. |
204 | 219 | * *advanced** example configuration below |
205 | 220 | * |
206 | 221 | timeSystems: [ |
207 | | - { |
208 | | - key:'scet', |
209 | | - presets: [ |
210 | | - { |
211 | | - label: 'Last 2 hours', |
212 | | - bounds: { |
213 | | - start: Date.now() - 1000 * 60 * 60 * 2, |
214 | | - end: Date.now() |
215 | | - } |
| 222 | + { |
| 223 | + key:'scet', |
| 224 | + modeSettings:{ |
| 225 | + fixed:{ |
| 226 | + bounds:{ |
| 227 | + // 1 day ago |
| 228 | + start: new Date( |
| 229 | + Date.UTC( |
| 230 | + new Date().getUTCFullYear(), |
| 231 | + new Date().getUTCMonth(), |
| 232 | + new Date().getUTCDate() |
| 233 | + ) - 1 * 864e5 |
| 234 | + ).getTime(), |
| 235 | + end: new Date( |
| 236 | + Date.UTC( |
| 237 | + new Date().getUTCFullYear(), |
| 238 | + new Date().getUTCMonth(), |
| 239 | + new Date().getUTCDate() |
| 240 | + ) + 864e5 - 1 |
| 241 | + ).getTime() |
216 | 242 | }, |
217 | | - { |
218 | | - label: 'Last 1 hour', |
219 | | - bounds: { |
220 | | - start: Date.now() - 1000 * 60 * 60, |
221 | | - end: Date.now() |
222 | | - } |
| 243 | + presets:[ |
| 244 | + { |
| 245 | + label: 'Last 2 hours (SCET Recorded)', |
| 246 | + bounds: { |
| 247 | + start: () => Date.now() - 1000 * 60 * 60 * 2, |
| 248 | + end: () => Date.now() |
223 | 249 | } |
224 | | - ], |
225 | | - limit: 1000 * 60 * 60 * 6 |
226 | | - }, |
227 | | - { |
228 | | - key:'ert', |
229 | | - presets: [ |
230 | | - { |
231 | | - label: 'Last 2 hours', |
232 | | - bounds: { |
233 | | - start: Date.now() - 1000 * 60 * 60 * 2, |
234 | | - end: Date.now() |
235 | | - } |
236 | | - }, |
237 | | - { |
238 | | - label: 'Last 1 hour', |
239 | | - bounds: { |
240 | | - start: Date.now() - 1000 * 60 * 60, |
241 | | - end: Date.now() |
242 | | - } |
| 250 | + }, |
| 251 | + ] |
| 252 | + }, |
| 253 | + realtime:{ |
| 254 | + clockOffsets:{ |
| 255 | + start: -60 * 60 * 1000, |
| 256 | + end: 5 * 60 * 1000 |
| 257 | + }, |
| 258 | + presets:[ |
| 259 | + { |
| 260 | + label: 'Last 2 hours (SCET Realtime)', |
| 261 | + bounds: { |
| 262 | + start: -60 * 60 * 1000 * 2, |
| 263 | + end: 5 * 60 * 1000 |
243 | 264 | } |
244 | | - ], |
245 | | - limit: 1000 * 60 * 60 * 6 |
| 265 | + } |
| 266 | + ] |
| 267 | + }, |
| 268 | + lad:{ |
| 269 | + clockOffsets:{ |
| 270 | + start: -60 * 60 * 1000, |
| 271 | + end: 5 * 60 * 1000 |
| 272 | + }, |
| 273 | + }, |
| 274 | + }, |
| 275 | + limit: 1000 * 60 * 60 * 60 |
| 276 | + }, |
| 277 | + { |
| 278 | + key:'ert', |
| 279 | + modeSettings:{ |
| 280 | + fixed:{ |
| 281 | + bounds:{ |
| 282 | + // 1 day ago |
| 283 | + start: new Date( |
| 284 | + Date.UTC( |
| 285 | + new Date().getUTCFullYear(), |
| 286 | + new Date().getUTCMonth(), |
| 287 | + new Date().getUTCDate() |
| 288 | + ) - 1 * 864e5 |
| 289 | + ).getTime(), |
| 290 | + // today |
| 291 | + end: new Date( |
| 292 | + Date.UTC( |
| 293 | + new Date().getUTCFullYear(), |
| 294 | + new Date().getUTCMonth(), |
| 295 | + new Date().getUTCDate() |
| 296 | + ) + 864e5 - 1 |
| 297 | + ).getTime() |
246 | 298 | }, |
247 | | - { |
248 | | - key:'sclk', |
249 | | - presets: [ |
250 | | - { |
251 | | - label: 'Last 2 hours', |
252 | | - bounds: { |
253 | | - start: Date.now() - 1000 * 60 * 60 * 2, |
254 | | - end: Date.now() |
255 | | - } |
256 | | - }, |
257 | | - { |
258 | | - label: 'Last 1 hour', |
259 | | - bounds: { |
260 | | - start: Date.now() - 1000 * 60 * 60, |
261 | | - end: Date.now() |
262 | | - } |
263 | | - } |
264 | | - ], |
265 | | - limit: 1000 / 5 * 60 * 60 * 6 |
| 299 | + presets:[ |
| 300 | + { |
| 301 | + label: 'Last 2 hours (ERT Recorded)', |
| 302 | + bounds: { |
| 303 | + start: Date.now() - 1000 * 60 * 60 * 2, |
| 304 | + end: Date.now() |
| 305 | + } |
| 306 | + }, |
| 307 | + ] |
266 | 308 | }, |
267 | | - { |
268 | | - key:'lmst', |
269 | | - presets: [] |
270 | | - } |
271 | | - ], |
272 | | - */ |
| 309 | + realtime:{ |
| 310 | + clockOffsets:{ |
| 311 | + start: -60 * 60 * 1000, |
| 312 | + end: 5 * 60 * 1000 |
| 313 | + }, |
| 314 | + presets:[ |
| 315 | + { |
| 316 | + label: 'Last 2 hours (ERT Realtime)', |
| 317 | + bounds: { |
| 318 | + start: -60 * 60 * 1000 * 2, |
| 319 | + end: 5 * 60 * 1000 |
| 320 | + } |
| 321 | + } |
| 322 | + ] |
| 323 | + }, |
| 324 | + lad:{ |
| 325 | + clockOffsets:{ |
| 326 | + start: -60 * 60 * 1000, |
| 327 | + end: 5 * 60 * 1000 |
| 328 | + }, |
| 329 | + }, |
| 330 | + }, |
| 331 | + limit: 1000 * 60 * 60 * 60 |
| 332 | + } |
| 333 | + ], |
| 334 | + */ |
273 | 335 |
|
274 | 336 | /** |
275 | 337 | * allowRealtime: whether or not to allow utc-relative time conductor. |
|
287 | 349 | records: 10 |
288 | 350 | }, |
289 | 351 |
|
| 352 | + /** |
| 353 | + * Data Product Temporary Workaround: |
| 354 | + * |
| 355 | + * If you want to view real-time product data, you must specify all |
| 356 | + * product APIDs that you want to see in the below array. This config |
| 357 | + * is only required for MCWS R3.2, and will not be required for |
| 358 | + * MCWS R3.3. |
| 359 | + * |
| 360 | + * This list can be quickly extracted from apid.xml with the following |
| 361 | + * python code: |
| 362 | + * |
| 363 | + * temporarily disable spellcheck, to be removed in https://github.com/NASA-AMMOS/openmct-mcws/issues/303 |
| 364 | + * cspell:disable |
| 365 | + * import xml.etree.ElementTree as ET |
| 366 | + * tree = ET.parse('apid.xml') |
| 367 | + * apids = [int(a.attrib['number']) for a in tree.getroot() if a.tag == 'apid'] |
| 368 | + * cspell:enable |
| 369 | + * |
| 370 | + */ |
| 371 | + realtimeProductAPIDs: [], |
| 372 | + |
290 | 373 | /** |
291 | 374 | * Plugin Support |
292 | 375 | * Example configuration: |
|
0 commit comments