From eb5d32c2a0d9798c1aa590d6e0a48057d681a529 Mon Sep 17 00:00:00 2001 From: Scott Bell Date: Tue, 1 Oct 2024 18:02:07 +0200 Subject: [PATCH] fix domains --- src/plugins/comps/CompsManager.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/comps/CompsManager.js b/src/plugins/comps/CompsManager.js index e151c604e8..7875397078 100644 --- a/src/plugins/comps/CompsManager.js +++ b/src/plugins/comps/CompsManager.js @@ -44,11 +44,9 @@ export default class CompsManager extends EventEmitter { addParameter(telemetryObject) { const keyString = this.#openmct.objects.makeKeyString(telemetryObject.identifier); const metaData = this.#openmct.telemetry.getMetadata(telemetryObject); - const specificTelemetryCollection = this.#telemetryCollections[keyString]; - const specificTimeKey = specificTelemetryCollection.timeKey; - const timeMetaData = metaData.valueMetadatas.find((metaDatum) => { - return metaDatum.key === specificTimeKey || metaDatum.source === specificTimeKey; - }); + const timeSystem = this.#openmct.time.getTimeSystem(); + const domains = metaData?.valuesForHints(['domain']); + const timeMetaData = domains.find((d) => d.key === timeSystem.key); // in the valuesMetadata, find the first numeric data type const rangeItems = metaData.valueMetadatas.filter( (metaDatum) => metaDatum.hints && metaDatum.hints.range