mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 05:38:12 +00:00
Add time context to telemetry requests (#5887)
* add time context to telemetry requests * change to empty array * refactor telemetry api to use time context * removed unused function * add tests * add test, rename function * make function public
This commit is contained in:
@ -282,12 +282,15 @@ export default {
|
||||
this.limitEvaluator = this.openmct.telemetry.limitEvaluator(this.domainObject);
|
||||
this.formats = this.openmct.telemetry.getFormatMap(this.metadata);
|
||||
|
||||
this.timeContext = this.openmct.time.getContextForView(this.objectPath);
|
||||
|
||||
const valueMetadata = this.metadata ? this.metadata.value(this.item.value) : {};
|
||||
this.customStringformatter = this.openmct.telemetry.customStringFormatter(valueMetadata, this.item.format);
|
||||
|
||||
this.telemetryCollection = this.openmct.telemetry.requestCollection(this.domainObject, {
|
||||
size: 1,
|
||||
strategy: 'latest'
|
||||
strategy: 'latest',
|
||||
timeContext: this.timeContext
|
||||
});
|
||||
this.telemetryCollection.on('add', this.setLatestValues);
|
||||
this.telemetryCollection.on('clear', this.refreshData);
|
||||
|
Reference in New Issue
Block a user