Compare commits

..

1 Commits

Author SHA1 Message Date
David Tsay
dc5405aefd move ApplicationRouter to api/router/RouterAPI 2021-06-22 12:30:06 -07:00
7 changed files with 11 additions and 21 deletions

View File

@@ -4,8 +4,6 @@ Open MCT (Open Mission Control Technologies) is a next-generation mission contro
Please visit our [Official Site](https://nasa.github.io/openmct/) and [Getting Started Guide](https://nasa.github.io/openmct/getting-started/)
Once you've created something amazing with Open MCT, showcase your work in our GitHub Discussions [Show and Tell](https://github.com/nasa/openmct/discussions/categories/show-and-tell) section. We love seeing unique and wonderful implementations of Open MCT!
## See Open MCT in Action
Try Open MCT now with our [live demo](https://openmct-demo.herokuapp.com/).

View File

@@ -36,8 +36,7 @@ define([
'./plugins/imagery/plugin',
'./ui/registries/InspectorViewRegistry',
'./ui/registries/ToolbarRegistry',
'./ui/router/ApplicationRouter',
'./ui/router/Browse',
'./api/router/Browse',
'../platform/framework/src/Main',
'./ui/layout/Layout.vue',
'../platform/core/src/objects/DomainObjectImpl',
@@ -65,7 +64,6 @@ define([
ImageryPlugin,
InspectorViewRegistry,
ToolbarRegistry,
ApplicationRouter,
Browse,
Main,
Layout,
@@ -252,7 +250,7 @@ define([
this.status = new api.StatusAPI(this);
this.router = new ApplicationRouter(this);
this.router = new api.RouterAPI(this);
this.branding = BrandingAPI.default;

View File

@@ -31,7 +31,8 @@ define([
'./Editor',
'./menu/MenuAPI',
'./actions/ActionsAPI',
'./status/StatusAPI'
'./status/StatusAPI',
'./router/RouterAPI'
], function (
TimeAPI,
ObjectAPI,
@@ -43,7 +44,8 @@ define([
EditorAPI,
MenuAPI,
ActionsAPI,
StatusAPI
StatusAPI,
RouterAPI
) {
return {
TimeAPI: TimeAPI,
@@ -56,6 +58,7 @@ define([
EditorAPI: EditorAPI,
MenuAPI: MenuAPI.default,
ActionsAPI: ActionsAPI.default,
StatusAPI: StatusAPI.default
StatusAPI: StatusAPI.default,
RouterAPI: RouterAPI.default
};
});

View File

@@ -19,13 +19,12 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global module*/
const LocationBar = require('location-bar');
const EventEmitter = require('EventEmitter');
const _ = require('lodash');
class ApplicationRouter extends EventEmitter {
class RouterAPI extends EventEmitter {
/**
* events
* change:params -> notify listeners w/ new, old, and changed.
@@ -416,4 +415,4 @@ function paramsToObject(searchParams) {
return params;
}
module.exports = ApplicationRouter;
export default RouterAPI;

View File

@@ -37,15 +37,7 @@ export default class DuplicateAction {
let duplicationTask = new DuplicateTask(this.openmct);
let originalObject = objectPath[0];
let parent = objectPath[1];
let userInput;
try {
userInput = await this.getUserInput(originalObject, parent);
} catch (error) {
// user most likely canceled
return;
}
let userInput = await this.getUserInput(originalObject, parent);
let newParent = userInput.location;
let inNavigationPath = this.inNavigationPath(originalObject);