Merge branch 'condition-ui' of https://github.com/nasa/openmct into set-criteria-options

This commit is contained in:
Joshi 2020-01-23 15:54:24 -08:00
commit efb3c2b71e
3 changed files with 10 additions and 9 deletions

View File

@ -2,7 +2,7 @@
<div v-if="condition"
id="conditionArea"
class="c-cs-ui__conditions"
:class="['widget-condition', { 'widget-condition--current': isCurrent && (isCurrent.key === conditionIdentifier.key) }]"
:class="['widget-condition', { 'widget-condition--current': currentConditionIdentifier && (currentConditionIdentifier.key === conditionIdentifier.key) }]"
>
<div class="title-bar">
<span class="condition-name">
@ -28,7 +28,7 @@ export default {
type: Object,
required: true
},
isCurrent: {
currentConditionIdentifier: {
type: Object,
required: true
}

View File

@ -36,7 +36,7 @@
<div v-if="isEditing">
<ConditionEdit :condition-identifier="conditionIdentifier"
:telemetry="telemetryObjs"
:is-current="currentConditionIdentifier"
:current-condition-identifier="currentConditionIdentifier"
@update-current-condition="updateCurrentCondition"
@remove-condition="removeCondition"
@condition-result-updated="handleConditionResult"
@ -44,7 +44,7 @@
</div>
<div v-else>
<Condition :condition-identifier="conditionIdentifier"
:is-current="currentConditionIdentifier"
:current-condition-identifier="currentConditionIdentifier"
/>
</div>
</div>
@ -90,6 +90,8 @@ export default {
this.conditionCollection = this.domainObject.configuration ? this.domainObject.configuration.conditionCollection : [];
if (!this.conditionCollection.length) {
this.addCondition(null, true);
} else {
this.updateCurrentCondition(this.conditionCollection[0]);
}
},
methods: {
@ -100,7 +102,6 @@ export default {
},
updateCurrentConditionId() {
let currentConditionIdentifier = this.conditionCollection[this.conditionCollection.length-1];
for (let i=0, ii = this.conditionCollection.length-1; i< ii; i++) {
let conditionIdAsString = this.openmct.objects.makeKeyString(this.conditionCollection[i]);
if (this.conditionResults[conditionIdAsString]) {

View File

@ -1,7 +1,7 @@
<template>
<div v-if="condition"
class="c-cs-editui__conditions"
:class="['widget-condition', { 'widget-condition--current': isCurrent && (isCurrent.key === conditionIdentifier.key) }]"
:class="['widget-condition', { 'widget-condition--current': currentConditionIdentifier && (currentConditionIdentifier.key === conditionIdentifier.key) }]"
>
<div class="title-bar">
<span
@ -152,7 +152,7 @@ export default {
type: Object,
required: true
},
isCurrent: {
currentConditionIdentifier: {
type: Object,
required: true
},
@ -170,8 +170,8 @@ export default {
telemetryMetadata: this.telemetryMetadata,
operations: OPERATIONS,
selectedMetaDataKey: null,
selectedTelemetryKey: null,
selectedOperationKey: null,
selectedTelemetryKey: '',
selectedOperationKey: '',
selectedOutputKey: null,
stringOutputField: false,
comparisonValueField: false,