mirror of
https://github.com/nasa/openmct.git
synced 2025-02-05 10:39:15 +00:00
Merge remote-tracking branch 'origin/telemetry-comps' into combined-rodap-stuff
This commit is contained in:
commit
3cd9e62682
@ -73,10 +73,6 @@ export default class TelemetryCollection extends EventEmitter {
|
|||||||
this.isStrategyLatest = this.options.strategy === 'latest';
|
this.isStrategyLatest = this.options.strategy === 'latest';
|
||||||
this.dataOutsideTimeBounds = false;
|
this.dataOutsideTimeBounds = false;
|
||||||
this.modeChanged = false;
|
this.modeChanged = false;
|
||||||
|
|
||||||
console.debug(
|
|
||||||
`🫙 Created telemetry for ${this.domainObject.name} with bounds ${options.start} and ${options.end}`
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -98,7 +94,7 @@ export default class TelemetryCollection extends EventEmitter {
|
|||||||
this.lastBounds.end = this.options.end;
|
this.lastBounds.end = this.options.end;
|
||||||
}
|
}
|
||||||
console.debug(
|
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._watchBounds();
|
||||||
this._watchTimeSystem();
|
this._watchTimeSystem();
|
||||||
@ -144,6 +140,9 @@ export default class TelemetryCollection extends EventEmitter {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _requestHistoricalTelemetry() {
|
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 });
|
let options = this.openmct.telemetry.standardizeRequestOptions({ ...this.options });
|
||||||
const historicalProvider = this.openmct.telemetry.findRequestProvider(
|
const historicalProvider = this.openmct.telemetry.findRequestProvider(
|
||||||
this.domainObject,
|
this.domainObject,
|
||||||
@ -229,7 +228,6 @@ export default class TelemetryCollection extends EventEmitter {
|
|||||||
let hasDataBeforeStartBound = false;
|
let hasDataBeforeStartBound = false;
|
||||||
let size = this.options.size;
|
let size = this.options.size;
|
||||||
let enforceSize = size !== undefined && this.options.enforceSize;
|
let enforceSize = size !== undefined && this.options.enforceSize;
|
||||||
console.debug(`🫙 Bounds are telemetry are currently`, this.lastBounds);
|
|
||||||
|
|
||||||
// loop through, sort and dedupe
|
// loop through, sort and dedupe
|
||||||
for (let datum of data) {
|
for (let datum of data) {
|
||||||
@ -237,6 +235,13 @@ export default class TelemetryCollection extends EventEmitter {
|
|||||||
beforeStartOfBounds = parsedValue < this.lastBounds.start;
|
beforeStartOfBounds = parsedValue < this.lastBounds.start;
|
||||||
afterEndOfBounds = parsedValue > this.lastBounds.end;
|
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 (
|
if (
|
||||||
!afterEndOfBounds &&
|
!afterEndOfBounds &&
|
||||||
(!beforeStartOfBounds || (this.isStrategyLatest && this.openmct.telemetry.greedyLAD()))
|
(!beforeStartOfBounds || (this.isStrategyLatest && this.openmct.telemetry.greedyLAD()))
|
||||||
@ -348,8 +353,12 @@ export default class TelemetryCollection extends EventEmitter {
|
|||||||
this.lastBounds = bounds;
|
this.lastBounds = bounds;
|
||||||
|
|
||||||
// delete start/end if they are defined in options as we've got new bounds
|
// delete start/end if they are defined in options as we've got new bounds
|
||||||
delete this.options.start;
|
if (!isTick && startChanged) {
|
||||||
delete this.options.end;
|
delete this.options.start;
|
||||||
|
}
|
||||||
|
if (!isTick && endChanged) {
|
||||||
|
delete this.options.end;
|
||||||
|
}
|
||||||
|
|
||||||
if (isTick) {
|
if (isTick) {
|
||||||
if (this.timeKey === undefined) {
|
if (this.timeKey === undefined) {
|
||||||
|
@ -108,9 +108,9 @@ export default class CompsManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async load(telemetryOptions) {
|
async load(telemetryOptions) {
|
||||||
if (!_.isEqual(telemetryOptions, this.#telemetryOptions) && this.#loaded) {
|
if (!_.isEqual(telemetryOptions, this.#telemetryOptions)) {
|
||||||
console.debug(
|
console.debug(
|
||||||
`😩 Reloading comps manager ${this.#domainObject.name} due to telemetry options change`,
|
`😩 Reloading comps manager ${this.#domainObject.name} due to telemetry options change.`,
|
||||||
telemetryOptions
|
telemetryOptions
|
||||||
);
|
);
|
||||||
this.#destroy();
|
this.#destroy();
|
||||||
|
@ -250,7 +250,8 @@ export default {
|
|||||||
...persistedSeriesConfig.series
|
...persistedSeriesConfig.series
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: persistedSeriesConfig.yAxis
|
yAxis: persistedSeriesConfig.yAxis,
|
||||||
|
...this.childObject.configuration
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openmct: this.openmct,
|
openmct: this.openmct,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user