From 4b39ea232a215f20c8a99eb2b065d66daff6e159 Mon Sep 17 00:00:00 2001 From: Khalid Adil Date: Mon, 30 Sep 2024 18:53:08 -0500 Subject: [PATCH] Addressing feedback --- src/plugins/condition/ConditionManager.js | 2 +- .../condition/components/ConditionItem.vue | 16 +++++----------- src/plugins/condition/components/TestData.vue | 6 +----- .../condition/historicalTelemetryProvider.js | 8 -------- 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/src/plugins/condition/ConditionManager.js b/src/plugins/condition/ConditionManager.js index 44818ed349..41bba5c4e9 100644 --- a/src/plugins/condition/ConditionManager.js +++ b/src/plugins/condition/ConditionManager.js @@ -24,7 +24,7 @@ import { EventEmitter } from 'eventemitter3'; import { v4 as uuid } from 'uuid'; import Condition from './Condition.js'; -import HistoricalTelemetryProvider from './historicalTelemetryProvider.js'; +import HistoricalTelemetryProvider from './HistoricalTelemetryProvider.js'; import { getLatestTimestamp } from './utils/time.js'; export default class ConditionManager extends EventEmitter { diff --git a/src/plugins/condition/components/ConditionItem.vue b/src/plugins/condition/components/ConditionItem.vue index 250c517154..f33495bd08 100644 --- a/src/plugins/condition/components/ConditionItem.vue +++ b/src/plugins/condition/components/ConditionItem.vue @@ -352,18 +352,12 @@ export default { methods: { setOutputSelection() { let conditionOutput = this.condition.configuration.output; - if (conditionOutput) { - if ( - conditionOutput !== 'false' && - conditionOutput !== 'true' && - conditionOutput !== 'telemetry value' - ) { - this.selectedOutputSelection = 'string'; - } else { - this.selectedOutputSelection = conditionOutput; - } - } else if (conditionOutput === undefined) { + if (conditionOutput === undefined) { this.selectedOutputSelection = 'none'; + } else if (['false', 'true', 'telemetry value'].includes(conditionOutput)) { + this.selectedOutputSelection = conditionOutput; + } else { + this.selectedOutputSelection = 'string'; } }, setOutputValue() { diff --git a/src/plugins/condition/components/TestData.vue b/src/plugins/condition/components/TestData.vue index 1e6f695cf0..d087d948e7 100644 --- a/src/plugins/condition/components/TestData.vue +++ b/src/plugins/condition/components/TestData.vue @@ -63,7 +63,7 @@ :key="index" :value="telemetryOption.identifier" > - {{ telemetryPaths[index] || telemetryOption.name }} + {{ telemetryOption.path || telemetryOption.name }} @@ -201,10 +201,6 @@ export default { this.telemetryMetadataOptions[id] = []; } }); - this.telemetry.forEach(async (telemetryOption, index) => { - const telemetryPath = await this.getFullTelemetryPath(telemetryOption); - this.telemetryPaths[index] = telemetryPath; - }); }, addTestInput(testInput) { this.testInputs.push( diff --git a/src/plugins/condition/historicalTelemetryProvider.js b/src/plugins/condition/historicalTelemetryProvider.js index a2a1abb058..78cb79fce0 100644 --- a/src/plugins/condition/historicalTelemetryProvider.js +++ b/src/plugins/condition/historicalTelemetryProvider.js @@ -15,14 +15,6 @@ export default class HistoricalTelemetryProvider { this.bounds = bounds; } - refreshAllHistoricalTelemetries() { - const refreshPromises = []; - for (const [, value] of Object.entries(this.telemetryObjects)) { - refreshPromises.push(this.refreshHistoricalTelemetry(value)); - } - return Promise.all(refreshPromises); - } - async refreshHistoricalTelemetry(domainObject, identifier) { console.log('refreshHistoricalTelemetry'); if (!domainObject && identifier) {