mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 18:57:01 +00:00
Merge pull request #1698 from nasa/plot-metadata-1684
[Telemetry] Provide legacy domains/ranges
This commit is contained in:
commit
7290601a37
@ -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;
|
||||
};
|
||||
|
||||
|
@ -91,8 +91,10 @@ define(
|
||||
"findSubscriptionProvider"
|
||||
]);
|
||||
mockTelemetryAPI.getMetadata.andReturn({
|
||||
valuesForHints: function () {
|
||||
return [{}];
|
||||
valuesForHints: function (hint) {
|
||||
var metadatum = {};
|
||||
metadatum[hint] = "foo";
|
||||
return [metadatum];
|
||||
}
|
||||
});
|
||||
|
||||
@ -147,7 +149,9 @@ define(
|
||||
source: "testSource", // from model
|
||||
key: "testKey", // from model
|
||||
start: 42, // from argument
|
||||
domain: 'mockTimeSystem'
|
||||
domain: 'mockTimeSystem',
|
||||
domains: [{ domain: "foo" }],
|
||||
ranges: [{ range: "foo" }]
|
||||
}]);
|
||||
});
|
||||
|
||||
@ -167,7 +171,9 @@ define(
|
||||
key: "testKey",
|
||||
start: 0,
|
||||
end: 1,
|
||||
domain: 'mockTimeSystem'
|
||||
domain: 'mockTimeSystem',
|
||||
domains: [{ domain: "foo" }],
|
||||
ranges: [{ range: "foo" }]
|
||||
});
|
||||
});
|
||||
|
||||
@ -184,7 +190,9 @@ define(
|
||||
key: "testId", // from domain object
|
||||
start: 0,
|
||||
end: 1,
|
||||
domain: 'mockTimeSystem'
|
||||
domain: 'mockTimeSystem',
|
||||
domains: [{ domain: "foo" }],
|
||||
ranges: [{ range: "foo" }]
|
||||
});
|
||||
});
|
||||
|
||||
@ -266,7 +274,9 @@ define(
|
||||
key: "testKey",
|
||||
start: 0,
|
||||
end: 1,
|
||||
domain: 'mockTimeSystem'
|
||||
domain: 'mockTimeSystem',
|
||||
domains: [{ domain: "foo" }],
|
||||
ranges: [{ range: "foo" }]
|
||||
}]
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user