[Telemetry] Convert to legacy domains/ranges

When requesting metadata via the legacy telemetry capability,
add fields for ranges/domains to avoid breaking legacy views.
Fixes #1684
This commit is contained in:
Victor Woeltjen 2017-08-30 09:31:02 -07:00
parent b6a8078634
commit eb196ea521

View File

@ -138,6 +138,11 @@ define(
typeRequest = (type && type.getDefinition().telemetry) || {},
modelTelemetry = domainObject.getModel().telemetry,
fullRequest = Object.create(typeRequest),
newObject = objectUtils.toNewFormat(
domainObject.getModel(),
domainObject.getId()
),
metadata = this.openmct.telemetry.getMetadata(newObject),
bounds,
timeSystem;
@ -173,6 +178,14 @@ define(
}
}
if (!fullRequest.ranges) {
fullRequest.ranges = metadata.valuesForHints(['range']);
}
if (!fullRequest.domains) {
fullRequest.domains = metadata.valuesForHints(['domain']);
}
return fullRequest;
};