Legacy inspector view support

This commit is contained in:
Pete Richards
2018-10-05 10:41:06 -07:00
parent f40c9fa6f9
commit 9a6090cd02
4 changed files with 116 additions and 28 deletions

View File

@@ -1,8 +1,10 @@
define([
'./LegacyViewProvider',
'./TypeInspectorViewProvider',
'../../api/objects/object-utils'
], function (
LegacyViewProvider,
TypeInspectorViewProvider,
objectUtils
) {
function installLegacyViews(openmct, legacyViews, instantiate) {
@@ -16,6 +18,13 @@ define([
legacyViews.forEach(function (legacyView) {
openmct.objectViews.addProvider(new LegacyViewProvider(legacyView, openmct, convertToLegacyObject));
});
let inspectorTypes = openmct.$injector.get('types[]')
.filter((t) => t.hasOwnProperty('inspector'));
inspectorTypes.forEach(function (typeDefinition) {
openmct.inspectorViews.addProvider(new TypeInspectorViewProvider(typeDefinition, openmct, convertToLegacyObject));
});
}
return installLegacyViews;