Compare commits

...

1 Commits

3 changed files with 29 additions and 26 deletions

View File

@ -55,7 +55,6 @@ define([
'../platform/exporters/bundle',
'../platform/features/clock/bundle',
'../platform/features/imagery/bundle',
'../platform/features/my-items/bundle',
'../platform/features/pages/bundle',
'../platform/features/hyperlink/bundle',
'../platform/features/static-markup/bundle',

View File

@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government
* Open MCT, Copyright (c) 2014-2019, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
@ -21,31 +21,32 @@
*****************************************************************************/
define([
'legacyRegistry'
], function (
legacyRegistry
) {
const namespace = '',
key = 'mine';
return function plugin() {
return function install(openmct) {
openmct.objects.addRoot({
namespace: namespace,
key: key
});
legacyRegistry.register("platform/features/my-items", {
"name": "My Items",
"description": "Defines a root named My Items",
"extensions": {
"roots": [
{
"id": "mine"
}
],
"models": [
{
"id": "mine",
"model": {
"name": "My Items",
"type": "folder",
"composition": [],
"location": "ROOT"
let objectProvider = {
get: function (identifier) {
if (identifier.key === key) {
return Promise.resolve({
identifier: identifier,
name: 'My Items',
type: 'folder',
location: 'ROOT',
composition: []
});
}
}
]
};
openmct.objects.addProvider(namespace, objectProvider);
}
});
}
});

View File

@ -44,7 +44,8 @@ define([
'./filters/plugin',
'./objectMigration/plugin',
'./goToOriginalAction/plugin',
'./clearData/plugin'
'./clearData/plugin',
'./myItems/plugin'
], function (
_,
UTCTimeSystem,
@ -69,11 +70,11 @@ define([
Filters,
ObjectMigration,
GoToOriginalAction,
ClearData
ClearData,
MyItems
) {
var bundleMap = {
LocalStorage: 'platform/persistence/local',
MyItems: 'platform/features/my-items',
CouchDB: 'platform/persistence/couch'
};
@ -103,6 +104,8 @@ define([
*/
plugins.AutoflowView = AutoflowPlugin;
plugins.MyItems = MyItems;
plugins.Conductor = TimeConductorPlugin.default;
plugins.CouchDB = function (url) {