persist name change

This commit is contained in:
Joel McKinnon 2020-01-22 11:15:49 -08:00
parent 4d263bcf32
commit 73d0507f1f
3 changed files with 8 additions and 8 deletions

View File

@ -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>

View File

@ -151,7 +151,6 @@ export default {
});
},
persist() {
console.log('this.domainObject', this.domainObject);
this.openmct.objects.mutate(this.domainObject, 'configuration.conditionCollection', this.conditionCollection);
}
}

View File

@ -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;