mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 05:07:52 +00:00
cherry-pick(#6929): Condition sets now provide the timeContext they're using when sending requests (#6959)
cherry-pick(6929): Condition sets now provide the timeContext they're using when sending requests (#6929) * Send in the timeContext for requests * Fix failing test --------- Co-authored-by: Scott Bell <scott@traclabs.com>
This commit is contained in:
parent
2002396d0e
commit
c3ac07ebaf
@ -201,9 +201,11 @@ export default class AllTelemetryCriterion extends TelemetryCriterion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
requestLAD(telemetryObjects, requestOptions) {
|
requestLAD(telemetryObjects, requestOptions) {
|
||||||
|
//We pass in the global time context here
|
||||||
let options = {
|
let options = {
|
||||||
strategy: 'latest',
|
strategy: 'latest',
|
||||||
size: 1
|
size: 1,
|
||||||
|
timeContext: this.openmct.time.getContextForView([])
|
||||||
};
|
};
|
||||||
|
|
||||||
if (requestOptions !== undefined) {
|
if (requestOptions !== undefined) {
|
||||||
|
@ -189,9 +189,11 @@ export default class TelemetryCriterion extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
requestLAD(telemetryObjects, requestOptions) {
|
requestLAD(telemetryObjects, requestOptions) {
|
||||||
|
//We pass in the global time context here
|
||||||
let options = {
|
let options = {
|
||||||
strategy: 'latest',
|
strategy: 'latest',
|
||||||
size: 1
|
size: 1,
|
||||||
|
timeContext: this.openmct.time.getContextForView([])
|
||||||
};
|
};
|
||||||
|
|
||||||
if (requestOptions !== undefined) {
|
if (requestOptions !== undefined) {
|
||||||
|
@ -83,13 +83,19 @@ describe('The telemetry criterion', function () {
|
|||||||
});
|
});
|
||||||
openmct.telemetry.getMetadata.and.returnValue(testTelemetryObject.telemetry);
|
openmct.telemetry.getMetadata.and.returnValue(testTelemetryObject.telemetry);
|
||||||
|
|
||||||
openmct.time = jasmine.createSpyObj('timeAPI', ['timeSystem', 'bounds', 'getAllTimeSystems']);
|
openmct.time = jasmine.createSpyObj('timeAPI', [
|
||||||
|
'timeSystem',
|
||||||
|
'bounds',
|
||||||
|
'getAllTimeSystems',
|
||||||
|
'getContextForView'
|
||||||
|
]);
|
||||||
openmct.time.timeSystem.and.returnValue({ key: 'system' });
|
openmct.time.timeSystem.and.returnValue({ key: 'system' });
|
||||||
openmct.time.bounds.and.returnValue({
|
openmct.time.bounds.and.returnValue({
|
||||||
start: 0,
|
start: 0,
|
||||||
end: 1
|
end: 1
|
||||||
});
|
});
|
||||||
openmct.time.getAllTimeSystems.and.returnValue([{ key: 'system' }]);
|
openmct.time.getAllTimeSystems.and.returnValue([{ key: 'system' }]);
|
||||||
|
openmct.time.getContextForView.and.returnValue({});
|
||||||
|
|
||||||
testCriterionDefinition = {
|
testCriterionDefinition = {
|
||||||
id: 'test-criterion-id',
|
id: 'test-criterion-id',
|
||||||
|
Loading…
Reference in New Issue
Block a user