mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 14:18:16 +00:00
Display active condition's output in read only view
This commit is contained in:
@ -21,6 +21,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ConditionClass from "@/plugins/condition/Condition";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
inject: ['openmct'],
|
inject: ['openmct'],
|
||||||
props: {
|
props: {
|
||||||
@ -41,7 +43,17 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.openmct.objects.get(this.conditionIdentifier).then((obj => {
|
this.openmct.objects.get(this.conditionIdentifier).then((obj => {
|
||||||
this.condition = 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>
|
</script>
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<Condition :condition-identifier="conditionIdentifier"
|
<Condition :condition-identifier="conditionIdentifier"
|
||||||
|
@condition-result-updated="handleConditionResult"
|
||||||
:current-condition-identifier="currentConditionIdentifier"
|
:current-condition-identifier="currentConditionIdentifier"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user