From 3b06c7749e3e3903b1299cab799d25bcc2361785 Mon Sep 17 00:00:00 2001 From: Scott Bell Date: Wed, 9 Oct 2024 17:56:02 +0200 Subject: [PATCH] change to just value --- src/plugins/comps/CompsMathWorker.js | 4 ++-- src/plugins/comps/CompsMetadataProvider.js | 5 ++--- src/plugins/comps/components/CompsView.vue | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/plugins/comps/CompsMathWorker.js b/src/plugins/comps/CompsMathWorker.js index 606c3b5a3e..2da09178fe 100644 --- a/src/plugins/comps/CompsMathWorker.js +++ b/src/plugins/comps/CompsMathWorker.js @@ -121,8 +121,8 @@ function calculate(dataFrame, parameters, expression) { if (missingData) { return; } - const compsOutput = evaluate(expression, scope); - sumResults.push({ [referenceParameter.timeKey]: referenceTime, compsOutput }); + const value = evaluate(expression, scope); + sumResults.push({ [referenceParameter.timeKey]: referenceTime, value }); }); return sumResults; } diff --git a/src/plugins/comps/CompsMetadataProvider.js b/src/plugins/comps/CompsMetadataProvider.js index 690b2c999b..1b4a489277 100644 --- a/src/plugins/comps/CompsMetadataProvider.js +++ b/src/plugins/comps/CompsMetadataProvider.js @@ -58,9 +58,8 @@ export default class CompsMetadataProvider { const metaDataToReturn = { values: [ { - key: 'compsOutput', - source: 'compsOutput', - name: 'Output', + key: 'value', + name: 'Value', derived: true, formatString: specificCompsManager.getOutputFormat(), hints: { diff --git a/src/plugins/comps/components/CompsView.vue b/src/plugins/comps/components/CompsView.vue index 109733e4c6..606bd13613 100644 --- a/src/plugins/comps/components/CompsView.vue +++ b/src/plugins/comps/components/CompsView.vue @@ -299,7 +299,7 @@ function updateExpression() { function getValueFormatter() { const metaData = openmct.telemetry.getMetadata(domainObject); - const outputMetaDatum = metaData.values().find((metaDatum) => metaDatum.key === 'compsOutput'); + const outputMetaDatum = metaData.values().find((metaDatum) => metaDatum.key === 'value'); return openmct.telemetry.getValueFormatter(outputMetaDatum); } @@ -347,7 +347,7 @@ function telemetryProcessor(data) { return; } // new data will come in as array, so just take the last element - const currentOutput = data[data.length - 1]?.compsOutput; + const currentOutput = data[data.length - 1]?.value; const formattedOutput = getValueFormatter().format(currentOutput); currentCompOutput.value = formattedOutput; }