[Telemetry] Use the 'source' metadata field to retrieve telemetry metadata, if available. Fixes #1543.

This commit is contained in:
Henry 2017-04-26 21:15:48 -07:00
parent fd3312734c
commit 11677b97ab

View File

@ -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;