mirror of
https://github.com/nasa/openmct.git
synced 2025-04-21 09:31:24 +00:00
only listen for condition updates in telemetry provider
This commit is contained in:
parent
51c70d02d7
commit
dabd0bff29
@ -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);
|
||||
},
|
||||
|
@ -25,9 +25,7 @@
|
||||
<div class="c-sw-edit__ui holder">
|
||||
<CurrentOutput :output="currentConditionOutput" />
|
||||
<TestData :is-editing="isEditing" />
|
||||
<ConditionCollection :is-editing="isEditing"
|
||||
@currentConditionSetOutputUpdated="updateCurrentOutput"
|
||||
/>
|
||||
<ConditionCollection :is-editing="isEditing" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -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); });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user