From 38316bd2f54cae9d420fb8ca3abcbb0c766e002a Mon Sep 17 00:00:00 2001 From: Scott Bell Date: Fri, 4 Oct 2024 09:46:51 +0200 Subject: [PATCH 1/3] more debug just in case --- src/api/telemetry/TelemetryCollection.js | 23 ++++++++++++++++++----- src/plugins/comps/CompsManager.js | 2 +- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/api/telemetry/TelemetryCollection.js b/src/api/telemetry/TelemetryCollection.js index 10b6a6144b..2ff078caf4 100644 --- a/src/api/telemetry/TelemetryCollection.js +++ b/src/api/telemetry/TelemetryCollection.js @@ -75,7 +75,7 @@ export default class TelemetryCollection extends EventEmitter { this.modeChanged = false; console.debug( - `🫙 Created telemetry for ${this.domainObject.name} with bounds ${options.start} and ${options.end}` + `🫙 Created telemetry for ${this.domainObject.name} with bounds ${new Date(options.start).toISOString()} and ${new Date(options.end).toISOString()}` ); } @@ -98,7 +98,7 @@ export default class TelemetryCollection extends EventEmitter { this.lastBounds.end = this.options.end; } console.debug( - `🫙 Bounds for collection are start ${this.lastBounds.start} and end ${this.lastBounds.end}` + `🫙 Bounds for collection are start ${new Date(this.lastBounds.start).toISOString()} and end ${new Date(this.lastBounds.end).toISOString()}` ); this._watchBounds(); this._watchTimeSystem(); @@ -144,6 +144,9 @@ export default class TelemetryCollection extends EventEmitter { * @private */ async _requestHistoricalTelemetry() { + console.debug( + `🫙 Requesting historical telemetry with start ${new Date(this.lastBounds.start).toISOString()} and end ${new Date(this.lastBounds.end).toISOString()}}` + ); let options = this.openmct.telemetry.standardizeRequestOptions({ ...this.options }); const historicalProvider = this.openmct.telemetry.findRequestProvider( this.domainObject, @@ -229,7 +232,6 @@ export default class TelemetryCollection extends EventEmitter { let hasDataBeforeStartBound = false; let size = this.options.size; let enforceSize = size !== undefined && this.options.enforceSize; - console.debug(`🫙 Bounds are telemetry are currently`, this.lastBounds); // loop through, sort and dedupe for (let datum of data) { @@ -237,6 +239,13 @@ export default class TelemetryCollection extends EventEmitter { beforeStartOfBounds = parsedValue < this.lastBounds.start; afterEndOfBounds = parsedValue > this.lastBounds.end; + if (beforeStartOfBounds) { + console.debug( + `🫙 Datum is before start of bounds: ${new Date(parsedValue).toISOString()} < ${new Date(this.lastBounds.start).toISOString()}`, + this.options + ); + } + if ( !afterEndOfBounds && (!beforeStartOfBounds || (this.isStrategyLatest && this.openmct.telemetry.greedyLAD())) @@ -348,8 +357,12 @@ export default class TelemetryCollection extends EventEmitter { this.lastBounds = bounds; // delete start/end if they are defined in options as we've got new bounds - delete this.options.start; - delete this.options.end; + if (!isTick && startChanged) { + delete this.options.start; + } + if (!isTick && endChanged) { + delete this.options.end; + } if (isTick) { if (this.timeKey === undefined) { diff --git a/src/plugins/comps/CompsManager.js b/src/plugins/comps/CompsManager.js index 59ee041c77..88721362f1 100644 --- a/src/plugins/comps/CompsManager.js +++ b/src/plugins/comps/CompsManager.js @@ -110,7 +110,7 @@ export default class CompsManager extends EventEmitter { async load(telemetryOptions) { if (!_.isEqual(telemetryOptions, this.#telemetryOptions) && this.#loaded) { console.debug( - `😩 Reloading comps manager ${this.#domainObject.name} due to telemetry options change`, + `😩 Reloading comps manager ${this.#domainObject.name} due to telemetry options change. New bounds are: ${new Date(telemetryOptions.start).toISOString()} to ${new Date(telemetryOptions.end).toISOString()}`, telemetryOptions ); this.#destroy(); From f718ccdf4eedcde468caf8723f1ad0d917031cc7 Mon Sep 17 00:00:00 2001 From: Scott Bell Date: Fri, 4 Oct 2024 11:14:45 +0200 Subject: [PATCH 2/3] stacked plots are overriding telemetry object configurations --- src/plugins/plot/stackedPlot/StackedPlotItem.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/plot/stackedPlot/StackedPlotItem.vue b/src/plugins/plot/stackedPlot/StackedPlotItem.vue index 1541b8c980..087175fec8 100644 --- a/src/plugins/plot/stackedPlot/StackedPlotItem.vue +++ b/src/plugins/plot/stackedPlot/StackedPlotItem.vue @@ -249,7 +249,8 @@ export default { ...persistedSeriesConfig.series } ], - yAxis: persistedSeriesConfig.yAxis + yAxis: persistedSeriesConfig.yAxis, + ...this.childObject.configuration } }, openmct: this.openmct, From 58d6cdb57417244025b3b83a30334e0d5099aa64 Mon Sep 17 00:00:00 2001 From: Scott Bell Date: Fri, 4 Oct 2024 11:29:00 +0200 Subject: [PATCH 3/3] some changes --- src/api/telemetry/TelemetryCollection.js | 4 ---- src/plugins/comps/CompsManager.js | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/api/telemetry/TelemetryCollection.js b/src/api/telemetry/TelemetryCollection.js index 2ff078caf4..231e141f9b 100644 --- a/src/api/telemetry/TelemetryCollection.js +++ b/src/api/telemetry/TelemetryCollection.js @@ -73,10 +73,6 @@ export default class TelemetryCollection extends EventEmitter { this.isStrategyLatest = this.options.strategy === 'latest'; this.dataOutsideTimeBounds = false; this.modeChanged = false; - - console.debug( - `🫙 Created telemetry for ${this.domainObject.name} with bounds ${new Date(options.start).toISOString()} and ${new Date(options.end).toISOString()}` - ); } /** diff --git a/src/plugins/comps/CompsManager.js b/src/plugins/comps/CompsManager.js index 88721362f1..6d912ef397 100644 --- a/src/plugins/comps/CompsManager.js +++ b/src/plugins/comps/CompsManager.js @@ -108,9 +108,9 @@ export default class CompsManager extends EventEmitter { } async load(telemetryOptions) { - if (!_.isEqual(telemetryOptions, this.#telemetryOptions) && this.#loaded) { + if (!_.isEqual(telemetryOptions, this.#telemetryOptions)) { console.debug( - `😩 Reloading comps manager ${this.#domainObject.name} due to telemetry options change. New bounds are: ${new Date(telemetryOptions.start).toISOString()} to ${new Date(telemetryOptions.end).toISOString()}`, + `😩 Reloading comps manager ${this.#domainObject.name} due to telemetry options change.`, telemetryOptions ); this.#destroy();