From 116bb2c25ff0e091b13786b380512d9eb79d28b7 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 12 Jan 2017 14:56:47 -0800 Subject: [PATCH] [Plugins] Add persistence plugin constructors --- src/plugins/plugins.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/plugins/plugins.js b/src/plugins/plugins.js index c005fb213f..11331ae78c 100644 --- a/src/plugins/plugins.js +++ b/src/plugins/plugins.js @@ -23,7 +23,7 @@ define([ 'lodash' ], function (_) { - return _({ + var bundleMap = { couchDB: 'platform/persistence/couch', elasticsearch: 'platform/persistence/elastic', espresso: 'platform/commonUI/themes/espresso', @@ -31,9 +31,25 @@ define([ myItems: 'platform/features/my-items', snow: 'platform/commonUI/themes/snow', utcTimeSystem: 'platform/features/conductor/utcTimeSystem' - }).map(pluginName, bundleName) { + }; + + var plugins = _(bundleMap).map(pluginName, bundleName) { return function (openmct) { 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; });