WIP fixing telemetry subscribe

This commit is contained in:
Joel McKinnon 2020-02-18 11:05:54 -08:00
parent 53e0ed4d4a
commit 387912b4d3
3 changed files with 3 additions and 9 deletions

View File

@ -110,7 +110,7 @@ export default class ConditionClass extends EventEmitter {
*/
addCriterion(criterionConfiguration) {
let criterionConfigurationWithId = this.generateCriterion(criterionConfiguration || null);
console.log('condition class criterionConfigurationWithId', criterionConfigurationWithId );
console.log('condition class addCriterion criterionConfigurationWithId', criterionConfigurationWithId );
let criterion = new TelemetryCriterion(criterionConfigurationWithId, this.openmct);
criterion.on('criterionUpdated', (obj) => this.handleCriterionUpdated(obj));
criterion.on('criterionResultUpdated', (obj) => this.handleCriterionResult(obj));
@ -141,7 +141,6 @@ export default class ConditionClass extends EventEmitter {
updateCriterion(id, criterionConfiguration) {
let found = this.findCriterion(id);
if (found) {
console.log('updateCriterion found')
const newcriterionConfiguration = this.generateCriterion(criterionConfiguration);
let newCriterion = new TelemetryCriterion(newcriterionConfiguration, this.openmct);
newCriterion.on('criterionUpdated', (obj) => this.handleCriterionUpdated(obj));

View File

@ -16,9 +16,7 @@
</select>
</span>
<span class="controls">
<select v-model="criterion.metadata"
@change="updateMetadataSelection"
>
<select v-model="criterion.metadata">
<option value="">- Select Field -</option>
<option v-for="option in telemetryMetadata"
:key="option.key"
@ -109,9 +107,6 @@ export default {
}
}
},
updateMetadataSelection() {
this.comparisonInputValue = '';
},
persist() {
this.$emit('persist', this.criterion);
}

View File

@ -99,7 +99,7 @@ export default class TelemetryCriterion extends EventEmitter {
*/
subscribe() {
this.unsubscribe();
console.log('criteria subscribe this.telemetryObject', this.telemetryObject);
console.log('criteria class subscribe this.telemetryObject', this.telemetryObject);
this.subscription = this.telemetryAPI.subscribe(this.telemetryObject, (datum) => {
this.handleSubscription(datum);
});