mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 07:38:15 +00:00
[Telemetry] include type telemetry metadata
Read telemetry metadata from type and include in telemetry. Allows telemetry service to work with SWG.
This commit is contained in:
@ -84,12 +84,16 @@ define([
|
||||
* Wraps old format metadata to new format metadata.
|
||||
* Provides methods for interrogating telemetry metadata.
|
||||
*/
|
||||
function TelemetryMetadataManager(domainObject) {
|
||||
function TelemetryMetadataManager(domainObject, typeService) {
|
||||
this.metadata = domainObject.telemetry || {};
|
||||
|
||||
if (this.metadata.values) {
|
||||
this.valueMetadatas = this.metadata.values;
|
||||
} else {
|
||||
var typeMetadata = typeService
|
||||
.getType(domainObject.type).typeDef.telemetry;
|
||||
|
||||
_.extend(this.metadata, typeMetadata);
|
||||
this.valueMetadatas = valueMetadatasFromOldFormat(this.metadata);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user