From 169cc6617a3408748328672793fd36d943af55be Mon Sep 17 00:00:00 2001 From: Joel McKinnon Date: Wed, 1 Apr 2020 13:58:58 -0700 Subject: [PATCH] added uuid() in conditionManager --- src/plugins/condition/Condition.js | 2 +- src/plugins/condition/ConditionManager.js | 2 +- src/plugins/condition/components/Condition.vue | 3 +-- src/plugins/condition/components/Criterion.vue | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/condition/Condition.js b/src/plugins/condition/Condition.js index 1078a38011..9cf2a3b877 100644 --- a/src/plugins/condition/Condition.js +++ b/src/plugins/condition/Condition.js @@ -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 || '', diff --git a/src/plugins/condition/ConditionManager.js b/src/plugins/condition/ConditionManager.js index 5acb67d1df..858275d5f4 100644 --- a/src/plugins/condition/ConditionManager.js +++ b/src/plugins/condition/ConditionManager.js @@ -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}` diff --git a/src/plugins/condition/components/Condition.vue b/src/plugins/condition/components/Condition.vue index 6381494362..c6c044bc2d 100644 --- a/src/plugins/condition/components/Condition.vue +++ b/src/plugins/condition/components/Condition.vue @@ -41,7 +41,6 @@ > {{ condition.configuration.name }} -