From b97555445e8ceedeaa94e3064200f2133aea8a20 Mon Sep 17 00:00:00 2001 From: Khalid Adil Date: Mon, 30 Sep 2024 19:10:24 -0500 Subject: [PATCH] Creating a const for telemetry value --- src/plugins/condition/ConditionManager.js | 3 ++- src/plugins/condition/components/ConditionItem.vue | 9 +++++---- src/plugins/condition/utils/constants.js | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/plugins/condition/ConditionManager.js b/src/plugins/condition/ConditionManager.js index 41bba5c4e9..97969be777 100644 --- a/src/plugins/condition/ConditionManager.js +++ b/src/plugins/condition/ConditionManager.js @@ -25,6 +25,7 @@ import { v4 as uuid } from 'uuid'; import Condition from './Condition.js'; import HistoricalTelemetryProvider from './HistoricalTelemetryProvider.js'; +import { TELEMETRY_VALUE } from './utils/constants.js'; import { getLatestTimestamp } from './utils/time.js'; export default class ConditionManager extends EventEmitter { @@ -392,7 +393,7 @@ export default class ConditionManager extends EventEmitter { const currentCondition = this.getCurrentConditionLAD(conditionResults); let output = currentCondition?.configuration?.output; - if (output === 'telemetry value') { + if (output === TELEMETRY_VALUE) { const { outputTelemetry, outputMetadata } = currentCondition.configuration; const outputTelemetryObject = await this.openmct.objects.get(outputTelemetry); const telemetryOptions = { diff --git a/src/plugins/condition/components/ConditionItem.vue b/src/plugins/condition/components/ConditionItem.vue index f33495bd08..a7481a10fc 100644 --- a/src/plugins/condition/components/ConditionItem.vue +++ b/src/plugins/condition/components/ConditionItem.vue @@ -113,7 +113,7 @@ @change="persist" /> - +