mirror of
https://github.com/nasa/openmct.git
synced 2025-03-10 14:34:08 +00:00
trigger label and add divider
This commit is contained in:
parent
6e5e8f0ce8
commit
b6ce9c6ed7
@ -95,6 +95,7 @@
|
||||
:criterion="criterion"
|
||||
:condition="domainObject"
|
||||
:index="index"
|
||||
:trigger="trigger"
|
||||
@persist="persist"
|
||||
/>
|
||||
</ul>
|
||||
@ -176,7 +177,7 @@ export default {
|
||||
domainObject: this.domainObject,
|
||||
currentCriteria: this.currentCriteria,
|
||||
expanded: true,
|
||||
trigger: 'any',
|
||||
trigger: 'all',
|
||||
selectedOutputKey: '',
|
||||
stringOutputField: false,
|
||||
outputOptions: ['false', 'true', 'string']
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<li class="has-local-controls t-condition">
|
||||
<label>{{ index === 0 ? 'when' : 'and when' }}</label>
|
||||
<label>{{ setRowLabel }}</label>
|
||||
<span class="t-configuration">
|
||||
<span class="controls">
|
||||
<select v-model="selectedTelemetryObject"
|
||||
@ -74,6 +74,10 @@ export default {
|
||||
condition: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
trigger: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -85,12 +89,23 @@ export default {
|
||||
selectedOperationOption: '',
|
||||
operationValue: '',
|
||||
comparisonInputValue: '',
|
||||
isInputOperation: false
|
||||
isInputOperation: false,
|
||||
rowLabel: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
setRowLabel: function () {
|
||||
let operator = this.trigger === 'all' ? 'and ': 'or ';
|
||||
|
||||
return (this.index !== 0 ? operator : '') + 'when';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initialize();
|
||||
},
|
||||
updated() {
|
||||
this.persist();
|
||||
},
|
||||
methods: {
|
||||
initialize() {
|
||||
this.selectedTelemetryObject = this.criterion.telemetry;
|
||||
@ -107,7 +122,6 @@ export default {
|
||||
this.telemetryMetadata = this.openmct.telemetry.getMetadata(telemetryObject).values();
|
||||
});
|
||||
}
|
||||
this.persist();
|
||||
},
|
||||
updateOperationInput() {
|
||||
if (this.selectedOperationOption &&
|
||||
@ -118,7 +132,6 @@ export default {
|
||||
this.isInputOperation = false;
|
||||
this.comparisonInputValue = '';
|
||||
}
|
||||
this.persist();
|
||||
},
|
||||
persist() {
|
||||
this.criterion.telemetry = this.selectedTelemetryObject;
|
||||
|
@ -92,7 +92,7 @@
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
.widget-condition-content.expanded ul {
|
||||
.widget-condition-content.expanded ul li {
|
||||
border-top: solid 1px #ccc;
|
||||
padding: 2px;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user