mirror of
https://github.com/nasa/openmct.git
synced 2025-03-11 06:54:01 +00:00
reverted changes unrelated to id
This commit is contained in:
parent
c33314a4bf
commit
d3443518d6
@ -108,7 +108,7 @@ export default class ConditionManager extends EventEmitter {
|
||||
if (conditionConfiguration) {
|
||||
conditionObj = {
|
||||
...conditionConfiguration,
|
||||
id: conditionConfiguration.id || uuid(),
|
||||
id: uuid(),
|
||||
configuration: {
|
||||
...conditionConfiguration.configuration,
|
||||
name: `Copy of ${conditionConfiguration.configuration.name}`
|
||||
|
@ -85,7 +85,7 @@
|
||||
</span>
|
||||
</template>
|
||||
<span v-else>
|
||||
<span v-if="inputCount"
|
||||
<span v-if="inputCount && criterion.operation"
|
||||
class="c-cdef__control"
|
||||
>
|
||||
<select v-model="criterion.input[0]"
|
||||
@ -134,6 +134,7 @@ export default {
|
||||
return {
|
||||
telemetryMetadataOptions: [],
|
||||
operations: OPERATIONS,
|
||||
inputCount: 0,
|
||||
rowLabel: '',
|
||||
operationFormat: '',
|
||||
enumerations: [],
|
||||
@ -161,18 +162,6 @@ export default {
|
||||
}
|
||||
}
|
||||
return type;
|
||||
},
|
||||
inputCount: function () {
|
||||
let inputCount = 0;
|
||||
if (this.criterion.operation) {
|
||||
for (let i = 0; i < this.filteredOps.length; i++) {
|
||||
if (this.criterion.operation === this.filteredOps[i].name) {
|
||||
inputCount = this.filteredOps[i].inputCount;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return inputCount;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -270,6 +259,15 @@ export default {
|
||||
this.clearDependentFields();
|
||||
this.persist();
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.filteredOps.length; i++) {
|
||||
if (this.criterion.operation === this.filteredOps[i].name) {
|
||||
this.inputCount = this.filteredOps[i].inputCount;
|
||||
}
|
||||
}
|
||||
if (!this.inputCount) {
|
||||
this.criterion.input = [];
|
||||
}
|
||||
},
|
||||
clearDependentFields(el) {
|
||||
if (el === this.$refs.telemetrySelect) {
|
||||
@ -278,12 +276,12 @@ export default {
|
||||
if (!this.filteredOps.find(operation => operation.name === this.criterion.operation)) {
|
||||
this.criterion.operation = '';
|
||||
this.criterion.input = this.enumerations.length ? [this.enumerations[0].value.toString()] : [];
|
||||
}
|
||||
this.inputCount = 0; }
|
||||
} else {
|
||||
if (this.enumerations.length && !this.criterion.input.length) {
|
||||
this.criterion.input = [this.enumerations[0].value.toString()];
|
||||
}
|
||||
}
|
||||
this.inputCount = 0; }
|
||||
},
|
||||
persist() {
|
||||
this.$emit('persist', this.criterion);
|
||||
|
Loading…
x
Reference in New Issue
Block a user