mirror of
https://github.com/nasa/openmct.git
synced 2025-01-20 03:36:44 +00:00
Merge pull request #2688 from nasa/condition-trigger
Condition Any/All criteria match enabled
This commit is contained in:
commit
ac13bc5850
@ -102,7 +102,9 @@
|
||||
<li class="has-local-controls t-condition">
|
||||
<label>Match when</label>
|
||||
<span class="controls">
|
||||
<select v-model="trigger">
|
||||
<select v-model="domainObject.configuration.trigger"
|
||||
@change="persist"
|
||||
>
|
||||
<option value="all">all criteria are met</option>
|
||||
<option value="any">any criteria are met</option>
|
||||
</select>
|
||||
@ -119,7 +121,7 @@
|
||||
<Criterion :telemetry="telemetry"
|
||||
:criterion="criterion"
|
||||
:index="index"
|
||||
:trigger="trigger"
|
||||
:trigger="domainObject.configuration.trigger"
|
||||
:is-default="domainObject.configuration.criteria.length === 1"
|
||||
@persist="persist"
|
||||
/>
|
||||
@ -211,7 +213,6 @@ export default {
|
||||
domainObject: this.domainObject,
|
||||
currentCriteria: this.currentCriteria,
|
||||
expanded: true,
|
||||
trigger: 'all',
|
||||
selectedOutputKey: '',
|
||||
stringOutputField: false,
|
||||
outputOptions: ['false', 'true', 'string'],
|
||||
|
@ -38,19 +38,22 @@
|
||||
<div v-show="isEditing"
|
||||
class="help"
|
||||
>
|
||||
<span>The first condition to match is the one that wins. Drag conditions to rearrange.</span>
|
||||
<span v-if="!telemetryObjs.length">Drag telemetry into Condition Set in order to add conditions.</span>
|
||||
<span v-else>The first condition to match is the one that wins. Drag conditions to rearrange.</span>
|
||||
</div>
|
||||
<div class="holder add-condition-button-wrapper align-left">
|
||||
<button
|
||||
v-show="isEditing"
|
||||
id="addCondition"
|
||||
class="c-cs-button c-cs-button--major add-condition-button"
|
||||
:class="{ 'is-disabled': !telemetryObjs.length}"
|
||||
:disabled="!telemetryObjs.length"
|
||||
@click="addCondition"
|
||||
>
|
||||
<span class="c-cs-button__label">Add Condition</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="c-c condition-collection">
|
||||
<div class="c-c__condition-collection">
|
||||
<ul class="c-c__container-holder">
|
||||
<li v-for="(conditionIdentifier, index) in conditionCollection"
|
||||
:key="conditionIdentifier.key"
|
||||
@ -237,7 +240,7 @@ export default {
|
||||
const configurationTemplate = {
|
||||
name: isDefault ? 'Default' : (isClone ? 'Copy of ' : '') + 'Unnamed Condition',
|
||||
output: 'false',
|
||||
trigger: 'any',
|
||||
trigger: 'all',
|
||||
criteria: isDefault ? [] : [{
|
||||
telemetry: '',
|
||||
operation: '',
|
||||
|
@ -64,6 +64,10 @@ section {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.c-c__condition-collection.is-disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.widget-condition form {
|
||||
padding: 0.5em;
|
||||
display: flex;
|
||||
@ -91,6 +95,10 @@ section {
|
||||
font-weight: bold;
|
||||
color: #eee;
|
||||
border-radius: 6px;
|
||||
|
||||
&.is-disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.c-cs__disclosure-triangle,
|
||||
|
Loading…
Reference in New Issue
Block a user