mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 03:06:54 +00:00
[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:
parent
b6a8078634
commit
eb196ea521
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user