mirror of
https://github.com/nasa/openmct.git
synced 2024-12-21 14:07:50 +00:00
[Framework] Simplify inputs to service compositor
Accept the full component array into the service compositor; this will make it easier to add these from the registar. WTD-518.
This commit is contained in:
parent
d9f17dca83
commit
2d0d505b51
@ -42,6 +42,12 @@ define(
|
||||
return arguments[0];
|
||||
}
|
||||
|
||||
function hasType(type) {
|
||||
return function (extension) {
|
||||
return extension.type === type;
|
||||
};
|
||||
}
|
||||
|
||||
function makeName(category, service, index) {
|
||||
return [
|
||||
service,
|
||||
@ -148,12 +154,20 @@ define(
|
||||
registerLatest();
|
||||
}
|
||||
|
||||
function registerCompositeServices(components) {
|
||||
registerComposites(
|
||||
components.filter(hasType("provider")),
|
||||
components.filter(hasType("aggregator")),
|
||||
components.filter(hasType("decorator"))
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {Array} components extensions of type component
|
||||
* @param {Array} components extensions of category component
|
||||
*/
|
||||
registerCompositeServices: registerComposites
|
||||
registerCompositeServices: registerCompositeServices
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user