mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 13:43:09 +00:00
fixed updateOperations, clearDependentFields, removed unnecessary ref
This commit is contained in:
parent
bf947a8835
commit
5f061001d6
@ -20,8 +20,7 @@
|
||||
<span v-if="criterion.telemetry"
|
||||
class="c-cdef__control"
|
||||
>
|
||||
<select ref="metadataSelect"
|
||||
v-model="criterion.metadata"
|
||||
<select v-model="criterion.metadata"
|
||||
@change="updateOperations"
|
||||
>
|
||||
<option value="">- Select Field -</option>
|
||||
@ -200,7 +199,7 @@ export default {
|
||||
}
|
||||
},
|
||||
updateOperations(ev) {
|
||||
if (ev && ev.target === this.$refs.telemetrySelect) {
|
||||
if (ev) {
|
||||
this.clearDependentFields(ev.target);
|
||||
this.persist();
|
||||
}
|
||||
@ -208,8 +207,9 @@ export default {
|
||||
},
|
||||
updateOperationInputVisibility(ev) {
|
||||
if (ev) {
|
||||
this.criterion.input = this.enumerations.length ? [this.enumerations[0].value.toString()] : [];
|
||||
this.inputCount = 0;
|
||||
if (this.enumerations.length) {
|
||||
this.criterion.input = [this.enumerations[0].value.toString()];
|
||||
}
|
||||
this.persist();
|
||||
}
|
||||
for (let i = 0; i < this.filteredOps.length; i++) {
|
||||
@ -222,10 +222,8 @@ export default {
|
||||
clearDependentFields(el) {
|
||||
if (el === this.$refs.telemetrySelect) {
|
||||
this.criterion.metadata = '';
|
||||
this.criterion.operation = '';
|
||||
} else if (el === this.$refs.metadataSelect) {
|
||||
this.criterion.operation = '';
|
||||
}
|
||||
this.criterion.operation = '';
|
||||
this.criterion.input = [];
|
||||
this.inputCount = 0;
|
||||
},
|
||||
|
@ -82,7 +82,7 @@ export const OPERATIONS = [
|
||||
appliesTo: ['number'],
|
||||
inputCount: 2,
|
||||
getDescription: function (values) {
|
||||
return ' is between ' + values.join(', ') + ' and ' + values[1];
|
||||
return ' is between ' + values[0] + ' and ' + values[1];
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -94,7 +94,7 @@ export const OPERATIONS = [
|
||||
appliesTo: ['number'],
|
||||
inputCount: 2,
|
||||
getDescription: function (values) {
|
||||
return ' is not between ' + values.join(', ') + ' and ' + values[1];
|
||||
return ' is not between ' + values[0] + ' and ' + values[1];
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user