mirror of
https://github.com/nasa/openmct.git
synced 2024-12-30 09:58:52 +00:00
persist name change
This commit is contained in:
parent
4d263bcf32
commit
73d0507f1f
@ -22,7 +22,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
inject: ['openmct'],
|
||||
inject: ['openmct', 'domainObject'],
|
||||
props: {
|
||||
conditionIdentifier: {
|
||||
type: Object,
|
||||
@ -35,17 +35,14 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
conditionData: {},
|
||||
condition: this.condition
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.condition = {};
|
||||
this.openmct.objects.get(this.conditionIdentifier).then((obj => {
|
||||
this.condition = obj;
|
||||
console.log('this.isCurrent.key', this.isCurrent.key)
|
||||
}));
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -151,7 +151,6 @@ export default {
|
||||
});
|
||||
},
|
||||
persist() {
|
||||
console.log('this.domainObject', this.domainObject);
|
||||
this.openmct.objects.mutate(this.domainObject, 'configuration.conditionCollection', this.conditionCollection);
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@
|
||||
<label>Output</label>
|
||||
<span class="controls">
|
||||
<select ref="outputSelect"
|
||||
@change="getOutputBinary"
|
||||
@change="getOutputBoolean"
|
||||
>
|
||||
<option value="false">False</option>
|
||||
<option value="true">True</option>
|
||||
@ -165,6 +165,7 @@ export default {
|
||||
this.$refs.outputSelect.value = 'string';
|
||||
this.stringOutputField = true;
|
||||
}
|
||||
console.log('this.isCurrent.key', this.isCurrent.key)
|
||||
this.updateTelemetry();
|
||||
}));
|
||||
this.updateCurrentCondition();
|
||||
@ -195,11 +196,14 @@ export default {
|
||||
},
|
||||
persist() {
|
||||
this.openmct.objects.mutate(this.domainObject, 'isCurrent', this.condition.isCurrent);
|
||||
this.openmct.objects.mutate(this.condition, 'name', this.condition.name);
|
||||
this.openmct.objects.mutate(this.condition, 'output', this.condition.output);
|
||||
|
||||
},
|
||||
updateCurrentCondition() {
|
||||
this.$emit('update-current-condition', this.conditionIdentifier);
|
||||
},
|
||||
getOutputBinary(ev) {
|
||||
getOutputBoolean(ev) {
|
||||
if (ev.target.value !== 'string') {
|
||||
this.condition.output = ev.target.value;
|
||||
this.stringOutputField = false;
|
||||
|
Loading…
Reference in New Issue
Block a user