added uuid() in conditionManager

This commit is contained in:
Joel McKinnon 2020-04-01 13:58:58 -07:00
parent 1beba78111
commit 169cc6617a
4 changed files with 3 additions and 5 deletions

View File

@ -95,7 +95,7 @@ export default class ConditionClass extends EventEmitter {
generateCriterion(criterionConfiguration) {
return {
id: uuid(),
id: criterionConfiguration.id || uuid(),
telemetry: criterionConfiguration.telemetry || '',
telemetryObject: this.conditionManager.telemetryObjects[this.openmct.objects.makeKeyString(criterionConfiguration.telemetry)],
operation: criterionConfiguration.operation || '',

View File

@ -108,7 +108,7 @@ export default class ConditionManager extends EventEmitter {
if (conditionConfiguration) {
conditionObj = {
...conditionConfiguration,
id: uuid(),
id: conditionConfiguration.id || uuid(),
configuration: {
...conditionConfiguration.configuration,
name: `Copy of ${conditionConfiguration.configuration.name}`

View File

@ -41,7 +41,6 @@
></span>
<span class="c-condition__name">{{ condition.configuration.name }}</span>
<!-- TODO: description should be derived from criteria -->
<span class="c-condition__summary">
<template v-if="!canEvaluateCriteria">
Define criteria
@ -317,7 +316,7 @@ export default {
index: this.conditionIndex
});
},
initCap: function (str) {
initCap(str) {
return str.charAt(0).toUpperCase() + str.slice(1)
}
}

View File

@ -184,7 +184,6 @@ export default {
}
},
mounted() {
console.log(this.criterion);
this.updateMetadataOptions();
},
methods: {