From dabd0bff295f937f820b109f578ed961cfbfa581 Mon Sep 17 00:00:00 2001 From: David Tsay Date: Fri, 28 Feb 2020 15:18:14 -0800 Subject: [PATCH] only listen for condition updates in telemetry provider --- src/plugins/condition/components/ConditionCollection.vue | 5 ----- src/plugins/condition/components/ConditionSet.vue | 7 +++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/plugins/condition/components/ConditionCollection.vue b/src/plugins/condition/components/ConditionCollection.vue index 31dbdd0666..803f18e7b6 100644 --- a/src/plugins/condition/components/ConditionCollection.vue +++ b/src/plugins/condition/components/ConditionCollection.vue @@ -110,7 +110,6 @@ export default { this.composition.off('add', this.addTelemetryObject); this.composition.off('remove', this.removeTelemetryObject); if(this.conditionManager) { - this.conditionManager.off('conditionSetResultUpdated', this.handleOutputUpdated); this.conditionManager.destroy(); } if (typeof this.stopObservingForChanges === 'function') { @@ -124,7 +123,6 @@ export default { this.composition.load(); this.conditionCollection = this.domainObject.configuration.conditionCollection; this.conditionManager = new ConditionManager(this.domainObject, this.openmct); - this.conditionManager.on('conditionSetResultUpdated', this.handleOutputUpdated.bind(this)); this.observeForChanges(); }, methods: { @@ -179,9 +177,6 @@ export default { dragLeave(e) { e.target.classList.remove("dragging"); }, - handleOutputUpdated(args) { - this.$emit('currentConditionSetOutputUpdated', args); - }, addTelemetryObject(domainObject) { this.telemetryObjs.push(domainObject); }, diff --git a/src/plugins/condition/components/ConditionSet.vue b/src/plugins/condition/components/ConditionSet.vue index 23a7ce01c4..b9852dddcb 100644 --- a/src/plugins/condition/components/ConditionSet.vue +++ b/src/plugins/condition/components/ConditionSet.vue @@ -25,9 +25,7 @@
- +
@@ -66,7 +64,8 @@ export default { this.currentConditionOutput = currentConditionResult.output; }, provideTelemetry() { - this.stopProvidingTelemetry = this.openmct.telemetry.subscribe(this.domainObject, output => output); + this.stopProvidingTelemetry = this.openmct.telemetry + .subscribe(this.domainObject, output => { this.updateCurrentOutput(output); }); } } };