From 26e13a6cd0eba1a7439fc4403032c77dd09f3772 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 26 Apr 2017 21:15:48 -0700 Subject: [PATCH] [Telemetry] Use the 'source' metadata field to retrieve telemetry metadata, if available. Fixes #1543. --- platform/telemetry/src/TelemetryCapability.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/telemetry/src/TelemetryCapability.js b/platform/telemetry/src/TelemetryCapability.js index 37a4e0f2ed..1c1735b328 100644 --- a/platform/telemetry/src/TelemetryCapability.js +++ b/platform/telemetry/src/TelemetryCapability.js @@ -212,8 +212,10 @@ define( var telemetryAPI = this.openmct.telemetry; var metadata = telemetryAPI.getMetadata(domainObject); - var defaultDomain = (metadata.valuesForHints(['domain'])[0] || {}).key; - var defaultRange = (metadata.valuesForHints(['range'])[0] || {}).key; + var domainMetadata = metadata.valuesForHints(['x'])[0] || {}; + var rangeMetadata = metadata.valuesForHints(['y'])[0] || {}; + var defaultDomain = domainMetadata.source || domainMetadata.key; + var defaultRange = rangeMetadata.source || rangeMetadata.key; var isLegacyProvider = telemetryAPI.findRequestProvider(domainObject) === telemetryAPI.legacyProvider;