mirror of
https://github.com/nasa/openmct.git
synced 2024-12-22 06:27:48 +00:00
[Plugins] Add persistence plugin constructors
This commit is contained in:
parent
6bf293f96b
commit
116bb2c25f
@ -23,7 +23,7 @@
|
|||||||
define([
|
define([
|
||||||
'lodash'
|
'lodash'
|
||||||
], function (_) {
|
], function (_) {
|
||||||
return _({
|
var bundleMap = {
|
||||||
couchDB: 'platform/persistence/couch',
|
couchDB: 'platform/persistence/couch',
|
||||||
elasticsearch: 'platform/persistence/elastic',
|
elasticsearch: 'platform/persistence/elastic',
|
||||||
espresso: 'platform/commonUI/themes/espresso',
|
espresso: 'platform/commonUI/themes/espresso',
|
||||||
@ -31,9 +31,25 @@ define([
|
|||||||
myItems: 'platform/features/my-items',
|
myItems: 'platform/features/my-items',
|
||||||
snow: 'platform/commonUI/themes/snow',
|
snow: 'platform/commonUI/themes/snow',
|
||||||
utcTimeSystem: 'platform/features/conductor/utcTimeSystem'
|
utcTimeSystem: 'platform/features/conductor/utcTimeSystem'
|
||||||
}).map(pluginName, bundleName) {
|
};
|
||||||
|
|
||||||
|
var plugins = _(bundleMap).map(pluginName, bundleName) {
|
||||||
return function (openmct) {
|
return function (openmct) {
|
||||||
openmct.legacyRegistry.enable(bundleName);
|
openmct.legacyRegistry.enable(bundleName);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugins.CouchDB = function (url) {
|
||||||
|
return function (openmct) {
|
||||||
|
openmct.legacyRegistry.enable(bundleMap.couchDB);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins.ElasticSearch = function (url) {
|
||||||
|
return function (openmct) {
|
||||||
|
openmct.legacyRegistry.enable(bundleMap.elasticsearch);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
return plugins;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user