Adapter consolidation & fix incorrect export to window (#2114)

* Merge adapter bundles

Merge adapter bundles into consistent location.

Update telemetry API to not incorrectly expose the format service
on window.

* openmct available on window for developers

* remove offending comma
This commit is contained in:
Pete Richards 2018-07-17 13:57:38 -07:00 committed by Andrew Henry
parent b0702ceff5
commit 4a046b3eea
7 changed files with 28 additions and 114 deletions

View File

@ -73,6 +73,7 @@
openmct.time.clock('local', {start: -THIRTY_MINUTES, end: 0});
openmct.time.timeSystem('utc');
openmct.start();
window.openmct = openmct;
});
</script>
<link rel="stylesheet" href="platform/commonUI/general/res/css/startup-base.css">

View File

@ -32,7 +32,9 @@ define([
'./policies/AdaptedViewPolicy',
'./runs/AlternateCompositionInitializer',
'./runs/TimeSettingsURLHandler',
'./runs/TypeDeprecationChecker'
'./runs/TypeDeprecationChecker',
'./runs/LegacyTelemetryProvider',
'./services/LegacyObjectAPIInterceptor'
], function (
legacyRegistry,
ActionDialogDecorator,
@ -45,7 +47,9 @@ define([
AdaptedViewPolicy,
AlternateCompositionInitializer,
TimeSettingsURLHandler,
TypeDeprecationChecker
TypeDeprecationChecker,
LegacyTelemetryProvider,
LegacyObjectAPIInterceptor
) {
legacyRegistry.register('src/adapter', {
"extensions": {
@ -94,6 +98,18 @@ define([
provides: "modelService",
implementation: MissingModelCompatibilityDecorator,
depends: ["openmct"]
},
{
provides: "objectService",
type: "decorator",
priority: "mandatory",
implementation: LegacyObjectAPIInterceptor,
depends: [
"openmct",
"roots[]",
"instantiate",
"topic"
]
}
],
policies: [
@ -126,6 +142,13 @@ define([
);
},
depends: ["openmct", "$location", "$rootScope"]
},
{
implementation: LegacyTelemetryProvider,
depends: [
"openmct",
"instantiate"
]
}
],
licenses: [

View File

@ -21,7 +21,7 @@
*****************************************************************************/
define([
'../objects/object-utils'
'../../api/objects/object-utils'
], function (
utils
) {

View File

@ -21,7 +21,7 @@
*****************************************************************************/
define([
'./object-utils'
'../../api/objects/object-utils'
], function (
utils
) {

View File

@ -1,51 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, 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.
*****************************************************************************/
/*global define*/
define([
'./LegacyObjectAPIInterceptor',
'legacyRegistry'
], function (
LegacyObjectAPIInterceptor,
legacyRegistry
) {
legacyRegistry.register('src/api/objects', {
name: 'Object API',
description: 'The public Objects API',
extensions: {
components: [
{
provides: "objectService",
type: "decorator",
priority: "mandatory",
implementation: LegacyObjectAPIInterceptor,
depends: [
"openmct",
"roots[]",
"instantiate",
"topic"
]
}
]
}
});
});

View File

@ -1,55 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, 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([
'./TelemetryAPI',
'./LegacyTelemetryProvider',
'legacyRegistry'
], function (
TelemetryAPI,
LegacyTelemetryProvider,
legacyRegistry
) {
legacyRegistry.register('src/api/telemetry', {
name: 'Telemetry API',
description: 'The public Telemetry API',
extensions: {
runs: [
{
key: "TelemetryAPI",
implementation: TelemetryAPI,
depends: [
'formatService'
]
},
{
key: "LegacyTelemetryAdapter",
implementation: LegacyTelemetryProvider,
depends: [
"openmct",
"instantiate"
]
}
]
}
});
});

View File

@ -24,8 +24,6 @@ define([
'legacyRegistry',
'../src/adapter/bundle',
'../src/api/objects/bundle',
'../src/api/telemetry/bundle',
'../example/builtins/bundle',
'../example/composite/bundle',
@ -93,8 +91,6 @@ define([
var DEFAULTS = [
'src/adapter',
'src/api/objects',
'src/api/telemetry',
'platform/framework',
'platform/core',
'platform/representation',