diff --git a/src/plugins/condition/components/ConditionEdit.vue b/src/plugins/condition/components/ConditionEdit.vue index 5710cabe67..eedcf6c032 100644 --- a/src/plugins/condition/components/ConditionEdit.vue +++ b/src/plugins/condition/components/ConditionEdit.vue @@ -47,14 +47,17 @@
  • - - @@ -98,7 +101,7 @@ -
  • @@ -142,16 +150,20 @@ export default { operations: OPERATIONS, selectedMetaDataKey: null, selectedOperationKey: null, - stringOutput: false + stringOutputField: false, + comparisonValueField: false }; }, mounted() { + if (this.condition.output !== 'false' && this.condition.output !== 'true') { + this.$refs.outputSelect.value = 'string'; + this.stringOutputField = true; + } this.updateTelemetry(); }, updated() { - console.log('updated conditionEdit'); this.updateCurrentCondition(); - this.persist() + this.persist(); }, methods: { removeCondition(ev) { @@ -196,13 +208,25 @@ export default { getOutputBinary(ev) { if (ev.target.value !== 'string') { this.condition.output = ev.target.value; - this.stringOutput = false; + this.stringOutputField = false; } else { - this.stringOutput = true; + this.stringOutputField = true; } }, getOutputString(ev) { this.condition.output = ev.target.value; + }, + getOperationKey(ev) { + console.log(ev.target.value) + if (ev.target.value !== 'isUndefined' && ev.target.value !== 'isDefined') { + this.comparisonValueField = true; + } else { + this.comparisonValueField = false; + } + this.selectedOperationKey = ev.target.value; + }, + getOperationValue(ev) { + this.selectedOperationKey = ev.target.value; } } }