diff --git a/src/plugins/condition/components/ConditionEdit.vue b/src/plugins/condition/components/ConditionEdit.vue index 8b1276e458..eedcf6c032 100644 --- a/src/plugins/condition/components/ConditionEdit.vue +++ b/src/plugins/condition/components/ConditionEdit.vue @@ -34,7 +34,7 @@
-
    +
    • @@ -44,45 +44,82 @@ >
    • -
    • - - - - - - - - - - - -
    • - + + + +
    +
    +
      +
    • + + + + +
    • +
    +
      +
    • + + + + + + + + + + + + + +
    • +
    +
@@ -112,16 +149,21 @@ export default { telemetryMetadata: this.telemetryMetadata, operations: OPERATIONS, selectedMetaDataKey: null, - selectedOperationKey: null + selectedOperationKey: null, + 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) { @@ -162,6 +204,29 @@ export default { } else { this.conditionCollection[0].isCurrent = true; } + }, + getOutputBinary(ev) { + if (ev.target.value !== 'string') { + this.condition.output = ev.target.value; + this.stringOutputField = false; + } else { + 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; } } } diff --git a/src/plugins/condition/components/condition.scss b/src/plugins/condition/components/condition.scss index 46b128b878..160ab59286 100644 --- a/src/plugins/condition/components/condition.scss +++ b/src/plugins/condition/components/condition.scss @@ -57,27 +57,29 @@ padding: 0; } +.l-compact-form ul li { + padding: 0; +} + .widget-rule-content.expanded { margin: 0 3px; } .widget-rule-content.expanded ul { border-top: solid 1px #ccc; - padding: 5px; -} - -.l-compact-form ul li { - padding: 1px 0; + padding: 2px; } .l-compact-form ul li .controls { - line-height: 20px; - min-height: 20px; + display: inline-flex; + flex-grow: inherit; + padding: 2px 0; } .l-compact-form ul li > label { display: block; width: 90px; + min-width: 90px; text-align: right; line-height: 20px; }