From 891412bdb91297afff15a924c9c8f6081be1c42e Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Thu, 13 Oct 2016 18:04:37 -0700 Subject: [PATCH] [Roots] Move my-items to separate bundle My Items root is now opt-in, and does not need to be enabled for all deployments. My Items is enabled by default in the development edition. https://github.com/nasa/openmct/issues/1251 --- index.html | 3 +- platform/core/bundle.js | 10 ------- platform/features/my-items/bundle.js | 45 ++++++++++++++++++++++++++++ src/defaultRegistry.js | 1 + 4 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 platform/features/my-items/bundle.js diff --git a/index.html b/index.html index aa5d79cfdc..b6b1715116 100644 --- a/index.html +++ b/index.html @@ -32,7 +32,8 @@ [ 'example/imagery', 'example/eventGenerator', - 'example/generator' + 'example/generator', + 'platform/features/my-items' ].forEach( openmct.legacyRegistry.enable.bind(openmct.legacyRegistry) ); diff --git a/platform/core/bundle.js b/platform/core/bundle.js index 26a49e16d9..93b64f5739 100644 --- a/platform/core/bundle.js +++ b/platform/core/bundle.js @@ -409,16 +409,6 @@ define([ ] } ], - "roots": [ - { - "id": "mine", - "model": { - "name": "My Items", - "type": "folder", - "composition": [] - } - } - ], "runs": [ { "implementation": TransactingMutationListener, diff --git a/platform/features/my-items/bundle.js b/platform/features/my-items/bundle.js new file mode 100644 index 0000000000..42b66ad3b4 --- /dev/null +++ b/platform/features/my-items/bundle.js @@ -0,0 +1,45 @@ +/***************************************************************************** + * Open MCT, Copyright (c) 2014-2016, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT is licensed under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * Open MCT includes source code licensed under additional open source + * licenses. See the Open Source Licenses file (LICENSES.md) included with + * this source code distribution or the Licensing information page available + * at runtime from the About dialog for additional information. + *****************************************************************************/ + +define([ + 'legacyRegistry' +], function ( + legacyRegistry +) { + + legacyRegistry.register("platform/features/my-items", { + "name": "My Items", + "description": "Defines a root named My Items", + "extensions": { + "roots": [ + { + "id": "mine", + "model": { + "name": "My Items", + "type": "folder", + "composition": [] + } + } + ] + } + }); +}); diff --git a/src/defaultRegistry.js b/src/defaultRegistry.js index efabce4d97..910dc8b94a 100644 --- a/src/defaultRegistry.js +++ b/src/defaultRegistry.js @@ -71,6 +71,7 @@ define([ '../platform/features/conductor-v2/utcTimeSystem/bundle', '../platform/features/imagery/bundle', '../platform/features/layout/bundle', + '../platform/features/my-items/bundle', '../platform/features/pages/bundle', '../platform/features/plot/bundle', '../platform/features/static-markup/bundle',