mirror of
https://github.com/nasa/openmct.git
synced 2025-05-03 17:22:56 +00:00
WIP fixing telemetry subscribe
This commit is contained in:
parent
53e0ed4d4a
commit
387912b4d3
@ -110,7 +110,7 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
addCriterion(criterionConfiguration) {
|
addCriterion(criterionConfiguration) {
|
||||||
let criterionConfigurationWithId = this.generateCriterion(criterionConfiguration || null);
|
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);
|
let criterion = new TelemetryCriterion(criterionConfigurationWithId, this.openmct);
|
||||||
criterion.on('criterionUpdated', (obj) => this.handleCriterionUpdated(obj));
|
criterion.on('criterionUpdated', (obj) => this.handleCriterionUpdated(obj));
|
||||||
criterion.on('criterionResultUpdated', (obj) => this.handleCriterionResult(obj));
|
criterion.on('criterionResultUpdated', (obj) => this.handleCriterionResult(obj));
|
||||||
@ -141,7 +141,6 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
updateCriterion(id, criterionConfiguration) {
|
updateCriterion(id, criterionConfiguration) {
|
||||||
let found = this.findCriterion(id);
|
let found = this.findCriterion(id);
|
||||||
if (found) {
|
if (found) {
|
||||||
console.log('updateCriterion found')
|
|
||||||
const newcriterionConfiguration = this.generateCriterion(criterionConfiguration);
|
const newcriterionConfiguration = this.generateCriterion(criterionConfiguration);
|
||||||
let newCriterion = new TelemetryCriterion(newcriterionConfiguration, this.openmct);
|
let newCriterion = new TelemetryCriterion(newcriterionConfiguration, this.openmct);
|
||||||
newCriterion.on('criterionUpdated', (obj) => this.handleCriterionUpdated(obj));
|
newCriterion.on('criterionUpdated', (obj) => this.handleCriterionUpdated(obj));
|
||||||
|
@ -16,9 +16,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<span class="controls">
|
<span class="controls">
|
||||||
<select v-model="criterion.metadata"
|
<select v-model="criterion.metadata">
|
||||||
@change="updateMetadataSelection"
|
|
||||||
>
|
|
||||||
<option value="">- Select Field -</option>
|
<option value="">- Select Field -</option>
|
||||||
<option v-for="option in telemetryMetadata"
|
<option v-for="option in telemetryMetadata"
|
||||||
:key="option.key"
|
:key="option.key"
|
||||||
@ -109,9 +107,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateMetadataSelection() {
|
|
||||||
this.comparisonInputValue = '';
|
|
||||||
},
|
|
||||||
persist() {
|
persist() {
|
||||||
this.$emit('persist', this.criterion);
|
this.$emit('persist', this.criterion);
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ export default class TelemetryCriterion extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
subscribe() {
|
subscribe() {
|
||||||
this.unsubscribe();
|
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.subscription = this.telemetryAPI.subscribe(this.telemetryObject, (datum) => {
|
||||||
this.handleSubscription(datum);
|
this.handleSubscription(datum);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user