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) { generateCriterion(criterionConfiguration) {
return { return {
id: uuid(), id: criterionConfiguration.id || uuid(),
telemetry: criterionConfiguration.telemetry || '', telemetry: criterionConfiguration.telemetry || '',
telemetryObject: this.conditionManager.telemetryObjects[this.openmct.objects.makeKeyString(criterionConfiguration.telemetry)], telemetryObject: this.conditionManager.telemetryObjects[this.openmct.objects.makeKeyString(criterionConfiguration.telemetry)],
operation: criterionConfiguration.operation || '', operation: criterionConfiguration.operation || '',

View File

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

View File

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

View File

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