From fdc875379fedc15adde4281843fdc98986c219bf Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 6 Jan 2016 10:44:53 -0800 Subject: [PATCH 01/37] [API] Refactor out application initialization ...to simplify insertion of an imperative bundle registry, WTD-450. --- platform/framework/src/FrameworkLayer.js | 99 +++++++++++++++++++++ platform/framework/src/Main.js | 69 +------------- platform/framework/src/load/BundleLoader.js | 1 - 3 files changed, 103 insertions(+), 66 deletions(-) create mode 100644 platform/framework/src/FrameworkLayer.js diff --git a/platform/framework/src/FrameworkLayer.js b/platform/framework/src/FrameworkLayer.js new file mode 100644 index 0000000000..c25afe5be7 --- /dev/null +++ b/platform/framework/src/FrameworkLayer.js @@ -0,0 +1,99 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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, window, requirejs*/ + +define([ + './Constants', + './FrameworkInitializer', + './LogLevel', + './load/BundleLoader', + './resolve/ImplementationLoader', + './resolve/ExtensionResolver', + './resolve/BundleResolver', + './resolve/RequireConfigurator', + './register/CustomRegistrars', + './register/ExtensionRegistrar', + './register/ExtensionSorter', + './bootstrap/ApplicationBootstrapper' +], function ( + Constants, + FrameworkInitializer, + LogLevel, + BundleLoader, + ImplementationLoader, + ExtensionResolver, + BundleResolver, + RequireConfigurator, + CustomRegistrars, + ExtensionRegistrar, + ExtensionSorter, + ApplicationBootstrapper +) { + 'use strict'; + + function FrameworkLayer($http, $log) { + this.$http = $http; + this.$log = $log; + } + + FrameworkLayer.prototype.initializeApplication = function (angular, logLevel) { + var $http = this.$http, + $log = this.$log, + app = angular.module(Constants.MODULE_NAME, ["ngRoute"]), + loader = new BundleLoader($http, $log), + resolver = new BundleResolver( + new ExtensionResolver( + new ImplementationLoader(require), + $log + ), + new RequireConfigurator(requirejs), + $log + ), + registrar = new ExtensionRegistrar( + app, + new CustomRegistrars(app, $log), + new ExtensionSorter($log), + $log + ), + bootstrapper = new ApplicationBootstrapper( + angular, + window.document, + $log + ), + initializer = new FrameworkInitializer( + loader, + resolver, + registrar, + bootstrapper + ); + + // Apply logging levels; this must be done now, before the + // first log statement. + new LogLevel(logLevel).configure(app, $log); + + // Initialize the application + $log.info("Initializing application."); + initializer.runApplication(Constants.BUNDLE_LISTING_FILE); + }; + + return FrameworkLayer; +}); \ No newline at end of file diff --git a/platform/framework/src/Main.js b/platform/framework/src/Main.js index cf8f270336..ecee20479a 100644 --- a/platform/framework/src/Main.js +++ b/platform/framework/src/Main.js @@ -43,36 +43,14 @@ define( '../lib/es6-promise-2.0.0.min', '../lib/angular.min', '../lib/angular-route.min', - './Constants', - './FrameworkInitializer', - './LogLevel', - './load/BundleLoader', - './resolve/ImplementationLoader', - './resolve/ExtensionResolver', - './resolve/BundleResolver', - './resolve/RequireConfigurator', - './register/CustomRegistrars', - './register/ExtensionRegistrar', - './register/ExtensionSorter', - './bootstrap/ApplicationBootstrapper' + './FrameworkLayer' ], function ( require, es6promise, angular, angularRoute, - Constants, - FrameworkInitializer, - LogLevel, - BundleLoader, - ImplementationLoader, - ExtensionResolver, - BundleResolver, - RequireConfigurator, - CustomRegistrars, - ExtensionRegistrar, - ExtensionSorter, - ApplicationBootstrapper + FrameworkLayer ) { "use strict"; @@ -89,49 +67,10 @@ define( // Polyfill Promise, in case browser does not natively provide Promise window.Promise = window.Promise || es6promise.Promise; - // Wire up framework layer components necessary to complete framework - // initialization phases. - function initializeApplication($http, $log) { - var app = angular.module(Constants.MODULE_NAME, ["ngRoute"]), - loader = new BundleLoader($http, $log), - resolver = new BundleResolver( - new ExtensionResolver( - new ImplementationLoader(require), - $log - ), - new RequireConfigurator(requirejs), - $log - ), - registrar = new ExtensionRegistrar( - app, - new CustomRegistrars(app, $log), - new ExtensionSorter($log), - $log - ), - bootstrapper = new ApplicationBootstrapper( - angular, - window.document, - $log - ), - initializer = new FrameworkInitializer( - loader, - resolver, - registrar, - bootstrapper - ); - - // Apply logging levels; this must be done now, before the - // first log statement. - new LogLevel(logLevel()).configure(app, $log); - - // Initialize the application - $log.info("Initializing application."); - initializer.runApplication(Constants.BUNDLE_LISTING_FILE); - } - // Reconfigure base url, since bundle paths will all be relative // to the root now. requirejs.config({ "baseUrl": "" }); - injector.invoke(['$http', '$log', initializeApplication]); + injector.instantiate(['$http', '$log', FrameworkLayer]) + .initializeApplication(angular, logLevel()); } ); diff --git a/platform/framework/src/load/BundleLoader.js b/platform/framework/src/load/BundleLoader.js index 14b404f195..1ae3a2eb70 100644 --- a/platform/framework/src/load/BundleLoader.js +++ b/platform/framework/src/load/BundleLoader.js @@ -47,7 +47,6 @@ define( function BundleLoader($http, $log) { this.$http = $http; this.$log = $log; - } /** From 9f66f39d8d988100e09d4b3901fc71f79aba9cea Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 6 Jan 2016 10:59:21 -0800 Subject: [PATCH 02/37] [API] Add a top-level main.js ...which can depend upon the bundle registry, as well as a set of installed bundles. https://github.com/nasa/openmctweb/issues/450 --- index.html | 2 +- main.js | 48 ++++++++++++++++++++++++++++++++++ platform/framework/src/Main.js | 43 ++++++++++++++++-------------- src/bundleRegistry.js | 26 ++++++++++++++++++ 4 files changed, 99 insertions(+), 20 deletions(-) create mode 100644 main.js create mode 100644 src/bundleRegistry.js diff --git a/index.html b/index.html index 8be727ab5a..d5555173c7 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@ diff --git a/main.js b/main.js new file mode 100644 index 0000000000..2bf5f4b597 --- /dev/null +++ b/main.js @@ -0,0 +1,48 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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, window, requirejs*/ + +requirejs.config({ + "paths": { + "bundleRegistry": "./src/bundleRegistry", + "angular": "./platform/framework/lib/angular.min", + "angular-route": "./platform/framework/lib/angular-route.min" + }, + "shim": { + "angular": { + "exports": "angular" + }, + "angular-route": { + "deps": [ "angular" ] + } + } +}); + +define([ + './platform/framework/src/Main', + 'bundleRegistry', + "angular", + "angular-route" +], function (Main, bundleRegistry, angular) { + 'use strict'; + new Main(angular).run(bundleRegistry); +}); \ No newline at end of file diff --git a/platform/framework/src/Main.js b/platform/framework/src/Main.js index ecee20479a..c5a1968308 100644 --- a/platform/framework/src/Main.js +++ b/platform/framework/src/Main.js @@ -41,36 +41,41 @@ define( [ 'require', '../lib/es6-promise-2.0.0.min', - '../lib/angular.min', - '../lib/angular-route.min', './FrameworkLayer' ], function ( require, es6promise, - angular, - angularRoute, FrameworkLayer ) { "use strict"; - // Get a reference to Angular's injector, so we can get $http and $log - // services, which are useful to the framework layer. - var injector = angular.injector(['ng']); - - // Look up log level from query string - function logLevel() { - var match = /[?&]log=([a-z]+)/.exec(window.location.search); - return match ? match[1] : ""; + function Main(angular) { + this.angular = angular; } - // Polyfill Promise, in case browser does not natively provide Promise - window.Promise = window.Promise || es6promise.Promise; + Main.prototype.run = function () { + // Get a reference to Angular's injector, so we can get $http and $log + // services, which are useful to the framework layer. + var angular = this.angular, + injector = angular.injector(['ng']); - // Reconfigure base url, since bundle paths will all be relative - // to the root now. - requirejs.config({ "baseUrl": "" }); - injector.instantiate(['$http', '$log', FrameworkLayer]) - .initializeApplication(angular, logLevel()); + // Look up log level from query string + function logLevel() { + var match = /[?&]log=([a-z]+)/.exec(window.location.search); + return match ? match[1] : ""; + } + + // Polyfill Promise, in case browser does not natively provide Promise + window.Promise = window.Promise || es6promise.Promise; + + // Reconfigure base url, since bundle paths will all be relative + // to the root now. + requirejs.config({"baseUrl": ""}); + injector.instantiate(['$http', '$log', FrameworkLayer]) + .initializeApplication(angular, logLevel()); + }; + + return Main; } ); diff --git a/src/bundleRegistry.js b/src/bundleRegistry.js new file mode 100644 index 0000000000..b5cbffb853 --- /dev/null +++ b/src/bundleRegistry.js @@ -0,0 +1,26 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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, window, requirejs*/ + +define(function () { + return {}; +}); \ No newline at end of file From 76aa9e1fd23a21d4211dda59c525964b4cd5d2fb Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 6 Jan 2016 11:05:41 -0800 Subject: [PATCH 03/37] [API] Add legacy bundle registry --- main.js | 8 ++-- src/BundleRegistry.js | 42 ++++++++++++++++++++ src/{bundleRegistry.js => legacyRegistry.js} | 5 ++- 3 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 src/BundleRegistry.js rename src/{bundleRegistry.js => legacyRegistry.js} (91%) diff --git a/main.js b/main.js index 2bf5f4b597..e5b6f24519 100644 --- a/main.js +++ b/main.js @@ -23,7 +23,7 @@ requirejs.config({ "paths": { - "bundleRegistry": "./src/bundleRegistry", + "legacyRegistry": "./src/legacyRegistry", "angular": "./platform/framework/lib/angular.min", "angular-route": "./platform/framework/lib/angular-route.min" }, @@ -39,10 +39,10 @@ requirejs.config({ define([ './platform/framework/src/Main', - 'bundleRegistry', + 'legacyRegistry', "angular", "angular-route" -], function (Main, bundleRegistry, angular) { +], function (Main, legacyRegistry, angular) { 'use strict'; - new Main(angular).run(bundleRegistry); + new Main(angular).run(legacyRegistry); }); \ No newline at end of file diff --git a/src/BundleRegistry.js b/src/BundleRegistry.js new file mode 100644 index 0000000000..4bf2f8091c --- /dev/null +++ b/src/BundleRegistry.js @@ -0,0 +1,42 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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(function () { + function BundleRegistry() { + this.bundles = {}; + } + + BundleRegistry.prototype.registry = function (path, definition) { + this.bundles[path] = definition; + }; + + BundleRegistry.prototype.contains = function (path) { + return !!this.bundles[path]; + }; + + BundleRegistry.prototype.get = function (path) { + return this.bundles[path]; + }; + + return BundleRegistry; +}); \ No newline at end of file diff --git a/src/bundleRegistry.js b/src/legacyRegistry.js similarity index 91% rename from src/bundleRegistry.js rename to src/legacyRegistry.js index b5cbffb853..ff7a6f94f5 100644 --- a/src/bundleRegistry.js +++ b/src/legacyRegistry.js @@ -21,6 +21,7 @@ *****************************************************************************/ /*global define, window, requirejs*/ -define(function () { - return {}; +define(['./BundleRegistry'], function (BundleRegistry) { + 'use strict'; + return new BundleRegistry(); }); \ No newline at end of file From 65fb5ab2a5ce642401e40a1326027638ccdf394b Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 6 Jan 2016 11:15:36 -0800 Subject: [PATCH 04/37] [API] Move angular dependency inward --- main.js | 8 +++----- platform/framework/src/Main.js | 13 +++++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/main.js b/main.js index e5b6f24519..5133122006 100644 --- a/main.js +++ b/main.js @@ -39,10 +39,8 @@ requirejs.config({ define([ './platform/framework/src/Main', - 'legacyRegistry', - "angular", - "angular-route" -], function (Main, legacyRegistry, angular) { + 'legacyRegistry' +], function (Main, legacyRegistry) { 'use strict'; - new Main(angular).run(legacyRegistry); + new Main().run(legacyRegistry); }); \ No newline at end of file diff --git a/platform/framework/src/Main.js b/platform/framework/src/Main.js index c5a1968308..caf66b7b6a 100644 --- a/platform/framework/src/Main.js +++ b/platform/framework/src/Main.js @@ -41,24 +41,25 @@ define( [ 'require', '../lib/es6-promise-2.0.0.min', - './FrameworkLayer' + './FrameworkLayer', + 'angular', + 'angular-route' ], function ( require, es6promise, - FrameworkLayer + FrameworkLayer, + angular ) { "use strict"; - function Main(angular) { - this.angular = angular; + function Main() { } Main.prototype.run = function () { // Get a reference to Angular's injector, so we can get $http and $log // services, which are useful to the framework layer. - var angular = this.angular, - injector = angular.injector(['ng']); + var injector = angular.injector(['ng']); // Look up log level from query string function logLevel() { From a39e8e44f0bb621a244aaeaf0e3b8091bec11142 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 6 Jan 2016 11:22:44 -0800 Subject: [PATCH 05/37] [API] Load bundles from imperative registry --- platform/framework/src/FrameworkLayer.js | 8 ++++++-- platform/framework/src/Main.js | 4 ++-- platform/framework/src/load/BundleLoader.js | 18 ++++++++++++++---- src/BundleRegistry.js | 6 ++++++ 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/platform/framework/src/FrameworkLayer.js b/platform/framework/src/FrameworkLayer.js index c25afe5be7..753eb91dfe 100644 --- a/platform/framework/src/FrameworkLayer.js +++ b/platform/framework/src/FrameworkLayer.js @@ -55,11 +55,15 @@ define([ this.$log = $log; } - FrameworkLayer.prototype.initializeApplication = function (angular, logLevel) { + FrameworkLayer.prototype.initializeApplication = function ( + angular, + legacyRegistry, + logLevel + ) { var $http = this.$http, $log = this.$log, app = angular.module(Constants.MODULE_NAME, ["ngRoute"]), - loader = new BundleLoader($http, $log), + loader = new BundleLoader($http, $log, legacyRegistry), resolver = new BundleResolver( new ExtensionResolver( new ImplementationLoader(require), diff --git a/platform/framework/src/Main.js b/platform/framework/src/Main.js index caf66b7b6a..936461bfaf 100644 --- a/platform/framework/src/Main.js +++ b/platform/framework/src/Main.js @@ -56,7 +56,7 @@ define( function Main() { } - Main.prototype.run = function () { + Main.prototype.run = function (legacyRegistry) { // Get a reference to Angular's injector, so we can get $http and $log // services, which are useful to the framework layer. var injector = angular.injector(['ng']); @@ -74,7 +74,7 @@ define( // to the root now. requirejs.config({"baseUrl": ""}); injector.instantiate(['$http', '$log', FrameworkLayer]) - .initializeApplication(angular, logLevel()); + .initializeApplication(angular, legacyRegistry, logLevel()); }; return Main; diff --git a/platform/framework/src/load/BundleLoader.js b/platform/framework/src/load/BundleLoader.js index 1ae3a2eb70..737771809f 100644 --- a/platform/framework/src/load/BundleLoader.js +++ b/platform/framework/src/load/BundleLoader.js @@ -44,9 +44,10 @@ define( * @param $http Angular's HTTP requester * @param $log Angular's logging service */ - function BundleLoader($http, $log) { + function BundleLoader($http, $log, legacyRegistry) { this.$http = $http; this.$log = $log; + this.legacyRegistry = legacyRegistry; } /** @@ -96,6 +97,13 @@ define( // Load an individual bundle, as a Bundle object. // Returns undefined if the definition could not be loaded. function loadBundle(bundlePath) { + if (this.legacyRegistry.contains(bundlePath)) { + return Promise.resolve(new Bundle( + bundlePath, + this.legacyRegistry.get(bundlePath) + )); + } + return loadBundleDefinition(bundlePath).then(function (definition) { return definition && (new Bundle(bundlePath, definition)); }); @@ -104,7 +112,9 @@ define( // Load all named bundles from the array, returned as an array // of Bundle objects. function loadBundlesFromArray(bundleArray) { - var bundlePromises = bundleArray.map(loadBundle); + var bundlePromises = this.legacyRegistry.list() + .concat(bundleArray) + .map(loadBundle); return Promise.all(bundlePromises) .then(filterBundles); @@ -117,8 +127,8 @@ define( } return Array.isArray(bundles) ? loadBundlesFromArray(bundles) : - (typeof bundles === 'string') ? loadBundlesFromFile(bundles) : - Promise.reject(new Error(INVALID_ARGUMENT_MESSAGE)); + (typeof bundles === 'string') ? loadBundlesFromFile(bundles) : + Promise.reject(new Error(INVALID_ARGUMENT_MESSAGE)); }; return BundleLoader; diff --git a/src/BundleRegistry.js b/src/BundleRegistry.js index 4bf2f8091c..73d6ebecae 100644 --- a/src/BundleRegistry.js +++ b/src/BundleRegistry.js @@ -22,6 +22,8 @@ /*global define*/ define(function () { + 'use strict'; + function BundleRegistry() { this.bundles = {}; } @@ -38,5 +40,9 @@ define(function () { return this.bundles[path]; }; + BundleRegistry.prototype.list = function () { + return Object.keys(this.bundles); + }; + return BundleRegistry; }); \ No newline at end of file From b87dd5def6d29dca986e93411f85236d3b3d78ed Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 6 Jan 2016 17:50:05 -0800 Subject: [PATCH 06/37] [API] Fix paths for legacyRegistry --- platform/framework/src/load/BundleLoader.js | 15 +++++++++++---- src/legacyRegistry.js | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/platform/framework/src/load/BundleLoader.js b/platform/framework/src/load/BundleLoader.js index 737771809f..ee6fb0a0e9 100644 --- a/platform/framework/src/load/BundleLoader.js +++ b/platform/framework/src/load/BundleLoader.js @@ -60,7 +60,8 @@ define( */ BundleLoader.prototype.loadBundles = function (bundles) { var $http = this.$http, - $log = this.$log; + $log = this.$log, + legacyRegistry = this.legacyRegistry; // Utility function; load contents of JSON file using $http function getJSON(file) { @@ -97,10 +98,10 @@ define( // Load an individual bundle, as a Bundle object. // Returns undefined if the definition could not be loaded. function loadBundle(bundlePath) { - if (this.legacyRegistry.contains(bundlePath)) { + if (legacyRegistry.contains(bundlePath)) { return Promise.resolve(new Bundle( bundlePath, - this.legacyRegistry.get(bundlePath) + legacyRegistry.get(bundlePath) )); } @@ -109,11 +110,17 @@ define( }); } + // Used to filter out redundant bundles + function unique(element, index, array) { + return array.indexOf(element) === index; + } + // Load all named bundles from the array, returned as an array // of Bundle objects. function loadBundlesFromArray(bundleArray) { - var bundlePromises = this.legacyRegistry.list() + var bundlePromises = legacyRegistry.list() .concat(bundleArray) + .filter(unique) .map(loadBundle); return Promise.all(bundlePromises) diff --git a/src/legacyRegistry.js b/src/legacyRegistry.js index ff7a6f94f5..f7a8d13b06 100644 --- a/src/legacyRegistry.js +++ b/src/legacyRegistry.js @@ -21,7 +21,7 @@ *****************************************************************************/ /*global define, window, requirejs*/ -define(['./BundleRegistry'], function (BundleRegistry) { +define(['src/BundleRegistry'], function (BundleRegistry) { 'use strict'; return new BundleRegistry(); }); \ No newline at end of file From 612dd7db2c92527a3c34767609e8ce0ad1dd21b1 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 6 Jan 2016 17:54:56 -0800 Subject: [PATCH 07/37] [API] Expose browse through legacy registry --- bundles.json | 1 - main.js | 3 +- platform/commonUI/browse/bundle.js | 212 +++++++++++++++++++++++++++++ src/BundleRegistry.js | 2 +- 4 files changed, 215 insertions(+), 3 deletions(-) create mode 100644 platform/commonUI/browse/bundle.js diff --git a/bundles.json b/bundles.json index e82812a40c..852179dddb 100644 --- a/bundles.json +++ b/bundles.json @@ -3,7 +3,6 @@ "platform/core", "platform/representation", "platform/commonUI/about", - "platform/commonUI/browse", "platform/commonUI/edit", "platform/commonUI/dialog", "platform/commonUI/formats", diff --git a/main.js b/main.js index 5133122006..2d4576b3a0 100644 --- a/main.js +++ b/main.js @@ -39,7 +39,8 @@ requirejs.config({ define([ './platform/framework/src/Main', - 'legacyRegistry' + 'legacyRegistry', + './platform/commonUI/browse/bundle' ], function (Main, legacyRegistry) { 'use strict'; new Main().run(legacyRegistry); diff --git a/platform/commonUI/browse/bundle.js b/platform/commonUI/browse/bundle.js new file mode 100644 index 0000000000..f5e2991dbb --- /dev/null +++ b/platform/commonUI/browse/bundle.js @@ -0,0 +1,212 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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,Promise*/ + +define(['legacyRegistry'], function (legacyRegistry) { + "use strict"; + + legacyRegistry.register("platform/commonUI/browse", { + "extensions": { + "routes": [ + { + "when": "/browse/:ids*", + "templateUrl": "templates/browse.html", + "reloadOnSearch": false + }, + { + "when": "", + "templateUrl": "templates/browse.html", + "reloadOnSearch": false + } + ], + "controllers": [ + { + "key": "BrowseController", + "implementation": "BrowseController.js", + "depends": [ + "$scope", + "$route", + "$location", + "objectService", + "navigationService", + "urlService" + ] + }, + { + "key": "PaneController", + "implementation": "PaneController.js", + "priority": "preferred", + "depends": [ "$scope", "agentService","$window" ] + }, + { + "key": "BrowseObjectController", + "implementation": "BrowseObjectController.js", + "depends": [ "$scope", "$location", "$route" ] + }, + { + "key": "CreateMenuController", + "implementation": "creation/CreateMenuController.js", + "depends": [ "$scope" ] + }, + { + "key": "LocatorController", + "implementation": "creation/LocatorController.js", + "depends": [ "$scope", "$timeout" ] + }, + { + "key": "MenuArrowController", + "implementation": "MenuArrowController.js", + "depends": [ "$scope" ] + } + ], + "controls": [ + { + "key": "locator", + "templateUrl": "templates/create/locator.html" + } + ], + "representations": [ + { + "key": "browse-object", + "templateUrl": "templates/browse-object.html", + "uses": [ "view" ] + }, + { + "key": "create-button", + "templateUrl": "templates/create/create-button.html" + }, + { + "key": "create-menu", + "templateUrl": "templates/create/create-menu.html", + "uses": [ "action" ] + }, + { + "key": "grid-item", + "templateUrl": "templates/items/grid-item.html", + "uses": [ "type", "action", "location" ], + "gestures": [ "info", "menu" ] + }, + { + "key": "object-header", + "templateUrl": "templates/browse/object-header.html", + "uses": [ "type" ] + }, + { + "key": "menu-arrow", + "templateUrl": "templates/menu-arrow.html", + "uses": [ "action" ], + "gestures": [ "menu" ] + }, + { + "key": "back-arrow", + "uses": [ "context" ], + "templateUrl": "templates/back-arrow.html" + } + ], + "services": [ + { + "key": "navigationService", + "implementation": "navigation/NavigationService.js" + } + ], + "policies": [ + { + "implementation": "creation/CreationPolicy.js", + "category": "creation" + } + ], + "actions": [ + { + "key": "navigate", + "implementation": "navigation/NavigateAction.js", + "depends": [ "navigationService", "$q" ] + }, + { + "key": "window", + "name": "Open In New Tab", + "implementation": "windowing/NewTabAction.js", + "description": "Open in a new browser tab", + "category": ["view-control", "contextual"], + "depends": [ "urlService", "$window" ], + "group": "windowing", + "glyph": "y", + "priority": "preferred" + }, + { + "key": "fullscreen", + "implementation": "windowing/FullscreenAction.js", + "category": "view-control", + "group": "windowing", + "glyph": "z", + "priority": "default" + } + ], + "views": [ + { + "key": "items", + "name": "Items", + "glyph": "9", + "description": "Grid of available items", + "templateUrl": "templates/items/items.html", + "uses": [ "composition" ], + "gestures": [ "drop" ], + "type": "folder", + "editable": false + } + ], + "components": [ + { + "key": "CreateActionProvider", + "provides": "actionService", + "type": "provider", + "implementation": "creation/CreateActionProvider.js", + "depends": [ "typeService", "dialogService", "creationService", "policyService" ] + }, + { + "key": "CreationService", + "provides": "creationService", + "type": "provider", + "implementation": "creation/CreationService.js", + "depends": [ "$q", "$log" ] + } + ], + "runs": [ + { + "implementation": "windowing/WindowTitler.js", + "depends": [ "navigationService", "$rootScope", "$document" ] + } + ], + "licenses": [ + { + "name": "screenfull.js", + "version": "1.2.0", + "description": "Wrapper for cross-browser usage of fullscreen API", + "author": "Sindre Sorhus", + "website": "https://github.com/sindresorhus/screenfull.js/", + "copyright": "Copyright (c) Sindre Sorhus (sindresorhus.com)", + "license": "license-mit", + "link": "https://github.com/sindresorhus/screenfull.js/blob/gh-pages/license" + } + ] + } + }); +}); \ No newline at end of file diff --git a/src/BundleRegistry.js b/src/BundleRegistry.js index 73d6ebecae..ae4f45ba27 100644 --- a/src/BundleRegistry.js +++ b/src/BundleRegistry.js @@ -28,7 +28,7 @@ define(function () { this.bundles = {}; } - BundleRegistry.prototype.registry = function (path, definition) { + BundleRegistry.prototype.register = function (path, definition) { this.bundles[path] = definition; }; From 9ebafa157bed5cdde9b6ad9dcd96b51c27ca3d45 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 10:42:08 -0800 Subject: [PATCH 08/37] [API] Add temporary bundle-rewriting script --- header.txt | 25 +++++++++++++++++++++++++ rebundle.js | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 header.txt create mode 100644 rebundle.js diff --git a/header.txt b/header.txt new file mode 100644 index 0000000000..fb2ba2b096 --- /dev/null +++ b/header.txt @@ -0,0 +1,25 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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(['legacyRegistry'], function (legacyRegistry) { + "use strict"; diff --git a/rebundle.js b/rebundle.js new file mode 100644 index 0000000000..23a3ce2ef0 --- /dev/null +++ b/rebundle.js @@ -0,0 +1,38 @@ +// Temporary utility script to rewrite bundle.json +// files as bundle.js files. + +var glob = require('glob'), + fs = require('fs'), + header = fs.readFileSync('header.txt', 'utf8'); + +function indent(str) { + return str.split('\n').map(function (line, index) { + return index === 0 ? line : (' ' + line); + }).join('\n'); +} + +function rebundle(file) { + var plainJson = fs.readFileSync(file, 'utf8'), + bundleName = file.replace("/bundle.json", ""), + outputFile = file.replace(".json", ".js"), + contents = [ + header, + "legacyRegistry.register(\"", + bundleName, + "\", ", + indent(plainJson), + ");\n", + "});\n" + ].join(''); + fs.writeFileSync(outputFile, contents, 'utf8'); +} + +glob('**/bundle.json', {}, function (err, files) { + if (err) { + console.log(err); + return; + } + + files.forEach(rebundle); +}); + From 792fda48e3096a2ac2962671f6b32e9470b465d6 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 10:45:00 -0800 Subject: [PATCH 09/37] [API] Fix whitespace of bundle rewrites --- rebundle.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rebundle.js b/rebundle.js index 23a3ce2ef0..134e3e1b2c 100644 --- a/rebundle.js +++ b/rebundle.js @@ -7,7 +7,9 @@ var glob = require('glob'), function indent(str) { return str.split('\n').map(function (line, index) { - return index === 0 ? line : (' ' + line); + return index === 0 ? line : (' ' + line); + }).filter(function (line) { + return line.trim().length > 0; }).join('\n'); } @@ -17,7 +19,7 @@ function rebundle(file) { outputFile = file.replace(".json", ".js"), contents = [ header, - "legacyRegistry.register(\"", + " legacyRegistry.register(\"", bundleName, "\", ", indent(plainJson), From 8d3aec02d6a42333a9e1484429786bad8a66c051 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 15:00:51 -0800 Subject: [PATCH 10/37] [API] Include dependencies during rebundling --- rebundle.js | 50 ++++++++++++++++++++++++++++---------- header.txt => template.txt | 11 ++++++++- 2 files changed, 47 insertions(+), 14 deletions(-) rename header.txt => template.txt (86%) diff --git a/rebundle.js b/rebundle.js index 134e3e1b2c..68c75979c7 100644 --- a/rebundle.js +++ b/rebundle.js @@ -3,29 +3,53 @@ var glob = require('glob'), fs = require('fs'), - header = fs.readFileSync('header.txt', 'utf8'); + _ = require('lodash'), + template = _.template(fs.readFileSync('template.txt', 'utf8')); -function indent(str) { - return str.split('\n').map(function (line, index) { - return index === 0 ? line : (' ' + line); +function indent(str, depth) { + return _.trimLeft(str.split('\n').map(function (line) { + return _.repeat(' ', depth || 1) + line; }).filter(function (line) { return line.trim().length > 0; + }).join('\n')); +} + +function findImpls(bundleContents) { + return _(bundleContents.extensions || {}) + .map().flatten().pluck('implementation').filter().value(); +} + +function toIdentifier(impl) { + var parts = impl.replace(".js", "").split('/'); + return parts[parts.length - 1]; +} + +function toPath(impl) { + return "\"./src/" + impl.replace(".js", "") + "\""; +} + +function replaceImpls(bundleText) { + var rx = /"implementation": "([^"]*)"/; + return bundleText.split('\n').map(function (line) { + var m = line.match(rx); + return m !== null ? + line.replace(rx, '"implementation": ' + toIdentifier(m[1])) : + line; }).join('\n'); } function rebundle(file) { var plainJson = fs.readFileSync(file, 'utf8'), + bundleContents = JSON.parse(plainJson), + impls = findImpls(bundleContents), bundleName = file.replace("/bundle.json", ""), outputFile = file.replace(".json", ".js"), - contents = [ - header, - " legacyRegistry.register(\"", - bundleName, - "\", ", - indent(plainJson), - ");\n", - "});\n" - ].join(''); + contents = template({ + bundleName: bundleName, + implPaths: indent(impls.map(toPath).concat([""]).join(",\n")), + implNames: indent(impls.map(toIdentifier).concat([""]).join(",\n")), + bundleContents: indent(replaceImpls(JSON.stringify(bundleContents, null, 4))) + }); fs.writeFileSync(outputFile, contents, 'utf8'); } diff --git a/header.txt b/template.txt similarity index 86% rename from header.txt rename to template.txt index fb2ba2b096..cddaceba08 100644 --- a/header.txt +++ b/template.txt @@ -21,5 +21,14 @@ *****************************************************************************/ /*global define*/ -define(['legacyRegistry'], function (legacyRegistry) { +define([ + <%= implPaths %> + 'legacyRegistry' +], function ( + <%= implNames %> + legacyRegistry +) { "use strict"; + + legacyRegistry.register("<%= bundleName %>", <%= bundleContents %>); +}); From 82990152d7a338f9d386ade62298ed228b91c8d8 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 10:53:15 -0800 Subject: [PATCH 11/37] [API] Depend on bundles via AMD --- main.js | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 2d4576b3a0..7c8cfdcb85 100644 --- a/main.js +++ b/main.js @@ -40,7 +40,44 @@ requirejs.config({ define([ './platform/framework/src/Main', 'legacyRegistry', - './platform/commonUI/browse/bundle' + + './platform/framework/bundle', + './platform/core/bundle', + './platform/representation/bundle', + './platform/commonUI/about/bundle', + './platform/commonUI/browse/bundle', + './platform/commonUI/edit/bundle', + './platform/commonUI/dialog/bundle', + './platform/commonUI/formats/bundle', + './platform/commonUI/general/bundle', + './platform/commonUI/inspect/bundle', + './platform/commonUI/mobile/bundle', + './platform/commonUI/themes/espresso/bundle', + './platform/commonUI/notification/bundle', + './platform/containment/bundle', + './platform/execution/bundle', + './platform/telemetry/bundle', + './platform/features/clock/bundle', + './platform/features/events/bundle', + './platform/features/imagery/bundle', + './platform/features/layout/bundle', + './platform/features/pages/bundle', + './platform/features/plot/bundle', + './platform/features/scrolling/bundle', + './platform/features/timeline/bundle', + './platform/forms/bundle', + './platform/identity/bundle', + './platform/persistence/aggregator/bundle', + './platform/persistence/local/bundle', + './platform/persistence/queue/bundle', + './platform/policy/bundle', + './platform/entanglement/bundle', + './platform/search/bundle', + './platform/status/bundle', + + './example/imagery/bundle', + './example/eventGenerator/bundle', + './example/generator/bundle' ], function (Main, legacyRegistry) { 'use strict'; new Main().run(legacyRegistry); From 4ed1836ae5ba435061f39a51d2b8826593a682f8 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 11:21:50 -0800 Subject: [PATCH 12/37] [API] Allow implementations to be passed directly Allow implementations to be passed in as values, instead of strings, facilitating the loading of said implementations via RequireJS. --- platform/framework/src/resolve/ExtensionResolver.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/platform/framework/src/resolve/ExtensionResolver.js b/platform/framework/src/resolve/ExtensionResolver.js index e4c2710c0f..98e8443a03 100644 --- a/platform/framework/src/resolve/ExtensionResolver.js +++ b/platform/framework/src/resolve/ExtensionResolver.js @@ -61,8 +61,10 @@ define( $log = this.$log; function loadImplementation(extension) { - var implPath = extension.getImplementationPath(), - implPromise = loader.load(implPath), + var implValue = extension.getImplementationPath(), + implPromise = (typeof implValue === 'string') ? + loader.load(implValue) : + Promise.resolve(implValue), definition = extension.getDefinition(); // Wrap a constructor function (to avoid modifying the original) @@ -120,7 +122,7 @@ define( // Log that loading has begun $log.info([ "Loading implementation ", - implPath, + implValue, " for extension ", extension.getLogName() ].join("")); From 5bbbdd4e5008f7acae67c84457a93deb52b8a984 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 11:31:22 -0800 Subject: [PATCH 13/37] [API] Fix explicit implementation assignments --- platform/commonUI/browse/bundle.js | 11 +++++---- platform/framework/src/load/Extension.js | 24 +++++++++++++++++-- .../src/resolve/ExtensionResolver.js | 10 ++++---- 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/platform/commonUI/browse/bundle.js b/platform/commonUI/browse/bundle.js index f5e2991dbb..b90dde2263 100644 --- a/platform/commonUI/browse/bundle.js +++ b/platform/commonUI/browse/bundle.js @@ -21,7 +21,10 @@ *****************************************************************************/ /*global define,Promise*/ -define(['legacyRegistry'], function (legacyRegistry) { +define([ + 'legacyRegistry', + './src/BrowseController' +], function (legacyRegistry, BrowseController) { "use strict"; legacyRegistry.register("platform/commonUI/browse", { @@ -41,7 +44,7 @@ define(['legacyRegistry'], function (legacyRegistry) { "controllers": [ { "key": "BrowseController", - "implementation": "BrowseController.js", + "implementation": BrowseController, "depends": [ "$scope", "$route", @@ -55,7 +58,7 @@ define(['legacyRegistry'], function (legacyRegistry) { "key": "PaneController", "implementation": "PaneController.js", "priority": "preferred", - "depends": [ "$scope", "agentService","$window" ] + "depends": [ "$scope", "agentService", "$window" ] }, { "key": "BrowseObjectController", @@ -209,4 +212,4 @@ define(['legacyRegistry'], function (legacyRegistry) { ] } }); -}); \ No newline at end of file +}); diff --git a/platform/framework/src/load/Extension.js b/platform/framework/src/load/Extension.js index d3b19f94fa..4339aeac27 100644 --- a/platform/framework/src/load/Extension.js +++ b/platform/framework/src/load/Extension.js @@ -134,8 +134,28 @@ define( */ Extension.prototype.getImplementationPath = function () { return this.definition.implementation ? - this.bundle.getSourcePath(this.definition.implementation) : - undefined; + this.bundle.getSourcePath(this.definition.implementation) : + undefined; + }; + + /** + * Check if an extension has an actual implementation value + * (and not just a path to an implementation) defined. + * @returns {function} the constructor for this extension instance + */ + Extension.prototype.getImplementationValue = function () { + return typeof this.definition.implementation === 'function' ? + this.definition.implementation : + undefined; + }; + + /** + * Check if an extension has an actual implementation value + * (and not just a path to an implementation) defined. + * @returns {boolean} true if a value is available + */ + Extension.prototype.hasImplementationValue = function () { + return typeof this.definition.implementation === 'function'; }; /** diff --git a/platform/framework/src/resolve/ExtensionResolver.js b/platform/framework/src/resolve/ExtensionResolver.js index 98e8443a03..d0e30124de 100644 --- a/platform/framework/src/resolve/ExtensionResolver.js +++ b/platform/framework/src/resolve/ExtensionResolver.js @@ -61,10 +61,10 @@ define( $log = this.$log; function loadImplementation(extension) { - var implValue = extension.getImplementationPath(), - implPromise = (typeof implValue === 'string') ? - loader.load(implValue) : - Promise.resolve(implValue), + var implPath = extension.getImplementationPath(), + implPromise = extension.hasImplementationValue() ? + Promise.resolve(extension.getImplementationValue()) : + loader.load(implPath), definition = extension.getDefinition(); // Wrap a constructor function (to avoid modifying the original) @@ -122,7 +122,7 @@ define( // Log that loading has begun $log.info([ "Loading implementation ", - implValue, + implPath, " for extension ", extension.getLogName() ].join("")); From 29acbfdb9c2140bda8099a3f5e649805499b8902 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 15:06:30 -0800 Subject: [PATCH 14/37] [API] Ensure uniqueness of impls when rebundling Avoids redundant argument names in generated JS files. --- rebundle.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rebundle.js b/rebundle.js index 68c75979c7..100767132b 100644 --- a/rebundle.js +++ b/rebundle.js @@ -16,7 +16,12 @@ function indent(str, depth) { function findImpls(bundleContents) { return _(bundleContents.extensions || {}) - .map().flatten().pluck('implementation').filter().value(); + .map() + .flatten() + .pluck('implementation') + .filter() + .uniq() + .value(); } function toIdentifier(impl) { From 786f9febe4441a9135e138cbf7a3d84f194ab0b5 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 15:07:25 -0800 Subject: [PATCH 15/37] [API] Declare libs upfront Declare external dependencies up-front in RequireJS config; avoids problems due to changes in ordering (since RequireJS config may be modified by bundle contents.) --- main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 7c8cfdcb85..64548ece3e 100644 --- a/main.js +++ b/main.js @@ -25,7 +25,10 @@ requirejs.config({ "paths": { "legacyRegistry": "./src/legacyRegistry", "angular": "./platform/framework/lib/angular.min", - "angular-route": "./platform/framework/lib/angular-route.min" + "angular-route": "./platform/framework/lib/angular-route.min", + "moment": 'platform/telemetry/lib/moment.min', + "moment-duration-format": 'platform/features/clock/lib/moment-duration-format', + "uuid": 'platform/core/lib/uuid' }, "shim": { "angular": { @@ -33,6 +36,9 @@ requirejs.config({ }, "angular-route": { "deps": [ "angular" ] + }, + "moment-duration-format": { + "deps": [ 'moment' ] } } }); From de53247d56e01725819eec494f7550024c448f0f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 15:08:08 -0800 Subject: [PATCH 16/37] [API] Convert JSON bundles to imperative form --- example/builtins/bundle.js | 74 +++ example/composite/bundle.js | 82 +++ example/eventGenerator/bundle.js | 70 +++ example/extensions/bundle.js | 51 ++ example/forms/bundle.js | 53 ++ example/generator/bundle.js | 143 ++++++ example/identity/bundle.js | 47 ++ example/imagery/bundle.js | 78 +++ example/mobile/bundle.js | 45 ++ example/notifications/bundle.js | 86 ++++ example/persistence/bundle.js | 54 ++ example/policy/bundle.js | 45 ++ example/profiling/bundle.js | 55 +++ example/scratchpad/bundle.js | 58 +++ example/taxonomy/bundle.js | 63 +++ example/worker/bundle.js | 52 ++ platform/commonUI/about/bundle.js | 166 +++++++ platform/commonUI/browse/bundle.js | 164 ++++-- platform/commonUI/dialog/bundle.js | 91 ++++ platform/commonUI/edit/bundle.js | 228 +++++++++ platform/commonUI/formats/bundle.js | 63 +++ platform/commonUI/general/bundle.js | 491 ++++++++++++++++++ platform/commonUI/inspect/bundle.js | 110 +++++ platform/commonUI/mobile/bundle.js | 68 +++ platform/commonUI/notification/bundle.js | 89 ++++ platform/commonUI/themes/espresso/bundle.js | 51 ++ platform/commonUI/themes/snow/bundle.js | 51 ++ platform/containment/bundle.js | 71 +++ platform/core/bundle.js | 420 ++++++++++++++++ platform/entanglement/bundle.js | 202 ++++++++ platform/execution/bundle.js | 47 ++ platform/features/clock/bundle.js | 251 ++++++++++ platform/features/conductor/bundle.js | 92 ++++ platform/features/events/bundle.js | 81 +++ platform/features/imagery/bundle.js | 79 +++ platform/features/layout/bundle.js | 322 ++++++++++++ platform/features/pages/bundle.js | 74 +++ platform/features/plot/bundle.js | 92 ++++ platform/features/rtevents/bundle.js | 82 +++ platform/features/rtscrolling/bundle.js | 63 +++ platform/features/scrolling/bundle.js | 62 +++ platform/features/static-markup/bundle.js | 56 +++ platform/features/timeline/bundle.js | 521 ++++++++++++++++++++ platform/forms/bundle.js | 131 +++++ platform/framework/bundle.js | 112 +++++ platform/identity/bundle.js | 88 ++++ platform/persistence/aggregator/bundle.js | 47 ++ platform/persistence/cache/bundle.js | 49 ++ platform/persistence/couch/bundle.js | 79 +++ platform/persistence/elastic/bundle.js | 98 ++++ platform/persistence/local/bundle.js | 61 +++ platform/persistence/queue/bundle.js | 81 +++ platform/policy/bundle.js | 70 +++ platform/representation/bundle.js | 170 +++++++ platform/search/bundle.js | 128 +++++ platform/status/bundle.js | 64 +++ platform/telemetry/bundle.js | 130 +++++ 57 files changed, 6413 insertions(+), 38 deletions(-) create mode 100644 example/builtins/bundle.js create mode 100644 example/composite/bundle.js create mode 100644 example/eventGenerator/bundle.js create mode 100644 example/extensions/bundle.js create mode 100644 example/forms/bundle.js create mode 100644 example/generator/bundle.js create mode 100644 example/identity/bundle.js create mode 100644 example/imagery/bundle.js create mode 100644 example/mobile/bundle.js create mode 100644 example/notifications/bundle.js create mode 100644 example/persistence/bundle.js create mode 100644 example/policy/bundle.js create mode 100644 example/profiling/bundle.js create mode 100644 example/scratchpad/bundle.js create mode 100644 example/taxonomy/bundle.js create mode 100644 example/worker/bundle.js create mode 100644 platform/commonUI/about/bundle.js create mode 100644 platform/commonUI/dialog/bundle.js create mode 100644 platform/commonUI/edit/bundle.js create mode 100644 platform/commonUI/formats/bundle.js create mode 100644 platform/commonUI/general/bundle.js create mode 100644 platform/commonUI/inspect/bundle.js create mode 100644 platform/commonUI/mobile/bundle.js create mode 100644 platform/commonUI/notification/bundle.js create mode 100644 platform/commonUI/themes/espresso/bundle.js create mode 100644 platform/commonUI/themes/snow/bundle.js create mode 100644 platform/containment/bundle.js create mode 100644 platform/core/bundle.js create mode 100644 platform/entanglement/bundle.js create mode 100644 platform/execution/bundle.js create mode 100644 platform/features/clock/bundle.js create mode 100644 platform/features/conductor/bundle.js create mode 100644 platform/features/events/bundle.js create mode 100644 platform/features/imagery/bundle.js create mode 100644 platform/features/layout/bundle.js create mode 100644 platform/features/pages/bundle.js create mode 100644 platform/features/plot/bundle.js create mode 100644 platform/features/rtevents/bundle.js create mode 100644 platform/features/rtscrolling/bundle.js create mode 100644 platform/features/scrolling/bundle.js create mode 100644 platform/features/static-markup/bundle.js create mode 100644 platform/features/timeline/bundle.js create mode 100644 platform/forms/bundle.js create mode 100644 platform/framework/bundle.js create mode 100644 platform/identity/bundle.js create mode 100644 platform/persistence/aggregator/bundle.js create mode 100644 platform/persistence/cache/bundle.js create mode 100644 platform/persistence/couch/bundle.js create mode 100644 platform/persistence/elastic/bundle.js create mode 100644 platform/persistence/local/bundle.js create mode 100644 platform/persistence/queue/bundle.js create mode 100644 platform/policy/bundle.js create mode 100644 platform/representation/bundle.js create mode 100644 platform/search/bundle.js create mode 100644 platform/status/bundle.js create mode 100644 platform/telemetry/bundle.js diff --git a/example/builtins/bundle.js b/example/builtins/bundle.js new file mode 100644 index 0000000000..9192a19767 --- /dev/null +++ b/example/builtins/bundle.js @@ -0,0 +1,74 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/ExampleController", + "./src/ExampleDirective", + "./src/ExampleService", + 'legacyRegistry' +], function ( + ExampleController, + ExampleDirective, + ExampleService, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/builtins", { + "name": "Angular Built-ins Example", + "description": "Example showing how to declare extensions with built-in support from Angular.", + "sources": "src", + "extensions": { + "controllers": [ + { + "key": "ExampleController", + "implementation": ExampleController, + "depends": [ + "$scope", + "exampleService" + ] + } + ], + "directives": [ + { + "key": "exampleDirective", + "implementation": ExampleDirective, + "depends": [ + "examples[]" + ] + } + ], + "routes": [ + { + "templateUrl": "templates/example.html" + } + ], + "services": [ + { + "key": "exampleService", + "implementation": ExampleService + } + ] + } + }); +}); diff --git a/example/composite/bundle.js b/example/composite/bundle.js new file mode 100644 index 0000000000..efadd585bd --- /dev/null +++ b/example/composite/bundle.js @@ -0,0 +1,82 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/SomeProvider", + "./src/SomeOtherProvider", + "./src/SomeDecorator", + "./src/SomeOtherDecorator", + "./src/SomeAggregator", + "./src/SomeOtherExample", + 'legacyRegistry' +], function ( + SomeProvider, + SomeOtherProvider, + SomeDecorator, + SomeOtherDecorator, + SomeAggregator, + SomeOtherExample, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/composite", { + "extensions": { + "components": [ + { + "implementation": SomeProvider, + "provides": "someService", + "type": "provider" + }, + { + "implementation": SomeOtherProvider, + "provides": "someService", + "type": "provider" + }, + { + "implementation": SomeDecorator, + "provides": "someService", + "type": "decorator" + }, + { + "implementation": SomeOtherDecorator, + "provides": "someService", + "type": "decorator" + }, + { + "implementation": SomeAggregator, + "provides": "someService", + "type": "aggregator" + } + ], + "examples": [ + { + "implementation": SomeOtherExample, + "depends": [ + "someService" + ] + } + ] + } + }); +}); diff --git a/example/eventGenerator/bundle.js b/example/eventGenerator/bundle.js new file mode 100644 index 0000000000..608f61eaac --- /dev/null +++ b/example/eventGenerator/bundle.js @@ -0,0 +1,70 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/EventTelemetryProvider", + 'legacyRegistry' +], function ( + EventTelemetryProvider, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/eventGenerator", { + "name": "Event Message Generator", + "description": "Example of a component that produces event data.", + "extensions": { + "components": [ + { + "implementation": EventTelemetryProvider, + "type": "provider", + "provides": "telemetryService", + "depends": [ + "$q", + "$timeout" + ] + } + ], + "types": [ + { + "key": "eventGenerator", + "name": "Event Message Generator", + "glyph": "f", + "description": "An event message generator", + "features": "creation", + "model": { + "telemetry": {} + }, + "telemetry": { + "source": "eventGenerator", + "ranges": [ + { + "format": "string" + } + ] + } + } + ] + } + }); +}); diff --git a/example/extensions/bundle.js b/example/extensions/bundle.js new file mode 100644 index 0000000000..16a1876507 --- /dev/null +++ b/example/extensions/bundle.js @@ -0,0 +1,51 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/SomeExample", + 'legacyRegistry' +], function ( + SomeExample, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/extensions", { + "name": "Custom Extensions Examples", + "description": "Example showing how to declare custom extensions.", + "sources": "src", + "extensions": { + "examples": [ + { + "text": "I came from example/extensions" + }, + { + "implementation": SomeExample, + "depends": [ + "exampleService" + ] + } + ] + } + }); +}); diff --git a/example/forms/bundle.js b/example/forms/bundle.js new file mode 100644 index 0000000000..4325421493 --- /dev/null +++ b/example/forms/bundle.js @@ -0,0 +1,53 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/ExampleFormController", + 'legacyRegistry' +], function ( + ExampleFormController, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/forms", { + "name": "Declarative Forms example", + "sources": "src", + "extensions": { + "controllers": [ + { + "key": "ExampleFormController", + "implementation": ExampleFormController, + "depends": [ + "$scope" + ] + } + ], + "routes": [ + { + "templateUrl": "templates/exampleForm.html" + } + ] + } + }); +}); diff --git a/example/generator/bundle.js b/example/generator/bundle.js new file mode 100644 index 0000000000..0c68e4509c --- /dev/null +++ b/example/generator/bundle.js @@ -0,0 +1,143 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/SinewaveTelemetryProvider", + "./src/SinewaveLimitCapability", + "./src/SinewaveDeltaFormat", + 'legacyRegistry' +], function ( + SinewaveTelemetryProvider, + SinewaveLimitCapability, + SinewaveDeltaFormat, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/generator", { + "name": "Sine Wave Generator", + "description": "Example of a component that produces dataa.", + "extensions": { + "components": [ + { + "implementation": SinewaveTelemetryProvider, + "type": "provider", + "provides": "telemetryService", + "depends": [ + "$q", + "$timeout" + ] + } + ], + "capabilities": [ + { + "key": "limit", + "implementation": SinewaveLimitCapability + } + ], + "formats": [ + { + "key": "example.delta", + "implementation": SinewaveDeltaFormat + } + ], + "constants": [ + { + "key": "TIME_CONDUCTOR_DOMAINS", + "value": [ + { + "key": "time", + "name": "Time" + }, + { + "key": "yesterday", + "name": "Yesterday" + }, + { + "key": "delta", + "name": "Delta", + "format": "example.delta" + } + ], + "priority": -1 + } + ], + "types": [ + { + "key": "generator", + "name": "Sine Wave Generator", + "glyph": "T", + "description": "A sine wave generator", + "features": "creation", + "model": { + "telemetry": { + "period": 10 + } + }, + "telemetry": { + "source": "generator", + "domains": [ + { + "key": "time", + "name": "Time" + }, + { + "key": "yesterday", + "name": "Yesterday" + }, + { + "key": "delta", + "name": "Delta", + "format": "example.delta" + } + ], + "ranges": [ + { + "key": "sin", + "name": "Sine" + }, + { + "key": "cos", + "name": "Cosine" + } + ] + }, + "properties": [ + { + "name": "Period", + "control": "textfield", + "cssclass": "l-small l-numeric", + "key": "period", + "required": true, + "property": [ + "telemetry", + "period" + ], + "pattern": "^\\d*(\\.\\d*)?$" + } + ] + } + ] + } + }); +}); diff --git a/example/identity/bundle.js b/example/identity/bundle.js new file mode 100644 index 0000000000..6e1a14a898 --- /dev/null +++ b/example/identity/bundle.js @@ -0,0 +1,47 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/ExampleIdentityService", + 'legacyRegistry' +], function ( + ExampleIdentityService, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/identity", { + "extensions": { + "components": [ + { + "implementation": ExampleIdentityService, + "provides": "identityService", + "type": "provider", + "depends": [ + "dialogService" + ] + } + ] + } + }); +}); diff --git a/example/imagery/bundle.js b/example/imagery/bundle.js new file mode 100644 index 0000000000..5641b99ecb --- /dev/null +++ b/example/imagery/bundle.js @@ -0,0 +1,78 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/ImageTelemetryProvider", + 'legacyRegistry' +], function ( + ImageTelemetryProvider, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/imagery", { + "name": "Imagery", + "description": "Example of a component that produces image telemetry.", + "extensions": { + "components": [ + { + "implementation": ImageTelemetryProvider, + "type": "provider", + "provides": "telemetryService", + "depends": [ + "$q", + "$timeout" + ] + } + ], + "types": [ + { + "key": "imagery", + "name": "Example Imagery", + "glyph": "T", + "features": "creation", + "model": { + "telemetry": {} + }, + "telemetry": { + "source": "imagery", + "domains": [ + { + "name": "Time", + "key": "time", + "format": "timestamp" + } + ], + "ranges": [ + { + "name": "Image", + "key": "url", + "format": "imageUrl" + } + ] + } + } + ] + } + }); +}); diff --git a/example/mobile/bundle.js b/example/mobile/bundle.js new file mode 100644 index 0000000000..f7c37e8d72 --- /dev/null +++ b/example/mobile/bundle.js @@ -0,0 +1,45 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + + 'legacyRegistry' +], function ( + + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/mobile", { + "name": "Mobile", + "description": "Allows elements with pertinence to mobile usage and development", + "extensions": { + "stylesheets": [ + { + "stylesheetUrl": "css/mobile-example.css", + "priority": "mandatory" + } + ] + } + }); +}); diff --git a/example/notifications/bundle.js b/example/notifications/bundle.js new file mode 100644 index 0000000000..28e15f1e34 --- /dev/null +++ b/example/notifications/bundle.js @@ -0,0 +1,86 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/DialogLaunchController", + "./src/NotificationLaunchController", + "./src/DialogLaunchIndicator", + "./src/NotificationLaunchIndicator", + 'legacyRegistry' +], function ( + DialogLaunchController, + NotificationLaunchController, + DialogLaunchIndicator, + NotificationLaunchIndicator, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/notifications", { + "extensions": { + "templates": [ + { + "key": "dialogLaunchTemplate", + "templateUrl": "dialog-launch.html" + }, + { + "key": "notificationLaunchTemplate", + "templateUrl": "notification-launch.html" + } + ], + "controllers": [ + { + "key": "DialogLaunchController", + "implementation": DialogLaunchController, + "depends": [ + "$scope", + "$timeout", + "$log", + "dialogService", + "notificationService" + ] + }, + { + "key": "NotificationLaunchController", + "implementation": NotificationLaunchController, + "depends": [ + "$scope", + "$timeout", + "$log", + "notificationService" + ] + } + ], + "indicators": [ + { + "implementation": DialogLaunchIndicator, + "priority": "fallback" + }, + { + "implementation": NotificationLaunchIndicator, + "priority": "fallback" + } + ] + } + }); +}); diff --git a/example/persistence/bundle.js b/example/persistence/bundle.js new file mode 100644 index 0000000000..a728030c41 --- /dev/null +++ b/example/persistence/bundle.js @@ -0,0 +1,54 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/BrowserPersistenceProvider", + 'legacyRegistry' +], function ( + BrowserPersistenceProvider, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/persistence", { + "extensions": { + "components": [ + { + "provides": "persistenceService", + "type": "provider", + "implementation": BrowserPersistenceProvider, + "depends": [ + "$q", + "PERSISTENCE_SPACE" + ] + } + ], + "constants": [ + { + "key": "PERSISTENCE_SPACE", + "value": "mct" + } + ] + } + }); +}); diff --git a/example/policy/bundle.js b/example/policy/bundle.js new file mode 100644 index 0000000000..848248db0f --- /dev/null +++ b/example/policy/bundle.js @@ -0,0 +1,45 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/ExamplePolicy", + 'legacyRegistry' +], function ( + ExamplePolicy, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/policy", { + "name": "Example Policy", + "description": "Provides an example of using policies to prohibit actions.", + "extensions": { + "policies": [ + { + "implementation": ExamplePolicy, + "category": "action" + } + ] + } + }); +}); diff --git a/example/profiling/bundle.js b/example/profiling/bundle.js new file mode 100644 index 0000000000..7473c9fdaf --- /dev/null +++ b/example/profiling/bundle.js @@ -0,0 +1,55 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/WatchIndicator", + "./src/DigestIndicator", + 'legacyRegistry' +], function ( + WatchIndicator, + DigestIndicator, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/profiling", { + "extensions": { + "indicators": [ + { + "implementation": WatchIndicator, + "depends": [ + "$interval", + "$rootScope" + ] + }, + { + "implementation": DigestIndicator, + "depends": [ + "$interval", + "$rootScope" + ] + } + ] + } + }); +}); diff --git a/example/scratchpad/bundle.js b/example/scratchpad/bundle.js new file mode 100644 index 0000000000..104d4adf65 --- /dev/null +++ b/example/scratchpad/bundle.js @@ -0,0 +1,58 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/ScratchPersistenceProvider", + 'legacyRegistry' +], function ( + ScratchPersistenceProvider, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/scratchpad", { + "extensions": { + "roots": [ + { + "id": "scratch:root", + "model": { + "type": "folder", + "composition": [], + "name": "Scratchpad" + }, + "priority": "preferred" + } + ], + "components": [ + { + "provides": "persistenceService", + "type": "provider", + "implementation": ScratchPersistenceProvider, + "depends": [ + "$q" + ] + } + ] + } + }); +}); diff --git a/example/taxonomy/bundle.js b/example/taxonomy/bundle.js new file mode 100644 index 0000000000..4758db2ac2 --- /dev/null +++ b/example/taxonomy/bundle.js @@ -0,0 +1,63 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/ExampleTaxonomyModelProvider", + 'legacyRegistry' +], function ( + ExampleTaxonomyModelProvider, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/taxonomy", { + "name": "Example taxonomy", + "description": "Example illustrating the addition of a static top-level hierarchy", + "extensions": { + "roots": [ + { + "id": "exampleTaxonomy", + "model": { + "type": "folder", + "name": "Stub Subsystems", + "composition": [ + "examplePacket0", + "examplePacket1", + "examplePacket2" + ] + } + } + ], + "components": [ + { + "provides": "modelService", + "type": "provider", + "implementation": ExampleTaxonomyModelProvider, + "depends": [ + "$q" + ] + } + ] + } + }); +}); diff --git a/example/worker/bundle.js b/example/worker/bundle.js new file mode 100644 index 0000000000..7daf45f699 --- /dev/null +++ b/example/worker/bundle.js @@ -0,0 +1,52 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/FibonacciIndicator", + 'legacyRegistry' +], function ( + FibonacciIndicator, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("example/worker", { + "extensions": { + "indicators": [ + { + "implementation": FibonacciIndicator, + "depends": [ + "workerService", + "$rootScope" + ] + } + ], + "workers": [ + { + "key": "example.fibonacci", + "scriptUrl": "FibonacciWorker.js" + } + ] + } + }); +}); diff --git a/platform/commonUI/about/bundle.js b/platform/commonUI/about/bundle.js new file mode 100644 index 0000000000..ce99c380d1 --- /dev/null +++ b/platform/commonUI/about/bundle.js @@ -0,0 +1,166 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/LogoController", + "./src/AboutController", + "./src/LicenseController", + 'legacyRegistry' +], function ( + LogoController, + AboutController, + LicenseController, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/about", { + "name": "About Open MCT Web", + "extensions": { + "templates": [ + { + "key": "app-logo", + "priority": "optional", + "templateUrl": "templates/app-logo.html" + }, + { + "key": "about-logo", + "priority": "preferred", + "templateUrl": "templates/about-logo.html" + }, + { + "key": "about-dialog", + "templateUrl": "templates/about-dialog.html" + }, + { + "key": "overlay-about", + "templateUrl": "templates/overlay-about.html" + }, + { + "key": "license-apache", + "templateUrl": "templates/license-apache.html" + }, + { + "key": "license-mit", + "templateUrl": "templates/license-mit.html" + } + ], + "controllers": [ + { + "key": "LogoController", + "depends": [ + "overlayService" + ], + "implementation": LogoController + }, + { + "key": "AboutController", + "depends": [ + "versions[]", + "$window" + ], + "implementation": AboutController + }, + { + "key": "LicenseController", + "depends": [ + "licenses[]" + ], + "implementation": LicenseController + } + ], + "licenses": [ + { + "name": "Json.NET", + "version": "6.0.8", + "author": "Newtonsoft", + "description": "JSON serialization/deserialization", + "website": "http://www.newtonsoft.com/json", + "copyright": "Copyright (c) 2007 James Newton-King", + "license": "license-mit", + "link": "https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md" + }, + { + "name": "Nancy", + "version": "0.23.2", + "author": "Andreas Håkansson, Steven Robbins and contributors", + "description": "Embedded web server", + "website": "http://nancyfx.org/", + "copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors", + "license": "license-mit", + "link": "http://www.opensource.org/licenses/mit-license.php" + }, + { + "name": "Nancy.Hosting.Self", + "version": "0.23.2", + "author": "Andreas Håkansson, Steven Robbins and contributors", + "description": "Embedded web server", + "website": "http://nancyfx.org/", + "copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors", + "license": "license-mit", + "link": "http://www.opensource.org/licenses/mit-license.php" + }, + { + "name": "SuperSocket", + "version": "0.9.0.2", + "author": " Kerry Jiang", + "description": "Supports SuperWebSocket", + "website": "https://supersocket.codeplex.com/", + "copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)", + "license": "license-apache", + "link": "https://supersocket.codeplex.com/license" + }, + { + "name": "SuperWebSocket", + "version": "0.9.0.2", + "author": " Kerry Jiang", + "description": "WebSocket implementation for client-server communication", + "website": "https://superwebsocket.codeplex.com/", + "copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)", + "license": "license-apache", + "link": "https://superwebsocket.codeplex.com/license" + }, + { + "name": "log4net", + "version": "2.0.3", + "author": "Apache Software Foundation", + "description": "Logging", + "website": "http://logging.apache.org/log4net/", + "copyright": "Copyright © 2004-2015 Apache Software Foundation.", + "license": "license-apache", + "link": "http://logging.apache.org/log4net/license.html" + } + ], + "routes": [ + { + "when": "/licenses", + "templateUrl": "templates/licenses.html" + }, + { + "when": "/licenses-md", + "templateUrl": "templates/licenses-export-md.html" + } + ] + } + }); +}); diff --git a/platform/commonUI/browse/bundle.js b/platform/commonUI/browse/bundle.js index b90dde2263..8e07509bf0 100644 --- a/platform/commonUI/browse/bundle.js +++ b/platform/commonUI/browse/bundle.js @@ -19,12 +19,41 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ +/*global define*/ define([ - 'legacyRegistry', - './src/BrowseController' -], function (legacyRegistry, BrowseController) { + "./src/BrowseController", + "./src/PaneController", + "./src/BrowseObjectController", + "./src/creation/CreateMenuController", + "./src/creation/LocatorController", + "./src/MenuArrowController", + "./src/navigation/NavigationService", + "./src/creation/CreationPolicy", + "./src/navigation/NavigateAction", + "./src/windowing/NewTabAction", + "./src/windowing/FullscreenAction", + "./src/creation/CreateActionProvider", + "./src/creation/CreationService", + "./src/windowing/WindowTitler", + 'legacyRegistry' +], function ( + BrowseController, + PaneController, + BrowseObjectController, + CreateMenuController, + LocatorController, + MenuArrowController, + NavigationService, + CreationPolicy, + NavigateAction, + NewTabAction, + FullscreenAction, + CreateActionProvider, + CreationService, + WindowTitler, + legacyRegistry +) { "use strict"; legacyRegistry.register("platform/commonUI/browse", { @@ -56,29 +85,44 @@ define([ }, { "key": "PaneController", - "implementation": "PaneController.js", + "implementation": PaneController, "priority": "preferred", - "depends": [ "$scope", "agentService", "$window" ] + "depends": [ + "$scope", + "agentService", + "$window" + ] }, { "key": "BrowseObjectController", - "implementation": "BrowseObjectController.js", - "depends": [ "$scope", "$location", "$route" ] + "implementation": BrowseObjectController, + "depends": [ + "$scope", + "$location", + "$route" + ] }, { "key": "CreateMenuController", - "implementation": "creation/CreateMenuController.js", - "depends": [ "$scope" ] + "implementation": CreateMenuController, + "depends": [ + "$scope" + ] }, { "key": "LocatorController", - "implementation": "creation/LocatorController.js", - "depends": [ "$scope", "$timeout" ] + "implementation": LocatorController, + "depends": [ + "$scope", + "$timeout" + ] }, { "key": "MenuArrowController", - "implementation": "MenuArrowController.js", - "depends": [ "$scope" ] + "implementation": MenuArrowController, + "depends": [ + "$scope" + ] } ], "controls": [ @@ -91,7 +135,9 @@ define([ { "key": "browse-object", "templateUrl": "templates/browse-object.html", - "uses": [ "view" ] + "uses": [ + "view" + ] }, { "key": "create-button", @@ -100,63 +146,89 @@ define([ { "key": "create-menu", "templateUrl": "templates/create/create-menu.html", - "uses": [ "action" ] + "uses": [ + "action" + ] }, { "key": "grid-item", "templateUrl": "templates/items/grid-item.html", - "uses": [ "type", "action", "location" ], - "gestures": [ "info", "menu" ] + "uses": [ + "type", + "action", + "location" + ], + "gestures": [ + "info", + "menu" + ] }, { "key": "object-header", "templateUrl": "templates/browse/object-header.html", - "uses": [ "type" ] + "uses": [ + "type" + ] }, { "key": "menu-arrow", "templateUrl": "templates/menu-arrow.html", - "uses": [ "action" ], - "gestures": [ "menu" ] + "uses": [ + "action" + ], + "gestures": [ + "menu" + ] }, { "key": "back-arrow", - "uses": [ "context" ], + "uses": [ + "context" + ], "templateUrl": "templates/back-arrow.html" } ], "services": [ { "key": "navigationService", - "implementation": "navigation/NavigationService.js" + "implementation": NavigationService } ], "policies": [ { - "implementation": "creation/CreationPolicy.js", + "implementation": CreationPolicy, "category": "creation" } ], "actions": [ { "key": "navigate", - "implementation": "navigation/NavigateAction.js", - "depends": [ "navigationService", "$q" ] + "implementation": NavigateAction, + "depends": [ + "navigationService", + "$q" + ] }, { "key": "window", "name": "Open In New Tab", - "implementation": "windowing/NewTabAction.js", + "implementation": NewTabAction, "description": "Open in a new browser tab", - "category": ["view-control", "contextual"], - "depends": [ "urlService", "$window" ], + "category": [ + "view-control", + "contextual" + ], + "depends": [ + "urlService", + "$window" + ], "group": "windowing", "glyph": "y", "priority": "preferred" }, { "key": "fullscreen", - "implementation": "windowing/FullscreenAction.js", + "implementation": FullscreenAction, "category": "view-control", "group": "windowing", "glyph": "z", @@ -170,8 +242,12 @@ define([ "glyph": "9", "description": "Grid of available items", "templateUrl": "templates/items/items.html", - "uses": [ "composition" ], - "gestures": [ "drop" ], + "uses": [ + "composition" + ], + "gestures": [ + "drop" + ], "type": "folder", "editable": false } @@ -181,21 +257,33 @@ define([ "key": "CreateActionProvider", "provides": "actionService", "type": "provider", - "implementation": "creation/CreateActionProvider.js", - "depends": [ "typeService", "dialogService", "creationService", "policyService" ] + "implementation": CreateActionProvider, + "depends": [ + "typeService", + "dialogService", + "creationService", + "policyService" + ] }, { "key": "CreationService", "provides": "creationService", "type": "provider", - "implementation": "creation/CreationService.js", - "depends": [ "$q", "$log" ] + "implementation": CreationService, + "depends": [ + "$q", + "$log" + ] } ], "runs": [ { - "implementation": "windowing/WindowTitler.js", - "depends": [ "navigationService", "$rootScope", "$document" ] + "implementation": WindowTitler, + "depends": [ + "navigationService", + "$rootScope", + "$document" + ] } ], "licenses": [ diff --git a/platform/commonUI/dialog/bundle.js b/platform/commonUI/dialog/bundle.js new file mode 100644 index 0000000000..3839afbcf8 --- /dev/null +++ b/platform/commonUI/dialog/bundle.js @@ -0,0 +1,91 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/DialogService", + "./src/OverlayService", + 'legacyRegistry' +], function ( + DialogService, + OverlayService, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/dialog", { + "extensions": { + "services": [ + { + "key": "dialogService", + "implementation": DialogService, + "depends": [ + "overlayService", + "$q", + "$log" + ] + }, + { + "key": "overlayService", + "implementation": OverlayService, + "depends": [ + "$document", + "$compile", + "$rootScope" + ] + } + ], + "templates": [ + { + "key": "overlay-dialog", + "templateUrl": "templates/overlay-dialog.html" + }, + { + "key": "overlay-options", + "templateUrl": "templates/overlay-options.html" + }, + { + "key": "form-dialog", + "templateUrl": "templates/dialog.html" + }, + { + "key": "overlay-blocking-message", + "templateUrl": "templates/overlay-blocking-message.html" + }, + { + "key": "message", + "templateUrl": "templates/message.html" + }, + { + "key": "overlay-message-list", + "templateUrl": "templates/overlay-message-list.html" + } + ], + "containers": [ + { + "key": "overlay", + "templateUrl": "templates/overlay.html" + } + ] + } + }); +}); diff --git a/platform/commonUI/edit/bundle.js b/platform/commonUI/edit/bundle.js new file mode 100644 index 0000000000..04366f9a04 --- /dev/null +++ b/platform/commonUI/edit/bundle.js @@ -0,0 +1,228 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/controllers/EditController", + "./src/controllers/EditActionController", + "./src/controllers/EditPanesController", + "./src/directives/MCTBeforeUnload", + "./src/actions/LinkAction", + "./src/actions/EditAction", + "./src/actions/PropertiesAction", + "./src/actions/RemoveAction", + "./src/actions/SaveAction", + "./src/actions/CancelAction", + "./src/policies/EditActionPolicy", + "./src/policies/EditableViewPolicy", + "./src/representers/EditRepresenter", + "./src/representers/EditToolbarRepresenter", + 'legacyRegistry' +], function ( + EditController, + EditActionController, + EditPanesController, + MCTBeforeUnload, + LinkAction, + EditAction, + PropertiesAction, + RemoveAction, + SaveAction, + CancelAction, + EditActionPolicy, + EditableViewPolicy, + EditRepresenter, + EditToolbarRepresenter, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/edit", { + "extensions": { + "routes": [ + { + "when": "/edit", + "templateUrl": "templates/edit.html" + } + ], + "controllers": [ + { + "key": "EditController", + "implementation": EditController, + "depends": [ + "$scope", + "$q", + "navigationService" + ] + }, + { + "key": "EditActionController", + "implementation": EditActionController, + "depends": [ + "$scope" + ] + }, + { + "key": "EditPanesController", + "implementation": EditPanesController, + "depends": [ + "$scope" + ] + } + ], + "directives": [ + { + "key": "mctBeforeUnload", + "implementation": MCTBeforeUnload, + "depends": [ + "$window" + ] + } + ], + "actions": [ + { + "key": "compose", + "implementation": LinkAction + }, + { + "key": "edit", + "implementation": EditAction, + "depends": [ + "$location", + "navigationService", + "$log" + ], + "description": "Edit this object.", + "category": "view-control", + "glyph": "p" + }, + { + "key": "properties", + "category": [ + "contextual", + "view-control" + ], + "implementation": PropertiesAction, + "glyph": "p", + "name": "Edit Properties...", + "description": "Edit properties of this object.", + "depends": [ + "dialogService" + ] + }, + { + "key": "remove", + "category": "contextual", + "implementation": RemoveAction, + "glyph": "Z", + "name": "Remove", + "description": "Remove this object from its containing object.", + "depends": [ + "$q", + "navigationService" + ] + }, + { + "key": "save", + "category": "conclude-editing", + "implementation": SaveAction, + "name": "Save", + "description": "Save changes made to these objects.", + "depends": [ + "$location", + "urlService" + ], + "priority": "mandatory" + }, + { + "key": "cancel", + "category": "conclude-editing", + "implementation": CancelAction, + "name": "Cancel", + "description": "Discard changes made to these objects.", + "depends": [ + "$location", + "urlService" + ] + } + ], + "policies": [ + { + "category": "action", + "implementation": EditActionPolicy + }, + { + "category": "view", + "implementation": EditableViewPolicy + } + ], + "templates": [ + { + "key": "edit-library", + "templateUrl": "templates/library.html" + } + ], + "representations": [ + { + "key": "edit-object", + "templateUrl": "templates/edit-object.html", + "uses": [ + "view" + ] + }, + { + "key": "edit-action-buttons", + "templateUrl": "templates/edit-action-buttons.html", + "uses": [ + "action" + ] + }, + { + "key": "edit-elements", + "templateUrl": "templates/elements.html", + "uses": [ + "composition" + ], + "gestures": [ + "drop" + ] + }, + { + "key": "topbar-edit", + "templateUrl": "templates/topbar-edit.html" + } + ], + "representers": [ + { + "implementation": EditRepresenter, + "depends": [ + "$q", + "$log" + ] + }, + { + "implementation": EditToolbarRepresenter + } + ] + } + }); +}); diff --git a/platform/commonUI/formats/bundle.js b/platform/commonUI/formats/bundle.js new file mode 100644 index 0000000000..d323d3d47a --- /dev/null +++ b/platform/commonUI/formats/bundle.js @@ -0,0 +1,63 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/FormatProvider", + "./src/UTCTimeFormat", + 'legacyRegistry' +], function ( + FormatProvider, + UTCTimeFormat, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/formats", { + "name": "Time services bundle", + "description": "Defines interfaces and provides default implementations for handling different time systems.", + "extensions": { + "components": [ + { + "provides": "formatService", + "type": "provider", + "implementation": FormatProvider, + "depends": [ + "formats[]" + ] + } + ], + "formats": [ + { + "key": "utc", + "implementation": UTCTimeFormat + } + ], + "constants": [ + { + "key": "DEFAULT_TIME_FORMAT", + "value": "utc" + } + ] + } + }); +}); diff --git a/platform/commonUI/general/bundle.js b/platform/commonUI/general/bundle.js new file mode 100644 index 0000000000..b803130239 --- /dev/null +++ b/platform/commonUI/general/bundle.js @@ -0,0 +1,491 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/services/UrlService", + "./src/services/PopupService", + "./src/StyleSheetLoader", + "./src/UnsupportedBrowserWarning", + "./src/controllers/TimeRangeController", + "./src/controllers/DateTimePickerController", + "./src/controllers/DateTimeFieldController", + "./src/controllers/TreeNodeController", + "./src/controllers/ActionGroupController", + "./src/controllers/ToggleController", + "./src/controllers/ContextMenuController", + "./src/controllers/ClickAwayController", + "./src/controllers/ViewSwitcherController", + "./src/controllers/BottomBarController", + "./src/controllers/GetterSetterController", + "./src/controllers/SplitPaneController", + "./src/controllers/SelectorController", + "./src/controllers/ObjectInspectorController", + "./src/controllers/BannerController", + "./src/directives/MCTContainer", + "./src/directives/MCTDrag", + "./src/directives/MCTClickElsewhere", + "./src/directives/MCTResize", + "./src/directives/MCTPopup", + "./src/directives/MCTScroll", + "./src/directives/MCTSplitPane", + "./src/directives/MCTSplitter", + 'legacyRegistry' +], function ( + UrlService, + PopupService, + StyleSheetLoader, + UnsupportedBrowserWarning, + TimeRangeController, + DateTimePickerController, + DateTimeFieldController, + TreeNodeController, + ActionGroupController, + ToggleController, + ContextMenuController, + ClickAwayController, + ViewSwitcherController, + BottomBarController, + GetterSetterController, + SplitPaneController, + SelectorController, + ObjectInspectorController, + BannerController, + MCTContainer, + MCTDrag, + MCTClickElsewhere, + MCTResize, + MCTPopup, + MCTScroll, + MCTSplitPane, + MCTSplitter, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/general", { + "name": "General UI elements", + "description": "General UI elements, meant to be reused across modes", + "resources": "res", + "extensions": { + "services": [ + { + "key": "urlService", + "implementation": UrlService, + "depends": [ + "$location" + ] + }, + { + "key": "popupService", + "implementation": PopupService, + "depends": [ + "$document", + "$window" + ] + } + ], + "runs": [ + { + "implementation": StyleSheetLoader, + "depends": [ + "stylesheets[]", + "$document", + "THEME" + ] + }, + { + "implementation": UnsupportedBrowserWarning, + "depends": [ + "notificationService", + "agentService" + ] + } + ], + "stylesheets": [ + { + "stylesheetUrl": "css/normalize.min.css", + "priority": "mandatory" + } + ], + "templates": [ + { + "key": "bottombar", + "templateUrl": "templates/bottombar.html" + }, + { + "key": "action-button", + "templateUrl": "templates/controls/action-button.html" + }, + { + "key": "input-filter", + "templateUrl": "templates/controls/input-filter.html" + }, + { + "key": "indicator", + "templateUrl": "templates/indicator.html" + }, + { + "key": "message-banner", + "templateUrl": "templates/message-banner.html" + }, + { + "key": "progress-bar", + "templateUrl": "templates/progress-bar.html" + }, + { + "key": "time-controller", + "templateUrl": "templates/controls/time-controller.html" + } + ], + "controllers": [ + { + "key": "TimeRangeController", + "implementation": TimeRangeController, + "depends": [ + "$scope", + "formatService", + "DEFAULT_TIME_FORMAT", + "now" + ] + }, + { + "key": "DateTimePickerController", + "implementation": DateTimePickerController, + "depends": [ + "$scope", + "now" + ] + }, + { + "key": "DateTimeFieldController", + "implementation": DateTimeFieldController, + "depends": [ + "$scope", + "formatService", + "DEFAULT_TIME_FORMAT" + ] + }, + { + "key": "TreeNodeController", + "implementation": TreeNodeController, + "depends": [ + "$scope", + "$timeout" + ] + }, + { + "key": "ActionGroupController", + "implementation": ActionGroupController, + "depends": [ + "$scope" + ] + }, + { + "key": "ToggleController", + "implementation": ToggleController + }, + { + "key": "ContextMenuController", + "implementation": ContextMenuController, + "depends": [ + "$scope" + ] + }, + { + "key": "ClickAwayController", + "implementation": ClickAwayController, + "depends": [ + "$scope", + "$document" + ] + }, + { + "key": "ViewSwitcherController", + "implementation": ViewSwitcherController, + "depends": [ + "$scope", + "$timeout" + ] + }, + { + "key": "BottomBarController", + "implementation": BottomBarController, + "depends": [ + "indicators[]" + ] + }, + { + "key": "GetterSetterController", + "implementation": GetterSetterController, + "depends": [ + "$scope" + ] + }, + { + "key": "SplitPaneController", + "implementation": SplitPaneController + }, + { + "key": "SelectorController", + "implementation": SelectorController, + "depends": [ + "objectService", + "$scope" + ] + }, + { + "key": "ObjectInspectorController", + "implementation": ObjectInspectorController, + "depends": [ + "$scope", + "objectService" + ] + }, + { + "key": "BannerController", + "implementation": BannerController, + "depends": [ + "$scope", + "notificationService", + "dialogService" + ] + } + ], + "directives": [ + { + "key": "mctContainer", + "implementation": MCTContainer, + "depends": [ + "containers[]" + ] + }, + { + "key": "mctDrag", + "implementation": MCTDrag, + "depends": [ + "$document" + ] + }, + { + "key": "mctClickElsewhere", + "implementation": MCTClickElsewhere, + "depends": [ + "$document" + ] + }, + { + "key": "mctResize", + "implementation": MCTResize, + "depends": [ + "$timeout" + ] + }, + { + "key": "mctPopup", + "implementation": MCTPopup, + "depends": [ + "$compile", + "popupService" + ] + }, + { + "key": "mctScrollX", + "implementation": MCTScroll, + "depends": [ + "$parse", + "MCT_SCROLL_X_PROPERTY", + "MCT_SCROLL_X_ATTRIBUTE" + ] + }, + { + "key": "mctScrollY", + "implementation": MCTScroll, + "depends": [ + "$parse", + "MCT_SCROLL_Y_PROPERTY", + "MCT_SCROLL_Y_ATTRIBUTE" + ] + }, + { + "key": "mctSplitPane", + "implementation": MCTSplitPane, + "depends": [ + "$parse", + "$log", + "$interval" + ] + }, + { + "key": "mctSplitter", + "implementation": MCTSplitter + } + ], + "constants": [ + { + "key": "MCT_SCROLL_X_PROPERTY", + "value": "scrollLeft" + }, + { + "key": "MCT_SCROLL_X_ATTRIBUTE", + "value": "mctScrollX" + }, + { + "key": "MCT_SCROLL_Y_PROPERTY", + "value": "scrollTop" + }, + { + "key": "MCT_SCROLL_Y_ATTRIBUTE", + "value": "mctScrollY" + }, + { + "key": "THEME", + "value": "unspecified", + "priority": "fallback" + } + ], + "containers": [ + { + "key": "accordion", + "templateUrl": "templates/containers/accordion.html", + "attributes": [ + "label" + ] + } + ], + "representations": [ + { + "key": "tree", + "templateUrl": "templates/subtree.html", + "uses": [ + "composition" + ], + "type": "root", + "priority": "preferred" + }, + { + "key": "tree", + "templateUrl": "templates/tree.html" + }, + { + "key": "subtree", + "templateUrl": "templates/subtree.html", + "uses": [ + "composition" + ] + }, + { + "key": "tree-node", + "templateUrl": "templates/tree-node.html", + "uses": [ + "action" + ] + }, + { + "key": "label", + "templateUrl": "templates/label.html", + "uses": [ + "type", + "location" + ], + "gestures": [ + "drag", + "menu", + "info" + ] + }, + { + "key": "node", + "templateUrl": "templates/label.html", + "uses": [ + "type" + ], + "gestures": [ + "drag", + "menu" + ] + }, + { + "key": "action-group", + "templateUrl": "templates/controls/action-group.html", + "uses": [ + "action" + ] + }, + { + "key": "context-menu", + "templateUrl": "templates/menu/context-menu.html", + "uses": [ + "action" + ] + }, + { + "key": "switcher", + "templateUrl": "templates/controls/switcher.html", + "uses": [ + "view" + ] + }, + { + "key": "object-inspector", + "templateUrl": "templates/object-inspector.html" + } + ], + "controls": [ + { + "key": "selector", + "templateUrl": "templates/controls/selector.html" + }, + { + "key": "datetime-picker", + "templateUrl": "templates/controls/datetime-picker.html" + }, + { + "key": "datetime-field", + "templateUrl": "templates/controls/datetime-field.html" + } + ], + "licenses": [ + { + "name": "Modernizr", + "version": "2.6.2", + "description": "Browser/device capability finding", + "author": "Faruk Ateş", + "website": "http://modernizr.com", + "copyright": "Copyright (c) 2009–2015", + "license": "license-mit", + "link": "http://modernizr.com/license/" + }, + { + "name": "Normalize.css", + "version": "1.1.2", + "description": "Browser style normalization", + "author": "Nicolas Gallagher, Jonathan Neal", + "website": "http://necolas.github.io/normalize.css/", + "copyright": "Copyright (c) Nicolas Gallagher and Jonathan Neal", + "license": "license-mit", + "link": "https://github.com/necolas/normalize.css/blob/v1.1.2/LICENSE.md" + } + ] + } + }); +}); diff --git a/platform/commonUI/inspect/bundle.js b/platform/commonUI/inspect/bundle.js new file mode 100644 index 0000000000..ea2f58e432 --- /dev/null +++ b/platform/commonUI/inspect/bundle.js @@ -0,0 +1,110 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/gestures/InfoGesture", + "./src/gestures/InfoButtonGesture", + "./src/services/InfoService", + 'legacyRegistry' +], function ( + InfoGesture, + InfoButtonGesture, + InfoService, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/inspect", { + "extensions": { + "templates": [ + { + "key": "info-table", + "templateUrl": "info-table.html" + }, + { + "key": "info-bubble", + "templateUrl": "info-bubble.html" + } + ], + "containers": [ + { + "key": "bubble", + "templateUrl": "bubble.html", + "attributes": [ + "bubbleTitle", + "bubbleLayout" + ], + "alias": "bubble" + } + ], + "gestures": [ + { + "key": "info", + "implementation": InfoGesture, + "depends": [ + "$timeout", + "agentService", + "infoService", + "INFO_HOVER_DELAY" + ] + }, + { + "key": "infobutton", + "implementation": InfoButtonGesture, + "depends": [ + "$document", + "agentService", + "infoService" + ] + } + ], + "services": [ + { + "key": "infoService", + "implementation": InfoService, + "depends": [ + "$compile", + "$rootScope", + "popupService", + "agentService" + ] + } + ], + "constants": [ + { + "key": "INFO_HOVER_DELAY", + "value": 2000 + } + ], + "representations": [ + { + "key": "info-button", + "templateUrl": "templates/info-button.html", + "gestures": [ + "infobutton" + ] + } + ] + } + }); +}); diff --git a/platform/commonUI/mobile/bundle.js b/platform/commonUI/mobile/bundle.js new file mode 100644 index 0000000000..1cec584ff0 --- /dev/null +++ b/platform/commonUI/mobile/bundle.js @@ -0,0 +1,68 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/MCTDevice", + "./src/AgentService", + "./src/DeviceClassifier", + 'legacyRegistry' +], function ( + MCTDevice, + AgentService, + DeviceClassifier, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/mobile", { + "extensions": { + "directives": [ + { + "key": "mctDevice", + "implementation": MCTDevice, + "depends": [ + "agentService" + ] + } + ], + "services": [ + { + "key": "agentService", + "implementation": AgentService, + "depends": [ + "$window" + ] + } + ], + "runs": [ + { + "implementation": DeviceClassifier, + "depends": [ + "agentService", + "$document" + ] + } + ] + } + }); +}); diff --git a/platform/commonUI/notification/bundle.js b/platform/commonUI/notification/bundle.js new file mode 100644 index 0000000000..a9123847fc --- /dev/null +++ b/platform/commonUI/notification/bundle.js @@ -0,0 +1,89 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/NotificationIndicatorController", + "./src/NotificationIndicator", + "./src/NotificationService", + 'legacyRegistry' +], function ( + NotificationIndicatorController, + NotificationIndicator, + NotificationService, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/notification", { + "extensions": { + "constants": [ + { + "key": "DEFAULT_AUTO_DISMISS", + "value": 3000 + }, + { + "key": "FORCE_AUTO_DISMISS", + "value": 1000 + }, + { + "key": "MINIMIZE_TIMEOUT", + "value": 300 + } + ], + "templates": [ + { + "key": "notificationIndicatorTemplate", + "templateUrl": "notification-indicator.html" + } + ], + "controllers": [ + { + "key": "NotificationIndicatorController", + "implementation": NotificationIndicatorController, + "depends": [ + "$scope", + "notificationService", + "dialogService" + ] + } + ], + "indicators": [ + { + "implementation": NotificationIndicator, + "priority": "fallback" + } + ], + "services": [ + { + "key": "notificationService", + "implementation": NotificationService, + "depends": [ + "$timeout", + "DEFAULT_AUTO_DISMISS", + "MINIMIZE_TIMEOUT" + ] + } + ] + } + }); +}); diff --git a/platform/commonUI/themes/espresso/bundle.js b/platform/commonUI/themes/espresso/bundle.js new file mode 100644 index 0000000000..b66f015877 --- /dev/null +++ b/platform/commonUI/themes/espresso/bundle.js @@ -0,0 +1,51 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + + 'legacyRegistry' +], function ( + + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/themes/espresso", { + "name": "Espresso", + "description": "Espresso theme: dark and rich", + "extensions": { + "stylesheets": [ + { + "stylesheetUrl": "css/theme-espresso.css", + "priority": 1000 + } + ], + "constants": [ + { + "key": "THEME", + "value": "espresso" + } + ] + } + }); +}); diff --git a/platform/commonUI/themes/snow/bundle.js b/platform/commonUI/themes/snow/bundle.js new file mode 100644 index 0000000000..0438213182 --- /dev/null +++ b/platform/commonUI/themes/snow/bundle.js @@ -0,0 +1,51 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + + 'legacyRegistry' +], function ( + + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/themes/snow", { + "name": "Snow", + "description": "Snow theme: light and cool", + "extensions": { + "stylesheets": [ + { + "stylesheetUrl": "css/theme-snow.css", + "priority": 1000 + } + ], + "constants": [ + { + "key": "THEME", + "value": "snow" + } + ] + } + }); +}); diff --git a/platform/containment/bundle.js b/platform/containment/bundle.js new file mode 100644 index 0000000000..a9f33b0149 --- /dev/null +++ b/platform/containment/bundle.js @@ -0,0 +1,71 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/CompositionPolicy", + "./src/CompositionMutabilityPolicy", + "./src/CompositionModelPolicy", + "./src/ComposeActionPolicy", + 'legacyRegistry' +], function ( + CompositionPolicy, + CompositionMutabilityPolicy, + CompositionModelPolicy, + ComposeActionPolicy, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/containment", { + "extensions": { + "policies": [ + { + "category": "composition", + "implementation": CompositionPolicy, + "depends": [ + "$injector" + ], + "message": "Objects of this type cannot contain objects of that type." + }, + { + "category": "composition", + "implementation": CompositionMutabilityPolicy, + "message": "Objects of this type cannot be modified." + }, + { + "category": "composition", + "implementation": CompositionModelPolicy, + "message": "Objects of this type cannot contain other objects." + }, + { + "category": "action", + "implementation": ComposeActionPolicy, + "depends": [ + "$injector" + ], + "message": "Objects of this type cannot contain objects of that type." + } + ] + } + }); +}); diff --git a/platform/core/bundle.js b/platform/core/bundle.js new file mode 100644 index 0000000000..0cb72bfd2a --- /dev/null +++ b/platform/core/bundle.js @@ -0,0 +1,420 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/objects/DomainObjectProvider", + "./src/capabilities/CoreCapabilityProvider", + "./src/models/StaticModelProvider", + "./src/models/RootModelProvider", + "./src/models/ModelAggregator", + "./src/models/PersistedModelProvider", + "./src/models/CachingModelDecorator", + "./src/models/MissingModelDecorator", + "./src/types/TypeProvider", + "./src/actions/ActionProvider", + "./src/actions/ActionAggregator", + "./src/actions/LoggingActionDecorator", + "./src/views/ViewProvider", + "./src/identifiers/IdentifierProvider", + "./src/capabilities/CompositionCapability", + "./src/capabilities/RelationshipCapability", + "./src/types/TypeCapability", + "./src/actions/ActionCapability", + "./src/views/ViewCapability", + "./src/capabilities/PersistenceCapability", + "./src/capabilities/MetadataCapability", + "./src/capabilities/MutationCapability", + "./src/capabilities/DelegationCapability", + "./src/capabilities/InstantiationCapability", + "./src/services/Now", + "./src/services/Throttle", + "./src/services/Topic", + "./src/services/Contextualize", + "./src/services/Instantiate", + 'legacyRegistry' +], function ( + DomainObjectProvider, + CoreCapabilityProvider, + StaticModelProvider, + RootModelProvider, + ModelAggregator, + PersistedModelProvider, + CachingModelDecorator, + MissingModelDecorator, + TypeProvider, + ActionProvider, + ActionAggregator, + LoggingActionDecorator, + ViewProvider, + IdentifierProvider, + CompositionCapability, + RelationshipCapability, + TypeCapability, + ActionCapability, + ViewCapability, + PersistenceCapability, + MetadataCapability, + MutationCapability, + DelegationCapability, + InstantiationCapability, + Now, + Throttle, + Topic, + Contextualize, + Instantiate, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/core", { + "name": "Open MCT Web Core", + "description": "Defines core concepts of Open MCT Web.", + "sources": "src", + "configuration": { + "paths": { + "uuid": "uuid" + } + }, + "extensions": { + "versions": [ + { + "name": "Version", + "value": "${project.version}", + "priority": 999 + }, + { + "name": "Built", + "value": "${timestamp}", + "description": "The date on which this version of the client was built.", + "priority": 990 + }, + { + "name": "Revision", + "value": "${buildNumber}", + "description": "A unique revision identifier for the client sources.", + "priority": 995 + }, + { + "name": "Branch", + "value": "${scmBranch}", + "description": "The date on which this version of the client was built.", + "priority": 994 + } + ], + "components": [ + { + "provides": "objectService", + "type": "provider", + "implementation": DomainObjectProvider, + "depends": [ + "modelService", + "instantiate" + ] + }, + { + "provides": "capabilityService", + "type": "provider", + "implementation": CoreCapabilityProvider, + "depends": [ + "capabilities[]", + "$log" + ] + }, + { + "provides": "modelService", + "type": "provider", + "implementation": StaticModelProvider, + "depends": [ + "models[]", + "$q", + "$log" + ] + }, + { + "provides": "modelService", + "type": "provider", + "implementation": RootModelProvider, + "depends": [ + "roots[]", + "$q", + "$log" + ] + }, + { + "provides": "modelService", + "type": "aggregator", + "implementation": ModelAggregator, + "depends": [ + "$q" + ] + }, + { + "provides": "modelService", + "type": "provider", + "implementation": PersistedModelProvider, + "depends": [ + "persistenceService", + "$q", + "now", + "PERSISTENCE_SPACE" + ] + }, + { + "provides": "modelService", + "type": "decorator", + "implementation": CachingModelDecorator + }, + { + "provides": "modelService", + "type": "decorator", + "priority": "fallback", + "implementation": MissingModelDecorator + }, + { + "provides": "typeService", + "type": "provider", + "implementation": TypeProvider, + "depends": [ + "types[]" + ] + }, + { + "provides": "actionService", + "type": "provider", + "implementation": ActionProvider, + "depends": [ + "actions[]", + "$log" + ] + }, + { + "provides": "actionService", + "type": "aggregator", + "implementation": ActionAggregator + }, + { + "provides": "actionService", + "type": "decorator", + "implementation": LoggingActionDecorator, + "depends": [ + "$log" + ] + }, + { + "provides": "viewService", + "type": "provider", + "implementation": ViewProvider, + "depends": [ + "views[]", + "$log" + ] + }, + { + "provides": "identifierService", + "type": "provider", + "implementation": IdentifierProvider, + "depends": [ + "PERSISTENCE_SPACE" + ] + } + ], + "types": [ + { + "properties": [ + { + "control": "textfield", + "name": "Title", + "key": "name", + "property": "name", + "pattern": "\\S+", + "required": true, + "cssclass": "l-med" + } + ] + }, + { + "key": "root", + "name": "Root", + "glyph": "F" + }, + { + "key": "folder", + "name": "Folder", + "glyph": "F", + "features": "creation", + "description": "Useful for storing and organizing domain objects.", + "model": { + "composition": [] + } + }, + { + "key": "unknown", + "name": "Unknown Type", + "glyph": "?" + }, + { + "name": "Unknown Type", + "glyph": "?" + } + ], + "capabilities": [ + { + "key": "composition", + "implementation": CompositionCapability, + "depends": [ + "$injector", + "contextualize" + ] + }, + { + "key": "relationship", + "implementation": RelationshipCapability, + "depends": [ + "$injector" + ] + }, + { + "key": "type", + "implementation": TypeCapability, + "depends": [ + "typeService" + ] + }, + { + "key": "action", + "implementation": ActionCapability, + "depends": [ + "$q", + "actionService" + ] + }, + { + "key": "view", + "implementation": ViewCapability, + "depends": [ + "viewService" + ] + }, + { + "key": "persistence", + "implementation": PersistenceCapability, + "depends": [ + "persistenceService", + "identifierService", + "notificationService", + "$q" + ] + }, + { + "key": "metadata", + "implementation": MetadataCapability + }, + { + "key": "mutation", + "implementation": MutationCapability, + "depends": [ + "topic", + "now" + ] + }, + { + "key": "delegation", + "implementation": DelegationCapability, + "depends": [ + "$q" + ] + }, + { + "key": "instantiation", + "implementation": InstantiationCapability, + "depends": [ + "$injector", + "identifierService" + ] + } + ], + "services": [ + { + "key": "now", + "implementation": Now + }, + { + "key": "throttle", + "implementation": Throttle, + "depends": [ + "$timeout" + ] + }, + { + "key": "topic", + "implementation": Topic, + "depends": [ + "$log" + ] + }, + { + "key": "contextualize", + "implementation": Contextualize, + "depends": [ + "$log" + ] + }, + { + "key": "instantiate", + "implementation": Instantiate, + "depends": [ + "capabilityService" + ] + } + ], + "roots": [ + { + "id": "mine", + "model": { + "name": "My Items", + "type": "folder", + "composition": [] + } + } + ], + "constants": [ + { + "key": "PERSISTENCE_SPACE", + "value": "mct" + } + ], + "licenses": [ + { + "name": "Math.uuid.js", + "version": "1.4", + "description": "Unique identifer generation (code adapted.)", + "author": "Robert Kieffer", + "website": "https://github.com/broofa/node-uuid", + "copyright": "Copyright (c) 2010 Robert Kieffer", + "license": "license-mit", + "link": "http://opensource.org/licenses/MIT" + } + ] + } + }); +}); diff --git a/platform/entanglement/bundle.js b/platform/entanglement/bundle.js new file mode 100644 index 0000000000..b1e2162997 --- /dev/null +++ b/platform/entanglement/bundle.js @@ -0,0 +1,202 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/actions/MoveAction", + "./src/actions/CopyAction", + "./src/actions/LinkAction", + "./src/actions/GoToOriginalAction", + "./src/actions/SetPrimaryLocationAction", + "./src/services/LocatingCreationDecorator", + "./src/services/LocatingObjectDecorator", + "./src/policies/CrossSpacePolicy", + "./src/capabilities/LocationCapability", + "./src/services/MoveService", + "./src/services/LinkService", + "./src/services/CopyService", + "./src/services/LocationService", + 'legacyRegistry' +], function ( + MoveAction, + CopyAction, + LinkAction, + GoToOriginalAction, + SetPrimaryLocationAction, + LocatingCreationDecorator, + LocatingObjectDecorator, + CrossSpacePolicy, + LocationCapability, + MoveService, + LinkService, + CopyService, + LocationService, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/entanglement", { + "name": "Entanglement", + "description": "Tools to assist you in entangling the world of WARP.", + "configuration": {}, + "extensions": { + "actions": [ + { + "key": "move", + "name": "Move", + "description": "Move object to another location.", + "glyph": "f", + "category": "contextual", + "implementation": MoveAction, + "depends": [ + "policyService", + "locationService", + "moveService" + ] + }, + { + "key": "copy", + "name": "Duplicate", + "description": "Duplicate object to another location.", + "glyph": "+", + "category": "contextual", + "implementation": CopyAction, + "depends": [ + "$log", + "policyService", + "locationService", + "copyService", + "dialogService", + "notificationService" + ] + }, + { + "key": "link", + "name": "Create Link", + "description": "Create Link to object in another location.", + "glyph": "è", + "category": "contextual", + "implementation": LinkAction, + "depends": [ + "policyService", + "locationService", + "linkService" + ] + }, + { + "key": "follow", + "name": "Go To Original", + "description": "Go to the original, un-linked instance of this object.", + "glyph": "ô", + "category": "contextual", + "implementation": GoToOriginalAction + }, + { + "key": "locate", + "name": "Set Primary Location", + "description": "Set a domain object's primary location.", + "glyph": "", + "category": "contextual", + "implementation": SetPrimaryLocationAction + } + ], + "components": [ + { + "type": "decorator", + "provides": "creationService", + "implementation": LocatingCreationDecorator + }, + { + "type": "decorator", + "provides": "objectService", + "implementation": LocatingObjectDecorator, + "depends": [ + "contextualize", + "$q", + "$log" + ] + } + ], + "policies": [ + { + "category": "action", + "implementation": CrossSpacePolicy + } + ], + "capabilities": [ + { + "key": "location", + "name": "Location Capability", + "description": "Provides a capability for retrieving the location of an object based upon it's context.", + "implementation": LocationCapability, + "depends": [ + "$q", + "$injector" + ] + } + ], + "services": [ + { + "key": "moveService", + "name": "Move Service", + "description": "Provides a service for moving objects", + "implementation": MoveService, + "depends": [ + "policyService", + "linkService", + "$q" + ] + }, + { + "key": "linkService", + "name": "Link Service", + "description": "Provides a service for linking objects", + "implementation": LinkService, + "depends": [ + "policyService" + ] + }, + { + "key": "copyService", + "name": "Copy Service", + "description": "Provides a service for copying objects", + "implementation": CopyService, + "depends": [ + "$q", + "policyService", + "now" + ] + }, + { + "key": "locationService", + "name": "Location Service", + "description": "Provides a service for prompting a user for locations.", + "implementation": LocationService, + "depends": [ + "dialogService" + ] + } + ], + "licenses": [] + } + }); +}); diff --git a/platform/execution/bundle.js b/platform/execution/bundle.js new file mode 100644 index 0000000000..967726fe03 --- /dev/null +++ b/platform/execution/bundle.js @@ -0,0 +1,47 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/WorkerService", + 'legacyRegistry' +], function ( + WorkerService, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/execution", { + "extensions": { + "services": [ + { + "key": "workerService", + "implementation": WorkerService, + "depends": [ + "$window", + "workers[]" + ] + } + ] + } + }); +}); diff --git a/platform/features/clock/bundle.js b/platform/features/clock/bundle.js new file mode 100644 index 0000000000..e19d9659c1 --- /dev/null +++ b/platform/features/clock/bundle.js @@ -0,0 +1,251 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/indicators/ClockIndicator", + "./src/services/TickerService", + "./src/controllers/ClockController", + "./src/controllers/TimerController", + "./src/controllers/RefreshingController", + "./src/actions/StartTimerAction", + "./src/actions/RestartTimerAction", + 'legacyRegistry' +], function ( + ClockIndicator, + TickerService, + ClockController, + TimerController, + RefreshingController, + StartTimerAction, + RestartTimerAction, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/clock", { + "name": "Clocks/Timers", + "descriptions": "Domain objects for displaying current & relative times.", + "configuration": { + "paths": { + "moment-duration-format": "moment-duration-format" + }, + "shim": { + "moment-duration-format": { + "deps": [ + "moment" + ] + } + } + }, + "extensions": { + "constants": [ + { + "key": "CLOCK_INDICATOR_FORMAT", + "value": "YYYY/MM/DD HH:mm:ss" + } + ], + "indicators": [ + { + "implementation": ClockIndicator, + "depends": [ + "tickerService", + "CLOCK_INDICATOR_FORMAT" + ], + "priority": "preferred" + } + ], + "services": [ + { + "key": "tickerService", + "implementation": TickerService, + "depends": [ + "$timeout", + "now" + ] + } + ], + "controllers": [ + { + "key": "ClockController", + "implementation": ClockController, + "depends": [ + "$scope", + "tickerService" + ] + }, + { + "key": "TimerController", + "implementation": TimerController, + "depends": [ + "$scope", + "$window", + "now" + ] + }, + { + "key": "RefreshingController", + "implementation": RefreshingController, + "depends": [ + "$scope", + "tickerService" + ] + } + ], + "views": [ + { + "key": "clock", + "type": "clock", + "templateUrl": "templates/clock.html" + }, + { + "key": "timer", + "type": "timer", + "templateUrl": "templates/timer.html" + } + ], + "actions": [ + { + "key": "timer.start", + "implementation": StartTimerAction, + "depends": [ + "now" + ], + "category": "contextual", + "name": "Start", + "glyph": "ï", + "priority": "preferred" + }, + { + "key": "timer.restart", + "implementation": RestartTimerAction, + "depends": [ + "now" + ], + "category": "contextual", + "name": "Restart at 0", + "glyph": "r", + "priority": "preferred" + } + ], + "types": [ + { + "key": "clock", + "name": "Clock", + "glyph": "C", + "features": [ + "creation" + ], + "properties": [ + { + "key": "clockFormat", + "name": "Display Format", + "control": "composite", + "items": [ + { + "control": "select", + "options": [ + { + "value": "YYYY/MM/DD hh:mm:ss", + "name": "YYYY/MM/DD hh:mm:ss" + }, + { + "value": "YYYY/DDD hh:mm:ss", + "name": "YYYY/DDD hh:mm:ss" + }, + { + "value": "hh:mm:ss", + "name": "hh:mm:ss" + } + ] + }, + { + "control": "select", + "options": [ + { + "value": "clock12", + "name": "12hr" + }, + { + "value": "clock24", + "name": "24hr" + } + ] + } + ] + } + ], + "model": { + "clockFormat": [ + "YYYY/MM/DD hh:mm:ss", + "clock12" + ] + } + }, + { + "key": "timer", + "name": "Timer", + "glyph": "õ", + "features": [ + "creation" + ], + "properties": [ + { + "key": "timestamp", + "control": "datetime", + "name": "Target" + }, + { + "key": "timerFormat", + "control": "select", + "options": [ + { + "value": "long", + "name": "DDD hh:mm:ss" + }, + { + "value": "short", + "name": "hh:mm:ss" + } + ] + } + ], + "model": { + "timerFormat": "DDD hh:mm:ss" + } + } + ], + "licenses": [ + { + "name": "moment-duration-format", + "version": "1.3.0", + "author": "John Madhavan-Reese", + "description": "Duration parsing/formatting", + "website": "https://github.com/jsmreese/moment-duration-format", + "copyright": "Copyright 2014 John Madhavan-Reese", + "license": "license-mit", + "link": "https://github.com/jsmreese/moment-duration-format/blob/master/LICENSE" + } + ] + } + }); +}); diff --git a/platform/features/conductor/bundle.js b/platform/features/conductor/bundle.js new file mode 100644 index 0000000000..1a215e2a10 --- /dev/null +++ b/platform/features/conductor/bundle.js @@ -0,0 +1,92 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/ConductorRepresenter", + "./src/ConductorTelemetryDecorator", + "./src/ConductorService", + 'legacyRegistry' +], function ( + ConductorRepresenter, + ConductorTelemetryDecorator, + ConductorService, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/conductor", { + "extensions": { + "representers": [ + { + "implementation": ConductorRepresenter, + "depends": [ + "throttle", + "conductorService", + "$compile", + "views[]" + ] + } + ], + "components": [ + { + "type": "decorator", + "provides": "telemetryService", + "implementation": ConductorTelemetryDecorator, + "depends": [ + "conductorService" + ] + } + ], + "services": [ + { + "key": "conductorService", + "implementation": ConductorService, + "depends": [ + "now", + "TIME_CONDUCTOR_DOMAINS" + ] + } + ], + "templates": [ + { + "key": "time-conductor", + "templateUrl": "templates/time-conductor.html" + } + ], + "constants": [ + { + "key": "TIME_CONDUCTOR_DOMAINS", + "value": [ + { + "key": "time", + "name": "UTC", + "format": "utc" + } + ], + "priority": "fallback", + "comment": "Placeholder; to be replaced by inspection of available domains." + } + ] + } + }); +}); diff --git a/platform/features/events/bundle.js b/platform/features/events/bundle.js new file mode 100644 index 0000000000..829036acb3 --- /dev/null +++ b/platform/features/events/bundle.js @@ -0,0 +1,81 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/EventListController", + "./src/directives/MCTDataTable", + "./src/policies/MessagesViewPolicy", + 'legacyRegistry' +], function ( + EventListController, + MCTDataTable, + MessagesViewPolicy, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/events", { + "name": "Event Messages", + "description": "List of time-ordered event messages", + "extensions": { + "views": [ + { + "key": "messages", + "name": "Messages", + "glyph": "5", + "description": "Scrolling list of messages.", + "templateUrl": "templates/messages.html", + "needs": [ + "telemetry" + ], + "delegation": true + } + ], + "controllers": [ + { + "key": "EventListController", + "implementation": EventListController, + "depends": [ + "$scope", + "telemetryFormatter" + ] + } + ], + "directives": [ + { + "key": "mctDataTable", + "implementation": MCTDataTable, + "depends": [ + "$window" + ] + } + ], + "policies": [ + { + "category": "view", + "implementation": MessagesViewPolicy + } + ] + } + }); +}); diff --git a/platform/features/imagery/bundle.js b/platform/features/imagery/bundle.js new file mode 100644 index 0000000000..2036fee513 --- /dev/null +++ b/platform/features/imagery/bundle.js @@ -0,0 +1,79 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/policies/ImageryViewPolicy", + "./src/controllers/ImageryController", + "./src/directives/MCTBackgroundImage", + 'legacyRegistry' +], function ( + ImageryViewPolicy, + ImageryController, + MCTBackgroundImage, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/imagery", { + "name": "Plot view for telemetry", + "extensions": { + "views": [ + { + "name": "Imagery", + "key": "imagery", + "glyph": "ã", + "templateUrl": "templates/imagery.html", + "priority": "preferred", + "needs": [ + "telemetry" + ] + } + ], + "policies": [ + { + "category": "view", + "implementation": ImageryViewPolicy + } + ], + "controllers": [ + { + "key": "ImageryController", + "implementation": ImageryController, + "depends": [ + "$scope", + "telemetryHandler" + ] + } + ], + "directives": [ + { + "key": "mctBackgroundImage", + "implementation": MCTBackgroundImage, + "depends": [ + "$document" + ] + } + ] + } + }); +}); diff --git a/platform/features/layout/bundle.js b/platform/features/layout/bundle.js new file mode 100644 index 0000000000..4227ebc2d9 --- /dev/null +++ b/platform/features/layout/bundle.js @@ -0,0 +1,322 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/LayoutController", + "./src/FixedController", + "./src/LayoutCompositionPolicy", + 'legacyRegistry' +], function ( + LayoutController, + FixedController, + LayoutCompositionPolicy, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/layout", { + "name": "Layout components.", + "description": "Plug in adding Layout capabilities.", + "extensions": { + "views": [ + { + "key": "layout", + "name": "Display Layout", + "glyph": "L", + "type": "layout", + "templateUrl": "templates/layout.html", + "uses": [], + "gestures": [ + "drop" + ] + }, + { + "key": "fixed", + "name": "Fixed Position", + "glyph": "3", + "type": "telemetry.panel", + "templateUrl": "templates/fixed.html", + "uses": [ + "composition" + ], + "gestures": [ + "drop" + ], + "toolbar": { + "sections": [ + { + "items": [ + { + "method": "add", + "glyph": "+", + "control": "menu-button", + "text": "Add", + "options": [ + { + "name": "Box", + "glyph": "à", + "key": "fixed.box" + }, + { + "name": "Line", + "glyph": "â", + "key": "fixed.line" + }, + { + "name": "Text", + "glyph": "ä", + "key": "fixed.text" + }, + { + "name": "Image", + "glyph": "ã", + "key": "fixed.image" + } + ] + } + ] + }, + { + "items": [ + { + "method": "order", + "glyph": "á", + "control": "menu-button", + "options": [ + { + "name": "Move to Top", + "glyph": "^", + "key": "top" + }, + { + "name": "Move Up", + "glyph": "^", + "key": "up" + }, + { + "name": "Move Down", + "glyph": "v", + "key": "down" + }, + { + "name": "Move to Bottom", + "glyph": "v", + "key": "bottom" + } + ] + }, + { + "property": "fill", + "glyph": "", + "control": "color" + }, + { + "property": "stroke", + "glyph": "â", + "control": "color" + }, + { + "property": "color", + "glyph": "ä", + "mandatory": true, + "control": "color" + }, + { + "property": "url", + "glyph": "ã", + "control": "dialog-button", + "title": "Image Properties", + "dialog": { + "control": "textfield", + "name": "Image URL", + "required": true + } + }, + { + "property": "text", + "glyph": "G", + "control": "dialog-button", + "title": "Text Properties", + "dialog": { + "control": "textfield", + "name": "Text", + "required": true + } + }, + { + "method": "showTitle", + "glyph": "ç", + "control": "button", + "description": "Show telemetry element title." + }, + { + "method": "hideTitle", + "glyph": "å", + "control": "button", + "description": "Hide telemetry element title." + } + ] + }, + { + "items": [ + { + "method": "remove", + "control": "button", + "glyph": "Z" + } + ] + } + ] + } + } + ], + "representations": [ + { + "key": "frame", + "templateUrl": "templates/frame.html" + } + ], + "controllers": [ + { + "key": "LayoutController", + "implementation": LayoutController, + "depends": [ + "$scope" + ] + }, + { + "key": "FixedController", + "implementation": FixedController, + "depends": [ + "$scope", + "$q", + "dialogService", + "telemetryHandler", + "telemetryFormatter", + "throttle" + ] + } + ], + "templates": [ + { + "key": "fixed.telemetry", + "templateUrl": "templates/elements/telemetry.html" + }, + { + "key": "fixed.box", + "templateUrl": "templates/elements/box.html" + }, + { + "key": "fixed.line", + "templateUrl": "templates/elements/line.html" + }, + { + "key": "fixed.text", + "templateUrl": "templates/elements/text.html" + }, + { + "key": "fixed.image", + "templateUrl": "templates/elements/image.html" + } + ], + "policies": [ + { + "category": "composition", + "implementation": LayoutCompositionPolicy + } + ], + "types": [ + { + "key": "layout", + "name": "Display Layout", + "glyph": "L", + "description": "A layout in which multiple telemetry panels may be displayed.", + "features": "creation", + "model": { + "composition": [] + }, + "properties": [ + { + "name": "Layout Grid", + "control": "composite", + "pattern": "^(\\d*[1-9]\\d*)?$", + "items": [ + { + "name": "Horizontal grid (px)", + "control": "textfield", + "cssclass": "l-small l-numeric" + }, + { + "name": "Vertical grid (px)", + "control": "textfield", + "cssclass": "l-small l-numeric" + } + ], + "key": "layoutGrid", + "conversion": "number[]" + } + ] + }, + { + "key": "telemetry.panel", + "name": "Telemetry Panel", + "glyph": "t", + "description": "A panel for collecting telemetry elements.", + "delegates": [ + "telemetry" + ], + "features": "creation", + "contains": [ + { + "has": "telemetry" + } + ], + "model": { + "composition": [] + }, + "properties": [ + { + "name": "Layout Grid", + "control": "composite", + "items": [ + { + "name": "Horizontal grid (px)", + "control": "textfield", + "cssclass": "l-small l-numeric" + }, + { + "name": "Vertical grid (px)", + "control": "textfield", + "cssclass": "l-small l-numeric" + } + ], + "pattern": "^(\\d*[1-9]\\d*)?$", + "property": "layoutGrid", + "conversion": "number[]" + } + ] + } + ] + } + }); +}); diff --git a/platform/features/pages/bundle.js b/platform/features/pages/bundle.js new file mode 100644 index 0000000000..b7c7ce03c5 --- /dev/null +++ b/platform/features/pages/bundle.js @@ -0,0 +1,74 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/EmbeddedPageController", + 'legacyRegistry' +], function ( + EmbeddedPageController, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/pages", { + "extensions": { + "types": [ + { + "key": "example.page", + "name": "Web Page", + "glyph": "ê", + "description": "A component to display a web page or image with a valid URL. Can be added to a Display Layout.", + "features": [ + "creation" + ], + "properties": [ + { + "key": "url", + "name": "URL", + "control": "textfield", + "pattern": "^(ftp|https?)\\:\\/\\/\\w+(\\.\\w+)*(\\:\\d+)?(\\/\\S*)*$", + "required": true + } + ] + } + ], + "views": [ + { + "templateUrl": "iframe.html", + "name": "Page", + "type": "example.page", + "key": "example.page" + } + ], + "controllers": [ + { + "key": "EmbeddedPageController", + "implementation": EmbeddedPageController, + "depends": [ + "$sce" + ] + } + ] + } + }); +}); diff --git a/platform/features/plot/bundle.js b/platform/features/plot/bundle.js new file mode 100644 index 0000000000..18eba3aa51 --- /dev/null +++ b/platform/features/plot/bundle.js @@ -0,0 +1,92 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/MCTChart", + "./src/PlotController", + "./src/policies/PlotViewPolicy", + 'legacyRegistry' +], function ( + MCTChart, + PlotController, + PlotViewPolicy, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/plot", { + "name": "Plot view for telemetry", + "extensions": { + "views": [ + { + "name": "Plot", + "key": "plot", + "glyph": "6", + "templateUrl": "templates/plot.html", + "needs": [ + "telemetry" + ], + "priority": "preferred", + "delegation": true + } + ], + "directives": [ + { + "key": "mctChart", + "implementation": MCTChart, + "depends": [ + "$interval", + "$log" + ] + } + ], + "controllers": [ + { + "key": "PlotController", + "implementation": PlotController, + "depends": [ + "$scope", + "telemetryFormatter", + "telemetryHandler", + "throttle", + "PLOT_FIXED_DURATION" + ] + } + ], + "constants": [ + { + "key": "PLOT_FIXED_DURATION", + "value": 900000, + "priority": "fallback", + "comment": "Fifteen minutes." + } + ], + "policies": [ + { + "category": "view", + "implementation": PlotViewPolicy + } + ] + } + }); +}); diff --git a/platform/features/rtevents/bundle.js b/platform/features/rtevents/bundle.js new file mode 100644 index 0000000000..8efaf072bd --- /dev/null +++ b/platform/features/rtevents/bundle.js @@ -0,0 +1,82 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/RTEventListController", + "./src/directives/MCTRTDataTable", + "./src/policies/RTMessagesViewPolicy", + 'legacyRegistry' +], function ( + RTEventListController, + MCTRTDataTable, + RTMessagesViewPolicy, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/rtevents", { + "name": "Event Messages", + "description": "List of time-ordered event messages", + "extensions": { + "views": [ + { + "key": "rtmessages", + "name": "RT Messages", + "glyph": "5", + "description": "Scrolling list of real time messages.", + "templateUrl": "templates/rtmessages.html", + "needs": [ + "telemetry" + ], + "delegation": true + } + ], + "controllers": [ + { + "key": "RTEventListController", + "implementation": RTEventListController, + "depends": [ + "$scope", + "telemetryHandler", + "telemetryFormatter" + ] + } + ], + "directives": [ + { + "key": "mctRtDataTable", + "implementation": MCTRTDataTable, + "depends": [ + "$window" + ] + } + ], + "policies": [ + { + "category": "view", + "implementation": RTMessagesViewPolicy + } + ] + } + }); +}); diff --git a/platform/features/rtscrolling/bundle.js b/platform/features/rtscrolling/bundle.js new file mode 100644 index 0000000000..d0b8f68f10 --- /dev/null +++ b/platform/features/rtscrolling/bundle.js @@ -0,0 +1,63 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/RTScrollingListController", + 'legacyRegistry' +], function ( + RTScrollingListController, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/rtscrolling", { + "name": "Scrolling Lists", + "description": "Time-ordered list of latest data.", + "extensions": { + "views": [ + { + "key": "scrolling", + "name": "Scrolling", + "glyph": "5", + "description": "Scrolling list of data values.", + "templateUrl": "templates/rtscrolling.html", + "needs": [ + "telemetry" + ], + "delegation": true + } + ], + "controllers": [ + { + "key": "RTScrollingListController", + "implementation": RTScrollingListController, + "depends": [ + "$scope", + "telemetryHandler", + "telemetryFormatter" + ] + } + ] + } + }); +}); diff --git a/platform/features/scrolling/bundle.js b/platform/features/scrolling/bundle.js new file mode 100644 index 0000000000..546fb6a06b --- /dev/null +++ b/platform/features/scrolling/bundle.js @@ -0,0 +1,62 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/ScrollingListController", + 'legacyRegistry' +], function ( + ScrollingListController, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/scrolling", { + "name": "Scrolling Lists", + "description": "Time-ordered list of latest data.", + "extensions": { + "views": [ + { + "key": "scrolling", + "name": "Scrolling", + "glyph": "5", + "description": "Scrolling list of data values.", + "templateUrl": "templates/scrolling.html", + "needs": [ + "telemetry" + ], + "delegation": true + } + ], + "controllers": [ + { + "key": "ScrollingListController", + "implementation": ScrollingListController, + "depends": [ + "$scope", + "telemetryFormatter" + ] + } + ] + } + }); +}); diff --git a/platform/features/static-markup/bundle.js b/platform/features/static-markup/bundle.js new file mode 100644 index 0000000000..63dfe3ac0b --- /dev/null +++ b/platform/features/static-markup/bundle.js @@ -0,0 +1,56 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + + 'legacyRegistry' +], function ( + + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/static-markup", { + "extensions": { + "types": [ + { + "key": "static.markup", + "name": "Static Markup", + "glyph": "p", + "description": "Static markup sandbox", + "features": [ + "creation" + ] + } + ], + "views": [ + { + "templateUrl": "markup.html", + "name": "Static Markup", + "type": "static.markup", + "key": "static.markup" + } + ] + } + }); +}); diff --git a/platform/features/timeline/bundle.js b/platform/features/timeline/bundle.js new file mode 100644 index 0000000000..584b051ae8 --- /dev/null +++ b/platform/features/timeline/bundle.js @@ -0,0 +1,521 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/controllers/TimelineController", + "./src/controllers/TimelineGraphController", + "./src/controllers/TimelineDateTimeController", + "./src/controllers/TimelineZoomController", + "./src/controllers/TimelineTickController", + "./src/controllers/TimelineTableController", + "./src/controllers/TimelineGanttController", + "./src/controllers/ActivityModeValuesController", + "./src/capabilities/ActivityTimespanCapability", + "./src/capabilities/TimelineTimespanCapability", + "./src/capabilities/UtilizationCapability", + "./src/capabilities/GraphCapability", + "./src/capabilities/CostCapability", + "./src/directives/MCTSwimlaneDrop", + "./src/directives/MCTSwimlaneDrag", + "./src/services/ObjectLoader", + 'legacyRegistry' +], function ( + TimelineController, + TimelineGraphController, + TimelineDateTimeController, + TimelineZoomController, + TimelineTickController, + TimelineTableController, + TimelineGanttController, + ActivityModeValuesController, + ActivityTimespanCapability, + TimelineTimespanCapability, + UtilizationCapability, + GraphCapability, + CostCapability, + MCTSwimlaneDrop, + MCTSwimlaneDrag, + ObjectLoader, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/features/timeline", { + "name": "Timelines", + "description": "Resources, templates, CSS, and code for Timelines.", + "resources": "res", + "extensions": { + "constants": [ + { + "key": "TIMELINE_MINIMUM_DURATION", + "description": "The minimum duration to display in a timeline view (one hour.)", + "value": 3600000 + }, + { + "key": "TIMELINE_MAXIMUM_OFFSCREEN", + "description": "Maximum amount, in pixels, of a Gantt bar which may go off screen.", + "value": 1000 + }, + { + "key": "TIMELINE_ZOOM_CONFIGURATION", + "description": "Describes major tick sizes in milliseconds, and width in pixels.", + "value": { + "levels": [ + 1000, + 2000, + 5000, + 10000, + 20000, + 30000, + 60000, + 120000, + 300000, + 600000, + 1200000, + 1800000, + 3600000, + 7200000, + 14400000, + 28800000, + 43200000, + 86400000 + ], + "width": 200 + } + } + ], + "types": [ + { + "key": "timeline", + "name": "Timeline", + "glyph": "S", + "description": "A container for arranging Timelines and Activities in time.", + "features": [ + "creation" + ], + "contains": [ + "timeline", + "activity" + ], + "properties": [ + { + "name": "Start date/time", + "control": "timeline-datetime", + "required": true, + "property": [ + "start" + ], + "options": [ + "SET" + ] + }, + { + "name": "Battery capacity (Watt-hours)", + "control": "textfield", + "required": false, + "conversion": "number", + "property": [ + "capacity" + ], + "pattern": "^-?\\d+(\\.\\d*)?$" + } + ], + "model": { + "composition": [] + } + }, + { + "key": "activity", + "name": "Activity", + "glyph": "a", + "features": [ + "creation" + ], + "contains": [ + "activity" + ], + "description": "An action that takes place in time. You can define a start time and duration. Activities can be nested within other Activities, or within Timelines.", + "properties": [ + { + "name": "Start date/time", + "control": "timeline-datetime", + "required": true, + "property": [ + "start" + ], + "options": [ + "SET" + ] + }, + { + "name": "Duration", + "control": "duration", + "required": true, + "property": [ + "duration" + ] + } + ], + "model": { + "composition": [], + "relationships": { + "modes": [] + } + } + }, + { + "key": "mode", + "name": "Activity Mode", + "glyph": "A", + "features": [ + "creation" + ], + "description": "Define resource utilizations over time, then apply to an Activity.", + "model": { + "resources": { + "comms": 0, + "power": 0 + } + }, + "properties": [ + { + "name": "Comms (Kbps)", + "control": "textfield", + "conversion": "number", + "pattern": "^-?\\d+(\\.\\d*)?$", + "property": [ + "resources", + "comms" + ] + }, + { + "name": "Power (watts)", + "control": "textfield", + "conversion": "number", + "pattern": "^-?\\d+(\\.\\d*)?$", + "property": [ + "resources", + "power" + ] + } + ] + } + ], + "views": [ + { + "key": "values", + "name": "Values", + "glyph": "A", + "templateUrl": "templates/values.html", + "type": "mode", + "uses": [ + "cost" + ], + "editable": false + }, + { + "key": "timeline", + "name": "Timeline", + "glyph": "S", + "type": "timeline", + "description": "A timeline view of Timelines and Activities.", + "templateUrl": "templates/timeline.html", + "toolbar": { + "sections": [ + { + "items": [ + { + "method": "add", + "glyph": "+", + "control": "menu-button", + "text": "Add", + "options": [ + { + "name": "Timeline", + "glyph": "S", + "key": "timeline" + }, + { + "name": "Activity", + "glyph": "a", + "key": "activity" + } + ] + } + ] + }, + { + "items": [ + { + "glyph": "é", + "description": "Graph resource utilization", + "control": "button", + "method": "toggleGraph" + }, + { + "glyph": "A", + "control": "dialog-button", + "description": "Apply Activity Modes...", + "title": "Apply Activity Modes", + "dialog": { + "control": "selector", + "name": "Modes", + "type": "mode" + }, + "property": "modes" + }, + { + "glyph": "è", + "description": "Edit Activity Link", + "title": "Activity Link", + "control": "dialog-button", + "dialog": { + "control": "textfield", + "name": "Link", + "pattern": "^(ftp|https?)\\:\\/\\/\\w+(\\.\\w+)*(\\:\\d+)?(\\/\\S*)*$" + }, + "property": "link" + }, + { + "glyph": "G", + "description": "Edit Properties...", + "control": "button", + "method": "properties" + } + ] + }, + { + "items": [ + { + "method": "remove", + "description": "Remove item", + "control": "button", + "glyph": "Z" + } + ] + } + ] + } + } + ], + "stylesheets": [ + { + "stylesheetUrl": "css/timeline.css" + }, + { + "stylesheetUrl": "css/timeline-espresso.css", + "theme": "espresso" + }, + { + "stylesheetUrl": "css/timeline-snow.css", + "theme": "snow" + } + ], + "representations": [ + { + "key": "gantt", + "templateUrl": "templates/activity-gantt.html", + "uses": [ + "timespan", + "type" + ] + } + ], + "templates": [ + { + "key": "timeline-tabular-swimlane-cols-tree", + "priority": "mandatory", + "templateUrl": "templates/tabular-swimlane-cols-tree.html" + }, + { + "key": "timeline-tabular-swimlane-cols-data", + "priority": "mandatory", + "templateUrl": "templates/tabular-swimlane-cols-data.html" + }, + { + "key": "timeline-resource-graphs", + "priority": "mandatory", + "templateUrl": "templates/resource-graphs.html" + }, + { + "key": "timeline-resource-graph-labels", + "priority": "mandatory", + "templateUrl": "templates/resource-graph-labels.html" + }, + { + "key": "timeline-legend-item", + "priority": "mandatory", + "templateUrl": "templates/legend-item.html" + }, + { + "key": "timeline-ticks", + "priority": "mandatory", + "templateUrl": "templates/ticks.html" + } + ], + "controls": [ + { + "key": "timeline-datetime", + "templateUrl": "templates/controls/datetime.html" + }, + { + "key": "duration", + "templateUrl": "templates/controls/datetime.html" + } + ], + "controllers": [ + { + "key": "TimelineController", + "implementation": TimelineController, + "depends": [ + "$scope", + "$q", + "objectLoader", + "TIMELINE_MINIMUM_DURATION" + ] + }, + { + "key": "TimelineGraphController", + "implementation": TimelineGraphController, + "depends": [ + "$scope", + "resources[]" + ] + }, + { + "key": "TimelineDateTimeController", + "implementation": TimelineDateTimeController, + "depends": [ + "$scope" + ] + }, + { + "key": "TimelineZoomController", + "implementation": TimelineZoomController, + "depends": [ + "$scope", + "TIMELINE_ZOOM_CONFIGURATION" + ] + }, + { + "key": "TimelineTickController", + "implementation": TimelineTickController + }, + { + "key": "TimelineTableController", + "implementation": TimelineTableController + }, + { + "key": "TimelineGanttController", + "implementation": TimelineGanttController, + "depends": [ + "TIMELINE_MAXIMUM_OFFSCREEN" + ] + }, + { + "key": "ActivityModeValuesController", + "implementation": ActivityModeValuesController, + "depends": [ + "resources[]" + ] + } + ], + "capabilities": [ + { + "key": "timespan", + "implementation": ActivityTimespanCapability, + "depends": [ + "$q" + ] + }, + { + "key": "timespan", + "implementation": TimelineTimespanCapability, + "depends": [ + "$q" + ] + }, + { + "key": "utilization", + "implementation": UtilizationCapability, + "depends": [ + "$q" + ] + }, + { + "key": "graph", + "implementation": GraphCapability, + "depends": [ + "$q" + ] + }, + { + "key": "cost", + "implementation": CostCapability + } + ], + "directives": [ + { + "key": "mctSwimlaneDrop", + "implementation": MCTSwimlaneDrop, + "depends": [ + "dndService" + ] + }, + { + "key": "mctSwimlaneDrag", + "implementation": MCTSwimlaneDrag, + "depends": [ + "dndService" + ] + } + ], + "services": [ + { + "key": "objectLoader", + "implementation": ObjectLoader, + "depends": [ + "$q" + ] + } + ], + "resources": [ + { + "key": "power", + "name": "Power", + "units": "watts" + }, + { + "key": "comms", + "name": "Comms", + "units": "Kbps" + }, + { + "key": "battery", + "name": "Battery State-of-Charge", + "units": "%" + } + ] + } + }); +}); diff --git a/platform/forms/bundle.js b/platform/forms/bundle.js new file mode 100644 index 0000000000..43c76d18ae --- /dev/null +++ b/platform/forms/bundle.js @@ -0,0 +1,131 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/MCTForm", + "./src/MCTToolbar", + "./src/MCTControl", + "./src/controllers/DateTimeController", + "./src/controllers/CompositeController", + "./src/controllers/ColorController", + "./src/controllers/DialogButtonController", + 'legacyRegistry' +], function ( + MCTForm, + MCTToolbar, + MCTControl, + DateTimeController, + CompositeController, + ColorController, + DialogButtonController, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/forms", { + "name": "MCT Forms", + "description": "Form generator; includes directive and some controls.", + "extensions": { + "directives": [ + { + "key": "mctForm", + "implementation": MCTForm + }, + { + "key": "mctToolbar", + "implementation": MCTToolbar + }, + { + "key": "mctControl", + "implementation": MCTControl, + "depends": [ + "controls[]" + ] + } + ], + "controls": [ + { + "key": "checkbox", + "templateUrl": "templates/controls/checkbox.html" + }, + { + "key": "datetime", + "templateUrl": "templates/controls/datetime.html" + }, + { + "key": "select", + "templateUrl": "templates/controls/select.html" + }, + { + "key": "textfield", + "templateUrl": "templates/controls/textfield.html" + }, + { + "key": "button", + "templateUrl": "templates/controls/button.html" + }, + { + "key": "color", + "templateUrl": "templates/controls/color.html" + }, + { + "key": "composite", + "templateUrl": "templates/controls/composite.html" + }, + { + "key": "menu-button", + "templateUrl": "templates/controls/menu-button.html" + }, + { + "key": "dialog-button", + "templateUrl": "templates/controls/dialog.html" + } + ], + "controllers": [ + { + "key": "DateTimeController", + "implementation": DateTimeController, + "depends": [ + "$scope" + ] + }, + { + "key": "CompositeController", + "implementation": CompositeController + }, + { + "key": "ColorController", + "implementation": ColorController + }, + { + "key": "DialogButtonController", + "implementation": DialogButtonController, + "depends": [ + "$scope", + "dialogService" + ] + } + ] + } + }); +}); diff --git a/platform/framework/bundle.js b/platform/framework/bundle.js new file mode 100644 index 0000000000..13aea540d8 --- /dev/null +++ b/platform/framework/bundle.js @@ -0,0 +1,112 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + + 'legacyRegistry' +], function ( + + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/framework", { + "name": "Open MCT Web Framework Component", + "description": "Framework layer for Open MCT Web; interprets bundle definitions and serves as an intermediary between Require and Angular", + "libraries": "lib", + "configuration": { + "paths": { + "angular": "angular.min" + }, + "shim": { + "angular": { + "exports": "angular" + } + } + }, + "extensions": { + "licenses": [ + { + "name": "Blanket.js", + "version": "1.1.5", + "description": "Code coverage measurement and reporting", + "author": "Alex Seville", + "website": "http://blanketjs.org/", + "copyright": "Copyright (c) 2013 Alex Seville", + "license": "license-mit", + "link": "http://opensource.org/licenses/MIT" + }, + { + "name": "Jasmine", + "version": "1.3.1", + "description": "Unit testing", + "author": "Pivotal Labs", + "website": "http://jasmine.github.io/", + "copyright": "Copyright (c) 2008-2011 Pivotal Labs", + "license": "license-mit", + "link": "http://opensource.org/licenses/MIT" + }, + { + "name": "RequireJS", + "version": "2.1.9", + "description": "Script loader", + "author": "The Dojo Foundation", + "website": "http://requirejs.org/", + "copyright": "Copyright (c) 2010-2015, The Dojo Foundation", + "license": "license-mit", + "link": "https://github.com/jrburke/requirejs/blob/master/LICENSE" + }, + { + "name": "AngularJS", + "version": "1.2.26", + "description": "Client-side web application framework", + "author": "Google", + "website": "http://angularjs.org/", + "copyright": "Copyright (c) 2010-2014 Google, Inc. http://angularjs.org", + "license": "license-mit", + "link": "https://github.com/angular/angular.js/blob/v1.2.26/LICENSE" + }, + { + "name": "Angular-Route", + "version": "1.2.26", + "description": "Client-side view routing", + "author": "Google", + "website": "http://angularjs.org/", + "copyright": "Copyright (c) 2010-2014 Google, Inc. http://angularjs.org", + "license": "license-mit", + "link": "https://github.com/angular/angular.js/blob/v1.2.26/LICENSE" + }, + { + "name": "ES6-Promise", + "version": "2.0.0", + "description": "Promise polyfill for pre-ECMAScript 6 browsers", + "author": "Yehuda Katz, Tom Dale, Stefan Penner and contributors", + "website": "https://github.com/jakearchibald/es6-promise", + "copyright": "Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors", + "license": "license-mit", + "link": "https://github.com/jakearchibald/es6-promise/blob/master/LICENSE" + } + ] + } + }); +}); diff --git a/platform/identity/bundle.js b/platform/identity/bundle.js new file mode 100644 index 0000000000..280019293c --- /dev/null +++ b/platform/identity/bundle.js @@ -0,0 +1,88 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/IdentityAggregator", + "./src/IdentityProvider", + "./src/IdentityCreationDecorator", + "./src/IdentityIndicator", + 'legacyRegistry' +], function ( + IdentityAggregator, + IdentityProvider, + IdentityCreationDecorator, + IdentityIndicator, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/identity", { + "extensions": { + "components": [ + { + "implementation": IdentityAggregator, + "type": "aggregator", + "provides": "identityService", + "depends": [ + "$q" + ] + }, + { + "implementation": IdentityProvider, + "type": "provider", + "provides": "identityService", + "depends": [ + "$q" + ], + "priority": "fallback" + }, + { + "type": "decorator", + "provides": "creationService", + "implementation": IdentityCreationDecorator, + "depends": [ + "identityService" + ] + } + ], + "indicators": [ + { + "implementation": IdentityIndicator, + "depends": [ + "identityService" + ] + } + ], + "types": [ + { + "properties": [ + { + "key": "creator", + "name": "Creator" + } + ] + } + ] + } + }); +}); diff --git a/platform/persistence/aggregator/bundle.js b/platform/persistence/aggregator/bundle.js new file mode 100644 index 0000000000..c53fecd427 --- /dev/null +++ b/platform/persistence/aggregator/bundle.js @@ -0,0 +1,47 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/PersistenceAggregator", + 'legacyRegistry' +], function ( + PersistenceAggregator, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/persistence/aggregator", { + "extensions": { + "components": [ + { + "provides": "persistenceService", + "type": "aggregator", + "depends": [ + "$q" + ], + "implementation": PersistenceAggregator + } + ] + } + }); +}); diff --git a/platform/persistence/cache/bundle.js b/platform/persistence/cache/bundle.js new file mode 100644 index 0000000000..4450a72c8a --- /dev/null +++ b/platform/persistence/cache/bundle.js @@ -0,0 +1,49 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/CachingPersistenceDecorator", + 'legacyRegistry' +], function ( + CachingPersistenceDecorator, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/persistence/cache", { + "name": "Persistence cache", + "description": "Cache to improve availability of persisted objects.", + "extensions": { + "components": [ + { + "provides": "persistenceService", + "type": "decorator", + "implementation": CachingPersistenceDecorator, + "depends": [ + "PERSISTENCE_SPACE" + ] + } + ] + } + }); +}); diff --git a/platform/persistence/couch/bundle.js b/platform/persistence/couch/bundle.js new file mode 100644 index 0000000000..1045fe2bed --- /dev/null +++ b/platform/persistence/couch/bundle.js @@ -0,0 +1,79 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/CouchPersistenceProvider", + "./src/CouchIndicator", + 'legacyRegistry' +], function ( + CouchPersistenceProvider, + CouchIndicator, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/persistence/couch", { + "name": "Couch Persistence", + "description": "Adapter to read and write objects using a CouchDB instance.", + "extensions": { + "components": [ + { + "provides": "persistenceService", + "type": "provider", + "implementation": CouchPersistenceProvider, + "depends": [ + "$http", + "$q", + "PERSISTENCE_SPACE", + "COUCHDB_PATH" + ] + } + ], + "constants": [ + { + "key": "PERSISTENCE_SPACE", + "value": "mct" + }, + { + "key": "COUCHDB_PATH", + "value": "/couch/openmct" + }, + { + "key": "COUCHDB_INDICATOR_INTERVAL", + "value": 15000 + } + ], + "indicators": [ + { + "implementation": CouchIndicator, + "depends": [ + "$http", + "$interval", + "COUCHDB_PATH", + "COUCHDB_INDICATOR_INTERVAL" + ] + } + ] + } + }); +}); diff --git a/platform/persistence/elastic/bundle.js b/platform/persistence/elastic/bundle.js new file mode 100644 index 0000000000..a830caacbe --- /dev/null +++ b/platform/persistence/elastic/bundle.js @@ -0,0 +1,98 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/ElasticPersistenceProvider", + "./src/ElasticSearchProvider", + "./src/ElasticIndicator", + 'legacyRegistry' +], function ( + ElasticPersistenceProvider, + ElasticSearchProvider, + ElasticIndicator, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/persistence/elastic", { + "name": "ElasticSearch Persistence", + "description": "Adapter to read and write objects using an ElasticSearch instance.", + "extensions": { + "components": [ + { + "provides": "persistenceService", + "type": "provider", + "implementation": ElasticPersistenceProvider, + "depends": [ + "$http", + "$q", + "PERSISTENCE_SPACE", + "ELASTIC_ROOT", + "ELASTIC_PATH" + ] + }, + { + "provides": "searchService", + "type": "provider", + "implementation": ElasticSearchProvider, + "depends": [ + "$http", + "ELASTIC_ROOT" + ] + } + ], + "constants": [ + { + "key": "PERSISTENCE_SPACE", + "value": "mct" + }, + { + "key": "ELASTIC_ROOT", + "value": "http://localhost:9200", + "priority": "fallback" + }, + { + "key": "ELASTIC_PATH", + "value": "mct/domain_object", + "priority": "fallback" + }, + { + "key": "ELASTIC_INDICATOR_INTERVAL", + "value": 15000, + "priority": "fallback" + } + ], + "indicators": [ + { + "implementation": ElasticIndicator, + "depends": [ + "$http", + "$interval", + "ELASTIC_ROOT", + "ELASTIC_INDICATOR_INTERVAL" + ] + } + ] + } + }); +}); diff --git a/platform/persistence/local/bundle.js b/platform/persistence/local/bundle.js new file mode 100644 index 0000000000..93f9895407 --- /dev/null +++ b/platform/persistence/local/bundle.js @@ -0,0 +1,61 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/LocalStoragePersistenceProvider", + "./src/LocalStorageIndicator", + 'legacyRegistry' +], function ( + LocalStoragePersistenceProvider, + LocalStorageIndicator, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/persistence/local", { + "extensions": { + "components": [ + { + "provides": "persistenceService", + "type": "provider", + "implementation": LocalStoragePersistenceProvider, + "depends": [ + "$q", + "PERSISTENCE_SPACE" + ] + } + ], + "constants": [ + { + "key": "PERSISTENCE_SPACE", + "value": "mct" + } + ], + "indicators": [ + { + "implementation": LocalStorageIndicator + } + ] + } + }); +}); diff --git a/platform/persistence/queue/bundle.js b/platform/persistence/queue/bundle.js new file mode 100644 index 0000000000..473e91a06d --- /dev/null +++ b/platform/persistence/queue/bundle.js @@ -0,0 +1,81 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/QueuingPersistenceCapabilityDecorator", + "./src/PersistenceQueue", + "./src/PersistenceFailureController", + 'legacyRegistry' +], function ( + QueuingPersistenceCapabilityDecorator, + PersistenceQueue, + PersistenceFailureController, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/persistence/queue", { + "extensions": { + "components": [ + { + "type": "decorator", + "provides": "capabilityService", + "implementation": QueuingPersistenceCapabilityDecorator, + "depends": [ + "persistenceQueue" + ] + } + ], + "services": [ + { + "key": "persistenceQueue", + "implementation": PersistenceQueue, + "depends": [ + "$q", + "$timeout", + "dialogService", + "PERSISTENCE_QUEUE_DELAY" + ] + } + ], + "constants": [ + { + "key": "PERSISTENCE_QUEUE_DELAY", + "value": 5 + } + ], + "templates": [ + { + "key": "persistence-failure-dialog", + "templateUrl": "templates/persistence-failure-dialog.html" + } + ], + "controllers": [ + { + "key": "PersistenceFailureController", + "implementation": PersistenceFailureController + } + ] + } + }); +}); diff --git a/platform/policy/bundle.js b/platform/policy/bundle.js new file mode 100644 index 0000000000..a5dfa31f65 --- /dev/null +++ b/platform/policy/bundle.js @@ -0,0 +1,70 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/PolicyActionDecorator", + "./src/PolicyViewDecorator", + "./src/PolicyProvider", + 'legacyRegistry' +], function ( + PolicyActionDecorator, + PolicyViewDecorator, + PolicyProvider, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/policy", { + "name": "Policy Service", + "description": "Provides support for extension-driven decisions.", + "sources": "src", + "extensions": { + "components": [ + { + "type": "decorator", + "provides": "actionService", + "implementation": PolicyActionDecorator, + "depends": [ + "policyService" + ] + }, + { + "type": "decorator", + "provides": "viewService", + "implementation": PolicyViewDecorator, + "depends": [ + "policyService" + ] + }, + { + "type": "provider", + "provides": "policyService", + "implementation": PolicyProvider, + "depends": [ + "policies[]" + ] + } + ] + } + }); +}); diff --git a/platform/representation/bundle.js b/platform/representation/bundle.js new file mode 100644 index 0000000000..5ac366d91a --- /dev/null +++ b/platform/representation/bundle.js @@ -0,0 +1,170 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/MCTInclude", + "./src/MCTRepresentation", + "./src/gestures/DragGesture", + "./src/gestures/DropGesture", + "./src/gestures/ContextMenuGesture", + "./src/gestures/GestureProvider", + "./src/gestures/GestureRepresenter", + "./src/services/DndService", + "./src/TemplateLinker", + "./src/actions/ContextMenuAction", + "./src/TemplatePrefetcher", + 'legacyRegistry' +], function ( + MCTInclude, + MCTRepresentation, + DragGesture, + DropGesture, + ContextMenuGesture, + GestureProvider, + GestureRepresenter, + DndService, + TemplateLinker, + ContextMenuAction, + TemplatePrefetcher, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/representation", { + "extensions": { + "directives": [ + { + "key": "mctInclude", + "implementation": MCTInclude, + "depends": [ + "templates[]", + "templateLinker" + ] + }, + { + "key": "mctRepresentation", + "implementation": MCTRepresentation, + "depends": [ + "representations[]", + "views[]", + "representers[]", + "$q", + "templateLinker", + "$log" + ] + } + ], + "gestures": [ + { + "key": "drag", + "implementation": DragGesture, + "depends": [ + "$log", + "dndService" + ] + }, + { + "key": "drop", + "implementation": DropGesture, + "depends": [ + "dndService", + "$q" + ] + }, + { + "key": "menu", + "implementation": ContextMenuGesture, + "depends": [ + "$timeout", + "agentService" + ] + } + ], + "components": [ + { + "provides": "gestureService", + "type": "provider", + "implementation": GestureProvider, + "depends": [ + "gestures[]" + ] + } + ], + "representers": [ + { + "implementation": GestureRepresenter, + "depends": [ + "gestureService" + ] + } + ], + "services": [ + { + "key": "dndService", + "implementation": DndService, + "depends": [ + "$log" + ] + }, + { + "key": "templateLinker", + "implementation": TemplateLinker, + "depends": [ + "$templateRequest", + "$sce", + "$compile", + "$log" + ], + "comment": "For internal use by mct-include and mct-representation." + } + ], + "actions": [ + { + "key": "menu", + "implementation": ContextMenuAction, + "depends": [ + "$compile", + "$document", + "$rootScope", + "popupService", + "agentService" + ] + } + ], + "runs": [ + { + "priority": "mandatory", + "implementation": TemplatePrefetcher, + "depends": [ + "templateLinker", + "templates[]", + "views[]", + "representations[]", + "controls[]", + "containers[]" + ] + } + ] + } + }); +}); diff --git a/platform/search/bundle.js b/platform/search/bundle.js new file mode 100644 index 0000000000..3ad0c8b77f --- /dev/null +++ b/platform/search/bundle.js @@ -0,0 +1,128 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/controllers/SearchController", + "./src/controllers/SearchMenuController", + "./src/controllers/ClickAwayController", + "./src/services/GenericSearchProvider", + "./src/services/SearchAggregator", + 'legacyRegistry' +], function ( + SearchController, + SearchMenuController, + ClickAwayController, + GenericSearchProvider, + SearchAggregator, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/search", { + "name": "Search", + "description": "Allows the user to search through the file tree.", + "extensions": { + "constants": [ + { + "key": "GENERIC_SEARCH_ROOTS", + "value": [ + "ROOT" + ], + "priority": "fallback" + } + ], + "controllers": [ + { + "key": "SearchController", + "implementation": SearchController, + "depends": [ + "$scope", + "searchService" + ] + }, + { + "key": "SearchMenuController", + "implementation": SearchMenuController, + "depends": [ + "$scope", + "types[]" + ] + }, + { + "key": "ClickAwayController", + "implementation": ClickAwayController, + "depends": [ + "$scope", + "$document" + ] + } + ], + "representations": [ + { + "key": "search-item", + "templateUrl": "templates/search-item.html" + } + ], + "templates": [ + { + "key": "search", + "templateUrl": "templates/search.html" + }, + { + "key": "search-menu", + "templateUrl": "templates/search-menu.html" + } + ], + "components": [ + { + "provides": "searchService", + "type": "provider", + "implementation": GenericSearchProvider, + "depends": [ + "$q", + "$log", + "modelService", + "workerService", + "topic", + "GENERIC_SEARCH_ROOTS" + ] + }, + { + "provides": "searchService", + "type": "aggregator", + "implementation": SearchAggregator, + "depends": [ + "$q", + "objectService" + ] + } + ], + "workers": [ + { + "key": "genericSearchWorker", + "scriptUrl": "services/GenericSearchWorker.js" + } + ] + } + }); +}); diff --git a/platform/status/bundle.js b/platform/status/bundle.js new file mode 100644 index 0000000000..a1f8041067 --- /dev/null +++ b/platform/status/bundle.js @@ -0,0 +1,64 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/StatusRepresenter", + "./src/StatusCapability", + "./src/StatusService", + 'legacyRegistry' +], function ( + StatusRepresenter, + StatusCapability, + StatusService, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/status", { + "extensions": { + "representers": [ + { + "implementation": StatusRepresenter + } + ], + "capabilities": [ + { + "key": "status", + "implementation": StatusCapability, + "depends": [ + "statusService" + ] + } + ], + "services": [ + { + "key": "statusService", + "implementation": StatusService, + "depends": [ + "topic" + ] + } + ] + } + }); +}); diff --git a/platform/telemetry/bundle.js b/platform/telemetry/bundle.js new file mode 100644 index 0000000000..06d3c923ed --- /dev/null +++ b/platform/telemetry/bundle.js @@ -0,0 +1,130 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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([ + "./src/TelemetryAggregator", + "./src/TelemetryController", + "./src/TelemetryCapability", + "./src/TelemetryFormatter", + "./src/TelemetrySubscriber", + "./src/TelemetryHandler", + 'legacyRegistry' +], function ( + TelemetryAggregator, + TelemetryController, + TelemetryCapability, + TelemetryFormatter, + TelemetrySubscriber, + TelemetryHandler, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/telemetry", { + "name": "Data bundle", + "description": "Interfaces and infrastructure for real-time and historical data", + "configuration": { + "paths": { + "moment": "moment.min" + }, + "shim": { + "moment": { + "exports": "moment" + } + } + }, + "extensions": { + "components": [ + { + "provides": "telemetryService", + "type": "aggregator", + "implementation": TelemetryAggregator, + "depends": [ + "$q" + ] + } + ], + "controllers": [ + { + "key": "TelemetryController", + "implementation": TelemetryController, + "depends": [ + "$scope", + "$q", + "$timeout", + "$log" + ] + } + ], + "capabilities": [ + { + "key": "telemetry", + "implementation": TelemetryCapability, + "depends": [ + "$injector", + "$q", + "$log" + ] + } + ], + "services": [ + { + "key": "telemetryFormatter", + "implementation": TelemetryFormatter, + "depends": [ + "formatService", + "DEFAULT_TIME_FORMAT" + ] + }, + { + "key": "telemetrySubscriber", + "implementation": TelemetrySubscriber, + "depends": [ + "$q", + "$timeout" + ] + }, + { + "key": "telemetryHandler", + "implementation": TelemetryHandler, + "depends": [ + "$q", + "telemetrySubscriber" + ] + } + ], + "licenses": [ + { + "name": "Moment.js", + "version": "2.7.0", + "author": "Tim Wood, Iskren Chernev, Moment.js contributors", + "description": "Time/date parsing/formatting", + "website": "http://momentjs.com", + "copyright": "Copyright (c) 2011-2014 Tim Wood, Iskren Chernev, Moment.js contributors", + "license": "license-mit", + "link": "https://raw.githubusercontent.com/moment/moment/develop/LICENSE" + } + ] + } + }); +}); From 52579fefe133f6f80fa502123778047633e300bc Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 15:29:19 -0800 Subject: [PATCH 17/37] [API] Simplify RequireJS config --- main.js | 6 +++--- platform/framework/src/Main.js | 11 ----------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/main.js b/main.js index 64548ece3e..72432d0f05 100644 --- a/main.js +++ b/main.js @@ -23,9 +23,9 @@ requirejs.config({ "paths": { - "legacyRegistry": "./src/legacyRegistry", - "angular": "./platform/framework/lib/angular.min", - "angular-route": "./platform/framework/lib/angular-route.min", + "legacyRegistry": "src/legacyRegistry", + "angular": "platform/framework/lib/angular.min", + "angular-route": "platform/framework/lib/angular-route.min", "moment": 'platform/telemetry/lib/moment.min', "moment-duration-format": 'platform/features/clock/lib/moment-duration-format', "uuid": 'platform/core/lib/uuid' diff --git a/platform/framework/src/Main.js b/platform/framework/src/Main.js index 936461bfaf..cc11b699e4 100644 --- a/platform/framework/src/Main.js +++ b/platform/framework/src/Main.js @@ -21,17 +21,6 @@ *****************************************************************************/ /*global define, window, requirejs*/ -requirejs.config({ - "shim": { - "../lib/angular.min": { - "exports": "angular" - }, - "../lib/angular-route.min": { - "deps": [ "../lib/angular.min" ] - } - } -}); - /** * Implements the framework layer, which handles the loading of bundles * and the wiring-together of the extensions they expose. From 9babe7167e6945f722c1f322c8fed53aaa87c099 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 15:56:09 -0800 Subject: [PATCH 18/37] [API] Enable strict DI ...to facilitate detection of any issues with optimizability of legacy support for imperative registration. --- platform/framework/src/bootstrap/ApplicationBootstrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/framework/src/bootstrap/ApplicationBootstrapper.js b/platform/framework/src/bootstrap/ApplicationBootstrapper.js index f191bbbdaa..490017885a 100644 --- a/platform/framework/src/bootstrap/ApplicationBootstrapper.js +++ b/platform/framework/src/bootstrap/ApplicationBootstrapper.js @@ -59,7 +59,7 @@ define( $log = this.$log; $log.info("Bootstrapping application " + (app || {}).name); angular.element(document).ready(function () { - angular.bootstrap(document, [app.name]); + angular.bootstrap(document, [app.name], { strictDi: true }); }); }; From 7728d308f2d43fc9a3da75a87947e543beb676e2 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 16:03:36 -0800 Subject: [PATCH 19/37] [API] Obey strict DI rules Fix unintended implicit DI usage in configuration --- platform/framework/src/LogLevel.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/platform/framework/src/LogLevel.js b/platform/framework/src/LogLevel.js index 973811ca07..fbf69e8dcd 100644 --- a/platform/framework/src/LogLevel.js +++ b/platform/framework/src/LogLevel.js @@ -90,12 +90,10 @@ define( } decorate($log); - app.config(function ($provide) { - $provide.decorator('$log', function ($delegate) { - decorate($delegate); - return $delegate; - }); - }); + app.decorator('$log', ['$delegate', function ($delegate) { + decorate($delegate); + return $delegate; + }]); }; return LogLevel; From 2b4d6c111c08333386ce62a350428171eeb18171 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 7 Jan 2016 16:04:23 -0800 Subject: [PATCH 20/37] [API] Fix logging of paths When extensions have an explicitly-declared implementation, do not log that they are being loaded. --- platform/framework/src/load/Extension.js | 2 +- .../src/resolve/ExtensionResolver.js | 21 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/platform/framework/src/load/Extension.js b/platform/framework/src/load/Extension.js index 4339aeac27..7b07f879dc 100644 --- a/platform/framework/src/load/Extension.js +++ b/platform/framework/src/load/Extension.js @@ -133,7 +133,7 @@ define( * @returns {string} path to implementation, or undefined */ Extension.prototype.getImplementationPath = function () { - return this.definition.implementation ? + return (this.hasImplementation() && !this.hasImplementationValue()) ? this.bundle.getSourcePath(this.definition.implementation) : undefined; }; diff --git a/platform/framework/src/resolve/ExtensionResolver.js b/platform/framework/src/resolve/ExtensionResolver.js index d0e30124de..567a399213 100644 --- a/platform/framework/src/resolve/ExtensionResolver.js +++ b/platform/framework/src/resolve/ExtensionResolver.js @@ -61,10 +61,9 @@ define( $log = this.$log; function loadImplementation(extension) { - var implPath = extension.getImplementationPath(), - implPromise = extension.hasImplementationValue() ? + var implPromise = extension.hasImplementationValue() ? Promise.resolve(extension.getImplementationValue()) : - loader.load(implPath), + loader.load(extension.getImplementationPath()), definition = extension.getDefinition(); // Wrap a constructor function (to avoid modifying the original) @@ -119,13 +118,15 @@ define( return extension.getDefinition(); } - // Log that loading has begun - $log.info([ - "Loading implementation ", - implPath, - " for extension ", - extension.getLogName() - ].join("")); + if (!extension.hasImplementationValue()) { + // Log that loading has begun + $log.info([ + "Loading implementation ", + extension.getImplementationPath(), + " for extension ", + extension.getLogName() + ].join("")); + } return implPromise.then(attachDefinition, handleError); } From 1443ab61e3a9307de86cd26873bb441b6646660e Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 09:42:38 -0800 Subject: [PATCH 21/37] [API] Obey strict DI from FormController --- platform/forms/src/MCTForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/forms/src/MCTForm.js b/platform/forms/src/MCTForm.js index 0629fbfd21..ce48ed1572 100644 --- a/platform/forms/src/MCTForm.js +++ b/platform/forms/src/MCTForm.js @@ -66,7 +66,7 @@ define( templateUrl: templatePath, // Use FormController to populate/respond to changes in scope - controller: FormController, + controller: [ '$scope', FormController ], // Initial an isolate scope scope: { From 72c721b60564295951a2965d5548be7d88a70c54 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 09:54:02 -0800 Subject: [PATCH 22/37] [API] Remove bundles.json ...and make its usage optional. --- app.js | 34 ++++++++++-------- bundles.json | 38 --------------------- platform/framework/src/load/BundleLoader.js | 15 +++++++- 3 files changed, 34 insertions(+), 53 deletions(-) delete mode 100644 bundles.json diff --git a/app.js b/app.js index 12ef392ab3..3063c10314 100644 --- a/app.js +++ b/app.js @@ -40,20 +40,26 @@ } // Override bundles.json for HTTP requests - app.use('/' + BUNDLE_FILE, function (req, res) { - var bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8')); - - // Handle command line inclusions/exclusions - bundles = bundles.concat(options.include); - bundles = bundles.filter(function (bundle) { - return options.exclude.indexOf(bundle) === -1; - }); - bundles = bundles.filter(function (bundle, index) { // Uniquify - return bundles.indexOf(bundle) === index; - }); - - res.send(JSON.stringify(bundles)); - }); + //app.use('/' + BUNDLE_FILE, function (req, res) { + // var bundles; + // + // try { + // bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8')); + // } catch (e) { + // bundles = []; + // } + // + // // Handle command line inclusions/exclusions + // bundles = bundles.concat(options.include); + // bundles = bundles.filter(function (bundle) { + // return options.exclude.indexOf(bundle) === -1; + // }); + // bundles = bundles.filter(function (bundle, index) { // Uniquify + // return bundles.indexOf(bundle) === index; + // }); + // + // res.send(JSON.stringify(bundles)); + //}); // Expose everything else as static files app.use(express['static']('.')); diff --git a/bundles.json b/bundles.json deleted file mode 100644 index 852179dddb..0000000000 --- a/bundles.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - "platform/framework", - "platform/core", - "platform/representation", - "platform/commonUI/about", - "platform/commonUI/edit", - "platform/commonUI/dialog", - "platform/commonUI/formats", - "platform/commonUI/general", - "platform/commonUI/inspect", - "platform/commonUI/mobile", - "platform/commonUI/themes/espresso", - "platform/commonUI/notification", - "platform/containment", - "platform/execution", - "platform/telemetry", - "platform/features/clock", - "platform/features/events", - "platform/features/imagery", - "platform/features/layout", - "platform/features/pages", - "platform/features/plot", - "platform/features/scrolling", - "platform/features/timeline", - "platform/forms", - "platform/identity", - "platform/persistence/aggregator", - "platform/persistence/local", - "platform/persistence/queue", - "platform/policy", - "platform/entanglement", - "platform/search", - "platform/status", - - "example/imagery", - "example/eventGenerator", - "example/generator" -] diff --git a/platform/framework/src/load/BundleLoader.js b/platform/framework/src/load/BundleLoader.js index ee6fb0a0e9..9389207ea8 100644 --- a/platform/framework/src/load/BundleLoader.js +++ b/platform/framework/src/load/BundleLoader.js @@ -130,7 +130,20 @@ define( // Load all bundles named in the referenced file. The file is // presumed to be a JSON file function loadBundlesFromFile(listFile) { - return getJSON(listFile).then(loadBundlesFromArray); + function handleError(err) { + $log.info([ + "No external bundles loaded;", + "could not load bundle listing in", + listFile, + "due to error", + err.status, + err.statusText + ].join(' ')); + return loadBundlesFromArray([]); + } + + return getJSON(listFile) + .then(loadBundlesFromArray, handleError); } return Array.isArray(bundles) ? loadBundlesFromArray(bundles) : From 39c1a885d87036337a4ad204e335b19306a1dd83 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 12:06:12 -0800 Subject: [PATCH 23/37] [API] Enable code coverage Enable code coverage reporting from npm-executed tests. --- karma.conf.js | 12 ++++++++++-- package.json | 11 ++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 16175556ae..e42e783159 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -34,6 +34,7 @@ module.exports = function(config) { // List of files / patterns to load in the browser. // By default, files are also included in a script tag. files: [ + {pattern: 'src/**/*.js', included: false}, {pattern: 'example/**/*.js', included: false}, {pattern: 'platform/**/*.js', included: false}, {pattern: 'warp/**/*.js', included: false}, @@ -47,12 +48,14 @@ module.exports = function(config) { // Preprocess matching files before serving them to the browser. // https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: {}, + preprocessors: { + '**/src/**/!(*Spec).js': [ 'coverage' ] + }, // Test results reporter to use // Possible values: 'dots', 'progress' // Available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], + reporters: ['progress', 'coverage'], // Web server port. port: 9876, @@ -71,6 +74,11 @@ module.exports = function(config) { 'Chrome' ], + // Code coverage reporting. + coverageReporter: { + dir: "target/coverage" + }, + // Continuous Integration mode. // If true, Karma captures browsers, runs the tests and exits. singleRun: false diff --git a/package.json b/package.json index e753aa7bfb..4a0523aa18 100644 --- a/package.json +++ b/package.json @@ -7,23 +7,24 @@ "minimist": "^1.1.1" }, "devDependencies": { + "canvas": "^1.2.7", + "glob": ">= 3.0.0", "jasmine-core": "^2.3.0", "jsdoc": "^3.3.2", "jshint": "^2.7.0", "karma": "^0.12.31", "karma-chrome-launcher": "^0.1.8", "karma-cli": "0.0.4", + "karma-coverage": "^0.5.3", "karma-jasmine": "^0.1.5", "karma-phantomjs-launcher": "^0.1.4", "karma-requirejs": "^0.2.2", - "requirejs": "^2.1.17", + "markdown-toc": "^0.11.7", "marked": "^0.3.5", - "glob": ">= 3.0.0", - "split": "^1.0.0", "mkdirp": "^0.5.1", "nomnoml": "^0.0.3", - "canvas": "^1.2.7", - "markdown-toc": "^0.11.7" + "requirejs": "^2.1.17", + "split": "^1.0.0" }, "scripts": { "start": "node app.js", From 82094477a3ead59f65a76ccea04368ef359b00ad Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 12:10:42 -0800 Subject: [PATCH 24/37] [API] Run npm tests during maven build --- pom.xml | 62 +++++++++++++++++++++------------------------------------ 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/pom.xml b/pom.xml index 4cbecfb368..10997a2fc5 100644 --- a/pom.xml +++ b/pom.xml @@ -80,52 +80,36 @@ - + - com.github.klieber - phantomjs-maven-plugin - 0.2.1 + com.github.eirslett + frontend-maven-plugin + 0.0.26 + + target + v0.12.2 + 2.7.6 + + install node and npm - install + install-node-and-npm + + + + npm install + + npm + + + + javascript tests + + karma - - 1.9.2 - - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.1 - - - - Jasmine Specs - test - - exec - - - - . - - platform/framework/test/lib/run_jasmine_test.coffee - test.html - ${project.build.directory}/platform-test-results.html - - - - - - - ${phantomjs.binary} - From aa63308e0b391c5892eabb57841d9a78004326bc Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 12:16:32 -0800 Subject: [PATCH 25/37] [API Refactor] Fix JSLint failures Fix JSLint failures by excluding top-level code, and by explicitly declaring variable require. --- docs/src/guide/index.md | 4 ++-- karma.conf.js | 2 +- platform/framework/src/FrameworkLayer.js | 2 ++ pom.xml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/src/guide/index.md b/docs/src/guide/index.md index 8451210d35..7c3e78de61 100644 --- a/docs/src/guide/index.md +++ b/docs/src/guide/index.md @@ -2245,7 +2245,7 @@ options. The sources can be deployed in the same directory structure used during development. A few utilities are included to support development processes. ## Command-line Build -Open MCT Web includes a script for building via command line using Maven 3.0.4 +Open MCT Web includes a script for building via command line using Maven 3.3.9 https://maven.apache.org/ . Invoking mvn clean install will: @@ -2435,4 +2435,4 @@ The following configuration constants are recognized by Open MCT Web bundles: * `ELASTIC_ROOT`: URL or path to the ElasticSearch instance to be used for domain object persistence. Should not include a trailing slash. * `ELASTIC_PATH`: Path relative to the ElasticSearch instance where domain - object models should be persisted. Should take the form `/`. \ No newline at end of file + object models should be persisted. Should take the form `/`. diff --git a/karma.conf.js b/karma.conf.js index e42e783159..9e2204af26 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -81,6 +81,6 @@ module.exports = function(config) { // Continuous Integration mode. // If true, Karma captures browsers, runs the tests and exits. - singleRun: false + singleRun: true }); }; diff --git a/platform/framework/src/FrameworkLayer.js b/platform/framework/src/FrameworkLayer.js index 753eb91dfe..4cffd465cc 100644 --- a/platform/framework/src/FrameworkLayer.js +++ b/platform/framework/src/FrameworkLayer.js @@ -22,6 +22,7 @@ /*global define, window, requirejs*/ define([ + 'require', './Constants', './FrameworkInitializer', './LogLevel', @@ -35,6 +36,7 @@ define([ './register/ExtensionSorter', './bootstrap/ApplicationBootstrapper' ], function ( + require, Constants, FrameworkInitializer, LogLevel, diff --git a/pom.xml b/pom.xml index 10997a2fc5..b113c09702 100644 --- a/pom.xml +++ b/pom.xml @@ -146,7 +146,7 @@ ${basedir} **/lib/** - app.js + *.js node_modules/**/* protractor/**/* From 65c0cc66b642b084d9dbec90f4cfa2034f603eac Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 12:57:19 -0800 Subject: [PATCH 26/37] [API Refactor] Add HTML reporting Write HTML reports of test successes/failures to simplify handling of test failures; pre-existing HTML test runner is incompatible with changes to the way bundles are loaded. --- karma.conf.js | 7 ++++++- package.json | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/karma.conf.js b/karma.conf.js index 9e2204af26..1547f1991f 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -55,7 +55,7 @@ module.exports = function(config) { // Test results reporter to use // Possible values: 'dots', 'progress' // Available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress', 'coverage'], + reporters: ['progress', 'coverage', 'html'], // Web server port. port: 9876, @@ -79,6 +79,11 @@ module.exports = function(config) { dir: "target/coverage" }, + // HTML test reporting. + htmlReporter: { + outputDir: "target/tests" + }, + // Continuous Integration mode. // If true, Karma captures browsers, runs the tests and exits. singleRun: true diff --git a/package.json b/package.json index 4a0523aa18..6e16fa72a7 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "karma-chrome-launcher": "^0.1.8", "karma-cli": "0.0.4", "karma-coverage": "^0.5.3", + "karma-html-reporter": "^0.2.7", "karma-jasmine": "^0.1.5", "karma-phantomjs-launcher": "^0.1.4", "karma-requirejs": "^0.2.2", From df631ba40e4329fce3d325240d85742ce6b8474f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 12:58:06 -0800 Subject: [PATCH 27/37] [API Refactor] Update failing specs --- platform/forms/test/MCTFormSpec.js | 18 ++++++++++++------ platform/framework/test/LogLevelSpec.js | 17 ++++++----------- .../framework/test/load/BundleLoaderSpec.js | 9 ++++++++- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/platform/forms/test/MCTFormSpec.js b/platform/forms/test/MCTFormSpec.js index f8ae249585..37f4b4f6c2 100644 --- a/platform/forms/test/MCTFormSpec.js +++ b/platform/forms/test/MCTFormSpec.js @@ -30,6 +30,12 @@ define( var mockScope, mctForm; + function installController() { + var controllerProperty = mctForm.controller, + Controller = mctForm.controller[1]; + return new Controller(mockScope); + } + beforeEach(function () { mockScope = jasmine.createSpyObj("$scope", [ "$watch" ]); mockScope.$parent = {}; @@ -44,7 +50,7 @@ define( // mct-form needs to watch for the form by name // in order to convey changes in $valid, $dirty, etc // up to the parent scope. - mctForm.controller(mockScope); + installController(); expect(mockScope.$watch).toHaveBeenCalledWith( "mctForm", @@ -56,7 +62,7 @@ define( var someState = { someKey: "some value" }; mockScope.name = "someName"; - mctForm.controller(mockScope); + installController(); mockScope.$watch.mostRecentCall.args[1](someState); @@ -65,7 +71,7 @@ define( it("allows strings to be converted to RegExps", function () { // This is needed to support ng-pattern in the template - mctForm.controller(mockScope); + installController(); // Should have added getRegExp to the scope, // to convert strings to regular expressions @@ -78,7 +84,7 @@ define( regExp; // Add getRegExp to scope - mctForm.controller(mockScope); + installController(); regExp = mockScope.getRegExp(strRegExp); // Same object instance each time... @@ -91,7 +97,7 @@ define( var regExp = /^\d+[a-d]$/; // Add getRegExp to scope - mctForm.controller(mockScope); + installController(); // Should have added getRegExp to the scope, // to convert strings to regular expressions @@ -100,7 +106,7 @@ define( it("passes a non-whitespace regexp when no pattern is defined", function () { // If no pattern is supplied, ng-pattern should match anything - mctForm.controller(mockScope); + installController(); expect(mockScope.getRegExp()).toEqual(/\S/); expect(mockScope.getRegExp(undefined)).toEqual(/\S/); }); diff --git a/platform/framework/test/LogLevelSpec.js b/platform/framework/test/LogLevelSpec.js index 6b21c08025..224db5186e 100644 --- a/platform/framework/test/LogLevelSpec.js +++ b/platform/framework/test/LogLevelSpec.js @@ -37,7 +37,6 @@ define( describe("The logging level handler", function () { var mockLog, mockApp, - mockProvide, mockDelegate, mockMethods; @@ -61,8 +60,7 @@ define( beforeEach(function () { mockMethods = jasmine.createSpyObj("levels", LOG_METHODS); mockLog = jasmine.createSpyObj('$log', LOG_METHODS); - mockApp = jasmine.createSpyObj('app', ['config']); - mockProvide = jasmine.createSpyObj('$provide', ['decorator']); + mockApp = jasmine.createSpyObj('app', ['config', 'decorator']); mockDelegate = jasmine.createSpyObj('$delegate', LOG_METHODS); LOG_METHODS.forEach(function (m) { @@ -70,14 +68,11 @@ define( mockDelegate[m].andCallFake(mockMethods[m]); }); - mockApp.config.andCallFake(function (callback) { - callback(mockProvide); - }); - - mockProvide.decorator.andCallFake(function (key, callback) { - // Only $log should be configured in any case - expect(key).toEqual('$log'); - callback(mockDelegate); + mockApp.decorator.andCallFake(function (key, decoration) { + // We only expect $log to be decorated + if (key === '$log' && decoration[0] === '$delegate') { + decoration[1](mockDelegate); + } }); }); diff --git a/platform/framework/test/load/BundleLoaderSpec.js b/platform/framework/test/load/BundleLoaderSpec.js index 55454903f6..3c6eb69bb6 100644 --- a/platform/framework/test/load/BundleLoaderSpec.js +++ b/platform/framework/test/load/BundleLoaderSpec.js @@ -34,6 +34,7 @@ define( mockCallback, mockHttp, mockLog, + mockRegistry, testBundles; // Used to wait for then-chain resolution; @@ -53,7 +54,13 @@ define( mockCallback = jasmine.createSpy("callback"); mockHttp = jasmine.createSpyObj("$http", ["get"]); mockLog = jasmine.createSpyObj("$log", ["error", "warn", "info", "debug"]); - loader = new BundleLoader(mockHttp, mockLog); + mockRegistry = jasmine.createSpyObj( + 'legacyRegistry', + [ 'list', 'contains', 'get' ] + ); + mockRegistry.list.andReturn([]); + mockRegistry.contains.andReturn(false); + loader = new BundleLoader(mockHttp, mockLog, mockRegistry); }); it("accepts a JSON file name and loads all bundles", function () { From 77e39f288213581a72050e2ce9de65861eea1e45 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 13:38:28 -0800 Subject: [PATCH 28/37] [API Refactor] Test legacy bundle registry --- karma.conf.js | 4 ++- src/BundleRegistrySpec.js | 75 +++++++++++++++++++++++++++++++++++++++ src/legacyRegistrySpec.js | 35 ++++++++++++++++++ 3 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 src/BundleRegistrySpec.js create mode 100644 src/legacyRegistrySpec.js diff --git a/karma.conf.js b/karma.conf.js index 1547f1991f..8ce816223c 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -81,7 +81,9 @@ module.exports = function(config) { // HTML test reporting. htmlReporter: { - outputDir: "target/tests" + outputDir: "target/tests", + preserveDescribeNesting: true, + foldAll: false }, // Continuous Integration mode. diff --git a/src/BundleRegistrySpec.js b/src/BundleRegistrySpec.js new file mode 100644 index 0000000000..d005209a42 --- /dev/null +++ b/src/BundleRegistrySpec.js @@ -0,0 +1,75 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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,Promise,describe,it,expect,beforeEach,waitsFor,runs,jasmine*/ + +define(['./BundleRegistry'], function (BundleRegistry) { + 'use strict'; + + describe("BundleRegistry", function () { + var testPath, + bundleRegistry; + + beforeEach(function () { + testPath = 'some/bundle'; + bundleRegistry = new BundleRegistry(); + }); + + it("initially lists no bundles", function () { + expect(bundleRegistry.list()).toEqual([]); + }); + + it("initially contains no bundles", function () { + expect(bundleRegistry.contains(testPath)) + .toBe(false); + }); + + it("initially provides no bundles", function () { + expect(bundleRegistry.get(testPath)) + .toBeUndefined(); + }); + + describe("when a bundle has been registered", function () { + var testBundleDef; + + beforeEach(function () { + testBundleDef = { someKey: "some value" }; + bundleRegistry.register(testPath, testBundleDef); + }); + + it("lists registered bundles", function () { + expect(bundleRegistry.list()).toEqual([testPath]); + }); + + it("contains registered bundles", function () { + expect(bundleRegistry.contains(testPath)) + .toBe(true); + }); + + it("provides registered bundles", function () { + expect(bundleRegistry.get(testPath)) + .toBe(testBundleDef); + }); + }); + + }); + +}); \ No newline at end of file diff --git a/src/legacyRegistrySpec.js b/src/legacyRegistrySpec.js new file mode 100644 index 0000000000..a4b37ea68a --- /dev/null +++ b/src/legacyRegistrySpec.js @@ -0,0 +1,35 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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,Promise,describe,it,expect,beforeEach,waitsFor,runs,jasmine*/ + +define([ + './legacyRegistry', + './BundleRegistry' +], function (legacyRegistry, BundleRegistry) { + 'use strict'; + + describe("legacyRegistry", function () { + it("is a BundleRegistry", function () { + expect(legacyRegistry instanceof BundleRegistry).toBe(true); + }); + }); +}); From ed63e326feb43954277edff84d8c420b81f60877 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 14:55:37 -0800 Subject: [PATCH 29/37] [API Refactor] Update documentation ...to reflect new manner in which tests are run. --- README.md | 41 +++++++++++++----------------- docs/src/guide/index.md | 55 ++++++++++++++--------------------------- 2 files changed, 35 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 6a412412ef..4b25ac5520 100644 --- a/README.md +++ b/README.md @@ -43,29 +43,24 @@ that Open MCT Web (and its build and tests) execute correctly. ## Tests -The repository for Open MCT Web includes a test suite that can be run -directly from the web browser, `test.html`. This page will: +Tests are written for [Jasmine 1.3](http://jasmine.github.io/1.3/introduction.html) +and run by [Karma](http://karma-runner.github.io). To run: -* Load `bundles.json` to determine which bundles are in the application. -* Load `test/suite.json` to determine which source files are to be tested. - This should contain an array of strings, where each is the name of an - AMD module in the bundle's source directory. For each source file: - * Code coverage instrumentation will be added, via Blanket. - * The associated test file will be loaded, via RequireJS. These will - be located in the bundle's test folder; the test runner will presume - these follow a naming convention where each module to be tested has a - corresponding test module with the suffix `Spec` in that folder. -* Jasmine will then be invoked to run all tests defined in the loaded - test modules. Code coverage reporting will be displayed at the bottom - of the test page. +`npm test` -At present, the test runner presumes that bundle conventions are followed -as above; that is, sources are contained in `src`, and tests are contained -in `test`. Additionally, individual test files must use the `Spec` suffix -as described above. +The test suite is configured to load any scripts ending with `Spec.js` found +in the `src` hierarchy. Full configuration details are found in +`karma.conf.js`. By convention, unit test scripts should be located +alongside the units that they test; for example, `src/foo/Bar.js` would be +tested by `src/foo/BarSpec.js`. (For legacy reasons, some existing tests may +be located in separate `test` folders near the units they test, but the +naming convention is otherwise the same.) + +### Test Reporting + +When `npm test` is run, test results will be written as HTML to +`target/tests`. Code coverage information is written to `target/coverage`. -An example of this is expressed in `platform/framework`, which follows -bundle conventions. ### Functional Testing @@ -84,8 +79,7 @@ To run: Open MCT Web includes a Maven command line build. Although Open MCT Web can be run as-is using the repository contents (that is, by viewing -`index.html` in a web browser), and its tests can be run in-place -similarly (that is, by viewing `test.html` in a browser), the command +`index.html` in a web browser), the command line build allows machine-driven verification and packaging. This build will: @@ -93,8 +87,7 @@ This build will: * Check all sources (excluding those in directories named `lib`) with JSLint for code style compliance. The build will fail if any sources do not satisfy JSLint. -* Run unit tests. This is done by running `test.html` in a PhantomJS - browser-like environment. The build will fail if any tests fail. +* Run the [unit test suite](#tests). * Package the application as a `war` (web archive) file. This is convenient for deployment on Tomcat or similar. This archive will include sources, resources, and libraries for bundles, as well diff --git a/docs/src/guide/index.md b/docs/src/guide/index.md index 7c3e78de61..b6994f8cf1 100644 --- a/docs/src/guide/index.md +++ b/docs/src/guide/index.md @@ -407,7 +407,7 @@ In addition to the directories defined in the bundle definition, a bundle will typically contain other directories not used at run-time. Additionally, some useful development scripts (such as the command line build and the test suite) expect this directory structure to be in use, and may ignore options chosen by -`b undle.json`. It is recommended that the directory structure described below be +`bundle.json`. It is recommended that the directory structure described below be used for new bundles. * `src`: Contains JavaScript sources for this bundle. May contain additional @@ -2263,50 +2263,31 @@ download build dependencies. ## Test Suite -Open MCT Web uses Jasmine http://jasmine.github.io/ for automated testing. -The file `test.html` included at the top level of the source repository, can be -run from the browser to perform tests for all active bundles, as defined in -`bundle.json`. +Open MCT Web uses [Jasmine 1.3](http://jasmine.github.io/) and +[Karma](http://karma-runner.github.io) for automated testing. -To define tests for a bundle: +The test suite is configured to load any scripts ending with `Spec.js` found +in the `src` hierarchy. Full configuration details are found in +`karma.conf.js`. By convention, unit test scripts should be located +alongside the units that they test; for example, `src/foo/Bar.js` would be +tested by `src/foo/BarSpec.js`. (For legacy reasons, some existing tests may +be located in separate `test` folders near the units they test, but the +naming convention is otherwise the same.) -* Include a directory named `test` within that bundle. -* In the `test` directory, include a file named `suite.json`. This will identify -which scripts will be tested. -* The file `suite.json` must contain a JSON array of strings, where each string -is the name of a script to be tested. These names should include any directory -paths to the script after (but not including) the `src` folder, and should not -include the file's `.js` extension. (Note that while Open MCT Web's framework -allows a different name to be chosen for the src directory, the test runner -does not: This directory must be named `src` for the test runner to find it.) -* For each script to be tested, a corresponding test script should be located in -the bundle's `test` directory. This should include the suffix Spec at the end of -the filename (but before the `.js` extension.) This test script should be an AMD -module which uses the Jasmine API to declare its test behavior. It should -declare an AMD dependency on the script to be tested, using a relative path. - -For example, if writing tests for a bundle at example/foo with two scripts: -* `example/foo/src/controllers/FooController.js` -* `example/foo/src/directives/FooDirective.js` - -First, these scripts should be identified in `example/foo/test/suite.json` e.g. -with contents:`[ "controllers/FooController", "directives/FooDirective" ]` - -Then, scripts which describe these tests should be written. For example, test -`example/foo/test/controllers/FooControllerSpec.js` could look like: +Tests are written as AMD modules which depend (at minimum) upon the +unit under test. For example, `src/foo/BarSpec.js` could look like: /*global define,Promise,describe,it,expect,beforeEach*/ define( - ["../../src/controllers/FooController"], - function (FooController) { + ["./Bar"], + function (Bar) { "use strict"; - - - describe("The foo controller", function () { + + describe("Bar", function () { it("does something", function () { - var controller = new FooController(); - expect(controller.foo()).toEqual("foo"); + var bar = new Bar(); + expect(controller.baz()).toEqual("foo"); }); }); } From 3bf2819c07e0b85ffa74921fc26adaa83b157d05 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 15:04:54 -0800 Subject: [PATCH 30/37] [API Refactor] Ignore target when linting --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index b113c09702..c27b89a9ee 100644 --- a/pom.xml +++ b/pom.xml @@ -149,6 +149,7 @@ *.js node_modules/**/* protractor/**/* + target/**/* From cacc295524655c987161dc23eacb9cf5d760d61c Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 15:29:58 -0800 Subject: [PATCH 31/37] [API Refactor] Move rebundle script ...out of top-level, into a scripts directory. --- package.json | 1 + pom.xml | 1 + template.txt => scripts/rebundle-template.txt | 0 rebundle.js => scripts/rebundle.js | 5 ++++- 4 files changed, 6 insertions(+), 1 deletion(-) rename template.txt => scripts/rebundle-template.txt (100%) rename rebundle.js => scripts/rebundle.js (93%) diff --git a/package.json b/package.json index 6e16fa72a7..753dd6b927 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "karma-jasmine": "^0.1.5", "karma-phantomjs-launcher": "^0.1.4", "karma-requirejs": "^0.2.2", + "lodash": "^3.10.1", "markdown-toc": "^0.11.7", "marked": "^0.3.5", "mkdirp": "^0.5.1", diff --git a/pom.xml b/pom.xml index c27b89a9ee..b6144c754e 100644 --- a/pom.xml +++ b/pom.xml @@ -150,6 +150,7 @@ node_modules/**/* protractor/**/* target/**/* + scripts/**/* diff --git a/template.txt b/scripts/rebundle-template.txt similarity index 100% rename from template.txt rename to scripts/rebundle-template.txt diff --git a/rebundle.js b/scripts/rebundle.js similarity index 93% rename from rebundle.js rename to scripts/rebundle.js index 100767132b..a25178d654 100644 --- a/rebundle.js +++ b/scripts/rebundle.js @@ -3,8 +3,11 @@ var glob = require('glob'), fs = require('fs'), + path = require('path'), _ = require('lodash'), - template = _.template(fs.readFileSync('template.txt', 'utf8')); + template = _.template( + fs.readFileSync(path.resolve(__dirname, 'template.txt'), 'utf8') + ); function indent(str, depth) { return _.trimLeft(str.split('\n').map(function (line) { From cec197f888200028b979644494a92c858e338120 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 15:32:18 -0800 Subject: [PATCH 32/37] [API Refactor] Remove bundle.json files --- example/builtins/bundle.json | 32 -- example/composite/bundle.json | 37 -- example/eventGenerator/bundle.json | 32 -- example/extensions/bundle.json | 16 - example/forms/bundle.json | 18 - example/generator/bundle.json | 90 ---- example/identity/bundle.json | 12 - example/imagery/bundle.json | 42 -- example/mobile/bundle.json | 12 - example/notifications/bundle.json | 47 --- example/persistence/bundle.json | 18 - example/policy/bundle.json | 12 - example/profiling/bundle.json | 14 - example/scratchpad/bundle.json | 23 -- example/taxonomy/bundle.json | 29 -- example/worker/bundle.json | 16 - platform/commonUI/about/bundle.json | 122 ------ platform/commonUI/browse/bundle.json | 185 --------- platform/commonUI/dialog/bundle.json | 48 --- platform/commonUI/edit/bundle.json | 130 ------ platform/commonUI/formats/bundle.json | 26 -- platform/commonUI/general/bundle.json | 306 -------------- platform/commonUI/inspect/bundle.json | 68 ---- platform/commonUI/mobile/bundle.json | 24 -- platform/commonUI/notification/bundle.json | 45 -- platform/commonUI/themes/espresso/bundle.json | 18 - platform/commonUI/themes/snow/bundle.json | 18 - platform/containment/bundle.json | 28 -- platform/core/bundle.json | 269 ------------ platform/entanglement/bundle.json | 115 ------ platform/execution/bundle.json | 11 - platform/features/clock/bundle.json | 178 -------- platform/features/conductor/bundle.json | 46 --- platform/features/events/bundle.json | 37 -- platform/features/imagery/bundle.json | 35 -- platform/features/layout/bundle.json | 267 ------------ platform/features/pages/bundle.json | 37 -- platform/features/plot/bundle.json | 50 --- platform/features/rtevents/bundle.json | 37 -- platform/features/rtscrolling/bundle.json | 25 -- platform/features/scrolling/bundle.json | 25 -- platform/features/static-markup/bundle.json | 21 - platform/features/timeline/bundle.json | 385 ------------------ platform/forms/bundle.json | 79 ---- platform/framework/bundle.json | 81 ---- platform/identity/bundle.json | 41 -- platform/persistence/aggregator/bundle.json | 12 - platform/persistence/cache/bundle.json | 14 - platform/persistence/couch/bundle.json | 39 -- platform/persistence/elastic/bundle.json | 52 --- platform/persistence/local/bundle.json | 23 -- platform/persistence/queue/bundle.json | 42 -- platform/policy/bundle.json | 27 -- platform/representation/bundle.json | 87 ---- platform/search/bundle.json | 73 ---- platform/status/bundle.json | 23 -- platform/telemetry/bundle.json | 67 --- 57 files changed, 3666 deletions(-) delete mode 100644 example/builtins/bundle.json delete mode 100644 example/composite/bundle.json delete mode 100644 example/eventGenerator/bundle.json delete mode 100644 example/extensions/bundle.json delete mode 100644 example/forms/bundle.json delete mode 100644 example/generator/bundle.json delete mode 100644 example/identity/bundle.json delete mode 100644 example/imagery/bundle.json delete mode 100644 example/mobile/bundle.json delete mode 100644 example/notifications/bundle.json delete mode 100644 example/persistence/bundle.json delete mode 100644 example/policy/bundle.json delete mode 100644 example/profiling/bundle.json delete mode 100644 example/scratchpad/bundle.json delete mode 100644 example/taxonomy/bundle.json delete mode 100644 example/worker/bundle.json delete mode 100644 platform/commonUI/about/bundle.json delete mode 100644 platform/commonUI/browse/bundle.json delete mode 100644 platform/commonUI/dialog/bundle.json delete mode 100644 platform/commonUI/edit/bundle.json delete mode 100644 platform/commonUI/formats/bundle.json delete mode 100644 platform/commonUI/general/bundle.json delete mode 100644 platform/commonUI/inspect/bundle.json delete mode 100644 platform/commonUI/mobile/bundle.json delete mode 100644 platform/commonUI/notification/bundle.json delete mode 100644 platform/commonUI/themes/espresso/bundle.json delete mode 100644 platform/commonUI/themes/snow/bundle.json delete mode 100644 platform/containment/bundle.json delete mode 100644 platform/core/bundle.json delete mode 100644 platform/entanglement/bundle.json delete mode 100644 platform/execution/bundle.json delete mode 100644 platform/features/clock/bundle.json delete mode 100644 platform/features/conductor/bundle.json delete mode 100644 platform/features/events/bundle.json delete mode 100644 platform/features/imagery/bundle.json delete mode 100644 platform/features/layout/bundle.json delete mode 100644 platform/features/pages/bundle.json delete mode 100644 platform/features/plot/bundle.json delete mode 100644 platform/features/rtevents/bundle.json delete mode 100644 platform/features/rtscrolling/bundle.json delete mode 100644 platform/features/scrolling/bundle.json delete mode 100644 platform/features/static-markup/bundle.json delete mode 100644 platform/features/timeline/bundle.json delete mode 100644 platform/forms/bundle.json delete mode 100644 platform/framework/bundle.json delete mode 100644 platform/identity/bundle.json delete mode 100644 platform/persistence/aggregator/bundle.json delete mode 100644 platform/persistence/cache/bundle.json delete mode 100644 platform/persistence/couch/bundle.json delete mode 100644 platform/persistence/elastic/bundle.json delete mode 100644 platform/persistence/local/bundle.json delete mode 100644 platform/persistence/queue/bundle.json delete mode 100644 platform/policy/bundle.json delete mode 100644 platform/representation/bundle.json delete mode 100644 platform/search/bundle.json delete mode 100644 platform/status/bundle.json delete mode 100644 platform/telemetry/bundle.json diff --git a/example/builtins/bundle.json b/example/builtins/bundle.json deleted file mode 100644 index dae92b2f5c..0000000000 --- a/example/builtins/bundle.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "Angular Built-ins Example", - "description": "Example showing how to declare extensions with built-in support from Angular.", - "sources": "src", - "extensions": { - "controllers": [ - { - "key": "ExampleController", - "implementation": "ExampleController.js", - "depends": [ "$scope", "exampleService" ] - } - ], - "directives": [ - { - "key": "exampleDirective", - "implementation": "ExampleDirective.js", - "depends": [ "examples[]" ] - } - ], - "routes": [ - { - "templateUrl": "templates/example.html" - } - ], - "services": [ - { - "key": "exampleService", - "implementation": "ExampleService.js" - } - ] - } -} \ No newline at end of file diff --git a/example/composite/bundle.json b/example/composite/bundle.json deleted file mode 100644 index 4ec72d0854..0000000000 --- a/example/composite/bundle.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "extensions": { - "components": [ - { - "implementation": "SomeProvider.js", - "provides": "someService", - "type": "provider" - }, - { - "implementation": "SomeOtherProvider.js", - "provides": "someService", - "type": "provider" - }, - { - "implementation": "SomeDecorator.js", - "provides": "someService", - "type": "decorator" - }, - { - "implementation": "SomeOtherDecorator.js", - "provides": "someService", - "type": "decorator" - }, - { - "implementation": "SomeAggregator.js", - "provides": "someService", - "type": "aggregator" - } - ], - "examples": [ - { - "implementation": "SomeOtherExample.js", - "depends": [ "someService" ] - } - ] - } -} \ No newline at end of file diff --git a/example/eventGenerator/bundle.json b/example/eventGenerator/bundle.json deleted file mode 100644 index b2ede6893b..0000000000 --- a/example/eventGenerator/bundle.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "Event Message Generator", - "description": "Example of a component that produces event data.", - "extensions": { - "components": [ - { - "implementation": "EventTelemetryProvider.js", - "type": "provider", - "provides": "telemetryService", - "depends": [ "$q", "$timeout" ] - } - ], - "types": [ - { - "key": "eventGenerator", - "name": "Event Message Generator", - "glyph": "f", - "description": "An event message generator", - "features": "creation", - "model": { - "telemetry": {} - }, - "telemetry": { - "source": "eventGenerator", - "ranges": [ - { "format": "string" } - ] - } - } - ] - } -} \ No newline at end of file diff --git a/example/extensions/bundle.json b/example/extensions/bundle.json deleted file mode 100644 index aca5319321..0000000000 --- a/example/extensions/bundle.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "Custom Extensions Examples", - "description": "Example showing how to declare custom extensions.", - "sources": "src", - "extensions": { - "examples": [ - { - "text": "I came from example/extensions" - }, - { - "implementation": "SomeExample.js", - "depends": [ "exampleService" ] - } - ] - } -} \ No newline at end of file diff --git a/example/forms/bundle.json b/example/forms/bundle.json deleted file mode 100644 index 9226e3780d..0000000000 --- a/example/forms/bundle.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "Declarative Forms example", - "sources": "src", - "extensions": { - "controllers": [ - { - "key": "ExampleFormController", - "implementation": "ExampleFormController.js", - "depends": [ "$scope" ] - } - ], - "routes": [ - { - "templateUrl": "templates/exampleForm.html" - } - ] - } -} \ No newline at end of file diff --git a/example/generator/bundle.json b/example/generator/bundle.json deleted file mode 100644 index 7cf1c7b6f2..0000000000 --- a/example/generator/bundle.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "name": "Sine Wave Generator", - "description": "Example of a component that produces dataa.", - "extensions": { - "components": [ - { - "implementation": "SinewaveTelemetryProvider.js", - "type": "provider", - "provides": "telemetryService", - "depends": [ "$q", "$timeout" ] - } - ], - "capabilities": [ - { - "key": "limit", - "implementation": "SinewaveLimitCapability.js" - } - ], - "formats": [ - { - "key": "example.delta", - "implementation": "SinewaveDeltaFormat.js" - } - ], - "constants": [ - { - "key": "TIME_CONDUCTOR_DOMAINS", - "value": [ - { "key": "time", "name": "Time" }, - { "key": "yesterday", "name": "Yesterday" }, - { "key": "delta", "name": "Delta", "format": "example.delta" } - ], - "priority": -1 - } - ], - "types": [ - { - "key": "generator", - "name": "Sine Wave Generator", - "glyph": "T", - "description": "A sine wave generator", - "features": "creation", - "model": { - "telemetry": { - "period": 10 - } - }, - "telemetry": { - "source": "generator", - "domains": [ - { - "key": "time", - "name": "Time" - }, - { - "key": "yesterday", - "name": "Yesterday" - }, - { - "key": "delta", - "name": "Delta", - "format": "example.delta" - } - ], - "ranges": [ - { - "key": "sin", - "name": "Sine" - }, - { - "key": "cos", - "name": "Cosine" - } - ] - }, - "properties": [ - { - "name": "Period", - "control": "textfield", - "cssclass": "l-small l-numeric", - "key": "period", - "required": true, - "property": [ "telemetry", "period" ], - "pattern": "^\\d*(\\.\\d*)?$" - } - ] - } - ] - } -} diff --git a/example/identity/bundle.json b/example/identity/bundle.json deleted file mode 100644 index 85704050e7..0000000000 --- a/example/identity/bundle.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extensions": { - "components": [ - { - "implementation": "ExampleIdentityService.js", - "provides": "identityService", - "type": "provider", - "depends": [ "dialogService" ] - } - ] - } -} diff --git a/example/imagery/bundle.json b/example/imagery/bundle.json deleted file mode 100644 index 1adcf4758d..0000000000 --- a/example/imagery/bundle.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "Imagery", - "description": "Example of a component that produces image telemetry.", - "extensions": { - "components": [ - { - "implementation": "ImageTelemetryProvider.js", - "type": "provider", - "provides": "telemetryService", - "depends": [ "$q", "$timeout" ] - } - ], - "types": [ - { - "key": "imagery", - "name": "Example Imagery", - "glyph": "T", - "features": "creation", - "model": { - "telemetry": {} - }, - "telemetry": { - "source": "imagery", - "domains": [ - { - "name": "Time", - "key": "time", - "format": "timestamp" - } - ], - "ranges": [ - { - "name": "Image", - "key": "url", - "format": "imageUrl" - } - ] - } - } - ] - } -} diff --git a/example/mobile/bundle.json b/example/mobile/bundle.json deleted file mode 100644 index 5b726dce44..0000000000 --- a/example/mobile/bundle.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Mobile", - "description": "Allows elements with pertinence to mobile usage and development", - "extensions": { - "stylesheets": [ - { - "stylesheetUrl": "css/mobile-example.css", - "priority": "mandatory" - } - ] - } -} diff --git a/example/notifications/bundle.json b/example/notifications/bundle.json deleted file mode 100644 index bb2d464d64..0000000000 --- a/example/notifications/bundle.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "extensions": { - "templates": [ - { - "key": "dialogLaunchTemplate", - "templateUrl": "dialog-launch.html" - }, - { - "key": "notificationLaunchTemplate", - "templateUrl": "notification-launch.html" - } - ], - "controllers": [ - { - "key": "DialogLaunchController", - "implementation": "DialogLaunchController.js", - "depends": [ - "$scope", - "$timeout", - "$log", - "dialogService", - "notificationService" - ] - }, - { - "key": "NotificationLaunchController", - "implementation": "NotificationLaunchController.js", - "depends": [ - "$scope", - "$timeout", - "$log", - "notificationService" - ] - } - ], - "indicators": [ - { - "implementation": "DialogLaunchIndicator.js", - "priority": "fallback" - }, - { - "implementation": "NotificationLaunchIndicator.js", - "priority": "fallback" - } - ] - } -} diff --git a/example/persistence/bundle.json b/example/persistence/bundle.json deleted file mode 100644 index ae746fc27f..0000000000 --- a/example/persistence/bundle.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extensions": { - "components": [ - { - "provides": "persistenceService", - "type": "provider", - "implementation": "BrowserPersistenceProvider.js", - "depends": [ "$q", "PERSISTENCE_SPACE" ] - } - ], - "constants": [ - { - "key": "PERSISTENCE_SPACE", - "value": "mct" - } - ] - } -} \ No newline at end of file diff --git a/example/policy/bundle.json b/example/policy/bundle.json deleted file mode 100644 index cec350ffd0..0000000000 --- a/example/policy/bundle.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Example Policy", - "description": "Provides an example of using policies to prohibit actions.", - "extensions": { - "policies": [ - { - "implementation": "ExamplePolicy.js", - "category": "action" - } - ] - } -} \ No newline at end of file diff --git a/example/profiling/bundle.json b/example/profiling/bundle.json deleted file mode 100644 index 25c1b10749..0000000000 --- a/example/profiling/bundle.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extensions": { - "indicators": [ - { - "implementation": "WatchIndicator.js", - "depends": ["$interval", "$rootScope"] - }, - { - "implementation": "DigestIndicator.js", - "depends": ["$interval", "$rootScope"] - } - ] - } -} diff --git a/example/scratchpad/bundle.json b/example/scratchpad/bundle.json deleted file mode 100644 index f95b467fd0..0000000000 --- a/example/scratchpad/bundle.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extensions": { - "roots": [ - { - "id": "scratch:root", - "model": { - "type": "folder", - "composition": [], - "name": "Scratchpad" - }, - "priority": "preferred" - } - ], - "components": [ - { - "provides": "persistenceService", - "type": "provider", - "implementation": "ScratchPersistenceProvider.js", - "depends": [ "$q" ] - } - ] - } -} diff --git a/example/taxonomy/bundle.json b/example/taxonomy/bundle.json deleted file mode 100644 index 167cadc055..0000000000 --- a/example/taxonomy/bundle.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "Example taxonomy", - "description": "Example illustrating the addition of a static top-level hierarchy", - "extensions": { - "roots": [ - { - "id": "exampleTaxonomy", - "model": { - "type": "folder", - "name": "Stub Subsystems", - "composition": [ - "examplePacket0", - "examplePacket1", - "examplePacket2" - ] - } - } - ], - "components": [ - { - "provides": "modelService", - "type": "provider", - "implementation": "ExampleTaxonomyModelProvider.js", - "depends": [ "$q" ] - } - ] - - } -} \ No newline at end of file diff --git a/example/worker/bundle.json b/example/worker/bundle.json deleted file mode 100644 index 2241aca2a6..0000000000 --- a/example/worker/bundle.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extensions": { - "indicators": [ - { - "implementation": "FibonacciIndicator.js", - "depends": [ "workerService", "$rootScope" ] - } - ], - "workers": [ - { - "key": "example.fibonacci", - "scriptUrl": "FibonacciWorker.js" - } - ] - } -} diff --git a/platform/commonUI/about/bundle.json b/platform/commonUI/about/bundle.json deleted file mode 100644 index d66ce5b8d7..0000000000 --- a/platform/commonUI/about/bundle.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "name": "About Open MCT Web", - "extensions": { - "templates": [ - { - "key": "app-logo", - "priority": "optional", - "templateUrl": "templates/app-logo.html" - }, - { - "key": "about-logo", - "priority": "preferred", - "templateUrl": "templates/about-logo.html" - }, - { - "key": "about-dialog", - "templateUrl": "templates/about-dialog.html" - }, - { - "key": "overlay-about", - "templateUrl": "templates/overlay-about.html" - }, - { - "key": "license-apache", - "templateUrl": "templates/license-apache.html" - }, - { - "key": "license-mit", - "templateUrl": "templates/license-mit.html" - } - ], - "controllers": [ - { - "key": "LogoController", - "depends": [ "overlayService" ], - "implementation": "LogoController.js" - }, - { - "key": "AboutController", - "depends": [ "versions[]", "$window" ], - "implementation": "AboutController.js" - }, - { - "key": "LicenseController", - "depends": [ "licenses[]" ], - "implementation": "LicenseController.js" - } - ], - "licenses": [ - { - "name": "Json.NET", - "version": "6.0.8", - "author": "Newtonsoft", - "description": "JSON serialization/deserialization", - "website": "http://www.newtonsoft.com/json", - "copyright": "Copyright (c) 2007 James Newton-King", - "license": "license-mit", - "link": "https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md" - }, - { - "name": "Nancy", - "version": "0.23.2", - "author": "Andreas Håkansson, Steven Robbins and contributors", - "description": "Embedded web server", - "website": "http://nancyfx.org/", - "copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors", - "license": "license-mit", - "link": "http://www.opensource.org/licenses/mit-license.php" - }, - { - "name": "Nancy.Hosting.Self", - "version": "0.23.2", - "author": "Andreas Håkansson, Steven Robbins and contributors", - "description": "Embedded web server", - "website": "http://nancyfx.org/", - "copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors", - "license": "license-mit", - "link": "http://www.opensource.org/licenses/mit-license.php" - }, - { - "name": "SuperSocket", - "version": "0.9.0.2", - "author": " Kerry Jiang", - "description": "Supports SuperWebSocket", - "website": "https://supersocket.codeplex.com/", - "copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)", - "license": "license-apache", - "link": "https://supersocket.codeplex.com/license" - }, - { - "name": "SuperWebSocket", - "version": "0.9.0.2", - "author": " Kerry Jiang", - "description": "WebSocket implementation for client-server communication", - "website": "https://superwebsocket.codeplex.com/", - "copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)", - "license": "license-apache", - "link": "https://superwebsocket.codeplex.com/license" - }, - { - "name": "log4net", - "version": "2.0.3", - "author": "Apache Software Foundation", - "description": "Logging", - "website": "http://logging.apache.org/log4net/", - "copyright": "Copyright © 2004-2015 Apache Software Foundation.", - "license": "license-apache", - "link": "http://logging.apache.org/log4net/license.html" - } - ], - "routes": [ - { - "when": "/licenses", - "templateUrl": "templates/licenses.html" - }, - { - "when": "/licenses-md", - "templateUrl": "templates/licenses-export-md.html" - } - ] - } -} \ No newline at end of file diff --git a/platform/commonUI/browse/bundle.json b/platform/commonUI/browse/bundle.json deleted file mode 100644 index e290f296ff..0000000000 --- a/platform/commonUI/browse/bundle.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "extensions": { - "routes": [ - { - "when": "/browse/:ids*", - "templateUrl": "templates/browse.html", - "reloadOnSearch": false - }, - { - "when": "", - "templateUrl": "templates/browse.html", - "reloadOnSearch": false - } - ], - "controllers": [ - { - "key": "BrowseController", - "implementation": "BrowseController.js", - "depends": [ - "$scope", - "$route", - "$location", - "objectService", - "navigationService", - "urlService" - ] - }, - { - "key": "PaneController", - "implementation": "PaneController.js", - "priority": "preferred", - "depends": [ "$scope", "agentService","$window" ] - }, - { - "key": "BrowseObjectController", - "implementation": "BrowseObjectController.js", - "depends": [ "$scope", "$location", "$route" ] - }, - { - "key": "CreateMenuController", - "implementation": "creation/CreateMenuController.js", - "depends": [ "$scope" ] - }, - { - "key": "LocatorController", - "implementation": "creation/LocatorController.js", - "depends": [ "$scope", "$timeout" ] - }, - { - "key": "MenuArrowController", - "implementation": "MenuArrowController.js", - "depends": [ "$scope" ] - } - ], - "controls": [ - { - "key": "locator", - "templateUrl": "templates/create/locator.html" - } - ], - "representations": [ - { - "key": "browse-object", - "templateUrl": "templates/browse-object.html", - "uses": [ "view" ] - }, - { - "key": "create-button", - "templateUrl": "templates/create/create-button.html" - }, - { - "key": "create-menu", - "templateUrl": "templates/create/create-menu.html", - "uses": [ "action" ] - }, - { - "key": "grid-item", - "templateUrl": "templates/items/grid-item.html", - "uses": [ "type", "action", "location" ], - "gestures": [ "info", "menu" ] - }, - { - "key": "object-header", - "templateUrl": "templates/browse/object-header.html", - "uses": [ "type" ] - }, - { - "key": "menu-arrow", - "templateUrl": "templates/menu-arrow.html", - "uses": [ "action" ], - "gestures": [ "menu" ] - }, - { - "key": "back-arrow", - "uses": [ "context" ], - "templateUrl": "templates/back-arrow.html" - } - ], - "services": [ - { - "key": "navigationService", - "implementation": "navigation/NavigationService.js" - } - ], - "policies": [ - { - "implementation": "creation/CreationPolicy.js", - "category": "creation" - } - ], - "actions": [ - { - "key": "navigate", - "implementation": "navigation/NavigateAction.js", - "depends": [ "navigationService", "$q" ] - }, - { - "key": "window", - "name": "Open In New Tab", - "implementation": "windowing/NewTabAction.js", - "description": "Open in a new browser tab", - "category": ["view-control", "contextual"], - "depends": [ "urlService", "$window" ], - "group": "windowing", - "glyph": "y", - "priority": "preferred" - }, - { - "key": "fullscreen", - "implementation": "windowing/FullscreenAction.js", - "category": "view-control", - "group": "windowing", - "glyph": "z", - "priority": "default" - } - ], - "views": [ - { - "key": "items", - "name": "Items", - "glyph": "9", - "description": "Grid of available items", - "templateUrl": "templates/items/items.html", - "uses": [ "composition" ], - "gestures": [ "drop" ], - "type": "folder", - "editable": false - } - ], - "components": [ - { - "key": "CreateActionProvider", - "provides": "actionService", - "type": "provider", - "implementation": "creation/CreateActionProvider.js", - "depends": [ "typeService", "dialogService", "creationService", "policyService" ] - }, - { - "key": "CreationService", - "provides": "creationService", - "type": "provider", - "implementation": "creation/CreationService.js", - "depends": [ "$q", "$log" ] - } - ], - "runs": [ - { - "implementation": "windowing/WindowTitler.js", - "depends": [ "navigationService", "$rootScope", "$document" ] - } - ], - "licenses": [ - { - "name": "screenfull.js", - "version": "1.2.0", - "description": "Wrapper for cross-browser usage of fullscreen API", - "author": "Sindre Sorhus", - "website": "https://github.com/sindresorhus/screenfull.js/", - "copyright": "Copyright (c) Sindre Sorhus (sindresorhus.com)", - "license": "license-mit", - "link": "https://github.com/sindresorhus/screenfull.js/blob/gh-pages/license" - } - ] - } -} diff --git a/platform/commonUI/dialog/bundle.json b/platform/commonUI/dialog/bundle.json deleted file mode 100644 index 80cd456c20..0000000000 --- a/platform/commonUI/dialog/bundle.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "extensions": { - "services": [ - { - "key": "dialogService", - "implementation": "DialogService.js", - "depends": [ "overlayService", "$q", "$log" ] - }, - { - "key": "overlayService", - "implementation": "OverlayService.js", - "depends": [ "$document", "$compile", "$rootScope" ] - } - ], - "templates": [ - { - "key": "overlay-dialog", - "templateUrl": "templates/overlay-dialog.html" - }, - { - "key": "overlay-options", - "templateUrl": "templates/overlay-options.html" - }, - { - "key": "form-dialog", - "templateUrl": "templates/dialog.html" - }, - { - "key": "overlay-blocking-message", - "templateUrl": "templates/overlay-blocking-message.html" - }, - { - "key": "message", - "templateUrl": "templates/message.html" - }, - { - "key": "overlay-message-list", - "templateUrl": "templates/overlay-message-list.html" - } - ], - "containers": [ - { - "key": "overlay", - "templateUrl": "templates/overlay.html" - } - ] - } -} \ No newline at end of file diff --git a/platform/commonUI/edit/bundle.json b/platform/commonUI/edit/bundle.json deleted file mode 100644 index c216a9d877..0000000000 --- a/platform/commonUI/edit/bundle.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "extensions": { - "routes": [ - { - "when": "/edit", - "templateUrl": "templates/edit.html" - } - ], - "controllers": [ - { - "key": "EditController", - "implementation": "controllers/EditController.js", - "depends": [ "$scope", "$q", "navigationService" ] - }, - { - "key": "EditActionController", - "implementation": "controllers/EditActionController.js", - "depends": [ "$scope" ] - }, - { - "key": "EditPanesController", - "implementation": "controllers/EditPanesController.js", - "depends": [ "$scope" ] - } - ], - "directives": [ - { - "key": "mctBeforeUnload", - "implementation": "directives/MCTBeforeUnload.js", - "depends": [ "$window" ] - } - ], - "actions": [ - { - "key": "compose", - "implementation": "actions/LinkAction.js" - }, - { - "key": "edit", - "implementation": "actions/EditAction.js", - "depends": [ "$location", "navigationService", "$log" ], - "description": "Edit this object.", - "category": "view-control", - "glyph": "p" - }, - { - "key": "properties", - "category": ["contextual", "view-control"], - "implementation": "actions/PropertiesAction.js", - "glyph": "p", - "name": "Edit Properties...", - "description": "Edit properties of this object.", - "depends": [ "dialogService" ] - }, - { - "key": "remove", - "category": "contextual", - "implementation": "actions/RemoveAction.js", - "glyph": "Z", - "name": "Remove", - "description": "Remove this object from its containing object.", - "depends": [ "$q", "navigationService" ] - }, - { - "key": "save", - "category": "conclude-editing", - "implementation": "actions/SaveAction.js", - "name": "Save", - "description": "Save changes made to these objects.", - "depends": [ "$location", "urlService" ], - "priority": "mandatory" - }, - { - "key": "cancel", - "category": "conclude-editing", - "implementation": "actions/CancelAction.js", - "name": "Cancel", - "description": "Discard changes made to these objects.", - "depends": [ "$location", "urlService" ] - } - ], - "policies": [ - { - "category": "action", - "implementation": "policies/EditActionPolicy.js" - }, - { - "category": "view", - "implementation": "policies/EditableViewPolicy.js" - } - ], - "templates": [ - { - "key": "edit-library", - "templateUrl": "templates/library.html" - } - ], - "representations": [ - { - "key": "edit-object", - "templateUrl": "templates/edit-object.html", - "uses": [ "view" ] - }, - { - "key": "edit-action-buttons", - "templateUrl": "templates/edit-action-buttons.html", - "uses": [ "action" ] - }, - { - "key": "edit-elements", - "templateUrl": "templates/elements.html", - "uses": [ "composition" ], - "gestures": [ "drop" ] - }, - { - "key": "topbar-edit", - "templateUrl": "templates/topbar-edit.html" - } - ], - "representers": [ - { - "implementation": "representers/EditRepresenter.js", - "depends": [ "$q", "$log" ] - }, - { - "implementation": "representers/EditToolbarRepresenter.js" - } - ] - } -} \ No newline at end of file diff --git a/platform/commonUI/formats/bundle.json b/platform/commonUI/formats/bundle.json deleted file mode 100644 index 99925657b2..0000000000 --- a/platform/commonUI/formats/bundle.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "Time services bundle", - "description": "Defines interfaces and provides default implementations for handling different time systems.", - "extensions": { - "components": [ - { - "provides": "formatService", - "type": "provider", - "implementation": "FormatProvider.js", - "depends": [ "formats[]" ] - } - ], - "formats": [ - { - "key": "utc", - "implementation": "UTCTimeFormat.js" - } - ], - "constants": [ - { - "key": "DEFAULT_TIME_FORMAT", - "value": "utc" - } - ] - } -} diff --git a/platform/commonUI/general/bundle.json b/platform/commonUI/general/bundle.json deleted file mode 100644 index 7cc15a48b3..0000000000 --- a/platform/commonUI/general/bundle.json +++ /dev/null @@ -1,306 +0,0 @@ -{ - "name": "General UI elements", - "description": "General UI elements, meant to be reused across modes", - "resources": "res", - "extensions": { - "services": [ - { - "key": "urlService", - "implementation": "services/UrlService.js", - "depends": [ "$location" ] - }, - { - "key": "popupService", - "implementation": "services/PopupService.js", - "depends": [ "$document", "$window" ] - } - ], - "runs": [ - { - "implementation": "StyleSheetLoader.js", - "depends": [ "stylesheets[]", "$document", "THEME" ] - }, - { - "implementation": "UnsupportedBrowserWarning.js", - "depends": [ "notificationService", "agentService" ] - } - ], - "stylesheets": [ - { - "stylesheetUrl": "css/normalize.min.css", - "priority": "mandatory" - } - ], - "templates": [ - { - "key": "bottombar", - "templateUrl": "templates/bottombar.html" - }, - { - "key": "action-button", - "templateUrl": "templates/controls/action-button.html" - }, - { - "key": "input-filter", - "templateUrl": "templates/controls/input-filter.html" - }, - { - "key": "indicator", - "templateUrl": "templates/indicator.html" - }, - { - "key": "message-banner", - "templateUrl": "templates/message-banner.html" - }, - { - "key": "progress-bar", - "templateUrl": "templates/progress-bar.html" - }, - { - "key": "time-controller", - "templateUrl": "templates/controls/time-controller.html" - } - ], - "controllers": [ - { - "key": "TimeRangeController", - "implementation": "controllers/TimeRangeController.js", - "depends": [ "$scope", "formatService", "DEFAULT_TIME_FORMAT", "now" ] - }, - { - "key": "DateTimePickerController", - "implementation": "controllers/DateTimePickerController.js", - "depends": [ "$scope", "now" ] - }, - { - "key": "DateTimeFieldController", - "implementation": "controllers/DateTimeFieldController.js", - "depends": [ "$scope", "formatService", "DEFAULT_TIME_FORMAT" ] - }, - { - "key": "TreeNodeController", - "implementation": "controllers/TreeNodeController.js", - "depends": [ "$scope", "$timeout" ] - }, - { - "key": "ActionGroupController", - "implementation": "controllers/ActionGroupController.js", - "depends": [ "$scope" ] - }, - { - "key": "ToggleController", - "implementation": "controllers/ToggleController.js" - }, - { - "key": "ContextMenuController", - "implementation": "controllers/ContextMenuController.js", - "depends": [ "$scope" ] - }, - { - "key": "ClickAwayController", - "implementation": "controllers/ClickAwayController.js", - "depends": [ "$scope", "$document" ] - }, - { - "key": "ViewSwitcherController", - "implementation": "controllers/ViewSwitcherController.js", - "depends": [ "$scope", "$timeout" ] - }, - { - "key": "BottomBarController", - "implementation": "controllers/BottomBarController.js", - "depends": [ "indicators[]" ] - }, - { - "key": "GetterSetterController", - "implementation": "controllers/GetterSetterController.js", - "depends": [ "$scope" ] - }, - { - "key": "SplitPaneController", - "implementation": "controllers/SplitPaneController.js" - }, - { - "key": "SelectorController", - "implementation": "controllers/SelectorController.js", - "depends": [ "objectService", "$scope" ] - }, - { - "key": "ObjectInspectorController", - "implementation": "controllers/ObjectInspectorController.js", - "depends": [ "$scope", "objectService" ] - }, - { - "key": "BannerController", - "implementation": "controllers/BannerController.js", - "depends": ["$scope", "notificationService", "dialogService"] - } - ], - "directives": [ - { - "key": "mctContainer", - "implementation": "directives/MCTContainer.js", - "depends": [ "containers[]" ] - }, - { - "key": "mctDrag", - "implementation": "directives/MCTDrag.js", - "depends": [ "$document" ] - }, - { - "key": "mctClickElsewhere", - "implementation": "directives/MCTClickElsewhere.js", - "depends": [ "$document" ] - }, - { - "key": "mctResize", - "implementation": "directives/MCTResize.js", - "depends": [ "$timeout" ] - }, - { - "key": "mctPopup", - "implementation": "directives/MCTPopup.js", - "depends": [ "$compile", "popupService" ] - }, - { - "key": "mctScrollX", - "implementation": "directives/MCTScroll.js", - "depends": [ "$parse", "MCT_SCROLL_X_PROPERTY", "MCT_SCROLL_X_ATTRIBUTE" ] - }, - { - "key": "mctScrollY", - "implementation": "directives/MCTScroll.js", - "depends": [ "$parse", "MCT_SCROLL_Y_PROPERTY", "MCT_SCROLL_Y_ATTRIBUTE" ] - }, - { - "key": "mctSplitPane", - "implementation": "directives/MCTSplitPane.js", - "depends": [ "$parse", "$log", "$interval" ] - }, - { - "key": "mctSplitter", - "implementation": "directives/MCTSplitter.js" - } - ], - "constants": [ - { - "key": "MCT_SCROLL_X_PROPERTY", - "value": "scrollLeft" - }, - { - "key": "MCT_SCROLL_X_ATTRIBUTE", - "value": "mctScrollX" - }, - { - "key": "MCT_SCROLL_Y_PROPERTY", - "value": "scrollTop" - }, - { - "key": "MCT_SCROLL_Y_ATTRIBUTE", - "value": "mctScrollY" - }, - { - "key": "THEME", - "value": "unspecified", - "priority": "fallback" - } - ], - "containers": [ - { - "key": "accordion", - "templateUrl": "templates/containers/accordion.html", - "attributes": [ "label" ] - } - ], - "representations": [ - { - "key": "tree", - "templateUrl": "templates/subtree.html", - "uses": [ "composition" ], - "type": "root", - "priority": "preferred" - }, - { - "key": "tree", - "templateUrl": "templates/tree.html" - }, - { - "key": "subtree", - "templateUrl": "templates/subtree.html", - "uses": [ "composition" ] - }, - { - "key": "tree-node", - "templateUrl": "templates/tree-node.html", - "uses": [ "action" ] - }, - { - "key": "label", - "templateUrl": "templates/label.html", - "uses": [ "type", "location" ], - "gestures": [ "drag", "menu", "info" ] - }, - { - "key": "node", - "templateUrl": "templates/label.html", - "uses": [ "type" ], - "gestures": [ "drag", "menu" ] - }, - { - "key": "action-group", - "templateUrl": "templates/controls/action-group.html", - "uses": [ "action" ] - }, - { - "key": "context-menu", - "templateUrl": "templates/menu/context-menu.html", - "uses": [ "action" ] - }, - { - "key": "switcher", - "templateUrl": "templates/controls/switcher.html", - "uses": [ "view" ] - }, - { - "key": "object-inspector", - "templateUrl": "templates/object-inspector.html" - } - ], - "controls": [ - { - "key": "selector", - "templateUrl": "templates/controls/selector.html" - }, - { - "key": "datetime-picker", - "templateUrl": "templates/controls/datetime-picker.html" - }, - { - "key": "datetime-field", - "templateUrl": "templates/controls/datetime-field.html" - } - ], - "licenses": [ - { - "name": "Modernizr", - "version": "2.6.2", - "description": "Browser/device capability finding", - "author": "Faruk Ateş", - "website": "http://modernizr.com", - "copyright": "Copyright (c) 2009–2015", - "license": "license-mit", - "link": "http://modernizr.com/license/" - }, - { - "name": "Normalize.css", - "version": "1.1.2", - "description": "Browser style normalization", - "author": "Nicolas Gallagher, Jonathan Neal", - "website": "http://necolas.github.io/normalize.css/", - "copyright": "Copyright (c) Nicolas Gallagher and Jonathan Neal", - "license": "license-mit", - "link": "https://github.com/necolas/normalize.css/blob/v1.1.2/LICENSE.md" - } - ] - } -} diff --git a/platform/commonUI/inspect/bundle.json b/platform/commonUI/inspect/bundle.json deleted file mode 100644 index ed6858f13e..0000000000 --- a/platform/commonUI/inspect/bundle.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "extensions": { - "templates": [ - { - "key": "info-table", - "templateUrl": "info-table.html" - }, - { - "key": "info-bubble", - "templateUrl": "info-bubble.html" - } - ], - "containers": [ - { - "key": "bubble", - "templateUrl": "bubble.html", - "attributes": [ "bubbleTitle", "bubbleLayout" ], - "alias": "bubble" - } - ], - "gestures": [ - { - "key": "info", - "implementation": "gestures/InfoGesture.js", - "depends": [ - "$timeout", - "agentService", - "infoService", - "INFO_HOVER_DELAY" - ] - }, - { - "key": "infobutton", - "implementation": "gestures/InfoButtonGesture.js", - "depends": [ - "$document", - "agentService", - "infoService" - ] - } - ], - "services": [ - { - "key": "infoService", - "implementation": "services/InfoService.js", - "depends": [ - "$compile", - "$rootScope", - "popupService", - "agentService" - ] - } - ], - "constants": [ - { - "key": "INFO_HOVER_DELAY", - "value": 2000 - } - ], - "representations": [ - { - "key": "info-button", - "templateUrl": "templates/info-button.html", - "gestures": [ "infobutton" ] - } - ] - } -} diff --git a/platform/commonUI/mobile/bundle.json b/platform/commonUI/mobile/bundle.json deleted file mode 100644 index 52a0d282bc..0000000000 --- a/platform/commonUI/mobile/bundle.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extensions": { - "directives": [ - { - "key": "mctDevice", - "implementation": "MCTDevice.js", - "depends": [ "agentService" ] - } - ], - "services": [ - { - "key": "agentService", - "implementation": "AgentService.js", - "depends": [ "$window" ] - } - ], - "runs": [ - { - "implementation": "DeviceClassifier.js", - "depends": [ "agentService", "$document" ] - } - ] - } -} diff --git a/platform/commonUI/notification/bundle.json b/platform/commonUI/notification/bundle.json deleted file mode 100644 index 4851dd28b6..0000000000 --- a/platform/commonUI/notification/bundle.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "extensions": { - "constants": [ - { - "key": "DEFAULT_AUTO_DISMISS", - "value": 3000 - }, - { - "key": "FORCE_AUTO_DISMISS", - "value": 1000 - }, - { - "key": "MINIMIZE_TIMEOUT", - "value": 300 - } - ], - "templates": [ - { - "key":"notificationIndicatorTemplate", - "templateUrl": "notification-indicator.html" - } - ], - "controllers": [ - { - "key": "NotificationIndicatorController", - "implementation": "NotificationIndicatorController.js", - "depends": ["$scope", "notificationService", "dialogService"] - } - ], - "indicators": [ - { - "implementation": "NotificationIndicator.js", - "priority": "fallback" - } - ], - "services": [ - { - "key": "notificationService", - "implementation": "NotificationService.js", - "depends": [ "$timeout", "DEFAULT_AUTO_DISMISS", - "MINIMIZE_TIMEOUT" ] - } - ] - } -} diff --git a/platform/commonUI/themes/espresso/bundle.json b/platform/commonUI/themes/espresso/bundle.json deleted file mode 100644 index 94c7259027..0000000000 --- a/platform/commonUI/themes/espresso/bundle.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "Espresso", - "description": "Espresso theme: dark and rich", - "extensions": { - "stylesheets": [ - { - "stylesheetUrl": "css/theme-espresso.css", - "priority": 1000 - } - ], - "constants": [ - { - "key": "THEME", - "value": "espresso" - } - ] - } -} diff --git a/platform/commonUI/themes/snow/bundle.json b/platform/commonUI/themes/snow/bundle.json deleted file mode 100644 index 6780df8e33..0000000000 --- a/platform/commonUI/themes/snow/bundle.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "Snow", - "description": "Snow theme: light and cool", - "extensions": { - "stylesheets": [ - { - "stylesheetUrl": "css/theme-snow.css", - "priority": 1000 - } - ], - "constants": [ - { - "key": "THEME", - "value": "snow" - } - ] - } -} diff --git a/platform/containment/bundle.json b/platform/containment/bundle.json deleted file mode 100644 index e6e24f0f79..0000000000 --- a/platform/containment/bundle.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extensions": { - "policies": [ - { - "category": "composition", - "implementation": "CompositionPolicy.js", - "depends": [ "$injector" ], - "message": "Objects of this type cannot contain objects of that type." - }, - { - "category": "composition", - "implementation": "CompositionMutabilityPolicy.js", - "message": "Objects of this type cannot be modified." - }, - { - "category": "composition", - "implementation": "CompositionModelPolicy.js", - "message": "Objects of this type cannot contain other objects." - }, - { - "category": "action", - "implementation": "ComposeActionPolicy.js", - "depends": [ "$injector" ], - "message": "Objects of this type cannot contain objects of that type." - } - ] - } -} \ No newline at end of file diff --git a/platform/core/bundle.json b/platform/core/bundle.json deleted file mode 100644 index 0a76948e39..0000000000 --- a/platform/core/bundle.json +++ /dev/null @@ -1,269 +0,0 @@ -{ - "name": "Open MCT Web Core", - "description": "Defines core concepts of Open MCT Web.", - "sources": "src", - "configuration": { - "paths": { - "uuid": "uuid" - } - }, - "extensions": { - "versions": [ - { - "name": "Version", - "value": "${project.version}", - "priority": 999 - }, - { - "name": "Built", - "value": "${timestamp}", - "description": "The date on which this version of the client was built.", - "priority": 990 - }, - { - "name": "Revision", - "value": "${buildNumber}", - "description": "A unique revision identifier for the client sources.", - "priority": 995 - }, - { - "name": "Branch", - "value": "${scmBranch}", - "description": "The date on which this version of the client was built.", - "priority": 994 - } - ], - "components": [ - { - "provides": "objectService", - "type": "provider", - "implementation": "objects/DomainObjectProvider.js", - "depends": [ "modelService", "instantiate" ] - }, - { - "provides": "capabilityService", - "type": "provider", - "implementation": "capabilities/CoreCapabilityProvider.js", - "depends": [ "capabilities[]", "$log" ] - }, - { - "provides": "modelService", - "type": "provider", - "implementation": "models/StaticModelProvider", - "depends": [ "models[]", "$q", "$log" ] - }, - { - "provides": "modelService", - "type": "provider", - "implementation": "models/RootModelProvider.js", - "depends": [ "roots[]", "$q", "$log" ] - }, - { - "provides": "modelService", - "type": "aggregator", - "implementation": "models/ModelAggregator.js", - "depends": [ "$q" ] - }, - { - "provides": "modelService", - "type": "provider", - "implementation": "models/PersistedModelProvider.js", - "depends": [ - "persistenceService", - "$q", - "now", - "PERSISTENCE_SPACE" - ] - }, - { - "provides": "modelService", - "type": "decorator", - "implementation": "models/CachingModelDecorator.js" - }, - { - "provides": "modelService", - "type": "decorator", - "priority": "fallback", - "implementation": "models/MissingModelDecorator.js" - }, - { - "provides": "typeService", - "type": "provider", - "implementation": "types/TypeProvider.js", - "depends": [ "types[]" ] - }, - { - "provides": "actionService", - "type": "provider", - "implementation": "actions/ActionProvider.js", - "depends": [ "actions[]", "$log" ] - }, - { - "provides": "actionService", - "type": "aggregator", - "implementation": "actions/ActionAggregator.js" - }, - { - "provides": "actionService", - "type": "decorator", - "implementation": "actions/LoggingActionDecorator.js", - "depends": [ "$log" ] - }, - { - "provides": "viewService", - "type": "provider", - "implementation": "views/ViewProvider.js", - "depends": [ "views[]", "$log" ] - }, - { - "provides": "identifierService", - "type": "provider", - "implementation": "identifiers/IdentifierProvider.js", - "depends": [ "PERSISTENCE_SPACE" ] - } - ], - "types": [ - { - "properties": [ - { - "control": "textfield", - "name": "Title", - "key": "name", - "property": "name", - "pattern": "\\S+", - "required": true, - "cssclass": "l-med" - } - ] - }, - { - "key": "root", - "name": "Root", - "glyph": "F" - }, - { - "key": "folder", - "name": "Folder", - "glyph": "F", - "features": "creation", - "description": "Useful for storing and organizing domain objects.", - "model": { "composition": [] } - }, - { - "key": "unknown", - "name": "Unknown Type", - "glyph": "\u003f" - }, - { - "name": "Unknown Type", - "glyph": "\u003f" - } - ], - "capabilities": [ - { - "key": "composition", - "implementation": "capabilities/CompositionCapability.js", - "depends": [ "$injector", "contextualize" ] - }, - { - "key": "relationship", - "implementation": "capabilities/RelationshipCapability.js", - "depends": [ "$injector" ] - }, - { - "key": "type", - "implementation": "types/TypeCapability.js", - "depends": [ "typeService" ] - }, - { - "key": "action", - "implementation": "actions/ActionCapability.js", - "depends": [ "$q", "actionService" ] - }, - { - "key": "view", - "implementation": "views/ViewCapability.js", - "depends": [ "viewService" ] - }, - { - "key": "persistence", - "implementation": "capabilities/PersistenceCapability.js", - "depends": [ "persistenceService", "identifierService", - "notificationService", "$q" ] - }, - { - "key": "metadata", - "implementation": "capabilities/MetadataCapability.js" - }, - { - "key": "mutation", - "implementation": "capabilities/MutationCapability.js", - "depends": [ "topic", "now" ] - }, - { - "key": "delegation", - "implementation": "capabilities/DelegationCapability.js", - "depends": [ "$q" ] - }, - { - "key": "instantiation", - "implementation": "capabilities/InstantiationCapability.js", - "depends": [ "$injector", "identifierService" ] - } - ], - "services": [ - { - "key": "now", - "implementation": "services/Now.js" - }, - { - "key": "throttle", - "implementation": "services/Throttle.js", - "depends": [ "$timeout" ] - }, - { - "key": "topic", - "implementation": "services/Topic.js", - "depends": [ "$log" ] - }, - { - "key": "contextualize", - "implementation": "services/Contextualize.js", - "depends": [ "$log" ] - }, - { - "key": "instantiate", - "implementation": "services/Instantiate.js", - "depends": [ "capabilityService" ] - } - ], - "roots": [ - { - "id": "mine", - "model": { - "name": "My Items", - "type": "folder", - "composition": [] - } - } - ], - "constants": [ - { - "key": "PERSISTENCE_SPACE", - "value": "mct" - } - ], - "licenses": [ - { - "name": "Math.uuid.js", - "version": "1.4", - "description": "Unique identifer generation (code adapted.)", - "author": "Robert Kieffer", - "website": "https://github.com/broofa/node-uuid", - "copyright": "Copyright (c) 2010 Robert Kieffer", - "license": "license-mit", - "link": "http://opensource.org/licenses/MIT" - } - ] - } -} diff --git a/platform/entanglement/bundle.json b/platform/entanglement/bundle.json deleted file mode 100644 index b1e54730a7..0000000000 --- a/platform/entanglement/bundle.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "name": "Entanglement", - "description": "Tools to assist you in entangling the world of WARP.", - "configuration": {}, - "extensions": { - "actions": [ - { - "key": "move", - "name": "Move", - "description": "Move object to another location.", - "glyph": "f", - "category": "contextual", - "implementation": "actions/MoveAction.js", - "depends": ["policyService", "locationService", "moveService"] - }, - { - "key": "copy", - "name": "Duplicate", - "description": "Duplicate object to another location.", - "glyph": "+", - "category": "contextual", - "implementation": "actions/CopyAction.js", - "depends": ["$log", "policyService", "locationService", "copyService", - "dialogService", "notificationService"] - }, - { - "key": "link", - "name": "Create Link", - "description": "Create Link to object in another location.", - "glyph": "\u00E8", - "category": "contextual", - "implementation": "actions/LinkAction.js", - "depends": ["policyService", "locationService", "linkService"] - }, - { - "key": "follow", - "name": "Go To Original", - "description": "Go to the original, un-linked instance of this object.", - "glyph": "\u00F4", - "category": "contextual", - "implementation": "actions/GoToOriginalAction.js" - }, - { - "key": "locate", - "name": "Set Primary Location", - "description": "Set a domain object's primary location.", - "glyph": "", - "category": "contextual", - "implementation": "actions/SetPrimaryLocationAction.js" - - } - ], - "components": [ - { - "type": "decorator", - "provides": "creationService", - "implementation": "services/LocatingCreationDecorator.js" - }, - { - "type": "decorator", - "provides": "objectService", - "implementation": "services/LocatingObjectDecorator.js", - "depends": ["contextualize", "$q", "$log"] - } - ], - "policies": [ - { - "category": "action", - "implementation": "policies/CrossSpacePolicy.js" - } - ], - "capabilities": [ - { - "key": "location", - "name": "Location Capability", - "description": "Provides a capability for retrieving the location of an object based upon it's context.", - "implementation": "capabilities/LocationCapability", - "depends": [ "$q", "$injector" ] - } - ], - "services": [ - { - "key": "moveService", - "name": "Move Service", - "description": "Provides a service for moving objects", - "implementation": "services/MoveService.js", - "depends": ["policyService", "linkService", "$q"] - }, - { - "key": "linkService", - "name": "Link Service", - "description": "Provides a service for linking objects", - "implementation": "services/LinkService.js", - "depends": ["policyService"] - }, - { - "key": "copyService", - "name": "Copy Service", - "description": "Provides a service for copying objects", - "implementation": "services/CopyService.js", - "depends": ["$q", "policyService", "now"] - }, - { - "key": "locationService", - "name": "Location Service", - "description": "Provides a service for prompting a user for locations.", - "implementation": "services/LocationService.js", - "depends": ["dialogService"] - } - - ], - "licenses": [ - ] - } -} diff --git a/platform/execution/bundle.json b/platform/execution/bundle.json deleted file mode 100644 index 6e6ea83eee..0000000000 --- a/platform/execution/bundle.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extensions": { - "services": [ - { - "key": "workerService", - "implementation": "WorkerService.js", - "depends": [ "$window", "workers[]" ] - } - ] - } -} diff --git a/platform/features/clock/bundle.json b/platform/features/clock/bundle.json deleted file mode 100644 index 5468c46207..0000000000 --- a/platform/features/clock/bundle.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "name": "Clocks/Timers", - "descriptions": "Domain objects for displaying current & relative times.", - "configuration": { - "paths": { - "moment-duration-format": "moment-duration-format" - }, - "shim": { - "moment-duration-format": { - "deps": [ "moment" ] - } - } - }, - "extensions": { - "constants": [ - { - "key": "CLOCK_INDICATOR_FORMAT", - "value": "YYYY/MM/DD HH:mm:ss" - } - - ], - "indicators": [ - { - "implementation": "indicators/ClockIndicator.js", - "depends": [ "tickerService", "CLOCK_INDICATOR_FORMAT" ], - "priority": "preferred" - } - ], - "services": [ - { - "key": "tickerService", - "implementation": "services/TickerService.js", - "depends": [ "$timeout", "now" ] - } - ], - "controllers": [ - { - "key": "ClockController", - "implementation": "controllers/ClockController.js", - "depends": [ "$scope", "tickerService" ] - }, - { - "key": "TimerController", - "implementation": "controllers/TimerController.js", - "depends": [ "$scope", "$window", "now" ] - }, - { - "key": "RefreshingController", - "implementation": "controllers/RefreshingController.js", - "depends": [ "$scope", "tickerService" ] - } - ], - "views": [ - { - "key": "clock", - "type": "clock", - "templateUrl": "templates/clock.html" - }, - { - "key": "timer", - "type": "timer", - "templateUrl": "templates/timer.html" - } - ], - "actions": [ - { - "key": "timer.start", - "implementation": "actions/StartTimerAction.js", - "depends": ["now"], - "category": "contextual", - "name": "Start", - "glyph": "\u00EF", - "priority": "preferred" - }, - { - "key": "timer.restart", - "implementation": "actions/RestartTimerAction.js", - "depends": ["now"], - "category": "contextual", - "name": "Restart at 0", - "glyph": "r", - "priority": "preferred" - } - ], - "types": [ - { - "key": "clock", - "name": "Clock", - "glyph": "C", - "features": [ "creation" ], - "properties": [ - { - "key": "clockFormat", - "name": "Display Format", - "control": "composite", - "items": [ - { - "control": "select", - "options": [ - { - "value": "YYYY/MM/DD hh:mm:ss", - "name": "YYYY/MM/DD hh:mm:ss" - }, - { - "value": "YYYY/DDD hh:mm:ss", - "name": "YYYY/DDD hh:mm:ss" - }, - { - "value": "hh:mm:ss", - "name": "hh:mm:ss" - } - ] - }, - { - "control": "select", - "options": [ - { - "value": "clock12", - "name": "12hr" - }, - { - "value": "clock24", - "name": "24hr" - } - ] - } - ] - } - ], - "model": { - "clockFormat": [ "YYYY/MM/DD hh:mm:ss", "clock12" ] - } - }, - { - "key": "timer", - "name": "Timer", - "glyph": "\u00F5", - "features": [ "creation" ], - "properties": [ - { - "key": "timestamp", - "control": "datetime", - "name": "Target" - }, - { - "key": "timerFormat", - "control": "select", - "options": [ - { - "value": "long", - "name": "DDD hh:mm:ss" - }, - { - "value": "short", - "name": "hh:mm:ss" - } - ] - } - ], - "model": { - "timerFormat": "DDD hh:mm:ss" - } - } - ], - "licenses": [ - { - "name": "moment-duration-format", - "version": "1.3.0", - "author": "John Madhavan-Reese", - "description": "Duration parsing/formatting", - "website": "https://github.com/jsmreese/moment-duration-format", - "copyright": "Copyright 2014 John Madhavan-Reese", - "license": "license-mit", - "link": "https://github.com/jsmreese/moment-duration-format/blob/master/LICENSE" - } - ] - } -} diff --git a/platform/features/conductor/bundle.json b/platform/features/conductor/bundle.json deleted file mode 100644 index c37f15d97b..0000000000 --- a/platform/features/conductor/bundle.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "extensions": { - "representers": [ - { - "implementation": "ConductorRepresenter.js", - "depends": [ - "throttle", - "conductorService", - "$compile", - "views[]" - ] - } - ], - "components": [ - { - "type": "decorator", - "provides": "telemetryService", - "implementation": "ConductorTelemetryDecorator.js", - "depends": [ "conductorService" ] - } - ], - "services": [ - { - "key": "conductorService", - "implementation": "ConductorService.js", - "depends": [ "now", "TIME_CONDUCTOR_DOMAINS" ] - } - ], - "templates": [ - { - "key": "time-conductor", - "templateUrl": "templates/time-conductor.html" - } - ], - "constants": [ - { - "key": "TIME_CONDUCTOR_DOMAINS", - "value": [ - { "key": "time", "name": "UTC", "format": "utc" } - ], - "priority": "fallback", - "comment": "Placeholder; to be replaced by inspection of available domains." - } - ] - } -} diff --git a/platform/features/events/bundle.json b/platform/features/events/bundle.json deleted file mode 100644 index deacfab4b9..0000000000 --- a/platform/features/events/bundle.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "Event Messages", - "description": "List of time-ordered event messages", - "extensions": { - "views": [ - { - "key": "messages", - "name": "Messages", - "glyph": "5", - "description": "Scrolling list of messages.", - "templateUrl": "templates/messages.html", - "needs": [ "telemetry" ], - "delegation": true - } - ], - "controllers": [ - { - "key": "EventListController", - "implementation": "EventListController.js", - "depends": [ "$scope", "telemetryFormatter" ] - } - ], - "directives": [ - { - "key": "mctDataTable", - "implementation": "directives/MCTDataTable.js", - "depends": [ "$window" ] - } - ], - "policies": [ - { - "category": "view", - "implementation": "policies/MessagesViewPolicy.js" - } - ] - } -} diff --git a/platform/features/imagery/bundle.json b/platform/features/imagery/bundle.json deleted file mode 100644 index 8d8495aa3a..0000000000 --- a/platform/features/imagery/bundle.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "Plot view for telemetry", - "extensions": { - "views": [ - { - "name": "Imagery", - "key": "imagery", - "glyph": "\u00E3", - "templateUrl": "templates/imagery.html", - "priority": "preferred", - "needs": [ "telemetry" ] - } - ], - "policies": [ - { - "category": "view", - "implementation": "policies/ImageryViewPolicy.js" - } - ], - "controllers": [ - { - "key": "ImageryController", - "implementation": "controllers/ImageryController.js", - "depends": [ "$scope", "telemetryHandler" ] - } - ], - "directives": [ - { - "key": "mctBackgroundImage", - "implementation": "directives/MCTBackgroundImage.js", - "depends": [ "$document" ] - } - ] - } -} diff --git a/platform/features/layout/bundle.json b/platform/features/layout/bundle.json deleted file mode 100644 index 3f710d4371..0000000000 --- a/platform/features/layout/bundle.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "name": "Layout components.", - "description": "Plug in adding Layout capabilities.", - "extensions": { - "views": [ - { - "key": "layout", - "name": "Display Layout", - "glyph": "L", - "type": "layout", - "templateUrl": "templates/layout.html", - "uses": [], - "gestures": [ "drop" ] - }, - { - "key": "fixed", - "name": "Fixed Position", - "glyph": "3", - "type": "telemetry.panel", - "templateUrl": "templates/fixed.html", - "uses": [ "composition" ], - "gestures": [ "drop" ], - "toolbar": { - "sections": [ - { - "items": [ - { - "method": "add", - "glyph": "+", - "control": "menu-button", - "text": "Add", - "options": [ - { - "name": "Box", - "glyph": "\u00E0", - "key": "fixed.box" - }, - { - "name": "Line", - "glyph": "\u00E2", - "key": "fixed.line" - }, - { - "name": "Text", - "glyph": "\u00E4", - "key": "fixed.text" - }, - { - "name": "Image", - "glyph": "\u00E3", - "key": "fixed.image" - } - ] - } - ] - }, - { - "items": [ - { - "method": "order", - "glyph": "\u00E1", - "control": "menu-button", - "options": [ - { - "name": "Move to Top", - "glyph": "^", - "key": "top" - }, - { - "name": "Move Up", - "glyph": "^", - "key": "up" - }, - { - "name": "Move Down", - "glyph": "v", - "key": "down" - }, - { - "name": "Move to Bottom", - "glyph": "v", - "key": "bottom" - } - ] - }, - { - "property": "fill", - "glyph": "\ue606", - "control": "color" - }, - { - "property": "stroke", - "glyph": "\u00E2", - "control": "color" - }, - { - "property": "color", - "glyph": "\u00E4", - "mandatory": true, - "control": "color" - }, - { - "property": "url", - "glyph": "\u00E3", - "control": "dialog-button", - "title": "Image Properties", - "dialog": { - "control": "textfield", - "name": "Image URL", - "required": true - } - }, - { - "property": "text", - "glyph": "G", - "control": "dialog-button", - "title": "Text Properties", - "dialog": { - "control": "textfield", - "name": "Text", - "required": true - } - }, - { - "method": "showTitle", - "glyph": "\u00E7", - "control": "button", - "description": "Show telemetry element title." - }, - { - "method": "hideTitle", - "glyph": "\u00E5", - "control": "button", - "description": "Hide telemetry element title." - } - ] - }, - { - "items": [ - { - "method": "remove", - "control": "button", - "glyph": "Z" - } - ] - } - ] - } - } - ], - "representations": [ - { - "key": "frame", - "templateUrl": "templates/frame.html" - } - ], - "controllers": [ - { - "key": "LayoutController", - "implementation": "LayoutController.js", - "depends": [ "$scope" ] - }, - { - "key": "FixedController", - "implementation": "FixedController.js", - "depends": [ - "$scope", - "$q", - "dialogService", - "telemetryHandler", - "telemetryFormatter", - "throttle" - ] - } - ], - "templates": [ - { - "key": "fixed.telemetry", - "templateUrl": "templates/elements/telemetry.html" - }, - { - "key": "fixed.box", - "templateUrl": "templates/elements/box.html" - }, - { - "key": "fixed.line", - "templateUrl": "templates/elements/line.html" - }, - { - "key": "fixed.text", - "templateUrl": "templates/elements/text.html" - }, - { - "key": "fixed.image", - "templateUrl": "templates/elements/image.html" - } - ], - "policies": [ - { - "category": "composition", - "implementation": "LayoutCompositionPolicy.js" - } - ], - "types": [ - { - "key": "layout", - "name": "Display Layout", - "glyph": "L", - "description": "A layout in which multiple telemetry panels may be displayed.", - "features": "creation", - "model": { "composition": [] }, - "properties": [ - { - "name": "Layout Grid", - "control": "composite", - "pattern": "^(\\d*[1-9]\\d*)?$", - "items": [ - { - "name": "Horizontal grid (px)", - "control": "textfield", - "cssclass": "l-small l-numeric" - }, - { - "name": "Vertical grid (px)", - "control": "textfield", - "cssclass": "l-small l-numeric" - } - ], - "key": "layoutGrid", - "conversion": "number[]" - } - ] - }, - { - "key": "telemetry.panel", - "name": "Telemetry Panel", - "glyph": "t", - "description": "A panel for collecting telemetry elements.", - "delegates": [ "telemetry" ], - "features": "creation", - "contains": [ { "has": "telemetry" } ], - "model": { "composition": [] }, - "properties": [ - { - "name": "Layout Grid", - "control": "composite", - "items": [ - { - "name": "Horizontal grid (px)", - "control": "textfield", - "cssclass": "l-small l-numeric" - }, - { - "name": "Vertical grid (px)", - "control": "textfield", - "cssclass": "l-small l-numeric" - } - ], - "pattern": "^(\\d*[1-9]\\d*)?$", - "property": "layoutGrid", - "conversion": "number[]" - } - ] - } - ] - } -} diff --git a/platform/features/pages/bundle.json b/platform/features/pages/bundle.json deleted file mode 100644 index 099b96415b..0000000000 --- a/platform/features/pages/bundle.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "extensions": { - "types": [ - { - "key": "example.page", - "name": "Web Page", - "glyph": "\u00EA", - "description": "A component to display a web page or image with a valid URL. Can be added to a Display Layout.", - "features": [ "creation" ], - "properties": [ - { - "key": "url", - "name": "URL", - "control": "textfield", - "pattern": "^(ftp|https?)\\:\\/\\/\\w+(\\.\\w+)*(\\:\\d+)?(\\/\\S*)*$", - "required": true - } - ] - } - ], - "views": [ - { - "templateUrl": "iframe.html", - "name": "Page", - "type": "example.page", - "key": "example.page" - } - ], - "controllers": [ - { - "key": "EmbeddedPageController", - "implementation": "EmbeddedPageController.js", - "depends": ["$sce"] - } - ] - } -} \ No newline at end of file diff --git a/platform/features/plot/bundle.json b/platform/features/plot/bundle.json deleted file mode 100644 index d367c028cb..0000000000 --- a/platform/features/plot/bundle.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "Plot view for telemetry", - "extensions": { - "views": [ - { - "name": "Plot", - "key": "plot", - "glyph": "6", - "templateUrl": "templates/plot.html", - "needs": [ "telemetry" ], - "priority": "preferred", - "delegation": true - } - ], - "directives": [ - { - "key": "mctChart", - "implementation": "MCTChart.js", - "depends": [ "$interval", "$log" ] - } - ], - "controllers": [ - { - "key": "PlotController", - "implementation": "PlotController.js", - "depends": [ - "$scope", - "telemetryFormatter", - "telemetryHandler", - "throttle", - "PLOT_FIXED_DURATION" - ] - } - ], - "constants": [ - { - "key": "PLOT_FIXED_DURATION", - "value": 900000, - "priority": "fallback", - "comment": "Fifteen minutes." - } - ], - "policies": [ - { - "category": "view", - "implementation": "policies/PlotViewPolicy.js" - } - ] - } -} diff --git a/platform/features/rtevents/bundle.json b/platform/features/rtevents/bundle.json deleted file mode 100644 index d2067bdd79..0000000000 --- a/platform/features/rtevents/bundle.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "Event Messages", - "description": "List of time-ordered event messages", - "extensions": { - "views": [ - { - "key": "rtmessages", - "name": "RT Messages", - "glyph": "5", - "description": "Scrolling list of real time messages.", - "templateUrl": "templates/rtmessages.html", - "needs": [ "telemetry" ], - "delegation": true - } - ], - "controllers": [ - { - "key": "RTEventListController", - "implementation": "RTEventListController.js", - "depends": [ "$scope", "telemetryHandler", "telemetryFormatter" ] - } - ], - "directives": [ - { - "key": "mctRtDataTable", - "implementation": "directives/MCTRTDataTable.js", - "depends": [ "$window" ] - } - ], - "policies": [ - { - "category": "view", - "implementation": "policies/RTMessagesViewPolicy.js" - } - ] - } -} diff --git a/platform/features/rtscrolling/bundle.json b/platform/features/rtscrolling/bundle.json deleted file mode 100644 index b387a655a2..0000000000 --- a/platform/features/rtscrolling/bundle.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "Scrolling Lists", - "description": "Time-ordered list of latest data.", - "extensions": { - "views": [ - { - "key": "scrolling", - "name": "Scrolling", - "glyph": "5", - "description": "Scrolling list of data values.", - "templateUrl": "templates/rtscrolling.html", - "needs": [ "telemetry" ], - "delegation": true - } - ], - "controllers": [ - { - "key": "RTScrollingListController", - "implementation": "RTScrollingListController.js", - "depends": [ "$scope", "telemetryHandler", "telemetryFormatter" ] - } - ] - } - -} diff --git a/platform/features/scrolling/bundle.json b/platform/features/scrolling/bundle.json deleted file mode 100644 index 41b3508535..0000000000 --- a/platform/features/scrolling/bundle.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "Scrolling Lists", - "description": "Time-ordered list of latest data.", - "extensions": { - "views": [ - { - "key": "scrolling", - "name": "Scrolling", - "glyph": "5", - "description": "Scrolling list of data values.", - "templateUrl": "templates/scrolling.html", - "needs": [ "telemetry" ], - "delegation": true - } - ], - "controllers": [ - { - "key": "ScrollingListController", - "implementation": "ScrollingListController.js", - "depends": [ "$scope", "telemetryFormatter" ] - } - ] - } - -} \ No newline at end of file diff --git a/platform/features/static-markup/bundle.json b/platform/features/static-markup/bundle.json deleted file mode 100644 index e474df4888..0000000000 --- a/platform/features/static-markup/bundle.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extensions": { - "types": [ - { - "key": "static.markup", - "name": "Static Markup", - "glyph": "\u0070", - "description": "Static markup sandbox", - "features": [ "creation" ] - } - ], - "views": [ - { - "templateUrl": "markup.html", - "name": "Static Markup", - "type": "static.markup", - "key": "static.markup" - } - ] - } -} \ No newline at end of file diff --git a/platform/features/timeline/bundle.json b/platform/features/timeline/bundle.json deleted file mode 100644 index e7363ab160..0000000000 --- a/platform/features/timeline/bundle.json +++ /dev/null @@ -1,385 +0,0 @@ -{ - "name": "Timelines", - "description": "Resources, templates, CSS, and code for Timelines.", - "resources": "res", - "extensions": { - "constants": [ - { - "key": "TIMELINE_MINIMUM_DURATION", - "description": "The minimum duration to display in a timeline view (one hour.)", - "value": 3600000 - }, - { - "key": "TIMELINE_MAXIMUM_OFFSCREEN", - "description": "Maximum amount, in pixels, of a Gantt bar which may go off screen.", - "value": 1000 - }, - { - "key": "TIMELINE_ZOOM_CONFIGURATION", - "description": "Describes major tick sizes in milliseconds, and width in pixels.", - "value": { - "levels": [ - 1000, - 2000, - 5000, - - 10000, - 20000, - 30000, - 60000, - - 120000, - 300000, - 600000, - - 1200000, - 1800000, - 3600000, - 7200000, - - 14400000, - 28800000, - 43200000, - 86400000 - ], - "width": 200 - } - } - ], - "types": [ - { - "key": "timeline", - "name": "Timeline", - "glyph": "S", - "description": "A container for arranging Timelines and Activities in time.", - "features": [ "creation" ], - "contains": [ "timeline", "activity" ], - "properties": [ - { - "name": "Start date/time", - "control": "timeline-datetime", - "required": true, - "property": [ "start" ], - "options": [ "SET" ] - }, - { - "name": "Battery capacity (Watt-hours)", - "control": "textfield", - "required": false, - "conversion": "number", - "property": [ "capacity" ], - "pattern": "^-?\\d+(\\.\\d*)?$" - } - ], - "model": { "composition": [] } - }, - { - "key": "activity", - "name": "Activity", - "glyph": "a", - "features": [ "creation" ], - "contains": [ "activity" ], - "description": "An action that takes place in time. You can define a start time and duration. Activities can be nested within other Activities, or within Timelines.", - "properties": [ - { - "name": "Start date/time", - "control": "timeline-datetime", - "required": true, - "property": [ "start" ], - "options": [ "SET" ] - }, - { - "name": "Duration", - "control": "duration", - "required": true, - "property": [ "duration" ] - } - ], - "model": { "composition": [], "relationships": { "modes": [] } } - }, - { - "key": "mode", - "name": "Activity Mode", - "glyph": "A", - "features": [ "creation" ], - "description": "Define resource utilizations over time, then apply to an Activity.", - "model": { "resources": { "comms": 0, "power": 0 } }, - "properties": [ - { - "name": "Comms (Kbps)", - "control": "textfield", - "conversion": "number", - "pattern": "^-?\\d+(\\.\\d*)?$", - "property": [ "resources", "comms" ] - }, - { - "name": "Power (watts)", - "control": "textfield", - "conversion": "number", - "pattern": "^-?\\d+(\\.\\d*)?$", - "property": [ "resources", "power" ] - } - ] - } - ], - "views": [ - { - "key": "values", - "name": "Values", - "glyph": "A", - "templateUrl": "templates/values.html", - "type": "mode", - "uses": [ "cost" ], - "editable": false - }, - { - "key": "timeline", - "name": "Timeline", - "glyph": "S", - "type": "timeline", - "description": "A timeline view of Timelines and Activities.", - "templateUrl": "templates/timeline.html", - "toolbar": { - "sections": [ - { - "items": [ - { - "method": "add", - "glyph": "+", - "control": "menu-button", - "text": "Add", - "options": [ - { - "name": "Timeline", - "glyph": "S", - "key": "timeline" - }, - { - "name": "Activity", - "glyph": "a", - "key": "activity" - } - ] - } - ] - }, - { - "items": [ - { - "glyph": "\u00E9", - "description": "Graph resource utilization", - "control": "button", - "method": "toggleGraph" - }, - { - "glyph": "A", - "control": "dialog-button", - "description": "Apply Activity Modes...", - "title": "Apply Activity Modes", - "dialog": { - "control": "selector", - "name": "Modes", - "type": "mode" - }, - "property": "modes" - }, - { - "glyph": "\u00E8", - "description": "Edit Activity Link", - "title": "Activity Link", - "control": "dialog-button", - "dialog": { - "control": "textfield", - "name": "Link", - "pattern": "^(ftp|https?)\\:\\/\\/\\w+(\\.\\w+)*(\\:\\d+)?(\\/\\S*)*$" - }, - "property": "link" - }, - { - "glyph": "\u0047", - "description": "Edit Properties...", - "control": "button", - "method": "properties" - } - ] - }, - { - "items": [ - { - "method": "remove", - "description": "Remove item", - "control": "button", - "glyph": "Z" - } - ] - } - ] - } - } - ], - "stylesheets": [ - { - "stylesheetUrl": "css/timeline.css" - }, - { - "stylesheetUrl": "css/timeline-espresso.css", - "theme": "espresso" - }, - { - "stylesheetUrl": "css/timeline-snow.css", - "theme": "snow" - } - ], - "representations": [ - { - "key": "gantt", - "templateUrl": "templates/activity-gantt.html", - "uses": [ "timespan", "type" ] - } - ], - "templates": [ - { - "key": "timeline-tabular-swimlane-cols-tree", - "priority": "mandatory", - "templateUrl": "templates/tabular-swimlane-cols-tree.html" - }, - { - "key": "timeline-tabular-swimlane-cols-data", - "priority": "mandatory", - "templateUrl": "templates/tabular-swimlane-cols-data.html" - }, - { - "key": "timeline-resource-graphs", - "priority": "mandatory", - "templateUrl": "templates/resource-graphs.html" - }, - { - "key": "timeline-resource-graph-labels", - "priority": "mandatory", - "templateUrl": "templates/resource-graph-labels.html" - }, - { - "key": "timeline-legend-item", - "priority": "mandatory", - "templateUrl": "templates/legend-item.html" - }, - { - "key": "timeline-ticks", - "priority": "mandatory", - "templateUrl": "templates/ticks.html" - } - ], - "controls": [ - { - "key": "timeline-datetime", - "templateUrl": "templates/controls/datetime.html" - }, - { - "key": "duration", - "templateUrl": "templates/controls/datetime.html" - } - ], - "controllers": [ - { - "key": "TimelineController", - "implementation": "controllers/TimelineController.js", - "depends": [ "$scope", "$q", "objectLoader", "TIMELINE_MINIMUM_DURATION" ] - }, - { - "key": "TimelineGraphController", - "implementation": "controllers/TimelineGraphController.js", - "depends": [ "$scope", "resources[]" ] - }, - { - "key": "TimelineDateTimeController", - "implementation": "controllers/TimelineDateTimeController.js", - "depends": [ "$scope" ] - }, - { - "key": "TimelineZoomController", - "implementation": "controllers/TimelineZoomController.js", - "depends": [ "$scope", "TIMELINE_ZOOM_CONFIGURATION" ] - }, - { - "key": "TimelineTickController", - "implementation": "controllers/TimelineTickController.js" - }, - { - "key": "TimelineTableController", - "implementation": "controllers/TimelineTableController.js" - }, - { - "key": "TimelineGanttController", - "implementation": "controllers/TimelineGanttController.js", - "depends": [ "TIMELINE_MAXIMUM_OFFSCREEN" ] - }, - { - "key": "ActivityModeValuesController", - "implementation": "controllers/ActivityModeValuesController.js", - "depends": [ "resources[]" ] - } - ], - "capabilities": [ - { - "key": "timespan", - "implementation": "capabilities/ActivityTimespanCapability.js", - "depends": [ "$q" ] - }, - { - "key": "timespan", - "implementation": "capabilities/TimelineTimespanCapability.js", - "depends": [ "$q" ] - }, - { - "key": "utilization", - "implementation": "capabilities/UtilizationCapability.js", - "depends": [ "$q" ] - }, - { - "key": "graph", - "implementation": "capabilities/GraphCapability.js", - "depends": [ "$q" ] - }, - { - "key": "cost", - "implementation": "capabilities/CostCapability.js" - } - ], - "directives": [ - { - "key": "mctSwimlaneDrop", - "implementation": "directives/MCTSwimlaneDrop.js", - "depends": [ "dndService" ] - }, - { - "key": "mctSwimlaneDrag", - "implementation": "directives/MCTSwimlaneDrag.js", - "depends": [ "dndService" ] - } - ], - "services": [ - { - "key": "objectLoader", - "implementation": "services/ObjectLoader.js", - "depends": [ "$q" ] - } - ], - "resources": [ - { - "key": "power", - "name": "Power", - "units": "watts" - }, - { - "key": "comms", - "name": "Comms", - "units": "Kbps" - }, - { - "key": "battery", - "name": "Battery State-of-Charge", - "units": "%" - } - ] - } -} diff --git a/platform/forms/bundle.json b/platform/forms/bundle.json deleted file mode 100644 index c5d064d81f..0000000000 --- a/platform/forms/bundle.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "MCT Forms", - "description": "Form generator; includes directive and some controls.", - "extensions": { - "directives": [ - { - "key": "mctForm", - "implementation": "MCTForm.js" - }, - { - "key": "mctToolbar", - "implementation": "MCTToolbar.js" - }, - { - "key": "mctControl", - "implementation": "MCTControl.js", - "depends": [ "controls[]" ] - } - ], - "controls": [ - { - "key": "checkbox", - "templateUrl": "templates/controls/checkbox.html" - }, - { - "key": "datetime", - "templateUrl": "templates/controls/datetime.html" - }, - { - "key": "select", - "templateUrl": "templates/controls/select.html" - }, - { - "key": "textfield", - "templateUrl": "templates/controls/textfield.html" - }, - { - "key": "button", - "templateUrl": "templates/controls/button.html" - }, - { - "key": "color", - "templateUrl": "templates/controls/color.html" - }, - { - "key": "composite", - "templateUrl": "templates/controls/composite.html" - }, - { - "key": "menu-button", - "templateUrl": "templates/controls/menu-button.html" - }, - { - "key": "dialog-button", - "templateUrl": "templates/controls/dialog.html" - } - ], - "controllers": [ - { - "key": "DateTimeController", - "implementation": "controllers/DateTimeController.js", - "depends": [ "$scope" ] - }, - { - "key": "CompositeController", - "implementation": "controllers/CompositeController.js" - }, - { - "key": "ColorController", - "implementation": "controllers/ColorController.js" - }, - { - "key": "DialogButtonController", - "implementation": "controllers/DialogButtonController.js", - "depends": [ "$scope", "dialogService" ] - } - ] - } -} \ No newline at end of file diff --git a/platform/framework/bundle.json b/platform/framework/bundle.json deleted file mode 100644 index 971843c379..0000000000 --- a/platform/framework/bundle.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "Open MCT Web Framework Component", - "description": "Framework layer for Open MCT Web; interprets bundle definitions and serves as an intermediary between Require and Angular", - "libraries": "lib", - "configuration": { - "paths": { - "angular": "angular.min" - }, - "shim": { - "angular": { - "exports": "angular" - } - } - }, - "extensions": { - "licenses": [ - { - "name": "Blanket.js", - "version": "1.1.5", - "description": "Code coverage measurement and reporting", - "author": "Alex Seville", - "website": "http://blanketjs.org/", - "copyright": "Copyright (c) 2013 Alex Seville", - "license": "license-mit", - "link": "http://opensource.org/licenses/MIT" - }, - { - "name": "Jasmine", - "version": "1.3.1", - "description": "Unit testing", - "author": "Pivotal Labs", - "website": "http://jasmine.github.io/", - "copyright": "Copyright (c) 2008-2011 Pivotal Labs", - "license": "license-mit", - "link": "http://opensource.org/licenses/MIT" - }, - { - "name": "RequireJS", - "version": "2.1.9", - "description": "Script loader", - "author": "The Dojo Foundation", - "website": "http://requirejs.org/", - "copyright": "Copyright (c) 2010-2015, The Dojo Foundation", - "license": "license-mit", - "link": "https://github.com/jrburke/requirejs/blob/master/LICENSE" - }, - { - "name": "AngularJS", - "version": "1.2.26", - "description": "Client-side web application framework", - "author": "Google", - "website": "http://angularjs.org/", - "copyright": "Copyright (c) 2010-2014 Google, Inc. http://angularjs.org", - "license": "license-mit", - "link": "https://github.com/angular/angular.js/blob/v1.2.26/LICENSE" - }, - { - "name": "Angular-Route", - "version": "1.2.26", - "description": "Client-side view routing", - "author": "Google", - "website": "http://angularjs.org/", - "copyright": "Copyright (c) 2010-2014 Google, Inc. http://angularjs.org", - "license": "license-mit", - "link": "https://github.com/angular/angular.js/blob/v1.2.26/LICENSE" - }, - { - "name": "ES6-Promise", - "version": "2.0.0", - "description": "Promise polyfill for pre-ECMAScript 6 browsers", - "author": "Yehuda Katz, Tom Dale, Stefan Penner and contributors", - "website": "https://github.com/jakearchibald/es6-promise", - "copyright": "Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors", - "license": "license-mit", - "link": "https://github.com/jakearchibald/es6-promise/blob/master/LICENSE" - } - ] - } -} - - diff --git a/platform/identity/bundle.json b/platform/identity/bundle.json deleted file mode 100644 index 9b3e1eac2b..0000000000 --- a/platform/identity/bundle.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "extensions": { - "components": [ - { - "implementation": "IdentityAggregator.js", - "type": "aggregator", - "provides": "identityService", - "depends": [ "$q" ] - }, - { - "implementation": "IdentityProvider.js", - "type": "provider", - "provides": "identityService", - "depends": [ "$q" ], - "priority": "fallback" - }, - { - "type": "decorator", - "provides": "creationService", - "implementation": "IdentityCreationDecorator.js", - "depends": [ "identityService" ] - } - ], - "indicators": [ - { - "implementation": "IdentityIndicator.js", - "depends": [ "identityService" ] - } - ], - "types": [ - { - "properties": [ - { - "key": "creator", - "name": "Creator" - } - ] - } - ] - } -} diff --git a/platform/persistence/aggregator/bundle.json b/platform/persistence/aggregator/bundle.json deleted file mode 100644 index f9eaede5c1..0000000000 --- a/platform/persistence/aggregator/bundle.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extensions": { - "components": [ - { - "provides": "persistenceService", - "type": "aggregator", - "depends": [ "$q" ], - "implementation": "PersistenceAggregator.js" - } - ] - } -} diff --git a/platform/persistence/cache/bundle.json b/platform/persistence/cache/bundle.json deleted file mode 100644 index dbb30842c8..0000000000 --- a/platform/persistence/cache/bundle.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Persistence cache", - "description": "Cache to improve availability of persisted objects.", - "extensions": { - "components": [ - { - "provides": "persistenceService", - "type": "decorator", - "implementation": "CachingPersistenceDecorator.js", - "depends": [ "PERSISTENCE_SPACE" ] - } - ] - } -} diff --git a/platform/persistence/couch/bundle.json b/platform/persistence/couch/bundle.json deleted file mode 100644 index 011c46b666..0000000000 --- a/platform/persistence/couch/bundle.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "Couch Persistence", - "description": "Adapter to read and write objects using a CouchDB instance.", - "extensions": { - "components": [ - { - "provides": "persistenceService", - "type": "provider", - "implementation": "CouchPersistenceProvider.js", - "depends": [ "$http", "$q", "PERSISTENCE_SPACE", "COUCHDB_PATH" ] - } - ], - "constants": [ - { - "key": "PERSISTENCE_SPACE", - "value": "mct" - }, - { - "key": "COUCHDB_PATH", - "value": "/couch/openmct" - }, - { - "key": "COUCHDB_INDICATOR_INTERVAL", - "value": 15000 - } - ], - "indicators": [ - { - "implementation": "CouchIndicator.js", - "depends": [ - "$http", - "$interval", - "COUCHDB_PATH", - "COUCHDB_INDICATOR_INTERVAL" - ] - } - ] - } -} \ No newline at end of file diff --git a/platform/persistence/elastic/bundle.json b/platform/persistence/elastic/bundle.json deleted file mode 100644 index 3e1383351e..0000000000 --- a/platform/persistence/elastic/bundle.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "ElasticSearch Persistence", - "description": "Adapter to read and write objects using an ElasticSearch instance.", - "extensions": { - "components": [ - { - "provides": "persistenceService", - "type": "provider", - "implementation": "ElasticPersistenceProvider.js", - "depends": [ "$http", "$q", "PERSISTENCE_SPACE", "ELASTIC_ROOT", "ELASTIC_PATH" ] - }, - { - "provides": "searchService", - "type": "provider", - "implementation": "ElasticSearchProvider.js", - "depends": [ "$http", "ELASTIC_ROOT" ] - } - ], - "constants": [ - { - "key": "PERSISTENCE_SPACE", - "value": "mct" - }, - { - "key": "ELASTIC_ROOT", - "value": "http://localhost:9200", - "priority": "fallback" - }, - { - "key": "ELASTIC_PATH", - "value": "mct/domain_object", - "priority": "fallback" - }, - { - "key": "ELASTIC_INDICATOR_INTERVAL", - "value": 15000, - "priority": "fallback" - } - ], - "indicators": [ - { - "implementation": "ElasticIndicator.js", - "depends": [ - "$http", - "$interval", - "ELASTIC_ROOT", - "ELASTIC_INDICATOR_INTERVAL" - ] - } - ] - } -} diff --git a/platform/persistence/local/bundle.json b/platform/persistence/local/bundle.json deleted file mode 100644 index e5d338d21d..0000000000 --- a/platform/persistence/local/bundle.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extensions": { - "components": [ - { - "provides": "persistenceService", - "type": "provider", - "implementation": "LocalStoragePersistenceProvider.js", - "depends": [ "$q", "PERSISTENCE_SPACE" ] - } - ], - "constants": [ - { - "key": "PERSISTENCE_SPACE", - "value": "mct" - } - ], - "indicators": [ - { - "implementation": "LocalStorageIndicator.js" - } - ] - } -} diff --git a/platform/persistence/queue/bundle.json b/platform/persistence/queue/bundle.json deleted file mode 100644 index c67e241e35..0000000000 --- a/platform/persistence/queue/bundle.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "extensions": { - "components": [ - { - "type": "decorator", - "provides": "capabilityService", - "implementation": "QueuingPersistenceCapabilityDecorator.js", - "depends": [ "persistenceQueue" ] - } - ], - "services": [ - { - "key": "persistenceQueue", - "implementation": "PersistenceQueue.js", - "depends": [ - "$q", - "$timeout", - "dialogService", - "PERSISTENCE_QUEUE_DELAY" - ] - } - ], - "constants": [ - { - "key": "PERSISTENCE_QUEUE_DELAY", - "value": 5 - } - ], - "templates": [ - { - "key": "persistence-failure-dialog", - "templateUrl": "templates/persistence-failure-dialog.html" - } - ], - "controllers": [ - { - "key": "PersistenceFailureController", - "implementation": "PersistenceFailureController.js" - } - ] - } -} \ No newline at end of file diff --git a/platform/policy/bundle.json b/platform/policy/bundle.json deleted file mode 100644 index 0f27b51136..0000000000 --- a/platform/policy/bundle.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "Policy Service", - "description": "Provides support for extension-driven decisions.", - "sources": "src", - "extensions": { - "components": [ - { - "type": "decorator", - "provides": "actionService", - "implementation": "PolicyActionDecorator.js", - "depends": [ "policyService" ] - }, - { - "type": "decorator", - "provides": "viewService", - "implementation": "PolicyViewDecorator.js", - "depends": [ "policyService" ] - }, - { - "type": "provider", - "provides": "policyService", - "implementation": "PolicyProvider.js", - "depends": [ "policies[]" ] - } - ] - } -} \ No newline at end of file diff --git a/platform/representation/bundle.json b/platform/representation/bundle.json deleted file mode 100644 index 5c78bccff9..0000000000 --- a/platform/representation/bundle.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "extensions": { - "directives": [ - { - "key": "mctInclude", - "implementation": "MCTInclude.js", - "depends": [ "templates[]", "templateLinker" ] - }, - { - "key": "mctRepresentation", - "implementation": "MCTRepresentation.js", - "depends": [ "representations[]", "views[]", "representers[]", "$q", "templateLinker", "$log" ] - } - ], - "gestures": [ - { - "key": "drag", - "implementation": "gestures/DragGesture.js", - "depends": [ "$log", "dndService" ] - }, - { - "key": "drop", - "implementation": "gestures/DropGesture.js", - "depends": [ "dndService", "$q" ] - }, - { - "key": "menu", - "implementation": "gestures/ContextMenuGesture.js", - "depends": ["$timeout", "agentService"] - } - ], - "components": [ - { - "provides": "gestureService", - "type": "provider", - "implementation": "gestures/GestureProvider.js", - "depends": ["gestures[]"] - } - ], - "representers": [ - { - "implementation": "gestures/GestureRepresenter.js", - "depends": [ "gestureService" ] - } - ], - "services": [ - { - "key": "dndService", - "implementation": "services/DndService.js", - "depends": [ "$log" ] - }, - { - "key": "templateLinker", - "implementation": "TemplateLinker.js", - "depends": [ "$templateRequest", "$sce", "$compile", "$log" ], - "comment": "For internal use by mct-include and mct-representation." - } - ], - "actions": [ - { - "key": "menu", - "implementation": "actions/ContextMenuAction.js", - "depends": [ - "$compile", - "$document", - "$rootScope", - "popupService", - "agentService" - ] - } - ], - "runs": [ - { - "priority": "mandatory", - "implementation": "TemplatePrefetcher.js", - "depends": [ - "templateLinker", - "templates[]", - "views[]", - "representations[]", - "controls[]", - "containers[]" - ] - } - ] - } -} diff --git a/platform/search/bundle.json b/platform/search/bundle.json deleted file mode 100644 index d8f3d93458..0000000000 --- a/platform/search/bundle.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "Search", - "description": "Allows the user to search through the file tree.", - "extensions": { - "constants": [ - { - "key": "GENERIC_SEARCH_ROOTS", - "value": [ "ROOT" ], - "priority": "fallback" - } - ], - "controllers": [ - { - "key": "SearchController", - "implementation": "controllers/SearchController.js", - "depends": [ "$scope", "searchService" ] - }, - { - "key": "SearchMenuController", - "implementation": "controllers/SearchMenuController.js", - "depends": [ "$scope", "types[]" ] - }, - { - "key": "ClickAwayController", - "implementation": "controllers/ClickAwayController.js", - "depends": [ "$scope", "$document" ] - } - ], - "representations": [ - { - "key": "search-item", - "templateUrl": "templates/search-item.html" - } - ], - "templates": [ - { - "key": "search", - "templateUrl": "templates/search.html" - }, - { - "key": "search-menu", - "templateUrl": "templates/search-menu.html" - } - ], - "components": [ - { - "provides": "searchService", - "type": "provider", - "implementation": "services/GenericSearchProvider.js", - "depends": [ - "$q", - "$log", - "modelService", - "workerService", - "topic", - "GENERIC_SEARCH_ROOTS" - ] - }, - { - "provides": "searchService", - "type": "aggregator", - "implementation": "services/SearchAggregator.js", - "depends": [ "$q", "objectService" ] - } - ], - "workers": [ - { - "key": "genericSearchWorker", - "scriptUrl": "services/GenericSearchWorker.js" - } - ] - } -} diff --git a/platform/status/bundle.json b/platform/status/bundle.json deleted file mode 100644 index 4c117a9d75..0000000000 --- a/platform/status/bundle.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extensions": { - "representers": [ - { - "implementation": "StatusRepresenter.js" - } - ], - "capabilities": [ - { - "key": "status", - "implementation": "StatusCapability.js", - "depends": [ "statusService" ] - } - ], - "services": [ - { - "key": "statusService", - "implementation": "StatusService.js", - "depends": [ "topic" ] - } - ] - } -} diff --git a/platform/telemetry/bundle.json b/platform/telemetry/bundle.json deleted file mode 100644 index d264a1d6c0..0000000000 --- a/platform/telemetry/bundle.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "Data bundle", - "description": "Interfaces and infrastructure for real-time and historical data", - "configuration": { - "paths": { - "moment": "moment.min" - }, - "shim": { - "moment": { - "exports": "moment" - } - } - }, - "extensions": { - "components": [ - { - "provides": "telemetryService", - "type": "aggregator", - "implementation": "TelemetryAggregator.js", - "depends": [ "$q" ] - } - ], - "controllers": [ - { - "key": "TelemetryController", - "implementation": "TelemetryController.js", - "depends": [ "$scope", "$q", "$timeout", "$log" ] - } - ], - "capabilities": [ - { - "key": "telemetry", - "implementation": "TelemetryCapability.js", - "depends": [ "$injector", "$q", "$log" ] - } - ], - "services": [ - { - "key": "telemetryFormatter", - "implementation": "TelemetryFormatter.js", - "depends": [ "formatService", "DEFAULT_TIME_FORMAT" ] - }, - { - "key": "telemetrySubscriber", - "implementation": "TelemetrySubscriber.js", - "depends": [ "$q", "$timeout" ] - }, - { - "key": "telemetryHandler", - "implementation": "TelemetryHandler.js", - "depends": [ "$q", "telemetrySubscriber" ] - } - ], - "licenses": [ - { - "name": "Moment.js", - "version": "2.7.0", - "author": "Tim Wood, Iskren Chernev, Moment.js contributors", - "description": "Time/date parsing/formatting", - "website": "http://momentjs.com", - "copyright": "Copyright (c) 2011-2014 Tim Wood, Iskren Chernev, Moment.js contributors", - "license": "license-mit", - "link": "https://raw.githubusercontent.com/moment/moment/develop/LICENSE" - } - ] - } -} From 2665e55e597e4d06981c37672a2168d52ac8e239 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 15:37:46 -0800 Subject: [PATCH 33/37] [API Refactor] Include top-level main.js ...in Maven-based build. --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index b6144c754e..841321c805 100644 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,7 @@ . index.html + main.js *.json **/src/**/* **/res/**/* From ed454df97d2e3ea2014264d9e01936eb1297cffb Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Jan 2016 15:45:30 -0800 Subject: [PATCH 34/37] [API Refactor] Uncomment out erroneous change --- app.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app.js b/app.js index 3063c10314..e05f90d77a 100644 --- a/app.js +++ b/app.js @@ -40,26 +40,26 @@ } // Override bundles.json for HTTP requests - //app.use('/' + BUNDLE_FILE, function (req, res) { - // var bundles; - // - // try { - // bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8')); - // } catch (e) { - // bundles = []; - // } - // - // // Handle command line inclusions/exclusions - // bundles = bundles.concat(options.include); - // bundles = bundles.filter(function (bundle) { - // return options.exclude.indexOf(bundle) === -1; - // }); - // bundles = bundles.filter(function (bundle, index) { // Uniquify - // return bundles.indexOf(bundle) === index; - // }); - // - // res.send(JSON.stringify(bundles)); - //}); + app.use('/' + BUNDLE_FILE, function (req, res) { + var bundles; + + try { + bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8')); + } catch (e) { + bundles = []; + } + + // Handle command line inclusions/exclusions + bundles = bundles.concat(options.include); + bundles = bundles.filter(function (bundle) { + return options.exclude.indexOf(bundle) === -1; + }); + bundles = bundles.filter(function (bundle, index) { // Uniquify + return bundles.indexOf(bundle) === index; + }); + + res.send(JSON.stringify(bundles)); + }); // Expose everything else as static files app.use(express['static']('.')); From 86daad5fbd5b1f224c80191aba1fafaf6b5a392f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 13 Jan 2016 12:22:44 -0800 Subject: [PATCH 35/37] [API Refactor] Remove obsolete UUID dependency ...in association with cleanup of requirejs config, https://github.com/nasa/openmctweb/pull/469/files#r49642503 --- platform/entanglement/src/services/CopyService.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/platform/entanglement/src/services/CopyService.js b/platform/entanglement/src/services/CopyService.js index 03f32b76ce..bc825c0394 100644 --- a/platform/entanglement/src/services/CopyService.js +++ b/platform/entanglement/src/services/CopyService.js @@ -23,11 +23,8 @@ /*global define */ define( - [ - "uuid", - "./CopyTask" - ], - function (uuid, CopyTask) { + [ "./CopyTask" ], + function (CopyTask) { "use strict"; /** From 45142e03dcd71d5f90ba3271942af051465dc8dd Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 13 Jan 2016 12:33:22 -0800 Subject: [PATCH 36/37] [API Refactor] Move uuid dependency out of top-level --- main.js | 3 +-- platform/core/src/identifiers/IdentifierProvider.js | 2 +- test-main.js | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 72432d0f05..b7fc22bff3 100644 --- a/main.js +++ b/main.js @@ -27,8 +27,7 @@ requirejs.config({ "angular": "platform/framework/lib/angular.min", "angular-route": "platform/framework/lib/angular-route.min", "moment": 'platform/telemetry/lib/moment.min', - "moment-duration-format": 'platform/features/clock/lib/moment-duration-format', - "uuid": 'platform/core/lib/uuid' + "moment-duration-format": 'platform/features/clock/lib/moment-duration-format' }, "shim": { "angular": { diff --git a/platform/core/src/identifiers/IdentifierProvider.js b/platform/core/src/identifiers/IdentifierProvider.js index c6b2a136cb..9ef7c2c6a7 100644 --- a/platform/core/src/identifiers/IdentifierProvider.js +++ b/platform/core/src/identifiers/IdentifierProvider.js @@ -22,7 +22,7 @@ /*global define*/ define( - ["uuid", "./Identifier"], + ["../../lib/uuid", "./Identifier"], function (uuid, Identifier) { 'use strict'; diff --git a/test-main.js b/test-main.js index 2822b8cad8..d3bbb1fcc3 100644 --- a/test-main.js +++ b/test-main.js @@ -45,8 +45,7 @@ require.config({ paths: { 'es6-promise': 'platform/framework/lib/es6-promise-2.0.0.min', 'moment': 'platform/telemetry/lib/moment.min', - 'moment-duration-format': 'platform/features/clock/lib/moment-duration-format', - 'uuid': 'platform/core/lib/uuid' + 'moment-duration-format': 'platform/features/clock/lib/moment-duration-format' }, shim: { From 69c5b110bfab38d42add9bbfd560dad6a1789546 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 13 Jan 2016 12:40:03 -0800 Subject: [PATCH 37/37] [API Refactor] Move out non-global require config --- main.js | 10 +--------- .../features/clock/src/controllers/TimerFormatter.js | 12 ++++++++++-- platform/framework/src/Main.js | 10 +++++++++- test-main.js | 9 +-------- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/main.js b/main.js index b7fc22bff3..fd5f4533fb 100644 --- a/main.js +++ b/main.js @@ -25,19 +25,11 @@ requirejs.config({ "paths": { "legacyRegistry": "src/legacyRegistry", "angular": "platform/framework/lib/angular.min", - "angular-route": "platform/framework/lib/angular-route.min", - "moment": 'platform/telemetry/lib/moment.min', - "moment-duration-format": 'platform/features/clock/lib/moment-duration-format' + "moment": 'platform/telemetry/lib/moment.min' }, "shim": { "angular": { "exports": "angular" - }, - "angular-route": { - "deps": [ "angular" ] - }, - "moment-duration-format": { - "deps": [ 'moment' ] } } }); diff --git a/platform/features/clock/src/controllers/TimerFormatter.js b/platform/features/clock/src/controllers/TimerFormatter.js index e9ebb79a6b..3a694090b3 100644 --- a/platform/features/clock/src/controllers/TimerFormatter.js +++ b/platform/features/clock/src/controllers/TimerFormatter.js @@ -19,10 +19,18 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ +/*global define,requirejs*/ + +requirejs.config({ + shim: { + 'platform/features/clock/lib/moment-duration-format': { + deps: [ 'moment' ] + } + } +}); define( - ['moment', 'moment-duration-format'], + ['moment', '../../lib/moment-duration-format'], function (moment) { "use strict"; diff --git a/platform/framework/src/Main.js b/platform/framework/src/Main.js index cc11b699e4..40636b2d38 100644 --- a/platform/framework/src/Main.js +++ b/platform/framework/src/Main.js @@ -21,6 +21,14 @@ *****************************************************************************/ /*global define, window, requirejs*/ +requirejs.config({ + shim: { + 'platform/framework/lib/angular-route.min': { + deps: [ 'angular' ] + } + } +}); + /** * Implements the framework layer, which handles the loading of bundles * and the wiring-together of the extensions they expose. @@ -32,7 +40,7 @@ define( '../lib/es6-promise-2.0.0.min', './FrameworkLayer', 'angular', - 'angular-route' + '../lib/angular-route.min' ], function ( require, diff --git a/test-main.js b/test-main.js index d3bbb1fcc3..09edf98545 100644 --- a/test-main.js +++ b/test-main.js @@ -44,14 +44,7 @@ require.config({ paths: { 'es6-promise': 'platform/framework/lib/es6-promise-2.0.0.min', - 'moment': 'platform/telemetry/lib/moment.min', - 'moment-duration-format': 'platform/features/clock/lib/moment-duration-format' - }, - - shim: { - 'moment-duration-format': { - deps: [ 'moment' ] - } + 'moment': 'platform/telemetry/lib/moment.min' }, // dynamically load all test files