mirror of
https://github.com/nasa/openmct.git
synced 2024-12-23 15:02:23 +00:00
Remove check for invalid return, update spec
Remove a check for an invalid return value, update the spec to return the proper value. Also updated the subscribe method to fetch defaults the same as the request method. https://github.com/nasa/openmct/pull/1544
This commit is contained in:
parent
26e13a6cd0
commit
fce8f13984
@ -212,10 +212,8 @@ define(
|
||||
var telemetryAPI = this.openmct.telemetry;
|
||||
|
||||
var metadata = telemetryAPI.getMetadata(domainObject);
|
||||
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 defaultDomain = metadata.valuesForHints(['x'])[0].source;
|
||||
var defaultRange = metadata.valuesForHints(['y'])[0].source;
|
||||
|
||||
var isLegacyProvider = telemetryAPI.findRequestProvider(domainObject) ===
|
||||
telemetryAPI.legacyProvider;
|
||||
@ -276,8 +274,8 @@ 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 defaultDomain = metadata.valuesForHints(['x'])[0].source;
|
||||
var defaultRange = metadata.valuesForHints(['y'])[0].source;
|
||||
|
||||
var isLegacyProvider = telemetryAPI.findSubscriptionProvider(domainObject) ===
|
||||
telemetryAPI.legacyProvider;
|
||||
|
@ -92,7 +92,7 @@ define(
|
||||
]);
|
||||
mockTelemetryAPI.getMetadata.andReturn({
|
||||
valuesForHints: function () {
|
||||
return [];
|
||||
return [{}];
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user