Experimental unit tests for the Telemetry Table component (#2533)

* Initial commit of telemetry table spec
* Added example directory to linter paths. Fixed outstanding linting issues
This commit is contained in:
Andrew Henry 2019-11-27 16:04:52 -08:00 committed by GitHub
parent 72e382c46a
commit c51fd21847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
73 changed files with 3963 additions and 3757 deletions

View File

@ -22,59 +22,60 @@
/*global define*/ /*global define*/
define([ define([
"./src/EventTelemetryProvider", "./src/EventTelemetryProvider"
'legacyRegistry'
], function ( ], function (
EventTelemetryProvider, EventTelemetryProvider
legacyRegistry
) { ) {
"use strict"; "use strict";
legacyRegistry.register("example/eventGenerator", { return {
"name": "Event Message Generator", name:"example/eventGenerator",
"description": "For development use. Creates sample event message data that mimics a live data stream.", definition: {
"extensions": { "name": "Event Message Generator",
"components": [ "description": "For development use. Creates sample event message data that mimics a live data stream.",
{ "extensions": {
"implementation": EventTelemetryProvider, "components": [
"type": "provider", {
"provides": "telemetryService", "implementation": EventTelemetryProvider,
"depends": [ "type": "provider",
"$q", "provides": "telemetryService",
"$timeout" "depends": [
] "$q",
} "$timeout"
],
"types": [
{
"key": "eventGenerator",
"name": "Event Message Generator",
"cssClass": "icon-generator-events",
"description": "For development use. Creates sample event message data that mimics a live data stream.",
"priority": 10,
"features": "creation",
"model": {
"telemetry": {}
},
"telemetry": {
"source": "eventGenerator",
"domains": [
{
"key": "utc",
"name": "Timestamp",
"format": "utc"
}
],
"ranges": [
{
"key": "message",
"name": "Message",
"format": "string"
}
] ]
} }
} ],
] "types": [
{
"key": "eventGenerator",
"name": "Event Message Generator",
"cssClass": "icon-generator-events",
"description": "For development use. Creates sample event message data that mimics a live data stream.",
"priority": 10,
"features": "creation",
"model": {
"telemetry": {}
},
"telemetry": {
"source": "eventGenerator",
"domains": [
{
"key": "utc",
"name": "Timestamp",
"format": "utc"
}
],
"ranges": [
{
"key": "message",
"name": "Message",
"format": "string"
}
]
}
}
]
}
} }
}); };
}); });

View File

@ -48,11 +48,11 @@ define(
(domain !== 'delta' ? firstObservedTime : 0); (domain !== 'delta' ? firstObservedTime : 0);
}; };
generatorData.getRangeValue = function (i, range) { generatorData.getRangeValue = function (i, range) {
var domainDelta = this.getDomainValue(i) - firstObservedTime, var domainDelta = this.getDomainValue(i) - firstObservedTime,
ind = i % messages.length; ind = i % messages.length;
return messages[ind] + " - [" + domainDelta.toString() + "]"; return messages[ind] + " - [" + domainDelta.toString() + "]";
}; };
return generatorData; return generatorData;
} }

View File

