mirror of
https://github.com/nasa/openmct.git
synced 2025-04-12 05:40:17 +00:00
Display active condition's output in read only view
This commit is contained in:
parent
e912ab8f4e
commit
0beda1d053
@ -21,6 +21,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ConditionClass from "@/plugins/condition/Condition";
|
||||
|
||||
export default {
|
||||
inject: ['openmct'],
|
||||
props: {
|
||||
@ -41,7 +43,17 @@ export default {
|
||||
mounted() {
|
||||
this.openmct.objects.get(this.conditionIdentifier).then((obj => {
|
||||
this.condition = obj;
|
||||
this.conditionClass = new ConditionClass(this.condition, this.openmct);
|
||||
this.conditionClass.on('conditionResultUpdated', this.handleConditionResult.bind(this));
|
||||
}));
|
||||
},
|
||||
methods: {
|
||||
handleConditionResult(args) {
|
||||
this.$emit('condition-result-updated', {
|
||||
id: this.conditionIdentifier,
|
||||
result: args.data.result
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -44,6 +44,7 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<Condition :condition-identifier="conditionIdentifier"
|
||||
@condition-result-updated="handleConditionResult"
|
||||
:current-condition-identifier="currentConditionIdentifier"
|
||||
/>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user