Pass through plot options

This commit is contained in:
Khalid Adil 2024-10-01 11:27:01 -05:00
parent 7727a90ae1
commit f544a1ddbf
3 changed files with 7 additions and 5 deletions

View File

@ -324,7 +324,7 @@ export default class ConditionManager extends EventEmitter {
return currentCondition; return currentCondition;
} }
getHistoricalData() { getHistoricalData(options) {
if (!this.conditionSetDomainObject.configuration.shouldFetchHistorical) { if (!this.conditionSetDomainObject.configuration.shouldFetchHistorical) {
return []; return [];
} }
@ -332,7 +332,8 @@ export default class ConditionManager extends EventEmitter {
this.openmct, this.openmct,
this.telemetryObjects, this.telemetryObjects,
this.conditions, this.conditions,
this.conditionSetDomainObject this.conditionSetDomainObject,
options
); );
return historicalTelemetry.getHistoricalData(); return historicalTelemetry.getHistoricalData();
} }

View File

@ -42,7 +42,7 @@ export default class ConditionSetTelemetryProvider {
async request(domainObject, options) { async request(domainObject, options) {
let conditionManager = this.getConditionManager(domainObject); let conditionManager = this.getConditionManager(domainObject);
const formattedHistoricalData = await conditionManager.getHistoricalData(); const formattedHistoricalData = await conditionManager.getHistoricalData(options);
let latestOutput = await conditionManager.requestLADConditionSetOutput(options); let latestOutput = await conditionManager.requestLADConditionSetOutput(options);
return [...formattedHistoricalData, ...latestOutput]; return [...formattedHistoricalData, ...latestOutput];
} }

View File

@ -1,5 +1,5 @@
export default class HistoricalTelemetryProvider { export default class HistoricalTelemetryProvider {
constructor(openmct, telemetryObjects, conditions, conditionSetDomainObject) { constructor(openmct, telemetryObjects, conditions, conditionSetDomainObject, options) {
this.openmct = openmct; this.openmct = openmct;
this.telemetryObjects = telemetryObjects; this.telemetryObjects = telemetryObjects;
this.bounds = { start: null, end: null }; this.bounds = { start: null, end: null };
@ -9,6 +9,7 @@ export default class HistoricalTelemetryProvider {
this.historicalTelemetryPoolMap = new Map(); this.historicalTelemetryPoolMap = new Map();
this.historicalTelemetryDateMap = new Map(); this.historicalTelemetryDateMap = new Map();
this.index = 0; this.index = 0;
this.options = options;
} }
setTimeBounds(bounds) { setTimeBounds(bounds) {
@ -21,7 +22,7 @@ export default class HistoricalTelemetryProvider {
domainObject = await this.openmct.objects.get(identifier); domainObject = await this.openmct.objects.get(identifier);
} }
const id = this.openmct.objects.makeKeyString(domainObject.identifier); const id = this.openmct.objects.makeKeyString(domainObject.identifier);
const telemetryOptions = { ...this.bounds }; const telemetryOptions = { ...this.bounds, ...this.options };
const historicalTelemetry = await this.openmct.telemetry.request( const historicalTelemetry = await this.openmct.telemetry.request(
domainObject, domainObject,
telemetryOptions telemetryOptions