@ -34,11 +34,9 @@ define(
* @constructor * @constructor
*/ */
function EventTelemetryProvider($q, $timeout) { function EventTelemetryProvider($q, $timeout) {
var var subscriptions = [],
subscriptions = [], genInterval = 1000,
genInterval = 1000, generating = false;
generating = false,
id = Math.random() * 100000;
// //
function matchesSource(request) { function matchesSource(request) {
@ -47,7 +45,6 @@ define(
// Used internally; this will be repacked by doPackage // Used internally; this will be repacked by doPackage
function generateData(request) { function generateData(request) {
//console.log("generateData " + (Date.now() - startTime).toString());
return { return {
key: request.key, key: request.key,
telemetry: new EventTelemetry(request, genInterval) telemetry: new EventTelemetry(request, genInterval)

View File

@ -58,15 +58,15 @@ define([], function () {
row, row,
i; i;
function copyDomainsToRow(row, index) { function copyDomainsToRow(telemetryRow, index) {
domains.forEach(function (domain) { domains.forEach(function (domain) {
row[domain.name] = series.getDomainValue(index, domain.key); telemetryRow[domain.name] = series.getDomainValue(index, domain.key);
}); });
} }
function copyRangesToRow(row, index) { function copyRangesToRow(telemetryRow, index) {
ranges.forEach(function (range) { ranges.forEach(function (range) {
row[range.name] = series.getRangeValue(index, range.key); telemetryRow[range.name] = series.getRangeValue(index, range.key);
}); });
} }

View File

@ -22,24 +22,26 @@
/*global define*/ /*global define*/
define([ define([
'legacyRegistry',
'./ExportTelemetryAsCSVAction' './ExportTelemetryAsCSVAction'
], function (legacyRegistry, ExportTelemetryAsCSVAction) { ], function (ExportTelemetryAsCSVAction) {
"use strict"; "use strict";
legacyRegistry.register("example/export", { return {
"name": "Example of using CSV Export", name:"example/export",
"extensions": { definition: {
"actions": [ "name": "Example of using CSV Export",
{ "extensions": {
"key": "example.export", "actions": [
"name": "Export Telemetry as CSV", {
"implementation": ExportTelemetryAsCSVAction, "key": "example.export",
"category": "contextual", "name": "Export Telemetry as CSV",
"cssClass": "icon-download", "implementation": ExportTelemetryAsCSVAction,
"depends": [ "exportService" ] "category": "contextual",
} "cssClass": "icon-download",
] "depends": ["exportService"]
}
]
}
} }
}); };
}); });

View File

@ -22,32 +22,33 @@
/*global define*/ /*global define*/
define([ define([
"./src/ExampleFormController", "./src/ExampleFormController"
'legacyRegistry'
], function ( ], function (
ExampleFormController, ExampleFormController
legacyRegistry
) { ) {
"use strict"; "use strict";
legacyRegistry.register("example/forms", { return {
"name": "Declarative Forms example", name:"example/forms",
"sources": "src", definition: {
"extensions": { "name": "Declarative Forms example",
"controllers": [ "sources": "src",
{ "extensions": {
"key": "ExampleFormController", "controllers": [
"implementation": ExampleFormController, {
"depends": [ "key": "ExampleFormController",
"$scope" "implementation": ExampleFormController,
] "depends": [
} "$scope"
], ]
"routes": [ }
{ ],
"templateUrl": "templates/exampleForm.html" "routes": [
} {
] "templateUrl": "templates/exampleForm.html"
}
]
}
} }
}); };
}); });

View File

@ -52,7 +52,7 @@ define([
'period', 'period',
'offset', 'offset',
'dataRateInHz', 'dataRateInHz',
'phase', 'phase'
]; ];
request = request || {}; request = request || {};

View File

@ -28,7 +28,7 @@ define([
) { ) {
var RED = { var RED = {
sin: 0.9, sin: 0.9,
cos: 0.9 cos: 0.9
}, },
YELLOW = { YELLOW = {
@ -74,7 +74,7 @@ define([
return { return {
evaluate: function (datum, valueMetadata) { evaluate: function (datum, valueMetadata) {
var range = valueMetadata && valueMetadata.key; var range = valueMetadata && valueMetadata.key;
if (datum[range] > RED[range]) { if (datum[range] > RED[range]) {
return LIMITS.rh; return LIMITS.rh;
} }

View File

@ -89,7 +89,7 @@ define([
WorkerInterface.prototype.subscribe = function (request, cb) { WorkerInterface.prototype.subscribe = function (request, cb) {
function callback(message) { function callback(message) {
cb(message.data); cb(message.data);
}; }
var messageId = this.dispatch('subscribe', request, callback); var messageId = this.dispatch('subscribe', request, callback);

View File

@ -84,10 +84,10 @@
function onRequest(message) { function onRequest(message) {
var request = message.data; var request = message.data;
if (request.end == undefined) { if (request.end === undefined) {
request.end = Date.now(); request.end = Date.now();
} }
if (request.start == undefined){ if (request.start === undefined) {
request.start = request.end - FIFTEEN_MINUTES; request.start = request.end - FIFTEEN_MINUTES;
} }

View File

@ -33,7 +33,7 @@ define([
GeneratorMetadataProvider GeneratorMetadataProvider
) { ) {
return function(openmct){ return function (openmct) {
openmct.types.addType("example.state-generator", { openmct.types.addType("example.state-generator", {
name: "State Generator", name: "State Generator",

View File

@ -22,27 +22,28 @@
/*global define*/ /*global define*/
define([ define([
"./src/ExampleIdentityService", "./src/ExampleIdentityService"
'legacyRegistry'
], function ( ], function (
ExampleIdentityService, ExampleIdentityService
legacyRegistry
) { ) {
"use strict"; "use strict";
legacyRegistry.register("example/identity", { return {
"extensions": { name:"example/identity",
"components": [ definition: {
{ "extensions": {
"implementation": ExampleIdentityService, "components": [
"provides": "identityService", {
"type": "provider", "implementation": ExampleIdentityService,
"depends": [ "provides": "identityService",
"dialogService", "type": "provider",
"$q" "depends": [
] "dialogService",
} "$q"
] ]
}
]
}
} }
}); };
}); });

View File

@ -22,31 +22,31 @@
define([ define([
], function( ], function (
) { ) {
function ImageryPlugin() { function ImageryPlugin() {
var IMAGE_SAMPLES = [ var IMAGE_SAMPLES = [
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18734.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18734.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18735.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18735.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18736.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18736.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18737.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18737.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18738.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18738.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18739.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18739.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18740.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18740.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18741.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18741.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18742.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18742.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18743.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18743.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18744.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18744.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18745.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18745.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18746.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18746.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg" "https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
]; ];
function pointForTimestamp(timestamp, name) { function pointForTimestamp(timestamp, name) {
return { return {
@ -65,7 +65,7 @@ define([
callback(pointForTimestamp(Date.now(), domainObject.name)); callback(pointForTimestamp(Date.now(), domainObject.name));
}, 5000); }, 5000);
return function (interval) { return function () {
clearInterval(interval); clearInterval(interval);
}; };
} }

View File

@ -21,25 +21,22 @@
*****************************************************************************/ *****************************************************************************/
/*global define*/ /*global define*/
define([ define([], function () {
'legacyRegistry'
], function (
legacyRegistry
) {
"use strict"; "use strict";
legacyRegistry.register("example/mobile", { return {
"name": "Mobile", name:"example/mobile",
"description": "Allows elements with pertinence to mobile usage and development", definition: {
"extensions": { "name": "Mobile",
"stylesheets": [ "description": "Allows elements with pertinence to mobile usage and development",
{ "extensions": {
"stylesheetUrl": "css/mobile-example.css", "stylesheets": [
"priority": "mandatory" {
} "stylesheetUrl": "css/mobile-example.css",
] "priority": "mandatory"
}
]
}
} }
}); };
}); });

View File

@ -24,92 +24,92 @@
define([ define([
"./src/RemsTelemetryServerAdapter", "./src/RemsTelemetryServerAdapter",
"./src/RemsTelemetryModelProvider", "./src/RemsTelemetryModelProvider",
"./src/RemsTelemetryProvider", "./src/RemsTelemetryProvider"
'legacyRegistry',
"module"
], function ( ], function (
RemsTelemetryServerAdapter, RemsTelemetryServerAdapter,
RemsTelemetryModelProvider, RemsTelemetryModelProvider,
RemsTelemetryProvider, RemsTelemetryProvider
legacyRegistry
) { ) {
"use strict"; "use strict";
legacyRegistry.register("example/msl", { return {
"name" : "Mars Science Laboratory Data Adapter", name:"example/msl",
"extensions" : { definition: {
"types": [ "name" : "Mars Science Laboratory Data Adapter",
{ "extensions" : {
"name":"Mars Science Laboratory", "types": [
"key": "msl.curiosity", {
"cssClass": "icon-object" "name":"Mars Science Laboratory",
}, "key": "msl.curiosity",
{ "cssClass": "icon-object"
"name": "Instrument", },
"key": "msl.instrument", {
"cssClass": "icon-object", "name": "Instrument",
"model": {"composition": []} "key": "msl.instrument",
}, "cssClass": "icon-object",
{ "model": {"composition": []}
"name": "Measurement", },
"key": "msl.measurement", {
"cssClass": "icon-telemetry", "name": "Measurement",
"model": {"telemetry": {}}, "key": "msl.measurement",
"telemetry": { "cssClass": "icon-telemetry",
"source": "rems.source", "model": {"telemetry": {}},
"domains": [ "telemetry": {
{ "source": "rems.source",
"name": "Time", "domains": [
"key": "utc", {
"format": "utc" "name": "Time",
} "key": "utc",
] "format": "utc"
}
]
}
} }
} ],
], "constants": [
"constants": [ {
{ "key": "REMS_WS_URL",
"key": "REMS_WS_URL", "value": "/proxyUrl?url=http://cab.inta-csic.es/rems/wp-content/plugins/marsweather-widget/api.php"
"value": "/proxyUrl?url=http://cab.inta-csic.es/rems/wp-content/plugins/marsweather-widget/api.php"
}
],
"roots": [
{
"id": "msl:curiosity"
}
],
"models": [
{
"id": "msl:curiosity",
"priority": "preferred",
"model": {
"type": "msl.curiosity",
"name": "Mars Science Laboratory",
"composition": ["msl_tlm:rems"]
} }
} ],
], "roots": [
"services": [ {
{ "id": "msl:curiosity"
"key":"rems.adapter", }
"implementation": RemsTelemetryServerAdapter, ],
"depends": ["$http", "$log", "REMS_WS_URL"] "models": [
} {
], "id": "msl:curiosity",
"components": [ "priority": "preferred",
{ "model": {
"provides": "modelService", "type": "msl.curiosity",
"type": "provider", "name": "Mars Science Laboratory",
"implementation": RemsTelemetryModelProvider, "composition": ["msl_tlm:rems"]
"depends": ["rems.adapter"] }
}, }
{ ],
"provides": "telemetryService", "services": [
"type": "provider", {
"implementation": RemsTelemetryProvider, "key":"rems.adapter",
"depends": ["rems.adapter", "$q"] "implementation": RemsTelemetryServerAdapter,
} "depends": ["$http", "$log", "REMS_WS_URL"]
] }
],
"components": [
{
"provides": "modelService",
"type": "provider",
"implementation": RemsTelemetryModelProvider,
"depends": ["rems.adapter"]
},
{
"provides": "telemetryService",
"type": "provider",
"implementation": RemsTelemetryProvider,
"depends": ["rems.adapter", "$q"]
}
]
}
} }
}); };
}); });

View File

@ -76,4 +76,4 @@ define(
] ]
}; };
} }
); );

View File

@ -22,7 +22,7 @@
/*global define*/ /*global define*/
define( define(
function (){ function () {
"use strict"; "use strict";
var PREFIX = "msl_tlm:", var PREFIX = "msl_tlm:",
@ -32,20 +32,20 @@ define(
string: "string" string: "string"
}; };
function RemsTelemetryModelProvider(adapter){ function RemsTelemetryModelProvider(adapter) {
function isRelevant(id) { function isRelevant(id) {
return id.indexOf(PREFIX) === 0; return id.indexOf(PREFIX) === 0;
} }
function makeId(element){ function makeId(element) {
return PREFIX + element.identifier; return PREFIX + element.identifier;
} }
function buildTaxonomy(dictionary){ function buildTaxonomy(dictionary) {
var models = {}; var models = {};
function addMeasurement(measurement, parent){ function addMeasurement(measurement, parent) {
var format = FORMAT_MAPPINGS[measurement.type]; var format = FORMAT_MAPPINGS[measurement.type];
models[makeId(measurement)] = { models[makeId(measurement)] = {
type: "msl.measurement", type: "msl.measurement",
@ -73,12 +73,12 @@ define(
location: spacecraftId, location: spacecraftId,
composition: measurements.map(makeId) composition: measurements.map(makeId)
}; };
measurements.forEach(function(measurement) { measurements.forEach(function (measurement) {
addMeasurement(measurement, instrumentId); addMeasurement(measurement, instrumentId);
}); });
} }
(dictionary.instruments || []).forEach(function(instrument) { (dictionary.instruments || []).forEach(function (instrument) {
addInstrument(instrument, "msl:curiosity"); addInstrument(instrument, "msl:curiosity");
}); });
return models; return models;

View File

@ -72,10 +72,10 @@ define (
* This data source does not support real-time subscriptions * This data source does not support real-time subscriptions
*/ */
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) { RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
return function() {}; return function () {};
}; };
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) { RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
return function() {}; return function () {};
}; };
return RemsTelemetryProvider; return RemsTelemetryProvider;

View File

@ -54,8 +54,8 @@ define(
* @returns {number} A count of the number of data values available in * @returns {number} A count of the number of data values available in
* this series * this series
*/ */
RemsTelemetrySeries.prototype.getPointCount = function() { RemsTelemetrySeries.prototype.getPointCount = function () {
return this.data.length; return this.data.length;
}; };
/** /**
* The domain value at the given index. The Rems telemetry data is * The domain value at the given index. The Rems telemetry data is
@ -64,8 +64,8 @@ define(
* @param index * @param index
* @returns {number} the time value in ms since 1 January 1970 * @returns {number} the time value in ms since 1 January 1970
*/ */
RemsTelemetrySeries.prototype.getDomainValue = function(index) { RemsTelemetrySeries.prototype.getDomainValue = function (index) {
return this.data[index].date; return this.data[index].date;
}; };
/** /**
@ -75,8 +75,8 @@ define(
* value of. * value of.
* @returns {number} A floating point number * @returns {number} A floating point number
*/ */
RemsTelemetrySeries.prototype.getRangeValue = function(index) { RemsTelemetrySeries.prototype.getRangeValue = function (index) {
return this.data[index].value; return this.data[index].value;
}; };
return RemsTelemetrySeries; return RemsTelemetrySeries;

View File

@ -68,18 +68,18 @@ define(
* given request ID. * given request ID.
* @private * @private
*/ */
RemsTelemetryServerAdapter.prototype.requestHistory = function(request) { RemsTelemetryServerAdapter.prototype.requestHistory = function (request) {
var self = this, var self = this,
id = request.key; id = request.key;
var dataTransforms = this.dataTransforms; var dataTransforms = this.dataTransforms;
function processResponse(response){ function processResponse(response) {
var data = []; var data = [];
/* /*
* History data is organised by Sol. Iterate over sols... * History data is organised by Sol. Iterate over sols...
*/ */
response.data.soles.forEach(function(solData){ response.data.soles.forEach(function (solData) {
/* /*
* Check that valid data exists * Check that valid data exists
*/ */
@ -106,13 +106,13 @@ define(
//Filter results to match request parameters //Filter results to match request parameters
function filterResults(results) { function filterResults(results) {
return results.filter(function(result){ return results.filter(function (result) {
return result.date >= (request.start || Number.MIN_VALUE) && return result.date >= (request.start || Number.MIN_VALUE) &&
result.date <= (request.end || Number.MAX_VALUE); result.date <= (request.end || Number.MAX_VALUE);
}); });
} }
function packageAndResolve(results){ function packageAndResolve(results) {
return {id: id, values: results}; return {id: id, values: results};
} }
@ -132,7 +132,7 @@ define(
* @param id The telemetry data point key to be queried. * @param id The telemetry data point key to be queried.
* @returns {Promise | Array<RemsTelemetryValue>} that resolves with an Array of {@link RemsTelemetryValue} objects for the request data key. * @returns {Promise | Array<RemsTelemetryValue>} that resolves with an Array of {@link RemsTelemetryValue} objects for the request data key.
*/ */
RemsTelemetryServerAdapter.prototype.history = function(request) { RemsTelemetryServerAdapter.prototype.history = function (request) {
return this.requestHistory(request); return this.requestHistory(request);
}; };

View File

@ -27,64 +27,65 @@ define([
"./src/DialogLaunchIndicator", "./src/DialogLaunchIndicator",
"./src/NotificationLaunchIndicator", "./src/NotificationLaunchIndicator",
"./res/dialog-launch.html", "./res/dialog-launch.html",
"./res/notification-launch.html", "./res/notification-launch.html"
'legacyRegistry'
], function ( ], function (
DialogLaunchController, DialogLaunchController,
NotificationLaunchController, NotificationLaunchController,
DialogLaunchIndicator, DialogLaunchIndicator,
NotificationLaunchIndicator, NotificationLaunchIndicator,
DialogLaunch, DialogLaunch,
NotificationLaunch, NotificationLaunch
legacyRegistry
) { ) {
"use strict"; "use strict";
legacyRegistry.register("example/notifications", { return {
"extensions": { name:"example/notifications",
"templates": [ definition: {
{ "extensions": {
"key": "dialogLaunchTemplate", "templates": [
"template": DialogLaunch {
}, "key": "dialogLaunchTemplate",
{ "template": DialogLaunch
"key": "notificationLaunchTemplate", },
"template": NotificationLaunch {
} "key": "notificationLaunchTemplate",
], "template": NotificationLaunch
"controllers": [ }
{ ],
"key": "DialogLaunchController", "controllers": [
"implementation": DialogLaunchController, {
"depends": [ "key": "DialogLaunchController",
"$scope", "implementation": DialogLaunchController,
"$timeout", "depends": [
"$log", "$scope",
"dialogService", "$timeout",
"notificationService" "$log",
] "dialogService",
}, "notificationService"
{ ]
"key": "NotificationLaunchController", },
"implementation": NotificationLaunchController, {
"depends": [ "key": "NotificationLaunchController",
"$scope", "implementation": NotificationLaunchController,
"$timeout", "depends": [
"$log", "$scope",
"notificationService" "$timeout",
] "$log",
} "notificationService"
], ]
"indicators": [ }
{ ],
"implementation": DialogLaunchIndicator, "indicators": [
"priority": "fallback" {
}, "implementation": DialogLaunchIndicator,
{ "priority": "fallback"
"implementation": NotificationLaunchIndicator, },
"priority": "fallback" {
} "implementation": NotificationLaunchIndicator,
] "priority": "fallback"
}
]
}
} }
}); };
}); });

View File

@ -137,12 +137,12 @@ define(
" attention to an event.", " attention to an event.",
severity: "info", severity: "info",
primaryOption: { primaryOption: {
label: "OK", label: "OK",
callback: function () { callback: function () {
$log.debug("OK Pressed"); $log.debug("OK Pressed");
dialog.dismiss(); dialog.dismiss();
}
} }
}
}; };
dialog = dialogService.showBlockingMessage(model); dialog = dialogService.showBlockingMessage(model);

View File

@ -22,33 +22,34 @@
/*global define*/ /*global define*/
define([ define([
"./src/BrowserPersistenceProvider", "./src/BrowserPersistenceProvider"
'legacyRegistry'
], function ( ], function (
BrowserPersistenceProvider, BrowserPersistenceProvider
legacyRegistry
) { ) {
"use strict"; "use strict";
legacyRegistry.register("example/persistence", { return {
"extensions": { name:"example/persistence",
"components": [ definition: {
{ "extensions": {
"provides": "persistenceService", "components": [
"type": "provider", {
"implementation": BrowserPersistenceProvider, "provides": "persistenceService",
"depends": [ "type": "provider",
"$q", "implementation": BrowserPersistenceProvider,
"PERSISTENCE_SPACE" "depends": [
] "$q",
} "PERSISTENCE_SPACE"
], ]
"constants": [ }
{ ],
"key": "PERSISTENCE_SPACE", "constants": [
"value": "mct" {
} "key": "PERSISTENCE_SPACE",
] "value": "mct"
}
]
}
} }
}); };
}); });

View File

@ -22,24 +22,25 @@
/*global define*/ /*global define*/
define([ define([
"./src/ExamplePolicy", "./src/ExamplePolicy"
'legacyRegistry'
], function ( ], function (
ExamplePolicy, ExamplePolicy
legacyRegistry
) { ) {
"use strict"; "use strict";
legacyRegistry.register("example/policy", { return {
"name": "Example Policy", name:"example/policy",
"description": "Provides an example of using policies to prohibit actions.", definition: {
"extensions": { "name": "Example Policy",
"policies": [ "description": "Provides an example of using policies to prohibit actions.",
{ "extensions": {
"implementation": ExamplePolicy, "policies": [
"category": "action" {
} "implementation": ExamplePolicy,
] "category": "action"
}
]
}
} }
}); };
}); });

View File

@ -23,33 +23,34 @@
define([ define([
"./src/WatchIndicator", "./src/WatchIndicator",
"./src/DigestIndicator", "./src/DigestIndicator"
'legacyRegistry'
], function ( ], function (
WatchIndicator, WatchIndicator,
DigestIndicator, DigestIndicator
legacyRegistry
) { ) {
"use strict"; "use strict";
legacyRegistry.register("example/profiling", { return {
"extensions": { name:"example/profiling",
"indicators": [ definition: {
{ "extensions": {
"implementation": WatchIndicator, "indicators": [
"depends": [ {
"$interval", "implementation": WatchIndicator,
"$rootScope" "depends": [
] "$interval",
}, "$rootScope"
{ ]
"implementation": DigestIndicator, },
"depends": [ {
"$interval", "implementation": DigestIndicator,
"$rootScope" "depends": [
] "$interval",
} "$rootScope"
] ]
}
]
}
} }
}); };
}); });

View File

@ -22,42 +22,43 @@
/*global define*/ /*global define*/
define([ define([
"./src/ScratchPersistenceProvider", "./src/ScratchPersistenceProvider"
'legacyRegistry'
], function ( ], function (
ScratchPersistenceProvider, ScratchPersistenceProvider
legacyRegistry
) { ) {
"use strict"; "use strict";
legacyRegistry.register("example/scratchpad", { return {
"extensions": { name:"example/scratchpad",
"roots": [ definition: {
{ "extensions": {
"id": "scratch:root" "roots": [
} {
], "id": "scratch:root"
"models": [ }
{ ],
"id": "scratch:root", "models": [
"model": { {
"type": "folder", "id": "scratch:root",
"composition": [], "model": {
"name": "Scratchpad" "type": "folder",
}, "composition": [],
"priority": "preferred" "name": "Scratchpad"
} },
], "priority": "preferred"
"components": [ }
{ ],
"provides": "persistenceService", "components": [
"type": "provider", {
"implementation": ScratchPersistenceProvider, "provides": "persistenceService",
"depends": [ "type": "provider",
"$q" "implementation": ScratchPersistenceProvider,
] "depends": [
} "$q"
] ]
}
]
}
} }
}); };
}); });

View File

@ -60,7 +60,7 @@ define(
ScratchPersistenceProvider.prototype.readObject = function (space, key) { ScratchPersistenceProvider.prototype.readObject = function (space, key) {
return this.$q.when( return this.$q.when(
(space === 'scratch' && this.table[key]) ? (space === 'scratch' && this.table[key]) ?
JSON.parse(this.table[key]) : undefined JSON.parse(this.table[key]) : undefined
); );
}; };

View File

@ -1,10 +1,8 @@
import Vue from 'Vue'; import Vue from 'Vue';
import HelloWorld from './HelloWorld.vue'; import HelloWorld from './HelloWorld.vue';
function SimpleVuePlugin () { function SimpleVuePlugin() {
return function install(openmct) { return function install(openmct) {
var views = (openmct.mainViews || openmct.objectViews);
openmct.types.addType('hello-world', { openmct.types.addType('hello-world', {
name: 'Hello World', name: 'Hello World',
description: 'An introduction object', description: 'An introduction object',

View File

@ -8,8 +8,7 @@ define([
"./res/templates/glyphs.html", "./res/templates/glyphs.html",
"./res/templates/controls.html", "./res/templates/controls.html",
"./res/templates/input.html", "./res/templates/input.html",
"./res/templates/menus.html", "./res/templates/menus.html"
'legacyRegistry'
], function ( ], function (
ExampleStyleGuideModelProvider, ExampleStyleGuideModelProvider,
MCTExample, MCTExample,
@ -20,13 +19,14 @@ define([
glyphsTemplate, glyphsTemplate,
controlsTemplate, controlsTemplate,
inputTemplate, inputTemplate,
menusTemplate, menusTemplate
legacyRegistry
) { ) {
legacyRegistry.register("example/styleguide", { return {
"name": "Open MCT Style Guide", name:"example/styleguide",
"description": "Examples and documentation illustrating UI styles in use in Open MCT.", definition: {
"extensions": "name": "Open MCT Style Guide",
"description": "Examples and documentation illustrating UI styles in use in Open MCT.",
"extensions":
{ {
"types": [ "types": [
{ "key": "styleguide.intro", "name": "Introduction", "cssClass": "icon-page", "description": "Introduction and overview to the style guide" }, { "key": "styleguide.intro", "name": "Introduction", "cssClass": "icon-page", "description": "Introduction and overview to the style guide" },
@ -103,5 +103,6 @@ define([
} }
] ]
} }
}); }
};
}); });

View File

@ -30,14 +30,14 @@ define(
var pages = {}; var pages = {};
// Add pages // Add pages
pages['intro'] = { name: "Introduction", type: "styleguide.intro", location: "styleguide:home" }; pages.intro = { name: "Introduction", type: "styleguide.intro", location: "styleguide:home" };
pages['standards'] = { name: "Standards", type: "styleguide.standards", location: "styleguide:home" }; pages.standards = { name: "Standards", type: "styleguide.standards", location: "styleguide:home" };
pages['colors'] = { name: "Colors", type: "styleguide.colors", location: "styleguide:home" }; pages.colors = { name: "Colors", type: "styleguide.colors", location: "styleguide:home" };
pages['glyphs'] = { name: "Glyphs", type: "styleguide.glyphs", location: "styleguide:home" }; pages.glyphs = { name: "Glyphs", type: "styleguide.glyphs", location: "styleguide:home" };
pages['status'] = { name: "Status Indication", type: "styleguide.status", location: "styleguide:home" }; pages.status = { name: "Status Indication", type: "styleguide.status", location: "styleguide:home" };
pages['controls'] = { name: "Controls", type: "styleguide.controls", location: "styleguide:ui-elements" }; pages.controls = { name: "Controls", type: "styleguide.controls", location: "styleguide:ui-elements" };
pages['input'] = { name: "Text Inputs", type: "styleguide.input", location: "styleguide:ui-elements" }; pages.input = { name: "Text Inputs", type: "styleguide.input", location: "styleguide:ui-elements" };
pages['menus'] = { name: "Menus", type: "styleguide.menus", location: "styleguide:ui-elements" }; pages.menus = { name: "Menus", type: "styleguide.menus", location: "styleguide:ui-elements" };
return { return {
getModels: function () { getModels: function () {
@ -48,4 +48,4 @@ define(
return ExampleStyleGuideModelProvider return ExampleStyleGuideModelProvider
} }
); );

View File

@ -74,8 +74,8 @@
}, },
"scripts": { "scripts": {
"start": "node app.js", "start": "node app.js",
"lint": "eslint platform src openmct.js", "lint": "eslint platform example src openmct.js",
"lint:fix": "eslint platform src openmct.js --fix", "lint:fix": "eslint platform example src openmct.js --fix",
"build:prod": "NODE_ENV=production webpack", "build:prod": "NODE_ENV=production webpack",
"build:dev": "webpack", "build:dev": "webpack",
"build:watch": "webpack --watch", "build:watch": "webpack --watch",

View File

@ -31,8 +31,7 @@ define([
"./res/templates/license-apache.html", "./res/templates/license-apache.html",
"./res/templates/license-mit.html", "./res/templates/license-mit.html",
"./res/templates/licenses.html", "./res/templates/licenses.html",
"./res/templates/licenses-export-md.html", "./res/templates/licenses-export-md.html"
'legacyRegistry'
], function ( ], function (
aboutDialogTemplate, aboutDialogTemplate,
LogoController, LogoController,
@ -44,137 +43,139 @@ define([
licenseApacheTemplate, licenseApacheTemplate,
licenseMitTemplate, licenseMitTemplate,
licensesTemplate, licensesTemplate,
licensesExportMdTemplate, licensesExportMdTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/commonUI/about", { return {
"name": "About Open MCT", name:"platform/commonUI/about",
"extensions": { definition: {
"templates": [ "name": "About Open MCT",
{ "extensions": {
"key": "app-logo", "templates": [
"priority": "optional", {
"template": appLogoTemplate "key": "app-logo",
}, "priority": "optional",
{ "template": appLogoTemplate
"key": "about-logo", },
"priority": "preferred", {
"template": aboutLogoTemplate "key": "about-logo",
}, "priority": "preferred",
{ "template": aboutLogoTemplate
"key": "about-dialog", },
"template": aboutDialogTemplate {
}, "key": "about-dialog",
{ "template": aboutDialogTemplate
"key": "overlay-about", },
"template": overlayAboutTemplate {
}, "key": "overlay-about",
{ "template": overlayAboutTemplate
"key": "license-apache", },
"template": licenseApacheTemplate {
}, "key": "license-apache",
{ "template": licenseApacheTemplate
"key": "license-mit", },
"template": licenseMitTemplate {
} "key": "license-mit",
], "template": licenseMitTemplate
"controllers": [ }
{ ],
"key": "LogoController", "controllers": [
"depends": [ {
"overlayService" "key": "LogoController",
], "depends": [
"implementation": LogoController "overlayService"
}, ],
{ "implementation": LogoController
"key": "AboutController", },
"depends": [ {
"versions[]", "key": "AboutController",
"$window" "depends": [
], "versions[]",
"implementation": AboutController "$window"
}, ],
{ "implementation": AboutController
"key": "LicenseController", },
"depends": [ {
"licenses[]" "key": "LicenseController",
], "depends": [
"implementation": LicenseController "licenses[]"
} ],
], "implementation": LicenseController
"licenses": [ }
{ ],
"name": "Json.NET", "licenses": [
"version": "6.0.8", {
"author": "Newtonsoft", "name": "Json.NET",
"description": "JSON serialization/deserialization", "version": "6.0.8",
"website": "http://www.newtonsoft.com/json", "author": "Newtonsoft",
"copyright": "Copyright (c) 2007 James Newton-King", "description": "JSON serialization/deserialization",
"license": "license-mit", "website": "http://www.newtonsoft.com/json",
"link": "https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md" "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", "name": "Nancy",
"description": "Embedded web server", "version": "0.23.2",
"website": "http://nancyfx.org/", "author": "Andreas Håkansson, Steven Robbins and contributors",
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors", "description": "Embedded web server",
"license": "license-mit", "website": "http://nancyfx.org/",
"link": "http://www.opensource.org/licenses/mit-license.php" "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", "name": "Nancy.Hosting.Self",
"description": "Embedded web server", "version": "0.23.2",
"website": "http://nancyfx.org/", "author": "Andreas Håkansson, Steven Robbins and contributors",
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors", "description": "Embedded web server",
"license": "license-mit", "website": "http://nancyfx.org/",
"link": "http://www.opensource.org/licenses/mit-license.php" "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", "name": "SuperSocket",
"description": "Supports SuperWebSocket", "version": "0.9.0.2",
"website": "https://supersocket.codeplex.com/", "author": " Kerry Jiang",
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)", "description": "Supports SuperWebSocket",
"license": "license-apache", "website": "https://supersocket.codeplex.com/",
"link": "https://supersocket.codeplex.com/license" "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", "name": "SuperWebSocket",
"description": "WebSocket implementation for client-server communication", "version": "0.9.0.2",
"website": "https://superwebsocket.codeplex.com/", "author": " Kerry Jiang",
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)", "description": "WebSocket implementation for client-server communication",
"license": "license-apache", "website": "https://superwebsocket.codeplex.com/",
"link": "https://superwebsocket.codeplex.com/license" "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", "name": "log4net",
"description": "Logging", "version": "2.0.3",
"website": "http://logging.apache.org/log4net/", "author": "Apache Software Foundation",
"copyright": "Copyright © 2004-2015 Apache Software Foundation.", "description": "Logging",
"license": "license-apache", "website": "http://logging.apache.org/log4net/",
"link": "http://logging.apache.org/log4net/license.html" "copyright": "Copyright © 2004-2015 Apache Software Foundation.",
} "license": "license-apache",
], "link": "http://logging.apache.org/log4net/license.html"
"routes": [ }
{ ],
"when": "/licenses", "routes": [
"template": licensesTemplate {
}, "when": "/licenses",
{ "template": licensesTemplate
"when": "/licenses-md", },
"template": licensesExportMdTemplate {
} "when": "/licenses-md",
] "template": licensesExportMdTemplate
}
]
}
} }
}); };
}); });

View File

@ -32,8 +32,7 @@ define([
"./res/templates/menu-arrow.html", "./res/templates/menu-arrow.html",
"./res/templates/back-arrow.html", "./res/templates/back-arrow.html",
"./res/templates/browse/object-properties.html", "./res/templates/browse/object-properties.html",
"./res/templates/browse/inspector-region.html", "./res/templates/browse/inspector-region.html"
'legacyRegistry'
], function ( ], function (
NavigationService, NavigationService,
NavigateAction, NavigateAction,
@ -46,131 +45,133 @@ define([
menuArrowTemplate, menuArrowTemplate,
backArrowTemplate, backArrowTemplate,
objectPropertiesTemplate, objectPropertiesTemplate,
inspectorRegionTemplate, inspectorRegionTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/commonUI/browse", { return {
"extensions": { name:"platform/commonUI/browse",
"routes": [ definition: {
], "extensions": {
"constants": [ "routes": [
{ ],
"key": "DEFAULT_PATH", "constants": [
"value": "mine", {
"priority": "fallback" "key": "DEFAULT_PATH",
} "value": "mine",
], "priority": "fallback"
"representations": [ }
{ ],
"key": "browse-object", "representations": [
"template": browseObjectTemplate, {
"gestures": [ "key": "browse-object",
"drop" "template": browseObjectTemplate,
], "gestures": [
"uses": [ "drop"
"view" ],
] "uses": [
}, "view"
{ ]
"key": "object-header", },
"template": objectHeaderTemplate, {
"uses": [ "key": "object-header",
"type" "template": objectHeaderTemplate,
] "uses": [
}, "type"
{ ]
"key": "object-header-frame", },
"template": objectHeaderFrameTemplate, {
"uses": [ "key": "object-header-frame",
"type" "template": objectHeaderFrameTemplate,
] "uses": [
}, "type"
{ ]
"key": "menu-arrow", },
"template": menuArrowTemplate, {
"uses": [ "key": "menu-arrow",
"action" "template": menuArrowTemplate,
], "uses": [
"gestures": [ "action"
"menu" ],
] "gestures": [
}, "menu"
{ ]
"key": "back-arrow", },
"uses": [ {
"context" "key": "back-arrow",
], "uses": [
"template": backArrowTemplate "context"
}, ],
{ "template": backArrowTemplate
"key": "object-properties", },
"template": objectPropertiesTemplate {
}, "key": "object-properties",
{ "template": objectPropertiesTemplate
"key": "inspector-region", },
"template": inspectorRegionTemplate {
} "key": "inspector-region",
], "template": inspectorRegionTemplate
"services": [ }
{ ],
"key": "navigationService", "services": [
"implementation": NavigationService, {
"depends": [ "key": "navigationService",
"$window" "implementation": NavigationService,
] "depends": [
} "$window"
], ]
"actions": [ }
{ ],
"key": "navigate", "actions": [
"implementation": NavigateAction, {
"depends": [ "key": "navigate",
"navigationService" "implementation": NavigateAction,
] "depends": [
}, "navigationService"
{ ]
"key": "window", },
"name": "Open In New Tab", {
"implementation": NewTabAction, "key": "window",
"description": "Open in a new browser tab", "name": "Open In New Tab",
"category": [ "implementation": NewTabAction,
"view-control", "description": "Open in a new browser tab",
"contextual" "category": [
], "view-control",
"depends": [ "contextual"
"urlService", ],
"$window" "depends": [
], "urlService",
"group": "windowing", "$window"
"cssClass": "icon-new-window", ],
"priority": "preferred" "group": "windowing",
} "cssClass": "icon-new-window",
], "priority": "preferred"
"runs": [ }
{ ],
"implementation": OrphanNavigationHandler, "runs": [
"depends": [ {
"throttle", "implementation": OrphanNavigationHandler,
"topic", "depends": [
"navigationService" "throttle",
] "topic",
} "navigationService"
], ]
"templates": [ }
{ ],
key: "browseRoot", "templates": [
template: browseTemplate {
}, key: "browseRoot",
{ template: browseTemplate
key: "browseObject", },
template: browseObjectTemplate {
}, key: "browseObject",
{ template: browseObjectTemplate
key: "inspectorRegion", },
template: inspectorRegionTemplate {
} key: "inspectorRegion",
] template: inspectorRegionTemplate
}
]
}
} }
}); };
}); });

View File

@ -30,8 +30,7 @@ define([
"./res/templates/message.html", "./res/templates/message.html",
"./res/templates/notification-message.html", "./res/templates/notification-message.html",
"./res/templates/overlay-message-list.html", "./res/templates/overlay-message-list.html",
"./res/templates/overlay.html", "./res/templates/overlay.html"
'legacyRegistry'
], function ( ], function (
DialogService, DialogService,
OverlayService, OverlayService,
@ -42,70 +41,72 @@ define([
messageTemplate, messageTemplate,
notificationMessageTemplate, notificationMessageTemplate,
overlayMessageListTemplate, overlayMessageListTemplate,
overlayTemplate, overlayTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/commonUI/dialog", { return {
"extensions": { name:"platform/commonUI/dialog",
"services": [ definition: {
{ "extensions": {
"key": "dialogService", "services": [
"implementation": DialogService, {
"depends": [ "key": "dialogService",
"overlayService", "implementation": DialogService,
"$q", "depends": [
"$log", "overlayService",
"$document" "$q",
] "$log",
}, "$document"
{ ]
"key": "overlayService", },
"implementation": OverlayService, {
"depends": [ "key": "overlayService",
"$document", "implementation": OverlayService,
"$compile", "depends": [
"$rootScope", "$document",
"$timeout" "$compile",
] "$rootScope",
} "$timeout"
], ]
"templates": [ }
{ ],
"key": "overlay-dialog", "templates": [
"template": overlayDialogTemplate {
}, "key": "overlay-dialog",
{ "template": overlayDialogTemplate
"key": "overlay-options", },
"template": overlayOptionsTemplate {
}, "key": "overlay-options",
{ "template": overlayOptionsTemplate
"key": "form-dialog", },
"template": dialogTemplate {
}, "key": "form-dialog",
{ "template": dialogTemplate
"key": "overlay-blocking-message", },
"template": overlayBlockingMessageTemplate {
}, "key": "overlay-blocking-message",
{ "template": overlayBlockingMessageTemplate
"key": "message", },
"template": messageTemplate {
}, "key": "message",
{ "template": messageTemplate
"key": "notification-message", },
"template": notificationMessageTemplate {
}, "key": "notification-message",
{ "template": notificationMessageTemplate
"key": "overlay-message-list", },
"template": overlayMessageListTemplate {
} "key": "overlay-message-list",
], "template": overlayMessageListTemplate
"containers": [ }
{ ],
"key": "overlay", "containers": [
"template": overlayTemplate {
} "key": "overlay",
] "template": overlayTemplate
}
]
}
} }
}); };
}); });

View File

@ -48,8 +48,7 @@ define([
"./res/templates/library.html", "./res/templates/library.html",
"./res/templates/edit-object.html", "./res/templates/edit-object.html",
"./res/templates/edit-action-buttons.html", "./res/templates/edit-action-buttons.html",
"./res/templates/topbar-edit.html", "./res/templates/topbar-edit.html"
'legacyRegistry'
], function ( ], function (
EditActionController, EditActionController,
EditPanesController, EditPanesController,
@ -78,276 +77,277 @@ define([
libraryTemplate, libraryTemplate,
editObjectTemplate, editObjectTemplate,
editActionButtonsTemplate, editActionButtonsTemplate,
topbarEditTemplate, topbarEditTemplate
legacyRegistry
) { ) {
return {
legacyRegistry.register("platform/commonUI/edit", { name: "platform/commonUI/edit",
"extensions": { definition: {
"controllers": [ "extensions": {
{ "controllers": [
"key": "EditActionController", {
"implementation": EditActionController, "key": "EditActionController",
"depends": [ "implementation": EditActionController,
"$scope" "depends": [
] "$scope"
}, ]
{ },
"key": "EditPanesController", {
"implementation": EditPanesController, "key": "EditPanesController",
"depends": [ "implementation": EditPanesController,
"$scope" "depends": [
] "$scope"
}, ]
{ },
"key": "EditObjectController", {
"implementation": EditObjectController, "key": "EditObjectController",
"depends": [ "implementation": EditObjectController,
"$scope", "depends": [
"$location", "$scope",
"navigationService" "$location",
] "navigationService"
}, ]
{ },
"key": "CreateMenuController", {
"implementation": CreateMenuController, "key": "CreateMenuController",
"depends": [ "implementation": CreateMenuController,
"$scope" "depends": [
] "$scope"
}, ]
{ },
"key": "LocatorController", {
"implementation": LocatorController, "key": "LocatorController",
"depends": [ "implementation": LocatorController,
"$scope", "depends": [
"$timeout", "$scope",
"objectService" "$timeout",
] "objectService"
} ]
],
"actions": [
{
"key": "compose",
"implementation": EditAndComposeAction
},
{
"key": "edit",
"implementation": EditAction,
"depends": [
"$location",
"navigationService",
"$log"
],
"description": "Edit",
"category": "view-control",
"cssClass": "major icon-pencil"
},
{
"key": "properties",
"category": [
"contextual",
"view-control"
],
"implementation": PropertiesAction,
"cssClass": "major icon-pencil",
"name": "Edit Properties...",
"description": "Edit properties of this object.",
"depends": [
"dialogService"
]
},
{
"key": "save-and-stop-editing",
"category": "save",
"implementation": SaveAndStopEditingAction,
"name": "Save and Finish Editing",
"cssClass": "icon-save labeled",
"description": "Save changes made to these objects.",
"depends": [
"dialogService",
"notificationService"
]
},
{
"key": "save",
"category": "save",
"implementation": SaveAction,
"name": "Save and Continue Editing",
"cssClass": "icon-save labeled",
"description": "Save changes made to these objects.",
"depends": [
"dialogService",
"notificationService"
]
},
{
"key": "save-as",
"category": "save",
"implementation": SaveAsAction,
"name": "Save As...",
"cssClass": "icon-save labeled",
"description": "Save changes made to these objects.",
"depends": [
"$injector",
"dialogService",
"copyService",
"notificationService",
"openmct"
],
"priority": "mandatory"
},
{
"key": "cancel",
"category": "conclude-editing",
"implementation": CancelAction,
// Because we use the name as label for edit buttons and mct-control buttons need
// the label to be set to undefined in order to not apply the labeled CSS rule.
"name": undefined,
"cssClass": "icon-x no-label",
"description": "Discard changes made to these objects.",
"depends": []
}
],
"policies": [
{
"category": "action",
"implementation": EditPersistableObjectsPolicy,
"depends": ["openmct"]
},
{
"implementation": CreationPolicy,
"category": "creation"
}
],
"templates": [
{
"key": "edit-library",
"template": libraryTemplate
}
],
"representations": [
{
"key": "edit-object",
"template": editObjectTemplate,
"uses": [
"view"
],
"gestures": [
"drop"
]
},
{
"key": "edit-action-buttons",
"template": editActionButtonsTemplate,
"uses": [
"action"
]
},
{
"key": "topbar-edit",
"template": topbarEditTemplate
},
{
"key": "create-button",
"template": createButtonTemplate
},
{
"key": "create-menu",
"template": createMenuTemplate,
"uses": [
"action"
]
}
],
"components": [
{
"type": "decorator",
"provides": "capabilityService",
"implementation": TransactionCapabilityDecorator,
"depends": [
"$q",
"transactionManager"
],
"priority": "fallback"
},
{
"type": "provider",
"provides": "transactionService",
"implementation": TransactionService,
"depends": [
"$q",
"$log",
"cacheService"
]
},
{
"key": "CreateActionProvider",
"provides": "actionService",
"type": "provider",
"implementation": CreateActionProvider,
"depends": [
"typeService",
"policyService"
]
},
{
"key": "CreationService",
"provides": "creationService",
"type": "provider",
"implementation": CreationService,
"depends": [
"$q",
"$log"
]
}
],
"representers": [
{
"implementation": EditRepresenter,
"depends": [
"$log"
]
}
],
"capabilities": [
{
"key": "editor",
"name": "Editor Capability",
"description": "Provides transactional editing capabilities",
"implementation": EditorCapability,
"depends": [
"transactionService",
"openmct"
]
}
],
"controls": [
{
"key": "locator",
"template": locatorTemplate
}
],
"services": [
{
"key": "transactionManager",
"implementation": TransactionManager,
"depends": [
"transactionService"
]
}
],
"runs": [
{
depends: [
"toolbars[]",
"openmct"
],
implementation: function (toolbars, openmct) {
toolbars.forEach(openmct.toolbars.addProvider, openmct.toolbars);
} }
} ],
] "actions": [
{
"key": "compose",
"implementation": EditAndComposeAction
},
{
"key": "edit",
"implementation": EditAction,
"depends": [
"$location",
"navigationService",
"$log"
],
"description": "Edit",
"category": "view-control",
"cssClass": "major icon-pencil"
},
{
"key": "properties",
"category": [
"contextual",
"view-control"
],
"implementation": PropertiesAction,
"cssClass": "major icon-pencil",
"name": "Edit Properties...",
"description": "Edit properties of this object.",
"depends": [
"dialogService"
]
},
{
"key": "save-and-stop-editing",
"category": "save",
"implementation": SaveAndStopEditingAction,
"name": "Save and Finish Editing",
"cssClass": "icon-save labeled",
"description": "Save changes made to these objects.",
"depends": [
"dialogService",
"notificationService"
]
},
{
"key": "save",
"category": "save",
"implementation": SaveAction,
"name": "Save and Continue Editing",
"cssClass": "icon-save labeled",
"description": "Save changes made to these objects.",
"depends": [
"dialogService",
"notificationService"
]
},
{
"key": "save-as",
"category": "save",
"implementation": SaveAsAction,
"name": "Save As...",
"cssClass": "icon-save labeled",
"description": "Save changes made to these objects.",
"depends": [
"$injector",
"dialogService",
"copyService",
"notificationService",
"openmct"
],
"priority": "mandatory"
},
{
"key": "cancel",
"category": "conclude-editing",
"implementation": CancelAction,
// Because we use the name as label for edit buttons and mct-control buttons need
// the label to be set to undefined in order to not apply the labeled CSS rule.
"name": undefined,
"cssClass": "icon-x no-label",
"description": "Discard changes made to these objects.",
"depends": []
}
],
"policies": [
{
"category": "action",
"implementation": EditPersistableObjectsPolicy,
"depends": ["openmct"]
},
{
"implementation": CreationPolicy,
"category": "creation"
}
],
"templates": [
{
"key": "edit-library",
"template": libraryTemplate
}
],
"representations": [
{
"key": "edit-object",
"template": editObjectTemplate,
"uses": [
"view"
],
"gestures": [
"drop"
]
},
{
"key": "edit-action-buttons",
"template": editActionButtonsTemplate,
"uses": [
"action"
]
},
{
"key": "topbar-edit",
"template": topbarEditTemplate
},
{
"key": "create-button",
"template": createButtonTemplate
},
{
"key": "create-menu",
"template": createMenuTemplate,
"uses": [
"action"
]
}
],
"components": [
{
"type": "decorator",
"provides": "capabilityService",
"implementation": TransactionCapabilityDecorator,
"depends": [
"$q",
"transactionManager"
],
"priority": "fallback"
},
{
"type": "provider",
"provides": "transactionService",
"implementation": TransactionService,
"depends": [
"$q",
"$log",
"cacheService"
]
},
{
"key": "CreateActionProvider",
"provides": "actionService",
"type": "provider",
"implementation": CreateActionProvider,
"depends": [
"typeService",
"policyService"
]
},
{
"key": "CreationService",
"provides": "creationService",
"type": "provider",
"implementation": CreationService,
"depends": [
"$q",
"$log"
]
}
],
"representers": [
{
"implementation": EditRepresenter,
"depends": [
"$log"
]
}
],
"capabilities": [
{
"key": "editor",
"name": "Editor Capability",
"description": "Provides transactional editing capabilities",
"implementation": EditorCapability,
"depends": [
"transactionService",
"openmct"
]
}
],
"controls": [
{
"key": "locator",
"template": locatorTemplate
}
],
"services": [
{
"key": "transactionManager",
"implementation": TransactionManager,
"depends": [
"transactionService"
]
}
],
"runs": [
{
depends: [
"toolbars[]",
"openmct"
],
implementation: function (toolbars, openmct) {
toolbars.forEach(openmct.toolbars.addProvider, openmct.toolbars);
}
}
]
}
} }
}); };
}); });

View File

@ -23,56 +23,57 @@
define([ define([
"./src/FormatProvider", "./src/FormatProvider",
"./src/UTCTimeFormat", "./src/UTCTimeFormat",
"./src/DurationFormat", "./src/DurationFormat"
'legacyRegistry'
], function ( ], function (
FormatProvider, FormatProvider,
UTCTimeFormat, UTCTimeFormat,
DurationFormat, DurationFormat
legacyRegistry
) { ) {
legacyRegistry.register("platform/commonUI/formats", { return {
"name": "Format Registry", name:"platform/commonUI/formats",
"description": "Provides a registry for formats, which allow parsing and formatting of values.", definition: {
"extensions": { "name": "Format Registry",
"components": [ "description": "Provides a registry for formats, which allow parsing and formatting of values.",
{ "extensions": {
"provides": "formatService", "components": [
"type": "provider", {
"implementation": FormatProvider, "provides": "formatService",
"depends": [ "type": "provider",
"formats[]" "implementation": FormatProvider,
] "depends": [
} "formats[]"
], ]
"formats": [ }
{ ],
"key": "utc", "formats": [
"implementation": UTCTimeFormat {
}, "key": "utc",
{ "implementation": UTCTimeFormat
"key": "duration", },
"implementation": DurationFormat {
} "key": "duration",
], "implementation": DurationFormat
"constants": [ }
{ ],
"key": "DEFAULT_TIME_FORMAT", "constants": [
"value": "utc" {
} "key": "DEFAULT_TIME_FORMAT",
], "value": "utc"
"licenses": [ }
{ ],
"name": "d3", "licenses": [
"version": "3.0.0", {
"description": "Incorporates modified code from d3 Time Scales", "name": "d3",
"author": "Mike Bostock", "version": "3.0.0",
"copyright": "Copyright 2010-2016 Mike Bostock. " + "description": "Incorporates modified code from d3 Time Scales",
"author": "Mike Bostock",
"copyright": "Copyright 2010-2016 Mike Bostock. " +
"All rights reserved.", "All rights reserved.",
"link": "https://github.com/d3/d3/blob/master/LICENSE" "link": "https://github.com/d3/d3/blob/master/LICENSE"
} }
] ]
}
} }
}); };
}); });

View File

@ -66,8 +66,7 @@ define([
"./res/templates/object-inspector.html", "./res/templates/object-inspector.html",
"./res/templates/controls/selector.html", "./res/templates/controls/selector.html",
"./res/templates/controls/datetime-picker.html", "./res/templates/controls/datetime-picker.html",
"./res/templates/controls/datetime-field.html", "./res/templates/controls/datetime-field.html"
'legacyRegistry'
], function ( ], function (
UrlService, UrlService,
PopupService, PopupService,
@ -114,415 +113,417 @@ define([
objectInspectorTemplate, objectInspectorTemplate,
selectorTemplate, selectorTemplate,
datetimePickerTemplate, datetimePickerTemplate,
datetimeFieldTemplate, datetimeFieldTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/commonUI/general", { return {
"name": "General UI elements", name:"platform/commonUI/general",
"description": "General UI elements, meant to be reused across modes", definition: {
"resources": "res", "name": "General UI elements",
"extensions": { "description": "General UI elements, meant to be reused across modes",
"services": [ "resources": "res",
{ "extensions": {
"key": "urlService", "services": [
"implementation": UrlService, {
"depends": [ "key": "urlService",
"$location" "implementation": UrlService,
] "depends": [
}, "$location"
{ ]
"key": "popupService", },
"implementation": PopupService, {
"depends": [ "key": "popupService",
"$document", "implementation": PopupService,
"$window" "depends": [
] "$document",
} "$window"
], ]
"runs": [ }
{ ],
"implementation": StyleSheetLoader, "runs": [
"depends": [ {
"stylesheets[]", "implementation": StyleSheetLoader,
"$document", "depends": [
"THEME", "stylesheets[]",
"ASSETS_PATH" "$document",
] "THEME",
}, "ASSETS_PATH"
{ ]
"implementation": SplashScreenManager, },
"depends": [ {
"$document" "implementation": SplashScreenManager,
] "depends": [
} "$document"
], ]
"filters": [ }
{ ],
"implementation": ReverseFilter, "filters": [
"key": "reverse" {
} "implementation": ReverseFilter,
], "key": "reverse"
"templates": [ }
{ ],
"key": "bottombar", "templates": [
"template": bottombarTemplate {
}, "key": "bottombar",
{ "template": bottombarTemplate
"key": "action-button", },
"template": actionButtonTemplate {
}, "key": "action-button",
{ "template": actionButtonTemplate
"key": "input-filter", },
"template": inputFilterTemplate {
}, "key": "input-filter",
{ "template": inputFilterTemplate
"key": "indicator", },
"template": indicatorTemplate {
}, "key": "indicator",
{ "template": indicatorTemplate
"key": "message-banner", },
"template": messageBannerTemplate {
}, "key": "message-banner",
{ "template": messageBannerTemplate
"key": "progress-bar", },
"template": progressBarTemplate {
}, "key": "progress-bar",
{ "template": progressBarTemplate
"key": "time-controller", },
"template": timeControllerTemplate {
} "key": "time-controller",
], "template": timeControllerTemplate
"controllers": [ }
{ ],
"key": "TimeRangeController", "controllers": [
"implementation": TimeRangeController, {
"depends": [ "key": "TimeRangeController",
"$scope", "implementation": TimeRangeController,
"$timeout", "depends": [
"formatService", "$scope",
"DEFAULT_TIME_FORMAT", "$timeout",
"now" "formatService",
] "DEFAULT_TIME_FORMAT",
}, "now"
{ ]
"key": "DateTimePickerController", },
"implementation": DateTimePickerController, {
"depends": [ "key": "DateTimePickerController",
"$scope", "implementation": DateTimePickerController,
"now" "depends": [
] "$scope",
}, "now"
{ ]
"key": "DateTimeFieldController", },
"implementation": DateTimeFieldController, {
"depends": [ "key": "DateTimeFieldController",
"$scope", "implementation": DateTimeFieldController,
"formatService", "depends": [
"DEFAULT_TIME_FORMAT" "$scope",
] "formatService",
}, "DEFAULT_TIME_FORMAT"
{ ]
"key": "TreeNodeController", },
"implementation": TreeNodeController, {
"depends": [ "key": "TreeNodeController",
"$scope", "implementation": TreeNodeController,
"$timeout", "depends": [
"navigationService" "$scope",
] "$timeout",
}, "navigationService"
{ ]
"key": "ActionGroupController", },
"implementation": ActionGroupController, {
"depends": [ "key": "ActionGroupController",
"$scope" "implementation": ActionGroupController,
] "depends": [
}, "$scope"
{ ]
"key": "ToggleController", },
"implementation": ToggleController {
}, "key": "ToggleController",
{ "implementation": ToggleController
"key": "ClickAwayController", },
"implementation": ClickAwayController, {
"depends": [ "key": "ClickAwayController",
"$document", "implementation": ClickAwayController,
"$timeout" "depends": [
] "$document",
}, "$timeout"
{ ]
"key": "ViewSwitcherController", },
"implementation": ViewSwitcherController, {
"depends": [ "key": "ViewSwitcherController",
"$scope", "implementation": ViewSwitcherController,
"$timeout" "depends": [
] "$scope",
}, "$timeout"
{ ]
"key": "GetterSetterController", },
"implementation": GetterSetterController, {
"depends": [ "key": "GetterSetterController",
"$scope" "implementation": GetterSetterController,
] "depends": [
}, "$scope"
{ ]
"key": "SelectorController", },
"implementation": SelectorController, {
"depends": [ "key": "SelectorController",
"objectService", "implementation": SelectorController,
"$scope" "depends": [
] "objectService",
}, "$scope"
{ ]
"key": "ObjectInspectorController", },
"implementation": ObjectInspectorController, {
"depends": [ "key": "ObjectInspectorController",
"$scope", "implementation": ObjectInspectorController,
"objectService" "depends": [
] "$scope",
}, "objectService"
{ ]
"key": "BannerController", },
"implementation": BannerController, {
"depends": [ "key": "BannerController",
"$scope", "implementation": BannerController,
"notificationService", "depends": [
"dialogService" "$scope",
] "notificationService",
} "dialogService"
], ]
"directives": [ }
{ ],
"key": "mctContainer", "directives": [
"implementation": MCTContainer, {
"depends": [ "key": "mctContainer",
"containers[]" "implementation": MCTContainer,
] "depends": [
}, "containers[]"
{ ]
"key": "mctDrag", },
"implementation": MCTDrag, {
"depends": [ "key": "mctDrag",
"$document", "implementation": MCTDrag,
"agentService" "depends": [
] "$document",
}, "agentService"
{ ]
"key": "mctSelectable", },
"implementation": MCTSelectable, {
"depends": [ "key": "mctSelectable",
"openmct" "implementation": MCTSelectable,
] "depends": [
}, "openmct"
{ ]
"key": "mctClickElsewhere", },
"implementation": MCTClickElsewhere, {
"depends": [ "key": "mctClickElsewhere",
"$document" "implementation": MCTClickElsewhere,
] "depends": [
}, "$document"
{ ]
"key": "mctResize", },
"implementation": MCTResize, {
"depends": [ "key": "mctResize",
"$timeout" "implementation": MCTResize,
] "depends": [
}, "$timeout"
{ ]
"key": "mctPopup", },
"implementation": MCTPopup, {
"depends": [ "key": "mctPopup",
"$compile", "implementation": MCTPopup,
"popupService" "depends": [
] "$compile",
}, "popupService"
{ ]
"key": "mctScrollX", },
"implementation": MCTScroll, {
"depends": [ "key": "mctScrollX",
"$parse", "implementation": MCTScroll,
"MCT_SCROLL_X_PROPERTY", "depends": [
"MCT_SCROLL_X_ATTRIBUTE" "$parse",
] "MCT_SCROLL_X_PROPERTY",
}, "MCT_SCROLL_X_ATTRIBUTE"
{ ]
"key": "mctScrollY", },
"implementation": MCTScroll, {
"depends": [ "key": "mctScrollY",
"$parse", "implementation": MCTScroll,
"MCT_SCROLL_Y_PROPERTY", "depends": [
"MCT_SCROLL_Y_ATTRIBUTE" "$parse",
] "MCT_SCROLL_Y_PROPERTY",
}, "MCT_SCROLL_Y_ATTRIBUTE"
{ ]
"key": "mctSplitPane", },
"implementation": MCTSplitPane, {
"depends": [ "key": "mctSplitPane",
"$parse", "implementation": MCTSplitPane,
"$log", "depends": [
"$interval", "$parse",
"$window" "$log",
] "$interval",
}, "$window"
{ ]
"key": "mctSplitter", },
"implementation": MCTSplitter {
}, "key": "mctSplitter",
{ "implementation": MCTSplitter
"key": "mctTree", },
"implementation": MCTTree, {
"depends": ['gestureService', 'openmct'] "key": "mctTree",
}, "implementation": MCTTree,
{ "depends": ['gestureService', 'openmct']
"key": "mctIndicators", },
"implementation": MCTIndicators, {
"depends": ['openmct'] "key": "mctIndicators",
} "implementation": MCTIndicators,
], "depends": ['openmct']
"constants": [ }
{ ],
"key": "MCT_SCROLL_X_PROPERTY", "constants": [
"value": "scrollLeft" {
}, "key": "MCT_SCROLL_X_PROPERTY",
{ "value": "scrollLeft"
"key": "MCT_SCROLL_X_ATTRIBUTE", },
"value": "mctScrollX" {
}, "key": "MCT_SCROLL_X_ATTRIBUTE",
{ "value": "mctScrollX"
"key": "MCT_SCROLL_Y_PROPERTY", },
"value": "scrollTop" {
}, "key": "MCT_SCROLL_Y_PROPERTY",
{ "value": "scrollTop"
"key": "MCT_SCROLL_Y_ATTRIBUTE", },
"value": "mctScrollY" {
}, "key": "MCT_SCROLL_Y_ATTRIBUTE",
{ "value": "mctScrollY"
"key": "THEME", },
"value": "unspecified", {
"priority": "fallback" "key": "THEME",
}, "value": "unspecified",
{ "priority": "fallback"
"key": "ASSETS_PATH", },
"value": ".", {
"priority": "fallback" "key": "ASSETS_PATH",
} "value": ".",
], "priority": "fallback"
"containers": [ }
{ ],
"key": "accordion", "containers": [
"template": accordionTemplate, {
"attributes": [ "key": "accordion",
"label" "template": accordionTemplate,
] "attributes": [
} "label"
], ]
"representations": [ }
{ ],
"key": "tree", "representations": [
"template": subtreeTemplate, {
"uses": [ "key": "tree",
"composition" "template": subtreeTemplate,
], "uses": [
"type": "root", "composition"
"priority": "preferred" ],
}, "type": "root",
{ "priority": "preferred"
"key": "tree", },
"template": treeTemplate {
}, "key": "tree",
{ "template": treeTemplate
"key": "subtree", },
"template": subtreeTemplate, {
"uses": [ "key": "subtree",
"composition" "template": subtreeTemplate,
] "uses": [
}, "composition"
{ ]
"key": "tree-node", },
"template": treeNodeTemplate, {
"uses": [ "key": "tree-node",
"action" "template": treeNodeTemplate,
] "uses": [
}, "action"
{ ]
"key": "label", },
"template": labelTemplate, {
"uses": [ "key": "label",
"type", "template": labelTemplate,
"location" "uses": [
], "type",
"gestures": [ "location"
"drag", ],
"menu", "gestures": [
"info" "drag",
] "menu",
}, "info"
{ ]
"key": "node", },
"template": labelTemplate, {
"uses": [ "key": "node",
"type" "template": labelTemplate,
], "uses": [
"gestures": [ "type"
"drag", ],
"menu" "gestures": [
] "drag",
}, "menu"
{ ]
"key": "action-group", },
"template": actionGroupTemplate, {
"uses": [ "key": "action-group",
"action" "template": actionGroupTemplate,
] "uses": [
}, "action"
{ ]
"key": "switcher", },
"template": switcherTemplate, {
"uses": [ "key": "switcher",
"view" "template": switcherTemplate,
] "uses": [
}, "view"
{ ]
"key": "object-inspector", },
"template": objectInspectorTemplate {
} "key": "object-inspector",
], "template": objectInspectorTemplate
"controls": [ }
{ ],
"key": "selector", "controls": [
"template": selectorTemplate {
}, "key": "selector",
{ "template": selectorTemplate
"key": "datetime-picker", },
"template": datetimePickerTemplate {
}, "key": "datetime-picker",
{ "template": datetimePickerTemplate
"key": "datetime-field", },
"template": datetimeFieldTemplate {
} "key": "datetime-field",
], "template": datetimeFieldTemplate
"licenses": [ }
{ ],
"name": "Normalize.css", "licenses": [
"version": "1.1.2", {
"description": "Browser style normalization", "name": "Normalize.css",
"author": "Nicolas Gallagher, Jonathan Neal", "version": "1.1.2",
"website": "http://necolas.github.io/normalize.css/", "description": "Browser style normalization",
"copyright": "Copyright (c) Nicolas Gallagher and Jonathan Neal", "author": "Nicolas Gallagher, Jonathan Neal",
"license": "license-mit", "website": "http://necolas.github.io/normalize.css/",
"link": "https://github.com/necolas/normalize.css/blob/v1.1.2/LICENSE.md" "copyright": "Copyright (c) Nicolas Gallagher and Jonathan Neal",
}, "license": "license-mit",
{ "link": "https://github.com/necolas/normalize.css/blob/v1.1.2/LICENSE.md"
"name": "Zepto", },
"version": "1.1.6", {
"description": "DOM manipulation", "name": "Zepto",
"author": "Thomas Fuchs", "version": "1.1.6",
"website": "http://zeptojs.com/", "description": "DOM manipulation",
"copyright": "Copyright (c) 2010-2016 Thomas Fuchs", "author": "Thomas Fuchs",
"license": "license-mit", "website": "http://zeptojs.com/",
"link": "https://github.com/madrobby/zepto/blob/master/MIT-LICENSE" "copyright": "Copyright (c) 2010-2016 Thomas Fuchs",
} "license": "license-mit",
] "link": "https://github.com/madrobby/zepto/blob/master/MIT-LICENSE"
}
]
}
} }
}); };
}); });

View File

@ -27,8 +27,7 @@ define([
"./res/info-table.html", "./res/info-table.html",
"./res/info-bubble.html", "./res/info-bubble.html",
"./res/bubble.html", "./res/bubble.html",
"./res/templates/info-button.html", "./res/templates/info-button.html"
'legacyRegistry'
], function ( ], function (
InfoGesture, InfoGesture,
InfoButtonGesture, InfoButtonGesture,
@ -36,81 +35,83 @@ define([
infoTableTemplate, infoTableTemplate,
infoBubbleTemplate, infoBubbleTemplate,
bubbleTemplate, bubbleTemplate,
infoButtonTemplate, infoButtonTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/commonUI/inspect", { return {
"extensions": { name:"platform/commonUI/inspect",
"templates": [ definition: {
{ "extensions": {
"key": "info-table", "templates": [
"template": infoTableTemplate {
}, "key": "info-table",
{ "template": infoTableTemplate
"key": "info-bubble", },
"template": infoBubbleTemplate {
} "key": "info-bubble",
], "template": infoBubbleTemplate
"containers": [ }
{ ],
"key": "bubble", "containers": [
"template": bubbleTemplate, {
"attributes": [ "key": "bubble",
"bubbleTitle", "template": bubbleTemplate,
"bubbleLayout" "attributes": [
], "bubbleTitle",
"alias": "bubble" "bubbleLayout"
} ],
], "alias": "bubble"
"gestures": [ }
{ ],
"key": "info", "gestures": [
"implementation": InfoGesture, {
"depends": [ "key": "info",
"$timeout", "implementation": InfoGesture,
"agentService", "depends": [
"infoService", "$timeout",
"INFO_HOVER_DELAY" "agentService",
] "infoService",
}, "INFO_HOVER_DELAY"
{ ]
"key": "infobutton", },
"implementation": InfoButtonGesture, {
"depends": [ "key": "infobutton",
"$document", "implementation": InfoButtonGesture,
"agentService", "depends": [
"infoService" "$document",
] "agentService",
} "infoService"
], ]
"services": [ }
{ ],
"key": "infoService", "services": [
"implementation": InfoService, {
"depends": [ "key": "infoService",
"$compile", "implementation": InfoService,
"$rootScope", "depends": [
"popupService", "$compile",
"agentService" "$rootScope",
] "popupService",
} "agentService"
], ]
"constants": [ }
{ ],
"key": "INFO_HOVER_DELAY", "constants": [
"value": 2000 {
} "key": "INFO_HOVER_DELAY",
], "value": 2000
"representations": [ }
{ ],
"key": "info-button", "representations": [
"template": infoButtonTemplate, {
"gestures": [ "key": "info-button",
"infobutton" "template": infoButtonTemplate,
] "gestures": [
} "infobutton"
] ]
}
]
}
} }
}); };
}); });

View File

@ -23,44 +23,45 @@
define([ define([
"./src/MCTDevice", "./src/MCTDevice",
"./src/AgentService", "./src/AgentService",
"./src/DeviceClassifier", "./src/DeviceClassifier"
'legacyRegistry'
], function ( ], function (
MCTDevice, MCTDevice,
AgentService, AgentService,
DeviceClassifier, DeviceClassifier
legacyRegistry
) { ) {
legacyRegistry.register("platform/commonUI/mobile", { return {
"extensions": { name:"platform/commonUI/mobile",
"directives": [ definition: {
{ "extensions": {
"key": "mctDevice", "directives": [
"implementation": MCTDevice, {
"depends": [ "key": "mctDevice",
"agentService" "implementation": MCTDevice,
] "depends": [
} "agentService"
], ]
"services": [ }
{ ],
"key": "agentService", "services": [
"implementation": AgentService, {
"depends": [ "key": "agentService",
"$window" "implementation": AgentService,
] "depends": [
} "$window"
], ]
"runs": [ }
{ ],
"implementation": DeviceClassifier, "runs": [
"depends": [ {
"agentService", "implementation": DeviceClassifier,
"$document" "depends": [
] "agentService",
} "$document"
] ]
}
]
}
} }
}); };
}); });

View File

@ -24,52 +24,53 @@ define([
"./src/NotificationIndicatorController", "./src/NotificationIndicatorController",
"./src/NotificationIndicator", "./src/NotificationIndicator",
"./src/NotificationService", "./src/NotificationService",
"./res/notification-indicator.html", "./res/notification-indicator.html"
'legacyRegistry'
], function ( ], function (
NotificationIndicatorController, NotificationIndicatorController,
NotificationIndicator, NotificationIndicator,
NotificationService, NotificationService,
notificationIndicatorTemplate, notificationIndicatorTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/commonUI/notification", { return {
"extensions": { name:"platform/commonUI/notification",
"templates": [ definition: {
{ "extensions": {
"key": "notificationIndicatorTemplate", "templates": [
"template": notificationIndicatorTemplate {
} "key": "notificationIndicatorTemplate",
], "template": notificationIndicatorTemplate
"controllers": [ }
{ ],
"key": "NotificationIndicatorController", "controllers": [
"implementation": NotificationIndicatorController, {
"depends": [ "key": "NotificationIndicatorController",
"$scope", "implementation": NotificationIndicatorController,
"openmct", "depends": [
"dialogService" "$scope",
] "openmct",
} "dialogService"
], ]
"indicators": [ }
{ ],
"implementation": NotificationIndicator, "indicators": [
"priority": "fallback" {
} "implementation": NotificationIndicator,
], "priority": "fallback"
"services": [ }
{ ],
"key": "notificationService", "services": [
"implementation": function (openmct) { {
return new NotificationService.default(openmct); "key": "notificationService",
}, "implementation": function (openmct) {
"depends": [ return new NotificationService.default(openmct);
"openmct" },
] "depends": [
} "openmct"
] ]
}
]
}
} }
}); };
}); });

View File

@ -22,33 +22,34 @@
define([ define([
'./src/InspectorController', './src/InspectorController',
'./src/EditableRegionPolicy', './src/EditableRegionPolicy'
'legacyRegistry'
], function ( ], function (
InspectorController, InspectorController,
EditableRegionPolicy, EditableRegionPolicy
legacyRegistry
) { ) {
legacyRegistry.register("platform/commonUI/regions", { return {
"extensions": { name:"platform/commonUI/regions",
"controllers": [ definition: {
{ "extensions": {
"key": "InspectorController", "controllers": [
"implementation": InspectorController, {
"depends": [ "key": "InspectorController",
"$scope", "implementation": InspectorController,
"openmct", "depends": [
"$document" "$scope",
] "openmct",
} "$document"
], ]
"policies": [ }
{ ],
"category": "region", "policies": [
"implementation": EditableRegionPolicy {
} "category": "region",
] "implementation": EditableRegionPolicy
}
]
}
} }
}); };
}); });

View File

@ -25,51 +25,52 @@ define([
"./src/CompositionMutabilityPolicy", "./src/CompositionMutabilityPolicy",
"./src/CompositionModelPolicy", "./src/CompositionModelPolicy",
"./src/ComposeActionPolicy", "./src/ComposeActionPolicy",
"./src/PersistableCompositionPolicy", "./src/PersistableCompositionPolicy"
'legacyRegistry'
], function ( ], function (
CompositionPolicy, CompositionPolicy,
CompositionMutabilityPolicy, CompositionMutabilityPolicy,
CompositionModelPolicy, CompositionModelPolicy,
ComposeActionPolicy, ComposeActionPolicy,
PersistableCompositionPolicy, PersistableCompositionPolicy
legacyRegistry
) { ) {
legacyRegistry.register("platform/containment", { return {
"extensions": { name:"platform/containment",
"policies": [ definition: {
{ "extensions": {
"category": "composition", "policies": [
"implementation": CompositionPolicy, {
"message": "Objects of this type cannot contain objects of that type." "category": "composition",
}, "implementation": CompositionPolicy,
{ "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": CompositionMutabilityPolicy,
{ "message": "Objects of this type cannot be modified."
"category": "composition", },
"implementation": CompositionModelPolicy, {
"message": "Objects of this type cannot contain other objects." "category": "composition",
}, "implementation": CompositionModelPolicy,
{ "message": "Objects of this type cannot contain other objects."
"category": "action", },
"implementation": ComposeActionPolicy, {
"depends": [ "category": "action",
"$injector", "implementation": ComposeActionPolicy,
"openmct" "depends": [
], "$injector",
"message": "Objects of this type cannot contain objects of that type." "openmct"
}, ],
{ "message": "Objects of this type cannot contain objects of that type."
"category": "composition", },
"implementation": PersistableCompositionPolicy, {
"depends": ["openmct"], "category": "composition",
"message": "Change cannot be made to composition of non-persistable object" "implementation": PersistableCompositionPolicy,
} "depends": ["openmct"],
] "message": "Change cannot be made to composition of non-persistable object"
}
]
}
} }
}); };
}); });

View File

@ -49,8 +49,7 @@ define([
"./src/services/Now", "./src/services/Now",
"./src/services/Throttle", "./src/services/Throttle",
"./src/services/Topic", "./src/services/Topic",
"./src/services/Instantiate", "./src/services/Instantiate"
'legacyRegistry'
], function ( ], function (
DomainObjectProvider, DomainObjectProvider,
CoreCapabilityProvider, CoreCapabilityProvider,
@ -80,312 +79,314 @@ define([
Now, Now,
Throttle, Throttle,
Topic, Topic,
Instantiate, Instantiate
legacyRegistry
) { ) {
legacyRegistry.register("platform/core", { return {
"name": "Open MCT Core", name:"platform/core",
"description": "Defines core concepts of Open MCT.", definition: {
"sources": "src", "name": "Open MCT Core",
"configuration": { "description": "Defines core concepts of Open MCT.",
"paths": { "sources": "src",
"uuid": "uuid" "configuration": {
} "paths": {
}, "uuid": "uuid"
"extensions": {
"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": "aggregator",
"implementation": ModelAggregator,
"depends": [
"$q"
]
},
{
"provides": "modelService",
"type": "provider",
"implementation": PersistedModelProvider,
"depends": [
"persistenceService",
"$q",
"now",
"PERSISTENCE_SPACE"
]
},
{
"provides": "modelService",
"type": "decorator",
"implementation": CachingModelDecorator,
"depends": [
"cacheService"
]
},
{
"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": [ "extensions": {
{ "components": [
"properties": [ {
{ "provides": "objectService",
"control": "textfield", "type": "provider",
"name": "Title", "implementation": DomainObjectProvider,
"key": "name", "depends": [
"property": "name", "modelService",
"pattern": "\\S+", "instantiate"
"required": true, ]
"cssClass": "l-input-lg" },
}, {
{ "provides": "capabilityService",
"name": "Notes", "type": "provider",
"key": "notes", "implementation": CoreCapabilityProvider,
"property": "notes", "depends": [
"control": "textarea", "capabilities[]",
"required": false, "$log"
"cssClass": "l-textarea-sm" ]
} },
] {
}, "provides": "modelService",
{ "type": "provider",
"key": "root", "implementation": StaticModelProvider,
"name": "Root", "depends": [
"cssClass": "icon-folder" "models[]",
}, "$q",
{ "$log"
"key": "folder", ]
"name": "Folder", },
"cssClass": "icon-folder", {
"features": "creation", "provides": "modelService",
"description": "Create folders to organize other objects or links to objects.", "type": "aggregator",
"priority": 1000, "implementation": ModelAggregator,
"model": { "depends": [
"composition": [] "$q"
]
},
{
"provides": "modelService",
"type": "provider",
"implementation": PersistedModelProvider,
"depends": [
"persistenceService",
"$q",
"now",
"PERSISTENCE_SPACE"
]
},
{
"provides": "modelService",
"type": "decorator",
"implementation": CachingModelDecorator,
"depends": [
"cacheService"
]
},
{
"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": [
"key": "unknown", {
"name": "Unknown Type", "properties": [
"cssClass": "icon-object-unknown" {
}, "control": "textfield",
{ "name": "Title",
"name": "Unknown Type", "key": "name",
"cssClass": "icon-object-unknown" "property": "name",
} "pattern": "\\S+",
], "required": true,
"capabilities": [ "cssClass": "l-input-lg"
{ },
"key": "composition", {
"implementation": CompositionCapability, "name": "Notes",
"depends": [ "key": "notes",
"$injector" "property": "notes",
] "control": "textarea",
}, "required": false,
{ "cssClass": "l-textarea-sm"
"key": "relationship", }
"implementation": RelationshipCapability, ]
"depends": [ },
"$injector" {
] "key": "root",
}, "name": "Root",
{ "cssClass": "icon-folder"
"key": "type", },
"implementation": TypeCapability, {
"depends": [ "key": "folder",
"typeService" "name": "Folder",
] "cssClass": "icon-folder",
}, "features": "creation",
{ "description": "Create folders to organize other objects or links to objects.",
"key": "action", "priority": 1000,
"implementation": ActionCapability, "model": {
"depends": [ "composition": []
"$q", }
"actionService" },
] {
}, "key": "unknown",
{ "name": "Unknown Type",
"key": "view", "cssClass": "icon-object-unknown"
"implementation": ViewCapability, },
"depends": [ {
"viewService" "name": "Unknown Type",
] "cssClass": "icon-object-unknown"
}, }
{ ],
"key": "persistence", "capabilities": [
"implementation": PersistenceCapability, {
"depends": [ "key": "composition",
"cacheService", "implementation": CompositionCapability,
"persistenceService", "depends": [
"identifierService", "$injector"
"notificationService", ]
"$q" },
] {
}, "key": "relationship",
{ "implementation": RelationshipCapability,
"key": "metadata", "depends": [
"implementation": MetadataCapability "$injector"
}, ]
{ },
"key": "mutation", {
"implementation": MutationCapability, "key": "type",
"depends": [ "implementation": TypeCapability,
"topic", "depends": [
"now" "typeService"
] ]
}, },
{ {
"key": "delegation", "key": "action",
"implementation": DelegationCapability, "implementation": ActionCapability,
"depends": [ "depends": [
"$q" "$q",
] "actionService"
}, ]
{ },
"key": "instantiation", {
"implementation": InstantiationCapability, "key": "view",
"depends": [ "implementation": ViewCapability,
"$injector", "depends": [
"identifierService", "viewService"
"now" ]
] },
} {
], "key": "persistence",
"services": [ "implementation": PersistenceCapability,
{ "depends": [
"key": "cacheService", "cacheService",
"implementation": ModelCacheService "persistenceService",
}, "identifierService",
{ "notificationService",
"key": "now", "$q"
"implementation": Now ]
}, },
{ {
"key": "throttle", "key": "metadata",
"implementation": Throttle, "implementation": MetadataCapability
"depends": [ },
"$timeout" {
] "key": "mutation",
}, "implementation": MutationCapability,
{ "depends": [
"key": "topic", "topic",
"implementation": Topic, "now"
"depends": [ ]
"$log" },
] {
}, "key": "delegation",
{ "implementation": DelegationCapability,
"key": "instantiate", "depends": [
"implementation": Instantiate, "$q"
"depends": [ ]
"capabilityService", },
"identifierService", {
"cacheService" "key": "instantiation",
] "implementation": InstantiationCapability,
} "depends": [
], "$injector",
"runs": [ "identifierService",
{ "now"
"implementation": TransactingMutationListener, ]
"depends": ["topic", "transactionService", "cacheService"] }
} ],
], "services": [
"constants": [ {
{ "key": "cacheService",
"key": "PERSISTENCE_SPACE", "implementation": ModelCacheService
"value": "mct" },
} {
], "key": "now",
"licenses": [ "implementation": Now
{ },
"name": "Math.uuid.js", {
"version": "1.4.7", "key": "throttle",
"description": "Unique identifer generation (code adapted.)", "implementation": Throttle,
"author": "Robert Kieffer", "depends": [
"website": "https://github.com/broofa/node-uuid", "$timeout"
"copyright": "Copyright (c) 2010-2012 Robert Kieffer", ]
"license": "license-mit", },
"link": "http://opensource.org/licenses/MIT" {
} "key": "topic",
] "implementation": Topic,
"depends": [
"$log"
]
},
{
"key": "instantiate",
"implementation": Instantiate,
"depends": [
"capabilityService",
"identifierService",
"cacheService"
]
}
],
"runs": [
{
"implementation": TransactingMutationListener,
"depends": ["topic", "transactionService", "cacheService"]
}
],
"constants": [
{
"key": "PERSISTENCE_SPACE",
"value": "mct"
}
],
"licenses": [
{
"name": "Math.uuid.js",
"version": "1.4.7",
"description": "Unique identifer generation (code adapted.)",
"author": "Robert Kieffer",
"website": "https://github.com/broofa/node-uuid",
"copyright": "Copyright (c) 2010-2012 Robert Kieffer",
"license": "license-mit",
"link": "http://opensource.org/licenses/MIT"
}
]
}
} }
}); };
}); });

View File

@ -34,8 +34,7 @@ define([
"./src/services/MoveService", "./src/services/MoveService",
"./src/services/LinkService", "./src/services/LinkService",
"./src/services/CopyService", "./src/services/CopyService",
"./src/services/LocationService", "./src/services/LocationService"
'legacyRegistry'
], function ( ], function (
MoveAction, MoveAction,
CopyAction, CopyAction,
@ -50,152 +49,154 @@ define([
MoveService, MoveService,
LinkService, LinkService,
CopyService, CopyService,
LocationService, LocationService
legacyRegistry
) { ) {
legacyRegistry.register("platform/entanglement", { return {
"name": "Entanglement", name:"platform/entanglement",
"description": "Tools to assist you in entangling the world of WARP.", definition: {
"configuration": {}, "name": "Entanglement",
"extensions": { "description": "Tools to assist you in entangling the world of WARP.",
"actions": [ "configuration": {},
{ "extensions": {
"key": "move", "actions": [
"name": "Move", {
"description": "Move object to another location.", "key": "move",
"cssClass": "icon-move", "name": "Move",
"category": "contextual", "description": "Move object to another location.",
"implementation": MoveAction, "cssClass": "icon-move",
"depends": [ "category": "contextual",
"policyService", "implementation": MoveAction,
"locationService", "depends": [
"moveService" "policyService",
] "locationService",
}, "moveService"
{ ]
"key": "copy", },
"name": "Duplicate", {
"description": "Duplicate object to another location.", "key": "copy",
"cssClass": "icon-duplicate", "name": "Duplicate",
"category": "contextual", "description": "Duplicate object to another location.",
"implementation": CopyAction, "cssClass": "icon-duplicate",
"depends": [ "category": "contextual",
"$log", "implementation": CopyAction,
"policyService", "depends": [
"locationService", "$log",
"copyService", "policyService",
"dialogService", "locationService",
"notificationService" "copyService",
] "dialogService",
}, "notificationService"
{ ]
"key": "link", },
"name": "Create Link", {
"description": "Create Link to object in another location.", "key": "link",
"cssClass": "icon-link", "name": "Create Link",
"category": "contextual", "description": "Create Link to object in another location.",
"implementation": LinkAction, "cssClass": "icon-link",
"depends": [ "category": "contextual",
"policyService", "implementation": LinkAction,
"locationService", "depends": [
"linkService" "policyService",
] "locationService",
}, "linkService"
{ ]
"key": "locate", },
"name": "Set Primary Location", {
"description": "Set a domain object's primary location.", "key": "locate",
"cssClass": "", "name": "Set Primary Location",
"category": "contextual", "description": "Set a domain object's primary location.",
"implementation": SetPrimaryLocationAction "cssClass": "",
} "category": "contextual",
], "implementation": SetPrimaryLocationAction
"components": [ }
{ ],
"type": "decorator", "components": [
"provides": "creationService", {
"implementation": LocatingCreationDecorator "type": "decorator",
}, "provides": "creationService",
{ "implementation": LocatingCreationDecorator
"type": "decorator", },
"provides": "objectService", {
"implementation": LocatingObjectDecorator, "type": "decorator",
"depends": [ "provides": "objectService",
"$q", "implementation": LocatingObjectDecorator,
"$log" "depends": [
] "$q",
} "$log"
], ]
"policies": [ }
{ ],
"category": "action", "policies": [
"implementation": CrossSpacePolicy {
}, "category": "action",
{ "implementation": CrossSpacePolicy
"category": "action", },
"implementation": CopyPolicy {
}, "category": "action",
{ "implementation": CopyPolicy
"category": "action", },
"implementation": MovePolicy {
} "category": "action",
], "implementation": MovePolicy
"capabilities": [ }
{ ],
"key": "location", "capabilities": [
"name": "Location Capability", {
"description": "Provides a capability for retrieving the location of an object based upon it's context.", "key": "location",
"implementation": LocationCapability, "name": "Location Capability",
"depends": [ "description": "Provides a capability for retrieving the location of an object based upon it's context.",
"$q", "implementation": LocationCapability,
"$injector" "depends": [
] "$q",
} "$injector"
], ]
"services": [ }
{ ],
"key": "moveService", "services": [
"name": "Move Service", {
"description": "Provides a service for moving objects", "key": "moveService",
"implementation": MoveService, "name": "Move Service",
"depends": [ "description": "Provides a service for moving objects",
"openmct", "implementation": MoveService,
"linkService", "depends": [
"$q" "openmct",
] "linkService",
}, "$q"
{ ]
"key": "linkService", },
"name": "Link Service", {
"description": "Provides a service for linking objects", "key": "linkService",
"implementation": LinkService, "name": "Link Service",
"depends": [ "description": "Provides a service for linking objects",
"openmct" "implementation": LinkService,
] "depends": [
}, "openmct"
{ ]
"key": "copyService", },
"name": "Copy Service", {
"description": "Provides a service for copying objects", "key": "copyService",
"implementation": CopyService, "name": "Copy Service",
"depends": [ "description": "Provides a service for copying objects",
"$q", "implementation": CopyService,
"policyService", "depends": [
"openmct" "$q",
] "policyService",
}, "openmct"
{ ]
"key": "locationService", },
"name": "Location Service", {
"description": "Provides a service for prompting a user for locations.", "key": "locationService",
"implementation": LocationService, "name": "Location Service",
"depends": [ "description": "Provides a service for prompting a user for locations.",
"dialogService" "implementation": LocationService,
] "depends": [
} "dialogService"
], ]
"licenses": [] }
],
"licenses": []
}
} }
}); };
}); });

View File

@ -21,25 +21,26 @@
*****************************************************************************/ *****************************************************************************/
define([ define([
"./src/WorkerService", "./src/WorkerService"
'legacyRegistry'
], function ( ], function (
WorkerService, WorkerService
legacyRegistry
) { ) {
legacyRegistry.register("platform/execution", { return {
"extensions": { name:"platform/execution",
"services": [ definition: {
{ "extensions": {
"key": "workerService", "services": [
"implementation": WorkerService, {
"depends": [ "key": "workerService",
"$window", "implementation": WorkerService,
"workers[]" "depends": [
] "$window",
} "workers[]"
] ]
}
]
}
} }
}); };
}); });

View File

@ -22,42 +22,44 @@
define([ define([
"./ExportService", "./ExportService",
"saveAs", "saveAs"
"legacyRegistry" ], function (ExportService, saveAs) {
], function (ExportService, saveAs, legacyRegistry) {
legacyRegistry.register("platform/exporters", { return {
extensions: { name:"platform/exporters",
services: [ definition: {
{ extensions: {
key: "exportService", services: [
implementation: function () { {
return new ExportService(saveAs.saveAs); key: "exportService",
implementation: function () {
return new ExportService(saveAs.saveAs);
}
} }
} ],
], licenses: [
licenses: [ {
{ "name": "CSV.js",
"name": "CSV.js", "version": "3.6.4",
"version": "3.6.4", "author": "Kash Nouroozi",
"author": "Kash Nouroozi", "description": "Encoder for CSV (comma separated values) export",
"description": "Encoder for CSV (comma separated values) export", "website": "https://github.com/knrz/CSV.js",
"website": "https://github.com/knrz/CSV.js", "copyright": "Copyright (c) 2014 Kash Nouroozi",
"copyright": "Copyright (c) 2014 Kash Nouroozi", "license": "license-mit",
"license": "license-mit", "link": "https://github.com/knrz/CSV.js/blob/3.6.4/LICENSE"
"link": "https://github.com/knrz/CSV.js/blob/3.6.4/LICENSE" },
}, {
{ "name": "FileSaver.js",
"name": "FileSaver.js", "version": "0.0.2",
"version": "0.0.2", "author": "Eli Grey",
"author": "Eli Grey", "description": "File download initiator (for file exports)",
"description": "File download initiator (for file exports)", "website": "https://github.com/eligrey/FileSaver.js/",
"website": "https://github.com/eligrey/FileSaver.js/", "copyright": "Copyright © 2015 Eli Grey.",
"copyright": "Copyright © 2015 Eli Grey.", "license": "license-mit",
"license": "license-mit", "link": "https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md"
"link": "https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md" }
} ]
] }
} }
}); };
}); });

View File

@ -35,8 +35,7 @@ define([
"./src/actions/StopTimerAction", "./src/actions/StopTimerAction",
"./src/actions/PauseTimerAction", "./src/actions/PauseTimerAction",
"./res/templates/clock.html", "./res/templates/clock.html",
"./res/templates/timer.html", "./res/templates/timer.html"
'legacyRegistry'
], function ( ], function (
MomentTimezone, MomentTimezone,
ClockIndicator, ClockIndicator,
@ -52,269 +51,271 @@ define([
StopTimerAction, StopTimerAction,
PauseTimerAction, PauseTimerAction,
clockTemplate, clockTemplate,
timerTemplate, timerTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/features/clock", { return {
"name": "Clocks/Timers", name:"platform/features/clock",
"descriptions": "Domain objects for displaying current & relative times.", definition: {
"configuration": { "name": "Clocks/Timers",
"paths": { "descriptions": "Domain objects for displaying current & relative times.",
"moment-duration-format": "moment-duration-format" "configuration": {
"paths": {
"moment-duration-format": "moment-duration-format"
},
"shim": {
"moment-duration-format": {
"deps": [
"moment"
]
}
}
}, },
"shim": { "extensions": {
"moment-duration-format": { "constants": [
"deps": [ {
"moment" "key": "CLOCK_INDICATOR_FORMAT",
] "value": "YYYY/MM/DD HH:mm:ss"
} }
} ],
}, "indicators": [
"extensions": { {
"constants": [ "implementation": ClockIndicator,
{ "depends": [
"key": "CLOCK_INDICATOR_FORMAT", "tickerService",
"value": "YYYY/MM/DD HH:mm:ss" "CLOCK_INDICATOR_FORMAT"
}
],
"indicators": [
{
"implementation": ClockIndicator,
"depends": [
"tickerService",
"CLOCK_INDICATOR_FORMAT"
],
"priority": "preferred"
}
],
"services": [
{
"key": "tickerService",
"implementation": TickerService,
"depends": [
"$timeout",
"now"
]
},
{
"key": "timerService",
"implementation": TimerService,
"depends": ["openmct"]
}
],
"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",
"editable": false,
"template": clockTemplate
},
{
"key": "timer",
"type": "timer",
"editable": false,
"template": timerTemplate
}
],
"actions": [
{
"key": "timer.follow",
"implementation": FollowTimerAction,
"depends": ["timerService"],
"category": "contextual",
"name": "Follow Timer",
"cssClass": "icon-clock",
"priority": "optional"
},
{
"key": "timer.start",
"implementation": StartTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Start",
"cssClass": "icon-play",
"priority": "preferred"
},
{
"key": "timer.pause",
"implementation": PauseTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Pause",
"cssClass": "icon-pause",
"priority": "preferred"
},
{
"key": "timer.restart",
"implementation": RestartTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Restart at 0",
"cssClass": "icon-refresh",
"priority": "preferred"
},
{
"key": "timer.stop",
"implementation": StopTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Stop",
"cssClass": "icon-box",
"priority": "preferred"
}
],
"types": [
{
"key": "clock",
"name": "Clock",
"cssClass": "icon-clock",
"description": "A UTC-based clock that supports a variety of display formats. Clocks can be added to Display Layouts.",
"priority": 101,
"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"
}
],
"cssClass": "l-inline"
},
{
"control": "select",
"options": [
{
"value": "clock12",
"name": "12hr"
},
{
"value": "clock24",
"name": "24hr"
}
],
"cssClass": "l-inline"
}
]
},
{
"key": "timezone",
"name": "Timezone",
"control": "autocomplete",
"options": MomentTimezone.tz.names()
}
],
"model": {
"clockFormat": [
"YYYY/MM/DD hh:mm:ss",
"clock12"
], ],
"timezone": "UTC" "priority": "preferred"
} }
}, ],
{ "services": [
"key": "timer", {
"name": "Timer", "key": "tickerService",
"cssClass": "icon-timer", "implementation": TickerService,
"description": "A timer that counts up or down to a datetime. Timers can be started, stopped and reset whenever needed, and support a variety of display formats. Each Timer displays the same value to all users. Timers can be added to Display Layouts.", "depends": [
"priority": 100, "$timeout",
"features": [ "now"
"creation" ]
], },
"properties": [ {
{ "key": "timerService",
"key": "timestamp", "implementation": TimerService,
"control": "datetime", "depends": ["openmct"]
"name": "Target" }
}, ],
{ "controllers": [
"key": "timerFormat", {
"control": "select", "key": "ClockController",
"name": "Display Format", "implementation": ClockController,
"options": [ "depends": [
{ "$scope",
"value": "long", "tickerService"
"name": "DDD hh:mm:ss" ]
}, },
{ {
"value": "short", "key": "TimerController",
"name": "hh:mm:ss" "implementation": TimerController,
} "depends": [
] "$scope",
"$window",
"now"
]
},
{
"key": "RefreshingController",
"implementation": RefreshingController,
"depends": [
"$scope",
"tickerService"
]
}
],
"views": [
{
"key": "clock",
"type": "clock",
"editable": false,
"template": clockTemplate
},
{
"key": "timer",
"type": "timer",
"editable": false,
"template": timerTemplate
}
],
"actions": [
{
"key": "timer.follow",
"implementation": FollowTimerAction,
"depends": ["timerService"],
"category": "contextual",
"name": "Follow Timer",
"cssClass": "icon-clock",
"priority": "optional"
},
{
"key": "timer.start",
"implementation": StartTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Start",
"cssClass": "icon-play",
"priority": "preferred"
},
{
"key": "timer.pause",
"implementation": PauseTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Pause",
"cssClass": "icon-pause",
"priority": "preferred"
},
{
"key": "timer.restart",
"implementation": RestartTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Restart at 0",
"cssClass": "icon-refresh",
"priority": "preferred"
},
{
"key": "timer.stop",
"implementation": StopTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Stop",
"cssClass": "icon-box",
"priority": "preferred"
}
],
"types": [
{
"key": "clock",
"name": "Clock",
"cssClass": "icon-clock",
"description": "A UTC-based clock that supports a variety of display formats. Clocks can be added to Display Layouts.",
"priority": 101,
"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"
}
],
"cssClass": "l-inline"
},
{
"control": "select",
"options": [
{
"value": "clock12",
"name": "12hr"
},
{
"value": "clock24",
"name": "24hr"
}
],
"cssClass": "l-inline"
}
]
},
{
"key": "timezone",
"name": "Timezone",
"control": "autocomplete",
"options": MomentTimezone.tz.names()
}
],
"model": {
"clockFormat": [
"YYYY/MM/DD hh:mm:ss",
"clock12"
],
"timezone": "UTC"
}
},
{
"key": "timer",
"name": "Timer",
"cssClass": "icon-timer",
"description": "A timer that counts up or down to a datetime. Timers can be started, stopped and reset whenever needed, and support a variety of display formats. Each Timer displays the same value to all users. Timers can be added to Display Layouts.",
"priority": 100,
"features": [
"creation"
],
"properties": [
{
"key": "timestamp",
"control": "datetime",
"name": "Target"
},
{
"key": "timerFormat",
"control": "select",
"name": "Display Format",
"options": [
{
"value": "long",
"name": "DDD hh:mm:ss"
},
{
"value": "short",
"name": "hh:mm:ss"
}
]
}
],
"model": {
"timerFormat": "DDD hh:mm:ss"
} }
],
"model": {
"timerFormat": "DDD hh:mm:ss"
} }
} ],
], "runs": [{
"runs": [{ "implementation": FollowIndicator,
"implementation": FollowIndicator, "depends": ["openmct", "timerService"]
"depends": ["openmct", "timerService"] }],
}], "licenses": [
"licenses": [ {
{ "name": "moment-duration-format",
"name": "moment-duration-format", "version": "1.3.0",
"version": "1.3.0", "author": "John Madhavan-Reese",
"author": "John Madhavan-Reese", "description": "Duration parsing/formatting",
"description": "Duration parsing/formatting", "website": "https://github.com/jsmreese/moment-duration-format",
"website": "https://github.com/jsmreese/moment-duration-format", "copyright": "Copyright 2014 John Madhavan-Reese",
"copyright": "Copyright 2014 John Madhavan-Reese", "license": "license-mit",
"license": "license-mit", "link": "https://github.com/jsmreese/moment-duration-format/blob/master/LICENSE"
"link": "https://github.com/jsmreese/moment-duration-format/blob/master/LICENSE" }
} ]
] }
} }
}); };
}); });

View File

@ -22,98 +22,99 @@
define([ define([
'./src/HyperlinkController', './src/HyperlinkController',
'legacyRegistry',
'./res/templates/hyperlink.html' './res/templates/hyperlink.html'
], function ( ], function (
HyperlinkController, HyperlinkController,
legacyRegistry,
hyperlinkTemplate hyperlinkTemplate
) { ) {
legacyRegistry.register("platform/features/hyperlink", { return {
"name": "Hyperlink", name:"platform/features/hyperlink",
"description": "Insert a hyperlink to reference a link", definition: {
"extensions": { "name": "Hyperlink",
"types": [ "description": "Insert a hyperlink to reference a link",
{ "extensions": {
"key": "hyperlink", "types": [
"name": "Hyperlink", {
"cssClass": "icon-chain-links", "key": "hyperlink",
"description": "A hyperlink to redirect to a different link", "name": "Hyperlink",
"features": ["creation"], "cssClass": "icon-chain-links",
"properties": [ "description": "A hyperlink to redirect to a different link",
{ "features": ["creation"],
"key": "url", "properties": [
"name": "URL", {
"control": "textfield", "key": "url",
"required": true, "name": "URL",
"cssClass": "l-input-lg" "control": "textfield",
}, "required": true,
"cssClass": "l-input-lg"
},
{ {
"key": "displayText", "key": "displayText",
"name": "Text to Display", "name": "Text to Display",
"control": "textfield", "control": "textfield",
"required": true, "required": true,
"cssClass": "l-input-lg" "cssClass": "l-input-lg"
}, },
{ {
"key": "displayFormat", "key": "displayFormat",
"name": "Display Format", "name": "Display Format",
"control": "select", "control": "select",
"options": [ "options": [
{ {
"name": "Link", "name": "Link",
"value": "link" "value": "link"
}, },
{ {
"value": "button", "value": "button",
"name": "Button" "name": "Button"
} }
], ],
"cssClass": "l-inline" "cssClass": "l-inline"
}, },
{ {
"key": "openNewTab", "key": "openNewTab",
"name": "Tab to Open Hyperlink", "name": "Tab to Open Hyperlink",
"control": "select", "control": "select",
"options": [ "options": [
{ {
"name": "Open in this tab", "name": "Open in this tab",
"value": "thisTab" "value": "thisTab"
}, },
{ {
"value": "newTab", "value": "newTab",
"name": "Open in a new tab" "name": "Open in a new tab"
} }
], ],
"cssClass": "l-inline" "cssClass": "l-inline"
}
],
"model": {
"displayFormat": "link",
"openNewTab": "thisTab",
"removeTitle": true
} }
],
"model": {
"displayFormat": "link",
"openNewTab": "thisTab",
"removeTitle": true
}
} }
], ],
"views": [ "views": [
{ {
"key": "hyperlink", "key": "hyperlink",
"type": "hyperlink", "type": "hyperlink",
"name": "Hyperlink Display", "name": "Hyperlink Display",
"template": hyperlinkTemplate, "template": hyperlinkTemplate,
"editable": false "editable": false
} }
], ],
"controllers": [ "controllers": [
{ {
"key": "HyperlinkController", "key": "HyperlinkController",
"implementation": HyperlinkController, "implementation": HyperlinkController,
"depends": ["$scope"] "depends": ["$scope"]
} }
] ]
}
} }
}); };
}); });

View File

@ -24,62 +24,63 @@ define([
"./src/policies/ImageryViewPolicy", "./src/policies/ImageryViewPolicy",
"./src/controllers/ImageryController", "./src/controllers/ImageryController",
"./src/directives/MCTBackgroundImage", "./src/directives/MCTBackgroundImage",
"./res/templates/imagery.html", "./res/templates/imagery.html"
'legacyRegistry'
], function ( ], function (
ImageryViewPolicy, ImageryViewPolicy,
ImageryController, ImageryController,
MCTBackgroundImage, MCTBackgroundImage,
imageryTemplate, imageryTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/features/imagery", { return {
"name": "Plot view for telemetry", name:"platform/features/imagery",
"extensions": { definition: {
"views": [ "name": "Plot view for telemetry",
{ "extensions": {
"name": "Imagery", "views": [
"key": "imagery", {
"cssClass": "icon-image", "name": "Imagery",
"template": imageryTemplate, "key": "imagery",
"priority": "preferred", "cssClass": "icon-image",
"needs": [ "template": imageryTemplate,
"telemetry" "priority": "preferred",
], "needs": [
"editable": false "telemetry"
} ],
], "editable": false
"policies": [ }
{ ],
"category": "view", "policies": [
"implementation": ImageryViewPolicy, {
"depends": [ "category": "view",
"openmct" "implementation": ImageryViewPolicy,
] "depends": [
} "openmct"
], ]
"controllers": [ }
{ ],
"key": "ImageryController", "controllers": [
"implementation": ImageryController, {
"depends": [ "key": "ImageryController",
"$scope", "implementation": ImageryController,
"$window", "depends": [
"$element", "$scope",
"openmct" "$window",
] "$element",
} "openmct"
], ]
"directives": [ }
{ ],
"key": "mctBackgroundImage", "directives": [
"implementation": MCTBackgroundImage, {
"depends": [ "key": "mctBackgroundImage",
"$document" "implementation": MCTBackgroundImage,
] "depends": [
} "$document"
] ]
}
]
}
} }
}); };
}); });

View File

@ -20,32 +20,30 @@
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
define([ define([], function () {
'legacyRegistry' return {
], function ( name:"platform/features/my-items",
legacyRegistry definition: {
) { "name": "My Items",
"description": "Defines a root named My Items",
legacyRegistry.register("platform/features/my-items", { "extensions": {
"name": "My Items", "roots": [
"description": "Defines a root named My Items", {
"extensions": { "id": "mine"
"roots": [
{
"id": "mine"
}
],
"models": [
{
"id": "mine",
"model": {
"name": "My Items",
"type": "folder",
"composition": [],
"location": "ROOT"
} }
} ],
] "models": [
{
"id": "mine",
"model": {
"name": "My Items",
"type": "folder",
"composition": [],
"location": "ROOT"
}
}
]
}
} }
}); };
}); });

View File

@ -22,55 +22,56 @@
define([ define([
"./src/EmbeddedPageController", "./src/EmbeddedPageController",
"./res/iframe.html", "./res/iframe.html"
'legacyRegistry'
], function ( ], function (
EmbeddedPageController, EmbeddedPageController,
iframeTemplate, iframeTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/features/pages", { return {
"extensions": { name:"platform/features/pages",
"types": [ definition: {
{ "extensions": {
"key": "example.page", "types": [
"name": "Web Page", {
"cssClass": "icon-page", "key": "example.page",
"description": "Embed a web page or web-based image in a resizeable window component. Can be added to Display Layouts. Note that the URL being embedded must allow iframing.", "name": "Web Page",
"priority": 50, "cssClass": "icon-page",
"features": [ "description": "Embed a web page or web-based image in a resizeable window component. Can be added to Display Layouts. Note that the URL being embedded must allow iframing.",
"creation" "priority": 50,
], "features": [
"properties": [ "creation"
{ ],
"key": "url", "properties": [
"name": "URL", {
"control": "textfield", "key": "url",
"required": true, "name": "URL",
"cssClass": "l-input-lg" "control": "textfield",
} "required": true,
] "cssClass": "l-input-lg"
} }
], ]
"views": [ }
{ ],
"template": iframeTemplate, "views": [
"name": "Page", {
"type": "example.page", "template": iframeTemplate,
"key": "example.page", "name": "Page",
"editable": false "type": "example.page",
} "key": "example.page",
], "editable": false
"controllers": [ }
{ ],
"key": "EmbeddedPageController", "controllers": [
"implementation": EmbeddedPageController, {
"depends": [ "key": "EmbeddedPageController",
"$sce" "implementation": EmbeddedPageController,
] "depends": [
} "$sce"
] ]
}
]
}
} }
}); };
}); });

View File

@ -22,35 +22,35 @@
define([ define([
"./res/markup.html", "./res/markup.html"
'legacyRegistry'
], function ( ], function (
markupTemplate
markupTemplate,
legacyRegistry
) { ) {
legacyRegistry.register("platform/features/static-markup", { return {
"extensions": { name:"platform/features/static-markup",
"types": [ definition: {
{ "extensions": {
"key": "static.markup", "types": [
"name": "Static Markup", {
"cssClass": "icon-pencil", "key": "static.markup",
"description": "Static markup sandbox", "name": "Static Markup",
"features": [ "cssClass": "icon-pencil",
"creation" "description": "Static markup sandbox",
] "features": [
} "creation"
], ]
"views": [ }
{ ],
"template": markupTemplate, "views": [
"name": "Static Markup", {
"type": "static.markup", "template": markupTemplate,
"key": "static.markup" "name": "Static Markup",
} "type": "static.markup",
] "key": "static.markup"
}
]
}
} }
}); };
}); });

View File

@ -21,31 +21,32 @@
*****************************************************************************/ *****************************************************************************/
define([ define([
"./res/templates/deprecated-timeline-message.html", "./res/templates/deprecated-timeline-message.html"
'legacyRegistry'
], function ( ], function (
deprecatedTimelineMessage, deprecatedTimelineMessage
legacyRegistry
) { ) {
legacyRegistry.register('platform/features/timeline', { return {
extensions: { name: 'platform/features/timeline',
types: [ definition: {
{ extensions: {
key: "timeline", types: [
name: "Timeline", {
description: "Timeline, Activity and Activity Mode objects have been deprecated and will no longer be supported. (07/18/2018)", key: "timeline",
priority: 502 name: "Timeline",
} description: "Timeline, Activity and Activity Mode objects have been deprecated and will no longer be supported. (07/18/2018)",
], priority: 502
views: [ }
{ ],
key: "timeline", views: [
name: "Timeline", {
type: "timeline", key: "timeline",
description: "Timeline, Activity and Activity Mode objects have been deprecated and will no longer be supported. (07/18/2018)", name: "Timeline",
template: deprecatedTimelineMessage type: "timeline",
} description: "Timeline, Activity and Activity Mode objects have been deprecated and will no longer be supported. (07/18/2018)",
] template: deprecatedTimelineMessage
}
]
}
} }
}); };
}); });

View File

@ -45,8 +45,7 @@ define([
"./res/templates/controls/dialog.html", "./res/templates/controls/dialog.html",
"./res/templates/controls/radio.html", "./res/templates/controls/radio.html",
"./res/templates/controls/file-input.html", "./res/templates/controls/file-input.html",
"./res/templates/controls/snap-view.html", "./res/templates/controls/snap-view.html"
'legacyRegistry'
], function ( ], function (
MCTForm, MCTForm,
MCTControl, MCTControl,
@ -72,146 +71,148 @@ define([
dialogTemplate, dialogTemplate,
radioTemplate, radioTemplate,
fileInputTemplate, fileInputTemplate,
snapViewTemplate, snapViewTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/forms", { return {
"name": "MCT Forms", name:"platform/forms",
"description": "Form generator; includes directive and some controls.", definition: {
"extensions": { "name": "MCT Forms",
"directives": [ "description": "Form generator; includes directive and some controls.",
{ "extensions": {
"key": "mctForm", "directives": [
"implementation": MCTForm {
}, "key": "mctForm",
{ "implementation": MCTForm
"key": "mctControl", },
"implementation": MCTControl, {
"depends": [ "key": "mctControl",
"templateLinker", "implementation": MCTControl,
"controls[]" "depends": [
] "templateLinker",
}, "controls[]"
{ ]
"key": "mctFileInput", },
"implementation": MCTFileInput, {
"depends": [ "key": "mctFileInput",
"fileInputService" "implementation": MCTFileInput,
] "depends": [
} "fileInputService"
], ]
"controls": [ }
{ ],
"key": "autocomplete", "controls": [
"template": autocompleteTemplate {
}, "key": "autocomplete",
{ "template": autocompleteTemplate
"key": "checkbox", },
"template": checkboxTemplate {
}, "key": "checkbox",
{ "template": checkboxTemplate
"key": "radio", },
"template": radioTemplate {
}, "key": "radio",
{ "template": radioTemplate
"key": "datetime", },
"template": datetimeTemplate {
}, "key": "datetime",
{ "template": datetimeTemplate
"key": "select", },
"template": selectTemplate {
}, "key": "select",
{ "template": selectTemplate
"key": "textfield", },
"template": textfieldTemplate {
}, "key": "textfield",
{ "template": textfieldTemplate
"key": "numberfield", },
"template": numberfieldTemplate {
}, "key": "numberfield",
{ "template": numberfieldTemplate
"key": "textarea", },
"template": textareaTemplate {
}, "key": "textarea",
{ "template": textareaTemplate
"key": "button", },
"template": buttonTemplate {
}, "key": "button",
{ "template": buttonTemplate
"key": "color", },
"template": colorTemplate {
}, "key": "color",
{ "template": colorTemplate
"key": "composite", },
"template": compositeTemplate {
}, "key": "composite",
{ "template": compositeTemplate
"key": "menu-button", },
"template": menuButtonTemplate {
}, "key": "menu-button",
{ "template": menuButtonTemplate
"key": "dialog-button", },
"template": dialogTemplate {
}, "key": "dialog-button",
{ "template": dialogTemplate
"key": "file-input", },
"template": fileInputTemplate {
}, "key": "file-input",
{ "template": fileInputTemplate
"key": "snap-view", },
"template": snapViewTemplate {
} "key": "snap-view",
], "template": snapViewTemplate
"controllers": [ }
{ ],
"key": "AutocompleteController", "controllers": [
"implementation": AutocompleteController, {
"depends": [ "key": "AutocompleteController",
"$scope", "implementation": AutocompleteController,
"$element" "depends": [
] "$scope",
}, "$element"
{ ]
"key": "DateTimeController", },
"implementation": DateTimeController, {
"depends": [ "key": "DateTimeController",
"$scope" "implementation": DateTimeController,
] "depends": [
}, "$scope"
{ ]
"key": "CompositeController", },
"implementation": CompositeController {
}, "key": "CompositeController",
{ "implementation": CompositeController
"key": "ColorController", },
"implementation": ColorController {
}, "key": "ColorController",
{ "implementation": ColorController
"key": "DialogButtonController", },
"implementation": DialogButtonController, {
"depends": [ "key": "DialogButtonController",
"$scope", "implementation": DialogButtonController,
"dialogService" "depends": [
] "$scope",
}, "dialogService"
{ ]
"key": "SnapshotPreviewController", },
"implementation": SnapshotPreviewController, {
"depends": [ "key": "SnapshotPreviewController",
"$scope", "implementation": SnapshotPreviewController,
"openmct" "depends": [
] "$scope",
} "openmct"
], ]
"components": [ }
{ ],
"provides": "fileInputService", "components": [
"type": "provider", {
"implementation": FileInputService "provides": "fileInputService",
} "type": "provider",
"implementation": FileInputService
}
] ]
}
} }
}); };
}); });

View File

@ -20,91 +20,88 @@
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
define([ define([], function () {
'legacyRegistry' return {
], function ( name:"platform/framework",
definition: {
legacyRegistry "name": "Open MCT Framework Component",
) { "description": "Framework layer for Open MCT; interprets bundle definitions and serves as an intermediary between Require and Angular",
"libraries": "lib",
legacyRegistry.register("platform/framework", { "configuration": {
"name": "Open MCT Framework Component", "paths": {
"description": "Framework layer for Open MCT; interprets bundle definitions and serves as an intermediary between Require and Angular", "angular": "angular.min"
"libraries": "lib", },
"configuration": { "shim": {
"paths": { "angular": {
"angular": "angular.min" "exports": "angular"
}
}
}, },
"shim": { "extensions": {
"angular": { "licenses": [
"exports": "angular" {
} "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.22",
"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.4.4",
"description": "Client-side web application framework",
"author": "Google",
"website": "http://angularjs.org/",
"copyright": "Copyright (c) 2010-2015 Google, Inc. http://angularjs.org",
"license": "license-mit",
"link": "https://github.com/angular/angular.js/blob/v1.4.4/LICENSE"
},
{
"name": "Angular-Route",
"version": "1.4.4",
"description": "Client-side view routing",
"author": "Google",
"website": "http://angularjs.org/",
"copyright": "Copyright (c) 2010-2015 Google, Inc. http://angularjs.org",
"license": "license-mit",
"link": "https://github.com/angular/angular.js/blob/v1.4.4/LICENSE"
},
{
"name": "ES6-Promise",
"version": "3.0.2",
"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"
}
]
} }
},
"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.22",
"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.4.4",
"description": "Client-side web application framework",
"author": "Google",
"website": "http://angularjs.org/",
"copyright": "Copyright (c) 2010-2015 Google, Inc. http://angularjs.org",
"license": "license-mit",
"link": "https://github.com/angular/angular.js/blob/v1.4.4/LICENSE"
},
{
"name": "Angular-Route",
"version": "1.4.4",
"description": "Client-side view routing",
"author": "Google",
"website": "http://angularjs.org/",
"copyright": "Copyright (c) 2010-2015 Google, Inc. http://angularjs.org",
"license": "license-mit",
"link": "https://github.com/angular/angular.js/blob/v1.4.4/LICENSE"
},
{
"name": "ES6-Promise",
"version": "3.0.2",
"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"
}
]
} }
}); };
}); });

View File

@ -24,63 +24,64 @@ define([
"./src/IdentityAggregator", "./src/IdentityAggregator",
"./src/IdentityProvider", "./src/IdentityProvider",
"./src/IdentityCreationDecorator", "./src/IdentityCreationDecorator",
"./src/IdentityIndicator", "./src/IdentityIndicator"
'legacyRegistry'
], function ( ], function (
IdentityAggregator, IdentityAggregator,
IdentityProvider, IdentityProvider,
IdentityCreationDecorator, IdentityCreationDecorator,
IdentityIndicator, IdentityIndicator
legacyRegistry
) { ) {
legacyRegistry.register("platform/identity", { return {
"extensions": { name:"platform/identity",
"components": [ definition: {
{ "extensions": {
"implementation": IdentityAggregator, "components": [
"type": "aggregator", {
"provides": "identityService", "implementation": IdentityAggregator,
"depends": [ "type": "aggregator",
"$q" "provides": "identityService",
] "depends": [
}, "$q"
{ ]
"implementation": IdentityProvider, },
"type": "provider", {
"provides": "identityService", "implementation": IdentityProvider,
"depends": [ "type": "provider",
"$q" "provides": "identityService",
], "depends": [
"priority": "fallback" "$q"
}, ],
{ "priority": "fallback"
"type": "decorator", },
"provides": "creationService", {
"implementation": IdentityCreationDecorator, "type": "decorator",
"depends": [ "provides": "creationService",
"identityService" "implementation": IdentityCreationDecorator,
] "depends": [
} "identityService"
], ]
"indicators": [ }
{ ],
"implementation": IdentityIndicator, "indicators": [
"depends": [ {
"identityService" "implementation": IdentityIndicator,
] "depends": [
} "identityService"
], ]
"types": [ }
{ ],
"properties": [ "types": [
{ {
"key": "creator", "properties": [
"name": "Creator" {
} "key": "creator",
] "name": "Creator"
} }
] ]
}
]
}
} }
}); };
}); });

View File

@ -21,25 +21,26 @@
*****************************************************************************/ *****************************************************************************/
define([ define([
"./src/PersistenceAggregator", "./src/PersistenceAggregator"
'legacyRegistry'
], function ( ], function (
PersistenceAggregator, PersistenceAggregator
legacyRegistry
) { ) {
legacyRegistry.register("platform/persistence/aggregator", { return {
"extensions": { name:"platform/persistence/aggregator",
"components": [ definition: {
{ "extensions": {
"provides": "persistenceService", "components": [
"type": "aggregator", {
"depends": [ "provides": "persistenceService",
"$q" "type": "aggregator",
], "depends": [
"implementation": PersistenceAggregator "$q"
} ],
] "implementation": PersistenceAggregator
}
]
}
} }
}); };
}); });

View File

@ -22,56 +22,57 @@
define([ define([
"./src/CouchPersistenceProvider", "./src/CouchPersistenceProvider",
"./src/CouchIndicator", "./src/CouchIndicator"
'legacyRegistry'
], function ( ], function (
CouchPersistenceProvider, CouchPersistenceProvider,
CouchIndicator, CouchIndicator
legacyRegistry
) { ) {
legacyRegistry.register("platform/persistence/couch", { return {
"name": "Couch Persistence", name:"platform/persistence/couch",
"description": "Adapter to read and write objects using a CouchDB instance.", definition: {
"extensions": { "name": "Couch Persistence",
"components": [ "description": "Adapter to read and write objects using a CouchDB instance.",
{ "extensions": {
"provides": "persistenceService", "components": [
"type": "provider", {
"implementation": CouchPersistenceProvider, "provides": "persistenceService",
"depends": [ "type": "provider",
"$http", "implementation": CouchPersistenceProvider,
"$q", "depends": [
"PERSISTENCE_SPACE", "$http",
"COUCHDB_PATH" "$q",
] "PERSISTENCE_SPACE",
} "COUCHDB_PATH"
], ]
"constants": [ }
{ ],
"key": "PERSISTENCE_SPACE", "constants": [
"value": "mct" {
}, "key": "PERSISTENCE_SPACE",
{ "value": "mct"
"key": "COUCHDB_PATH", },
"value": "/couch/openmct" {
}, "key": "COUCHDB_PATH",
{ "value": "/couch/openmct"
"key": "COUCHDB_INDICATOR_INTERVAL", },
"value": 15000 {
} "key": "COUCHDB_INDICATOR_INTERVAL",
], "value": 15000
"indicators": [ }
{ ],
"implementation": CouchIndicator, "indicators": [
"depends": [ {
"$http", "implementation": CouchIndicator,
"$interval", "depends": [
"COUCHDB_PATH", "$http",
"COUCHDB_INDICATOR_INTERVAL" "$interval",
] "COUCHDB_PATH",
} "COUCHDB_INDICATOR_INTERVAL"
] ]
}
]
}
} }
}); };
}); });

View File

@ -23,74 +23,75 @@
define([ define([
"./src/ElasticPersistenceProvider", "./src/ElasticPersistenceProvider",
"./src/ElasticSearchProvider", "./src/ElasticSearchProvider",
"./src/ElasticIndicator", "./src/ElasticIndicator"
'legacyRegistry'
], function ( ], function (
ElasticPersistenceProvider, ElasticPersistenceProvider,
ElasticSearchProvider, ElasticSearchProvider,
ElasticIndicator, ElasticIndicator
legacyRegistry
) { ) {
legacyRegistry.register("platform/persistence/elastic", { return {
"name": "ElasticSearch Persistence", name:"platform/persistence/elastic",
"description": "Adapter to read and write objects using an ElasticSearch instance.", definition: {
"extensions": { "name": "ElasticSearch Persistence",
"components": [ "description": "Adapter to read and write objects using an ElasticSearch instance.",
{ "extensions": {
"provides": "persistenceService", "components": [
"type": "provider", {
"implementation": ElasticPersistenceProvider, "provides": "persistenceService",
"depends": [ "type": "provider",
"$http", "implementation": ElasticPersistenceProvider,
"$q", "depends": [
"PERSISTENCE_SPACE", "$http",
"ELASTIC_ROOT", "$q",
"ELASTIC_PATH" "PERSISTENCE_SPACE",
] "ELASTIC_ROOT",
}, "ELASTIC_PATH"
{ ]
"provides": "searchService", },
"type": "provider", {
"implementation": ElasticSearchProvider, "provides": "searchService",
"depends": [ "type": "provider",
"$http", "implementation": ElasticSearchProvider,
"ELASTIC_ROOT" "depends": [
] "$http",
} "ELASTIC_ROOT"
], ]
"constants": [ }
{ ],
"key": "PERSISTENCE_SPACE", "constants": [
"value": "mct" {
}, "key": "PERSISTENCE_SPACE",
{ "value": "mct"
"key": "ELASTIC_ROOT", },
"value": "http://localhost:9200", {
"priority": "fallback" "key": "ELASTIC_ROOT",
}, "value": "http://localhost:9200",
{ "priority": "fallback"
"key": "ELASTIC_PATH", },
"value": "mct/domain_object", {
"priority": "fallback" "key": "ELASTIC_PATH",
}, "value": "mct/domain_object",
{ "priority": "fallback"
"key": "ELASTIC_INDICATOR_INTERVAL", },
"value": 15000, {
"priority": "fallback" "key": "ELASTIC_INDICATOR_INTERVAL",
} "value": 15000,
], "priority": "fallback"
"indicators": [ }
{ ],
"implementation": ElasticIndicator, "indicators": [
"depends": [ {
"$http", "implementation": ElasticIndicator,
"$interval", "depends": [
"ELASTIC_ROOT", "$http",
"ELASTIC_INDICATOR_INTERVAL" "$interval",
] "ELASTIC_ROOT",
} "ELASTIC_INDICATOR_INTERVAL"
] ]
}
]
}
} }
}); };
}); });

View File

@ -22,39 +22,40 @@
define([ define([
"./src/LocalStoragePersistenceProvider", "./src/LocalStoragePersistenceProvider",
"./src/LocalStorageIndicator", "./src/LocalStorageIndicator"
'legacyRegistry'
], function ( ], function (
LocalStoragePersistenceProvider, LocalStoragePersistenceProvider,
LocalStorageIndicator, LocalStorageIndicator
legacyRegistry
) { ) {
legacyRegistry.register("platform/persistence/local", { return {
"extensions": { name:"platform/persistence/local",
"components": [ definition: {
{ "extensions": {
"provides": "persistenceService", "components": [
"type": "provider", {
"implementation": LocalStoragePersistenceProvider, "provides": "persistenceService",
"depends": [ "type": "provider",
"$window", "implementation": LocalStoragePersistenceProvider,
"$q", "depends": [
"PERSISTENCE_SPACE" "$window",
] "$q",
} "PERSISTENCE_SPACE"
], ]
"constants": [ }
{ ],
"key": "PERSISTENCE_SPACE", "constants": [
"value": "mct" {
} "key": "PERSISTENCE_SPACE",
], "value": "mct"
"indicators": [ }
{ ],
"implementation": LocalStorageIndicator "indicators": [
} {
] "implementation": LocalStorageIndicator
}
]
}
} }
}); };
}); });

View File

@ -24,58 +24,59 @@ define([
"./src/QueuingPersistenceCapabilityDecorator", "./src/QueuingPersistenceCapabilityDecorator",
"./src/PersistenceQueue", "./src/PersistenceQueue",
"./src/PersistenceFailureController", "./src/PersistenceFailureController",
"./res/templates/persistence-failure-dialog.html", "./res/templates/persistence-failure-dialog.html"
'legacyRegistry'
], function ( ], function (
QueuingPersistenceCapabilityDecorator, QueuingPersistenceCapabilityDecorator,
PersistenceQueue, PersistenceQueue,
PersistenceFailureController, PersistenceFailureController,
persistenceFailureDialogTemplate, persistenceFailureDialogTemplate
legacyRegistry
) { ) {
legacyRegistry.register("platform/persistence/queue", { return {
"extensions": { name:"platform/persistence/queue",
"components": [ definition: {
{ "extensions": {
"type": "decorator", "components": [
"provides": "capabilityService", {
"implementation": QueuingPersistenceCapabilityDecorator, "type": "decorator",
"depends": [ "provides": "capabilityService",
"persistenceQueue" "implementation": QueuingPersistenceCapabilityDecorator,
] "depends": [
} "persistenceQueue"
], ]
"services": [ }
{ ],
"key": "persistenceQueue", "services": [
"implementation": PersistenceQueue, {
"depends": [ "key": "persistenceQueue",
"$q", "implementation": PersistenceQueue,
"$timeout", "depends": [
"dialogService", "$q",
"PERSISTENCE_QUEUE_DELAY" "$timeout",
] "dialogService",
} "PERSISTENCE_QUEUE_DELAY"
], ]
"constants": [ }
{ ],
"key": "PERSISTENCE_QUEUE_DELAY", "constants": [
"value": 5 {
} "key": "PERSISTENCE_QUEUE_DELAY",
], "value": 5
"templates": [ }
{ ],
"key": "persistence-failure-dialog", "templates": [
"template": persistenceFailureDialogTemplate {
} "key": "persistence-failure-dialog",
], "template": persistenceFailureDialogTemplate
"controllers": [ }
{ ],
"key": "PersistenceFailureController", "controllers": [
"implementation": PersistenceFailureController {
} "key": "PersistenceFailureController",
] "implementation": PersistenceFailureController
}
]
}
} }
}); };
}); });

View File

@ -23,46 +23,47 @@
define([ define([
"./src/PolicyActionDecorator", "./src/PolicyActionDecorator",
"./src/PolicyViewDecorator", "./src/PolicyViewDecorator",
"./src/PolicyProvider", "./src/PolicyProvider"
'legacyRegistry'
], function ( ], function (
PolicyActionDecorator, PolicyActionDecorator,
PolicyViewDecorator, PolicyViewDecorator,
PolicyProvider, PolicyProvider
legacyRegistry
) { ) {
legacyRegistry.register("platform/policy", { return {
"name": "Policy Service", name:"platform/policy",
"description": "Provides support for extension-driven decisions.", definition: {
"sources": "src", "name": "Policy Service",
"extensions": { "description": "Provides support for extension-driven decisions.",
"components": [ "sources": "src",
{ "extensions": {
"type": "decorator", "components": [
"provides": "actionService", {
"implementation": PolicyActionDecorator, "type": "decorator",
"depends": [ "provides": "actionService",
"policyService" "implementation": PolicyActionDecorator,
] "depends": [
}, "policyService"
{ ]
"type": "decorator", },
"provides": "viewService", {
"implementation": PolicyViewDecorator, "type": "decorator",
"depends": [ "provides": "viewService",
"policyService" "implementation": PolicyViewDecorator,
] "depends": [
}, "policyService"
{ ]
"type": "provider", },
"provides": "policyService", {
"implementation": PolicyProvider, "type": "provider",
"depends": [ "provides": "policyService",
"policies[]" "implementation": PolicyProvider,
] "depends": [
} "policies[]"
] ]
}
]
}
} }
}); };
}); });

View File

@ -29,8 +29,7 @@ define([
"./src/gestures/GestureRepresenter", "./src/gestures/GestureRepresenter",
"./src/services/DndService", "./src/services/DndService",
"./src/TemplateLinker", "./src/TemplateLinker",
"./src/TemplatePrefetcher", "./src/TemplatePrefetcher"
'legacyRegistry'
], function ( ], function (
MCTInclude, MCTInclude,
MCTRepresentation, MCTRepresentation,
@ -40,104 +39,106 @@ define([
GestureRepresenter, GestureRepresenter,
DndService, DndService,
TemplateLinker, TemplateLinker,
TemplatePrefetcher, TemplatePrefetcher
legacyRegistry
) { ) {
legacyRegistry.register("platform/representation", { return {
"extensions": { name:"platform/representation",
"directives": [ definition: {
{ "extensions": {
"key": "mctInclude", "directives": [
"implementation": MCTInclude, {
"depends": [ "key": "mctInclude",
"templates[]", "implementation": MCTInclude,
"templateLinker" "depends": [
] "templates[]",
}, "templateLinker"
{ ]
"key": "mctRepresentation", },
"implementation": MCTRepresentation, {
"depends": [ "key": "mctRepresentation",
"representations[]", "implementation": MCTRepresentation,
"views[]", "depends": [
"representers[]", "representations[]",
"$q", "views[]",
"templateLinker", "representers[]",
"$log" "$q",
] "templateLinker",
} "$log"
], ]
"gestures": [ }
{ ],
"key": "drag", "gestures": [
"implementation": DragGesture, {
"depends": [ "key": "drag",
"$log", "implementation": DragGesture,
"dndService" "depends": [
] "$log",
}, "dndService"
{ ]
"key": "drop", },
"implementation": DropGesture, {
"depends": [ "key": "drop",
"dndService", "implementation": DropGesture,
"$q" "depends": [
] "dndService",
} "$q"
], ]
"components": [ }
{ ],
"provides": "gestureService", "components": [
"type": "provider", {
"implementation": GestureProvider, "provides": "gestureService",
"depends": [ "type": "provider",
"gestures[]" "implementation": GestureProvider,
] "depends": [
} "gestures[]"
], ]
"representers": [ }
{ ],
"implementation": GestureRepresenter, "representers": [
"depends": [ {
"gestureService" "implementation": GestureRepresenter,
] "depends": [
} "gestureService"
], ]
"services": [ }
{ ],
"key": "dndService", "services": [
"implementation": DndService, {
"depends": [ "key": "dndService",
"$log" "implementation": DndService,
] "depends": [
}, "$log"
{ ]
"key": "templateLinker", },
"implementation": TemplateLinker, {
"depends": [ "key": "templateLinker",
"$templateRequest", "implementation": TemplateLinker,
"$sce", "depends": [
"$compile", "$templateRequest",
"$log" "$sce",
], "$compile",
"comment": "For internal use by mct-include and mct-representation." "$log"
} ],
], "comment": "For internal use by mct-include and mct-representation."
"runs": [ }
{ ],
"priority": "mandatory", "runs": [
"implementation": TemplatePrefetcher, {
"depends": [ "priority": "mandatory",
"templateLinker", "implementation": TemplatePrefetcher,
"templates[]", "depends": [
"views[]", "templateLinker",
"representations[]", "templates[]",
"controls[]", "views[]",
"containers[]" "representations[]",
] "controls[]",
} "containers[]"
] ]
}
]
}
} }
}); };
}); });

View File

@ -29,8 +29,7 @@ define([
"./res/templates/search.html", "./res/templates/search.html",
"./res/templates/search-menu.html", "./res/templates/search-menu.html",
"raw-loader!./src/services/GenericSearchWorker.js", "raw-loader!./src/services/GenericSearchWorker.js",
"raw-loader!./src/services/BareBonesSearchWorker.js", "raw-loader!./src/services/BareBonesSearchWorker.js"
'legacyRegistry'
], function ( ], function (
SearchController, SearchController,
SearchMenuController, SearchMenuController,
@ -40,98 +39,100 @@ define([
searchTemplate, searchTemplate,
searchMenuTemplate, searchMenuTemplate,
searchWorkerText, searchWorkerText,
BareBonesSearchWorkerText, BareBonesSearchWorkerText
legacyRegistry
) { ) {
legacyRegistry.register("platform/search", { return {
"name": "Search", name:"platform/search",
"description": "Allows the user to search through the file tree.", definition: {
"extensions": { "name": "Search",
"constants": [ "description": "Allows the user to search through the file tree.",
{ "extensions": {
"key": "GENERIC_SEARCH_ROOTS", "constants": [
"value": [ {
"ROOT" "key": "GENERIC_SEARCH_ROOTS",
], "value": [
"priority": "fallback" "ROOT"
}, ],
{ "priority": "fallback"
"key": "USE_LEGACY_INDEXER", },
"value": false, {
"priority": 2 "key": "USE_LEGACY_INDEXER",
} "value": false,
], "priority": 2
"controllers": [ }
{ ],
"key": "SearchController", "controllers": [
"implementation": SearchController, {
"depends": [ "key": "SearchController",
"$scope", "implementation": SearchController,
"searchService" "depends": [
] "$scope",
}, "searchService"
{ ]
"key": "SearchMenuController", },
"implementation": SearchMenuController, {
"depends": [ "key": "SearchMenuController",
"$scope", "implementation": SearchMenuController,
"types[]" "depends": [
] "$scope",
} "types[]"
], ]
"representations": [ }
{ ],
"key": "search-item", "representations": [
"template": searchItemTemplate {
} "key": "search-item",
], "template": searchItemTemplate
"templates": [ }
{ ],
"key": "search", "templates": [
"template": searchTemplate {
}, "key": "search",
{ "template": searchTemplate
"key": "search-menu", },
"template": searchMenuTemplate {
} "key": "search-menu",
], "template": searchMenuTemplate
"components": [ }
{ ],
"provides": "searchService", "components": [
"type": "provider", {
"implementation": GenericSearchProvider, "provides": "searchService",
"depends": [ "type": "provider",
"$q", "implementation": GenericSearchProvider,
"$log", "depends": [
"modelService", "$q",
"workerService", "$log",
"topic", "modelService",
"GENERIC_SEARCH_ROOTS", "workerService",
"USE_LEGACY_INDEXER", "topic",
"openmct" "GENERIC_SEARCH_ROOTS",
] "USE_LEGACY_INDEXER",
}, "openmct"
{ ]
"provides": "searchService", },
"type": "aggregator", {
"implementation": SearchAggregator, "provides": "searchService",
"depends": [ "type": "aggregator",
"$q", "implementation": SearchAggregator,
"objectService" "depends": [
] "$q",
} "objectService"
], ]
"workers": [ }
{ ],
"key": "bareBonesSearchWorker", "workers": [
"scriptText": BareBonesSearchWorkerText {
}, "key": "bareBonesSearchWorker",
{ "scriptText": BareBonesSearchWorkerText
"key": "genericSearchWorker", },
"scriptText": searchWorkerText {
} "key": "genericSearchWorker",
] "scriptText": searchWorkerText
}
]
}
} }
}); };
}); });

View File

@ -23,40 +23,41 @@
define([ define([
"./src/StatusRepresenter", "./src/StatusRepresenter",
"./src/StatusCapability", "./src/StatusCapability",
"./src/StatusService", "./src/StatusService"
'legacyRegistry'
], function ( ], function (
StatusRepresenter, StatusRepresenter,
StatusCapability, StatusCapability,
StatusService, StatusService
legacyRegistry
) { ) {
legacyRegistry.register("platform/status", { return {
"extensions": { name:"platform/status",
"representers": [ definition: {
{ "extensions": {
"implementation": StatusRepresenter "representers": [
} {
], "implementation": StatusRepresenter
"capabilities": [ }
{ ],
"key": "status", "capabilities": [
"implementation": StatusCapability, {
"depends": [ "key": "status",
"statusService" "implementation": StatusCapability,
] "depends": [
} "statusService"
], ]
"services": [ }
{ ],
"key": "statusService", "services": [
"implementation": StatusService, {
"depends": [ "key": "statusService",
"topic" "implementation": StatusService,
] "depends": [
} "topic"
] ]
}
]
}
} }
}); };
}); });

View File

@ -26,104 +26,105 @@ define([
"./src/TelemetryCapability", "./src/TelemetryCapability",
"./src/TelemetryFormatter", "./src/TelemetryFormatter",
"./src/TelemetrySubscriber", "./src/TelemetrySubscriber",
"./src/TelemetryHandler", "./src/TelemetryHandler"
'legacyRegistry'
], function ( ], function (
TelemetryAggregator, TelemetryAggregator,
TelemetryController, TelemetryController,
TelemetryCapability, TelemetryCapability,
TelemetryFormatter, TelemetryFormatter,
TelemetrySubscriber, TelemetrySubscriber,
TelemetryHandler, TelemetryHandler
legacyRegistry
) { ) {
legacyRegistry.register("platform/telemetry", { return {
"name": "Data bundle", name:"platform/telemetry",
"description": "Interfaces and infrastructure for real-time and historical data", definition: {
"configuration": { "name": "Data bundle",
"paths": { "description": "Interfaces and infrastructure for real-time and historical data",
"moment": "moment.min" "configuration": {
"paths": {
"moment": "moment.min"
},
"shim": {
"moment": {
"exports": "moment"
}
}
}, },
"shim": { "extensions": {
"moment": { "components": [
"exports": "moment" {
} "provides": "telemetryService",
"type": "aggregator",
"implementation": TelemetryAggregator,
"depends": [
"$q"
]
}
],
"controllers": [
{
"key": "TelemetryController",
"implementation": TelemetryController,
"depends": [
"$scope",
"$q",
"$timeout",
"$log"
]
}
],
"capabilities": [
{
"key": "telemetry",
"implementation": TelemetryCapability,
"depends": [
"openmct",
"$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.11.1",
"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"
}
]
} }
},
"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": [
"openmct",
"$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.11.1",
"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"
}
]
} }
}); };
}); });

View File

@ -22,9 +22,9 @@
define([ define([
'EventEmitter', 'EventEmitter',
'legacyRegistry',
'uuid', 'uuid',
'./defaultRegistry', './BundleRegistry',
'./installDefaultBundles',
'./api/api', './api/api',
'./api/overlays/OverlayAPI', './api/overlays/OverlayAPI',
'./selection/Selection', './selection/Selection',
@ -50,9 +50,9 @@ define([
'vue' 'vue'
], function ( ], function (
EventEmitter, EventEmitter,
legacyRegistry,
uuid, uuid,
defaultRegistry, BundleRegistry,
installDefaultBundles,
api, api,
OverlayAPI, OverlayAPI,
Selection, Selection,
@ -248,7 +248,8 @@ define([
this.branding = BrandingAPI.default; this.branding = BrandingAPI.default;
this.legacyRegistry = defaultRegistry; this.legacyRegistry = new BundleRegistry();
installDefaultBundles(this.legacyRegistry);
// Plugin's that are installed by default // Plugin's that are installed by default
@ -258,7 +259,6 @@ define([
this.install(LegacyIndicatorsPlugin()); this.install(LegacyIndicatorsPlugin());
this.install(LicensesPlugin.default()); this.install(LicensesPlugin.default());
this.install(RemoveActionPlugin.default()); this.install(RemoveActionPlugin.default());
this.install(this.plugins.ImportExport());
this.install(this.plugins.FolderView()); this.install(this.plugins.FolderView());
this.install(this.plugins.Tabs()); this.install(this.plugins.Tabs());
this.install(this.plugins.FlexibleLayout()); this.install(this.plugins.FlexibleLayout());
@ -361,8 +361,8 @@ define([
this.legacyExtension('types', legacyDefinition); this.legacyExtension('types', legacyDefinition);
}.bind(this)); }.bind(this));
legacyRegistry.register('adapter', this.legacyBundle); this.legacyRegistry.register('adapter', this.legacyBundle);
legacyRegistry.enable('adapter'); this.legacyRegistry.enable('adapter');
this.router.route(/^\/$/, () => { this.router.route(/^\/$/, () => {
this.router.setPath('/browse/'); this.router.setPath('/browse/');

View File

@ -21,7 +21,6 @@
*****************************************************************************/ *****************************************************************************/
define([ define([
'legacyRegistry',
'./actions/ActionDialogDecorator', './actions/ActionDialogDecorator',
'./capabilities/AdapterCapability', './capabilities/AdapterCapability',
'./directives/MCTView', './directives/MCTView',
@ -39,7 +38,6 @@ define([
'./policies/LegacyCompositionPolicyAdapter', './policies/LegacyCompositionPolicyAdapter',
'./actions/LegacyActionAdapter' './actions/LegacyActionAdapter'
], function ( ], function (
legacyRegistry,
ActionDialogDecorator, ActionDialogDecorator,
AdapterCapability, AdapterCapability,
MCTView, MCTView,
@ -57,161 +55,164 @@ define([
legacyCompositionPolicyAdapter, legacyCompositionPolicyAdapter,
LegacyActionAdapter LegacyActionAdapter
) { ) {
legacyRegistry.register('src/adapter', { return {
"extensions": { name: 'src/adapter',
"directives": [ definition: {
{ "extensions": {
key: "mctView", "directives": [
implementation: MCTView, {
depends: ["openmct"] key: "mctView",
} implementation: MCTView,
], depends: ["openmct"]
capabilities: [ }
{ ],
key: "adapter", capabilities: [
implementation: AdapterCapability {
} key: "adapter",
], implementation: AdapterCapability
services: [ }
{ ],
key: "instantiate", services: [
priority: "mandatory", {
implementation: Instantiate, key: "instantiate",
depends: [ priority: "mandatory",
"capabilityService", implementation: Instantiate,
"identifierService", depends: [
"cacheService" "capabilityService",
] "identifierService",
} "cacheService"
], ]
components: [ }
{ ],
type: "decorator", components: [
provides: "capabilityService", {
implementation: APICapabilityDecorator, type: "decorator",
depends: [ provides: "capabilityService",
"$injector" implementation: APICapabilityDecorator,
] depends: [
}, "$injector"
{ ]
type: "decorator",
provides: "actionService",
implementation: ActionDialogDecorator,
depends: ["openmct"]
},
{
type: "decorator",
provides: "modelService",
implementation: MissingModelCompatibilityDecorator,
depends: ["openmct"]
},
{
provides: "objectService",
type: "decorator",
priority: "mandatory",
implementation: LegacyObjectAPIInterceptor,
depends: [
"openmct",
"roots[]",
"instantiate",
"topic"
]
}
],
policies: [
{
category: "view",
implementation: AdaptedViewPolicy,
depends: ["openmct"]
}
],
runs: [
{
implementation: TypeDeprecationChecker,
depends: ["types[]"]
},
{
implementation: AlternateCompositionInitializer,
depends: ["openmct"]
},
{
implementation: function (openmct, $location, $rootScope) {
return new TimeSettingsURLHandler(
openmct.time,
$location,
$rootScope
);
}, },
depends: ["openmct", "$location", "$rootScope"] {
}, type: "decorator",
{ provides: "actionService",
implementation: LegacyTelemetryProvider, implementation: ActionDialogDecorator,
depends: [ depends: ["openmct"]
"openmct", },
"instantiate" {
] type: "decorator",
}, provides: "modelService",
{ implementation: MissingModelCompatibilityDecorator,
implementation: installLegacyViews, depends: ["openmct"]
depends: [ },
"openmct", {
"views[]", provides: "objectService",
"instantiate" type: "decorator",
] priority: "mandatory",
}, implementation: LegacyObjectAPIInterceptor,
{ depends: [
implementation: RegisterLegacyTypes, "openmct",
depends: [ "roots[]",
"types[]", "instantiate",
"openmct" "topic"
] ]
}, }
{ ],
implementation: legacyCompositionPolicyAdapter.default, policies: [
depends: [ {
"openmct" category: "view",
] implementation: AdaptedViewPolicy,
}, depends: ["openmct"]
{ }
implementation: LegacyActionAdapter.default, ],
depends: [ runs: [
"openmct", {
"actions[]" implementation: TypeDeprecationChecker,
] depends: ["types[]"]
} },
], {
licenses: [ implementation: AlternateCompositionInitializer,
{ depends: ["openmct"]
"name": "almond", },
"version": "0.3.3", {
"description": "Lightweight RequireJS replacement for builds", implementation: function (openmct, $location, $rootScope) {
"author": "jQuery Foundation", return new TimeSettingsURLHandler(
"website": "https://github.com/requirejs/almond", openmct.time,
"copyright": "Copyright jQuery Foundation and other contributors, https://jquery.org/", $location,
"license": "license-mit", $rootScope
"link": "https://github.com/requirejs/almond/blob/master/LICENSE" );
}, },
{ depends: ["openmct", "$location", "$rootScope"]
"name": "lodash", },
"version": "3.10.1", {
"description": "Utility functions", implementation: LegacyTelemetryProvider,
"author": "Dojo Foundation", depends: [
"website": "https://lodash.com", "openmct",
"copyright": "Copyright 2012-2015 The Dojo Foundation", "instantiate"
"license": "license-mit", ]
"link": "https://raw.githubusercontent.com/lodash/lodash/3.10.1/LICENSE" },
}, {
{ implementation: installLegacyViews,
"name": "EventEmitter3", depends: [
"version": "1.2.0", "openmct",
"description": "Event-driven programming support", "views[]",
"author": "Arnout Kazemier", "instantiate"
"website": "https://github.com/primus/eventemitter3", ]
"copyright": "Copyright (c) 2014 Arnout Kazemier", },
"license": "license-mit", {
"link": "https://github.com/primus/eventemitter3/blob/1.2.0/LICENSE" implementation: RegisterLegacyTypes,
} depends: [
] "types[]",
"openmct"
]
},
{
implementation: legacyCompositionPolicyAdapter.default,
depends: [
"openmct"
]
},
{
implementation: LegacyActionAdapter.default,
depends: [
"openmct",
"actions[]"
]
}
],
licenses: [
{
"name": "almond",
"version": "0.3.3",
"description": "Lightweight RequireJS replacement for builds",
"author": "jQuery Foundation",
"website": "https://github.com/requirejs/almond",
"copyright": "Copyright jQuery Foundation and other contributors, https://jquery.org/",
"license": "license-mit",
"link": "https://github.com/requirejs/almond/blob/master/LICENSE"
},
{
"name": "lodash",
"version": "3.10.1",
"description": "Utility functions",
"author": "Dojo Foundation",
"website": "https://lodash.com",
"copyright": "Copyright 2012-2015 The Dojo Foundation",
"license": "license-mit",
"link": "https://raw.githubusercontent.com/lodash/lodash/3.10.1/LICENSE"
},
{
"name": "EventEmitter3",
"version": "1.2.0",
"description": "Event-driven programming support",
"author": "Arnout Kazemier",
"website": "https://github.com/primus/eventemitter3",
"copyright": "Copyright (c) 2014 Arnout Kazemier",
"license": "license-mit",
"link": "https://github.com/primus/eventemitter3/blob/1.2.0/LICENSE"
}
]
}
} }
}); }
}); });

View File

@ -19,10 +19,41 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
const DEFAULTS = [
'src/adapter',
'platform/framework',
'platform/core',
'platform/representation',
'platform/commonUI/about',
'platform/commonUI/browse',
'platform/commonUI/edit',
'platform/commonUI/dialog',
'platform/commonUI/formats',
'platform/commonUI/general',
'platform/commonUI/inspect',
'platform/commonUI/mobile',
'platform/commonUI/notification',
'platform/containment',
'platform/execution',
'platform/exporters',
'platform/telemetry',
'platform/features/clock',
'platform/features/imagery',
'platform/features/pages',
'platform/features/hyperlink',
'platform/features/timeline',
'platform/forms',
'platform/identity',
'platform/persistence/aggregator',
'platform/persistence/queue',
'platform/policy',
'platform/entanglement',
'platform/search',
'platform/status',
'platform/commonUI/regions'
];
define([ define([
'legacyRegistry',
'../src/adapter/bundle', '../src/adapter/bundle',
'../example/eventGenerator/bundle', '../example/eventGenerator/bundle',
@ -74,45 +105,23 @@ define([
'../platform/search/bundle', '../platform/search/bundle',
'../platform/status/bundle', '../platform/status/bundle',
'../platform/telemetry/bundle' '../platform/telemetry/bundle'
], function (legacyRegistry) { ], function () {
const LEGACY_BUNDLES = Array.from(arguments);
var DEFAULTS = [ return function installDefaultBundles(bundleRegistry) {
'src/adapter', registerLegacyBundles(LEGACY_BUNDLES);
'platform/framework', enableDefaultBundles();
'platform/core',
'platform/representation',
'platform/commonUI/about',
'platform/commonUI/browse',
'platform/commonUI/edit',
'platform/commonUI/dialog',
'platform/commonUI/formats',
'platform/commonUI/general',
'platform/commonUI/inspect',
'platform/commonUI/mobile',
'platform/commonUI/notification',
'platform/containment',
'platform/execution',
'platform/exporters',
'platform/telemetry',
'platform/features/clock',
'platform/features/imagery',
'platform/features/pages',
'platform/features/hyperlink',
'platform/features/timeline',
'platform/forms',
'platform/identity',
'platform/persistence/aggregator',
'platform/persistence/queue',
'platform/policy',
'platform/entanglement',
'platform/search',
'platform/status',
'platform/commonUI/regions'
];
DEFAULTS.forEach(function (bundlePath) { function registerLegacyBundles(bundles) {
legacyRegistry.enable(bundlePath); bundles.forEach((bundle, i) => {
}); bundleRegistry.register(bundle.name, bundle.definition);
});
}
return legacyRegistry; function enableDefaultBundles() {
DEFAULTS.forEach(function (bundlePath) {
bundleRegistry.enable(bundlePath);
});
}
}
}); });

View File

@ -822,6 +822,7 @@ export default {
this.filterChanged = _.debounce(this.filterChanged, 500); this.filterChanged = _.debounce(this.filterChanged, 500);
}, },
mounted() { mounted() {
console.log("Table mounted");
this.csvExporter = new CSVExporter(); this.csvExporter = new CSVExporter();
this.rowsAdded = _.throttle(this.rowsAdded, 200); this.rowsAdded = _.throttle(this.rowsAdded, 200);
this.rowsRemoved = _.throttle(this.rowsRemoved, 200); this.rowsRemoved = _.throttle(this.rowsRemoved, 200);

View File

@ -0,0 +1,145 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
import TablePlugin from './plugin.js';
import Vue from 'vue';
import {
createOpenMct,
createMouseEvent
} from 'testTools';
let openmct;
let tablePlugin;
let element;
let child;
describe("the plugin", () => {
beforeEach((done) => {
const appHolder = document.createElement('div');
appHolder.style.width = '640px';
appHolder.style.height = '480px';
openmct = createOpenMct();
element = document.createElement('div');
child = document.createElement('div');
element.appendChild(child);
tablePlugin = new TablePlugin();
openmct.install(tablePlugin);
spyOn(openmct.telemetry, 'request').and.returnValue(Promise.resolve([]));
openmct.on('start', done);
openmct.start(appHolder);
});
it("provides a table view for objects with telemetry", () => {
const testTelemetryObject = {
id:"test-object",
type: "test-object",
telemetry: {
values: [{
key: "some-key"
}]
}
};
const applicableViews = openmct.objectViews.get(testTelemetryObject);
let tableView = applicableViews.find((viewProvider) => viewProvider.key === 'table');
expect(tableView).toBeDefined();
});
describe("The table view", () => {
let testTelemetryObject;
let applicableViews;
let tableViewProvider;
let tableView;
beforeEach(() => {
testTelemetryObject = {
identifier:{ namespace: "", key: "test-object"},
type: "test-object",
name: "Test Object",
telemetry: {
values: [{
key: "some-key",
name: "Some attribute",
hints: {
domain: 1
}
}, {
key: "some-other-key",
name: "Another attribute",
hints: {
range: 1
}
}]
}
};
applicableViews = openmct.objectViews.get(testTelemetryObject);
tableViewProvider = applicableViews.find((viewProvider) => viewProvider.key === 'table');
tableView = tableViewProvider.view(testTelemetryObject, true, [testTelemetryObject]);
tableView.show(child, true);
return Vue.nextTick();
});
it("Renders a column for every item in telemetry metadata",() => {
let headers = element.querySelectorAll('span.c-telemetry-table__headers__label');
expect(headers.length).toBe(2);
expect(headers[0].innerText).toBe('Some attribute');
expect(headers[1].innerText).toBe('Another attribute');
});
it("Supports column reordering via drag and drop",() => {
let columns = element.querySelectorAll('tr.c-telemetry-table__headers__labels th');
let fromColumn = columns[0];
let toColumn = columns[1];
let fromColumnText = fromColumn.querySelector('span.c-telemetry-table__headers__label').innerText;
let toColumnText = toColumn.querySelector('span.c-telemetry-table__headers__label').innerText;
let dragStartEvent = createMouseEvent('dragstart');
let dragOverEvent = createMouseEvent('dragover');
let dropEvent = createMouseEvent('drop');
dragStartEvent.dataTransfer =
dragOverEvent.dataTransfer =
dropEvent.dataTransfer = new DataTransfer();
fromColumn.dispatchEvent(dragStartEvent);
toColumn.dispatchEvent(dragOverEvent);
toColumn.dispatchEvent(dropEvent);
return Vue.nextTick().then(() => {
columns = element.querySelectorAll('tr.c-telemetry-table__headers__labels th');
let firstColumn = columns[0];
let secondColumn = columns[1];
let firstColumnText = firstColumn.querySelector('span.c-telemetry-table__headers__label').innerText;
let secondColumnText = secondColumn.querySelector('span.c-telemetry-table__headers__label').innerText;
expect(fromColumnText).not.toEqual(firstColumnText);
expect(fromColumnText).toEqual(secondColumnText);
expect(toColumnText).not.toEqual(secondColumnText);
expect(toColumnText).toEqual(firstColumnText);
});
});
});
});

18
src/testTools.js Normal file
View File

@ -0,0 +1,18 @@
import MCT from 'MCT';
export function createOpenMct() {
const openmct = new MCT();
openmct.install(openmct.plugins.LocalStorage());
openmct.install(openmct.plugins.UTCTimeSystem());
openmct.time.timeSystem('utc', {start: 0, end: 1});
return openmct;
}
export function createMouseEvent(eventName) {
return new MouseEvent(eventName, {
bubbles: true,
cancelable: true,
view: window
});
}

View File

@ -37,7 +37,9 @@ const webpackConfig = {
"vue": path.join(__dirname, "node_modules/vue/dist/vue.js"), "vue": path.join(__dirname, "node_modules/vue/dist/vue.js"),
"d3-scale": path.join(__dirname, "node_modules/d3-scale/build/d3-scale.min.js"), "d3-scale": path.join(__dirname, "node_modules/d3-scale/build/d3-scale.min.js"),
"printj": path.join(__dirname, "node_modules/printj/dist/printj.min.js"), "printj": path.join(__dirname, "node_modules/printj/dist/printj.min.js"),
"styles": path.join(__dirname, "src/styles") "styles": path.join(__dirname, "src/styles"),
"MCT": path.join(__dirname, "src/MCT"),
"testTools": path.join(__dirname, "src/testTools.js")
} }
}, },
devtool: devMode ? 'eval-source-map' : 'source-map', devtool: devMode ? 'eval-source-map' : 'source-map',