mirror of
https://github.com/nasa/openmct.git
synced 2025-02-24 18:50:47 +00:00
pass timestamp datum through to ConditionManager
This commit is contained in:
parent
b8b838f490
commit
4c4b587d9c
@ -191,15 +191,12 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
|
|
||||||
handleCriterionResult(eventData) {
|
handleCriterionResult(eventData) {
|
||||||
const id = eventData.id;
|
const id = eventData.id;
|
||||||
const conditionData = eventData.data;
|
|
||||||
|
|
||||||
if (this.findCriterion(id)) {
|
if (this.findCriterion(id)) {
|
||||||
this.criteriaResults[id] = eventData.data.result;
|
this.criteriaResults[id] = eventData.data.result;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.handleConditionUpdated();
|
this.handleConditionUpdated(eventData.data);
|
||||||
// conditionData.result = computeCondition(this.criteriaResults, this.trigger === TRIGGER.ALL);
|
|
||||||
// this.emitEvent('conditionResultUpdated', conditionData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
subscribe() {
|
subscribe() {
|
||||||
@ -209,10 +206,12 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
handleConditionUpdated() {
|
handleConditionUpdated(datum) {
|
||||||
// trigger an updated event so that consumers can react accordingly
|
// trigger an updated event so that consumers can react accordingly
|
||||||
this.evaluate();
|
this.evaluate();
|
||||||
this.emitEvent('conditionResultUpdated', {result: this.result});
|
this.emitEvent('conditionResultUpdated',
|
||||||
|
Object.assign({}, datum, { result: this.result })
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCriteria() {
|
getCriteria() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user