Compare commits

..

44 Commits

Author SHA1 Message Date
6da0044adf update description of resync action and reduce pixel contant for drag handler 2018-04-16 14:12:27 -07:00
76a88fc1e5 major performance update to import activities from csv 2018-04-12 15:20:24 -07:00
6901684124 add actionPolicy for import action, add resync button to timeline to resync duration of timespan with imported duration 2018-04-12 12:30:57 -07:00
dbb5b9bb4c change seconds to milliseconds when importing and creatin activities 2018-04-05 10:24:47 -07:00
dce20825ea pull most current master 2018-04-05 10:09:41 -07:00
5fa9925ea1 code cleanup activity import action 2018-03-12 15:10:05 -07:00
d774458b17 fixed issue of not linking right activity modes if user provides id 2018-03-12 11:50:16 -07:00
22f464e02b fix bug where activity modes arent being linked to their activities 2018-03-12 11:30:37 -07:00
ef8f52769e add imported id support for linked activity modes 2018-03-12 11:26:53 -07:00
f25987cfed add support for imported id's 2018-03-12 10:49:57 -07:00
684dd4ff8c fix persist issue with couch and make copies, make fragments 2018-02-22 10:44:36 -08:00
a36b86516f remove activity-modes folder to prevent couch error, for now activity modes dont have a location, but activities can still point to them 2018-02-21 15:54:30 -08:00
99e103fd9d allow multiple users to import their own activities based on new folders that they import into 2018-02-21 14:25:30 -08:00
2224fba618 clean code in activityModesImportAction 2018-02-12 15:34:10 -08:00
b3fcbddeb7 fix activity modes folder error for couch 2018-02-12 15:17:41 -08:00
b3ababd67e search for existing objects with same id, before instantiating, to prevent 409 error for couchDB 2018-02-12 13:58:00 -08:00
0e3c5e1199 store properties on parent (it can be either an activity or timeline) 2018-02-06 11:00:46 -08:00
d72db1ff8c fix finding parent timeline algorithm 2018-02-05 15:29:44 -08:00
bade2e1678 Merge branch 'master' of https://github.com/nasa/openmct into activity-import 2018-02-05 12:37:54 -08:00
4bd1a192ed fix checkstyle errors, and add d3-dsv to test-main 2018-02-01 15:41:10 -08:00
89ab47d835 fix duration bug by setting duration before start and end time 2018-02-01 13:24:50 -08:00
27dfb18991 fix older timelines in new model 2018-02-01 11:42:28 -08:00
9e57a661ea set duration on move 2018-01-29 12:46:10 -08:00
116e346aaf fix gantt move bug, frag number bug 2018-01-29 12:40:41 -08:00
78cfdd3942 fragment works need to add logic to remove start and end from timeline on destroy 2018-01-27 01:28:08 -08:00
a8ecdf98b5 fix checkstyle and lint errors 2018-01-25 15:37:50 -08:00
fee74883c6 add alias to vertical split pane to persist user width preference 2018-01-25 15:27:32 -08:00
2e8e6306ee change fragment to copy
copy button working as expected
2018-01-25 13:15:42 -08:00
7f2cc89f42 working action button - fragment 2018-01-25 10:54:34 -08:00
321271bd4d fix drag malfunction" 2018-01-23 15:18:09 -08:00
006e99fb07 keep durations specific to timelines 2018-01-11 13:15:27 -08:00
63dc4b6253 store start time on timeline and use from there if changed using drag component 2018-01-11 11:54:00 -08:00
85868f690e show blocking error if file type is not csv 2018-01-08 15:30:25 -08:00
b1f34f7cd7 fix checkstyle 2018-01-08 13:54:42 -08:00
8785d9a9d7 store imported activity-modes in a folder in the import location 2018-01-08 13:50:42 -08:00
3a6e1fd301 merge latest master 2017-12-19 13:48:59 -08:00
8161e4fc89 clean code 2017-12-18 15:16:30 -08:00
abf7654027 linking imported activity modes to activities working 2017-12-18 13:05:33 -08:00
8fba707321 link imported acitivity mode to correspoding activity 2017-12-18 12:44:17 -08:00
8ad5cca936 allow instantiation of activity modes from same csv file 2017-12-18 11:28:21 -08:00
754d484501 give imported actiivities predictable ids to prevent duplication when imported again 2017-12-18 10:31:42 -08:00
74717b59c3 working import, instantiate and provide propertiess to activities 2017-12-14 10:38:20 -08:00
ffdb19787b persist csv file objects to window local storage 2017-12-11 16:19:39 -08:00
5dc0d8c7f8 Create new Root Object, add provider and create new import action. Working import from CSV. CSV being parsed to array of objects 2017-12-11 14:29:29 -08:00
1051 changed files with 8531 additions and 14773 deletions

11
API.md
View File

@ -23,7 +23,7 @@
- [Value Hints](#value-hints) - [Value Hints](#value-hints)
- [The Time Conductor and Telemetry](#the-time-conductor-and-telemetry) - [The Time Conductor and Telemetry](#the-time-conductor-and-telemetry)
- [Telemetry Providers](#telemetry-providers) - [Telemetry Providers](#telemetry-providers)
- [Telemetry Requests and Responses.](#telemetry-requests-and-responses) - [Telemetry Requests](#telemetry-requests)
- [Request Strategies **draft**](#request-strategies-draft) - [Request Strategies **draft**](#request-strategies-draft)
- [`latest` request strategy](#latest-request-strategy) - [`latest` request strategy](#latest-request-strategy)
- [`minmax` request strategy](#minmax-request-strategy) - [`minmax` request strategy](#minmax-request-strategy)
@ -32,7 +32,7 @@
- [Telemetry Data](#telemetry-data) - [Telemetry Data](#telemetry-data)
- [Telemetry Datums](#telemetry-datums) - [Telemetry Datums](#telemetry-datums)
- [Limit Evaluators **draft**](#limit-evaluators-draft) - [Limit Evaluators **draft**](#limit-evaluators-draft)
- [Telemetry Consumer APIs **draft**](#telemetry-consumer-apis-draft) - [Telemetry Visualization APIs **draft**](#telemetry-visualization-apis-draft)
- [Time API](#time-api) - [Time API](#time-api)
- [Time Systems and Bounds](#time-systems-and-bounds) - [Time Systems and Bounds](#time-systems-and-bounds)
- [Defining and Registering Time Systems](#defining-and-registering-time-systems) - [Defining and Registering Time Systems](#defining-and-registering-time-systems)
@ -449,7 +449,7 @@ A telemetry provider is a javascript object with up to four methods:
* `supportsSubscribe(domainObject, callback, options)` optional. Must be implemented to provide realtime telemetry. Should return `true` if the provider supports subscriptions for the given domain object (and request options). * `supportsSubscribe(domainObject, callback, options)` optional. Must be implemented to provide realtime telemetry. Should return `true` if the provider supports subscriptions for the given domain object (and request options).
* `subscribe(domainObject, callback, options)` required if `supportsSubscribe` is implemented. Establish a subscription for realtime data for the given domain object. Should invoke `callback` with a single telemetry datum every time data is received. Must return an unsubscribe function. Multiple views can subscribe to the same telemetry object, so it should always return a new unsubscribe function. * `subscribe(domainObject, callback, options)` required if `supportsSubscribe` is implemented. Establish a subscription for realtime data for the given domain object. Should invoke `callback` with a single telemetry datum every time data is received. Must return an unsubscribe function. Multiple views can subscribe to the same telemetry object, so it should always return a new unsubscribe function.
* `supportsRequest(domainObject, options)` optional. Must be implemented to provide historical telemetry. Should return `true` if the provider supports historical requests for the given domain object. * `supportsRequest(domainObject, options)` optional. Must be implemented to provide historical telemetry. Should return `true` if the provider supports historical requests for the given domain object.
* `request(domainObject, options)` required if `supportsRequest` is implemented. Must return a promise for an array of telemetry datums that fulfills the request. The `options` argument will include a `start`, `end`, and `domain` attribute representing the query bounds. See [Telemetry Requests and Responses](#telemetry-requests-and-responses) for more info on how to respond to requests. * `request(domainObject, options)` required if `supportsRequest` is implemented. Must return a promise for an array of telemetry datums that fulfills the request. The `options` argument will include a `start`, `end`, and `domain` attribute representing the query bounds. For more request properties, see Request Properties below.
* `supportsMetadata(domainObject)` optional. Implement and return `true` for objects that you want to provide dynamic metadata for. * `supportsMetadata(domainObject)` optional. Implement and return `true` for objects that you want to provide dynamic metadata for.
* `getMetadata(domainObject)` required if `supportsMetadata` is implemented. Must return a valid telemetry metadata definition that includes at least one valueMetadata definition. * `getMetadata(domainObject)` required if `supportsMetadata` is implemented. Must return a valid telemetry metadata definition that includes at least one valueMetadata definition.
* `supportsLimits(domainObject)` optional. Implement and return `true` for domain objects that you want to provide a limit evaluator for. * `supportsLimits(domainObject)` optional. Implement and return `true` for domain objects that you want to provide a limit evaluator for.
@ -466,7 +466,7 @@ openmct.telemetry.addProvider({
Note: it is not required to implement all of the methods on every provider. Depending on the complexity of your implementation, it may be helpful to instantiate and register your realtime, historical, and metadata providers separately. Note: it is not required to implement all of the methods on every provider. Depending on the complexity of your implementation, it may be helpful to instantiate and register your realtime, historical, and metadata providers separately.
#### Telemetry Requests and Responses. #### Telemetry Requests
Telemetry requests support time bounded queries. A call to a _Telemetry Provider_'s `request` function will include an `options` argument. These are simply javascript objects with attributes for the request parameters. An example of a telemetry request object with a start and end time is included below: Telemetry requests support time bounded queries. A call to a _Telemetry Provider_'s `request` function will include an `options` argument. These are simply javascript objects with attributes for the request parameters. An example of a telemetry request object with a start and end time is included below:
@ -480,7 +480,8 @@ Telemetry requests support time bounded queries. A call to a _Telemetry Provider
In this case, the `domain` is the currently selected time-system, and the start and end dates are valid dates in that time system. In this case, the `domain` is the currently selected time-system, and the start and end dates are valid dates in that time system.
A telemetry provider's `request` method should return a promise for an array of telemetry datums. These datums must be sorted by `domain` in ascending order. The response to a telemetry request is an array of telemetry datums.
These datums must be sorted by `domain` in ascending order.
#### Request Strategies **draft** #### Request Strategies **draft**

5
app.js
View File

@ -19,7 +19,6 @@
// Defaults // Defaults
options.port = options.port || options.p || 8080; options.port = options.port || options.p || 8080;
options.host = options.host || options.h || 'localhost'
options.directory = options.directory || options.D || '.'; options.directory = options.directory || options.D || '.';
['include', 'exclude', 'i', 'x'].forEach(function (opt) { ['include', 'exclude', 'i', 'x'].forEach(function (opt) {
options[opt] = options[opt] || []; options[opt] = options[opt] || [];
@ -79,7 +78,7 @@
app.use(express['static'](options.directory)); app.use(express['static'](options.directory));
// Finally, open the HTTP server and log the instance to the console // Finally, open the HTTP server and log the instance to the console
app.listen(options.port, options.host, function() { app.listen(options.port, function() {
console.log('Open MCT application running at %s:%s', options.host, options.port) console.log('Open MCT application running at localhost:' + options.port)
}); });
}()); }());

View File

@ -22,6 +22,7 @@
"eventemitter3": "^1.2.0", "eventemitter3": "^1.2.0",
"lodash": "3.10.1", "lodash": "3.10.1",
"almond": "~0.3.2", "almond": "~0.3.2",
"html2canvas": "^0.4.1",
"moment-timezone": "^0.5.13" "moment-timezone": "^0.5.13"
} }
} }

View File

@ -1,6 +1,6 @@
machine: machine:
node: node:
version: 8.11.0 version: 4.7.0
dependencies: dependencies:
pre: pre:

View File

@ -60,8 +60,8 @@ define([
"source": "eventGenerator", "source": "eventGenerator",
"domains": [ "domains": [
{ {
"key": "utc", "key": "time",
"name": "Timestamp", "name": "Time",
"format": "utc" "format": "utc"
} }
], ],

View File

@ -30,7 +30,6 @@ define([
{ {
key: "sin", key: "sin",
name: "Sine", name: "Sine",
formatString: '%0.2f',
hints: { hints: {
range: 1 range: 1
} }
@ -38,7 +37,6 @@ define([
{ {
key: "cos", key: "cos",
name: "Cosine", name: "Cosine",
formatString: '%0.2f',
hints: { hints: {
range: 2 range: 2
} }

View File

@ -27,14 +27,8 @@ define([
) { ) {
var RED = { var RED = 0.9,
sin: 0.9, YELLOW = 0.5,
cos: 0.9
},
YELLOW = {
sin: 0.5,
cos: 0.5
},
LIMITS = { LIMITS = {
rh: { rh: {
cssClass: "s-limit-upr s-limit-red", cssClass: "s-limit-upr s-limit-red",
@ -73,18 +67,17 @@ define([
SinewaveLimitProvider.prototype.getLimitEvaluator = function (domainObject) { SinewaveLimitProvider.prototype.getLimitEvaluator = function (domainObject) {
return { return {
evaluate: function (datum, valueMetadata) { evaluate: function (datum, valueMetadata) {
var range = valueMetadata && valueMetadata.key; var range = valueMetadata ? valueMetadata.key : 'sin'
if (datum[range] > RED) {
if (datum[range] > RED[range]) {
return LIMITS.rh; return LIMITS.rh;
} }
if (datum[range] < -RED[range]) { if (datum[range] < -RED) {
return LIMITS.rl; return LIMITS.rl;
} }
if (datum[range] > YELLOW[range]) { if (datum[range] > YELLOW) {
return LIMITS.yh; return LIMITS.yh;
} }
if (datum[range] < -YELLOW[range]) { if (datum[range] < -YELLOW) {
return LIMITS.yl; return LIMITS.yl;
} }
} }

View File

@ -47,9 +47,7 @@ define([
var interval = setInterval(function () { var interval = setInterval(function () {
var now = Date.now(); var now = Date.now();
var datum = pointForTimestamp(now, duration, domainObject.name); callback(pointForTimestamp(now, duration, domainObject.name));
datum.value += "";
callback(datum);
}, duration); }, duration);
return function () { return function () {
@ -72,7 +70,7 @@ define([
var data = []; var data = [];
while (start <= end && data.length < 5000) { while (start <= end && data.length < 5000) {
data.push(pointForTimestamp(start, duration, domainObject.name)); data.push(pointForTimestamp(start, duration, domainObject.name));
start += duration; start += 5000;
} }
return Promise.resolve(data); return Promise.resolve(data);
}; };

View File

@ -101,11 +101,11 @@
padding-top: 1em; padding-top: 1em;
.cols { .cols {
display: flex; @include display(flex);
flex-direction: row; @include flex-direction(row);
.col { .col {
flex: 1 1 auto; @include flex(1 1 auto);
&:not(:last-child) { &:not(:last-child) {
$v: $interiorMargin * 4; $v: $interiorMargin * 4;
border-right: 1px solid $colorInteriorBorder; border-right: 1px solid $colorInteriorBorder;
@ -199,7 +199,7 @@
border-radius: 15%; border-radius: 15%;
position: absolute; position: absolute;
left: 50%; left: 50%;
transform: translateX(-50%); @include transform(translateX(-50%));
} }
} }
} }

View File

@ -149,21 +149,12 @@
<h2>Local Controls</h2> <h2>Local Controls</h2>
<div class="cols cols1-1"> <div class="cols cols1-1">
<div class="col"> <div class="col">
<p>Local controls are typically buttons and selects that provide actions in close proximity to a component.</p> <p>Local controls are typically buttons and selects that provide local control to an individual element. Typically, these controls are hidden in order to not block data display until the user hovers their cursor over an element, when the controls are displayed using a transition fade. Mousing out of the element fades the controls from view.</p>
<p>These controls can optionally be hidden to reduce clutter until the user hovers their cursor over an enclosing element. To use this approach, apply the class <code>.has-local-controls</code> to the element that should be aware of the hover and ensure that element encloses <code>.h-local-controls</code>.</p>
</div> </div>
<mct-example><div class="plot-display-area" style="padding: 10px; position: relative;"> <mct-example><div class="plot-display-area" style="height: 100px; padding: 10px; position: relative;">Hover over me
Some content in here <div class="l-local-controls gl-plot-local-controls t-plot-display-controls">
<div class="h-local-controls h-local-controls-overlay-content l-btn-set">
<a class="s-button icon-arrow-left" title="Restore previous pan/zoom"></a> <a class="s-button icon-arrow-left" title="Restore previous pan/zoom"></a>
<a class="s-button icon-reset" title="Reset pan/zoom"></a> <a class="s-button icon-arrows-out" title="Reset pan/zoom"></a>
</div>
</div>
<div class="plot-display-area has-local-controls" style="padding: 10px; position: relative;">
Hover here
<div class="h-local-controls h-local-controls-overlay-content local-controls-hidden l-btn-set">
<a class="s-button icon-arrow-left" title="Restore previous pan/zoom"></a>
<a class="s-button icon-reset" title="Reset pan/zoom"></a>
</div> </div>
</div></mct-example> </div></mct-example>
</div> </div>

View File

@ -21,16 +21,15 @@
--> -->
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<title></title> <title></title>
<script src="bower_components/requirejs/require.js"> </script> <script src="bower_components/requirejs/require.js"> </script>
<script> <script>
var THIRTY_MINUTES = 30 * 60 * 1000; var THIRTY_MINUTES = 30 * 60 * 1000;
require(['openmct', './src/plugins/telemetryTable/plugin'], function (openmct, TelemetryTablePlugin) { require(['openmct'], function (openmct) {
[ [
'example/eventGenerator', 'example/eventGenerator',
'example/styleguide' 'example/styleguide'
@ -38,7 +37,8 @@
openmct.legacyRegistry.enable.bind(openmct.legacyRegistry) openmct.legacyRegistry.enable.bind(openmct.legacyRegistry)
); );
openmct.install(openmct.plugins.MyItems()); openmct.install(openmct.plugins.MyItems());
openmct.install(openmct.plugins.LocalStorage()); // openmct.install(openmct.plugins.LocalStorage());
openmct.install(openmct.plugins.CouchDB('http://127.0.0.1:5984/openmct'));
openmct.install(openmct.plugins.Espresso()); openmct.install(openmct.plugins.Espresso());
openmct.install(openmct.plugins.Generator()); openmct.install(openmct.plugins.Generator());
openmct.install(openmct.plugins.ExampleImagery()); openmct.install(openmct.plugins.ExampleImagery());
@ -69,8 +69,7 @@
] ]
})); }));
openmct.install(openmct.plugins.SummaryWidget()); openmct.install(openmct.plugins.SummaryWidget());
openmct.install(openmct.plugins.Notebook()); openmct.install(openmct.plugins.ActivityModes());
openmct.install(TelemetryTablePlugin());
openmct.time.clock('local', {start: -THIRTY_MINUTES, end: 0}); openmct.time.clock('local', {start: -THIRTY_MINUTES, end: 0});
openmct.time.timeSystem('utc'); openmct.time.timeSystem('utc');
openmct.start(); openmct.start();
@ -82,10 +81,10 @@
<link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-16x16.png" sizes="16x16">
<link rel="shortcut icon" href="platform/commonUI/general/res/images/favicons/favicon.ico"> <link rel="shortcut icon" href="platform/commonUI/general/res/images/favicons/favicon.ico">
</head> </head>
<body> <body class="user-environ">
<div class="l-splash-holder s-splash-holder"> <div class="l-splash-holder s-splash-holder">
<div class="l-splash s-splash"></div> <div class="l-splash s-splash"></div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -37,10 +37,7 @@ module.exports = function(config) {
{pattern: 'bower_components/**/*.js', included: false}, {pattern: 'bower_components/**/*.js', included: false},
{pattern: 'node_modules/d3-*/**/*.js', included: false}, {pattern: 'node_modules/d3-*/**/*.js', included: false},
{pattern: 'node_modules/vue/**/*.js', included: false}, {pattern: 'node_modules/vue/**/*.js', included: false},
{pattern: 'node_modules/printj/dist/*.js', included: false},
{pattern: 'src/**/*', included: false}, {pattern: 'src/**/*', included: false},
{pattern: 'node_modules/painterro/build/*.js', included: false},
{pattern: 'node_modules/html2canvas/dist/*', included: false},
{pattern: 'example/**/*.html', included: false}, {pattern: 'example/**/*.html', included: false},
{pattern: 'example/**/*.js', included: false}, {pattern: 'example/**/*.js', included: false},
{pattern: 'example/**/*.json', included: false}, {pattern: 'example/**/*.json', included: false},
@ -65,7 +62,7 @@ module.exports = function(config) {
// Test results reporter to use // Test results reporter to use
// Possible values: 'dots', 'progress' // Possible values: 'dots', 'progress'
// Available reporters: https://npmjs.org/browse/keyword/karma-reporter // Available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress', 'coverage', 'html'], reporters: ['progress', 'coverage', 'html', 'junit'],
// Web server port. // Web server port.
port: 9876, port: 9876,
@ -81,7 +78,7 @@ module.exports = function(config) {
// Specify browsers to run tests in. // Specify browsers to run tests in.
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: [ browsers: [
'ChromeHeadless' 'Chrome'
], ],
// Code coverage reporting. // Code coverage reporting.
@ -104,6 +101,10 @@ module.exports = function(config) {
foldAll: false foldAll: false
}, },
junitReporter: {
outputDir: process.env.CIRCLE_TEST_REPORTS || 'dist/reports/junit'
},
// Continuous Integration mode. // Continuous Integration mode.
// If true, Karma captures browsers, runs the tests and exits. // If true, Karma captures browsers, runs the tests and exits.
singleRun: true singleRun: true

View File

@ -1,68 +0,0 @@
* Delete old table
* Update new table type and test backward compatibility.
* re-evaluate TableConfiguration object. Name doesn't make sense right now, and some duplicated code for configuration handling in components.
* Rebase over refactor branch
* Move css to new table location
* Test (see list of issues below)
* Push WIP PR
* [X] Remove column sizing rows on object removal (should be trivial since tracking by object ID already).
* [X] Look at optimizing styles in telemetry-table-row
- Right now profiling does not highlight this as a bottleneck?
* [X] Add title to table cells
* [X] Add elipses for overflow on table cells
* [X] On entry, filter boxes need to remove magnifying glass.
* [X] auto-scroll
* [X] Show / hide columns (ie. table configuration)
* [X] Why aren't limits being applied until I scroll or do something?
* [X] Handle window resizing
* [X] Fix memory leaks
* [X] Remove isFromObject and hasColumn from TelemetryTableRow
* [X] Remove format caching
* [X] Add filtering
* If the new filter string starts with the old filter string, filter based on the list of previously filtered results, not the base list.
* Add the clear filter button
* [X] Cache formatted values for "just in time" formatting. I think cache on row. Opportunity to cache on column to benefit from multiple rows with the same value, but memory management becomes a problem then as cache could grow infinitely if the table is left to run.
* [X] Do some more testing with multiple objects. Not working properly right now.
* [X] Rows not being removed when object removed from composition
* [X] Subscribe to realtime data
* [X] Column widths should be done on receipt of FIRST DATA, not on receipt of historical data.
* [X] Filter subscription data
* [X] Export
* [X] Add loading spinner
* [X] in 'mounted', should not be necessary to bind to 'this'.
* [X] Stop Vue from decorating EVERYTHING (but especially the telemetry collection)
* [X] Need minimum width on tables. Provided by calcTableWidthPx in MCTTableController
* [X] Limits
* Benchmark - loading 1 million rows
- Old tables: ~90s
- New tables: ~11s
* 1 million rows in 11 secs vs 90s
To Test
* Multiple instances of tables
* Make sure time columns are being correctly merged
* Test with MSL data sources
* Test with tutorial data sources
* Behavior at different widths.
* Short tables
* Test with bounds / clock / time system changes.
* Memory leaks
Post WIP PR
* Fix jitter on auto-scroll
* Look at scroll-x again. Sounded like there might be some subtlety missing there (something to do with small columns?).
* Split TelemetryTableComponent into more components. It's too large now.
* Performance
* Don't wrap row on load, do it on scroll.
* On batch insert, check bounds once, rather than on each insert.
* See if sticky headers can be simplified (eg. can we combine headers table with content table?)
* Default sort behavior, and sticking to the bottom for realtime numerical
* Look at setting top on tbody, instead of each tr
* Replace all "mct-table" classes
* Consider making the sizing row a separate component. Encapsulate all sizing logic in there.
* consider making the header table a separate component.
* Test where no time column present (what will it sort by)
* [X] Optimization - don't both sorting filtered rows initially, just copy over values from bounded row collection which have already been sorted.

View File

@ -29,6 +29,7 @@ requirejs.config({
"csv": "bower_components/comma-separated-values/csv.min", "csv": "bower_components/comma-separated-values/csv.min",
"EventEmitter": "bower_components/eventemitter3/index", "EventEmitter": "bower_components/eventemitter3/index",
"es6-promise": "bower_components/es6-promise/es6-promise.min", "es6-promise": "bower_components/es6-promise/es6-promise.min",
"html2canvas": "bower_components/html2canvas/build/html2canvas.min",
"moment": "bower_components/moment/moment", "moment": "bower_components/moment/moment",
"moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format", "moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format",
"moment-timezone": "bower_components/moment-timezone/builds/moment-timezone-with-data", "moment-timezone": "bower_components/moment-timezone/builds/moment-timezone-with-data",
@ -49,9 +50,7 @@ requirejs.config({
"d3-interpolate": "node_modules/d3-interpolate/build/d3-interpolate.min", "d3-interpolate": "node_modules/d3-interpolate/build/d3-interpolate.min",
"d3-time": "node_modules/d3-time/build/d3-time.min", "d3-time": "node_modules/d3-time/build/d3-time.min",
"d3-time-format": "node_modules/d3-time-format/build/d3-time-format.min", "d3-time-format": "node_modules/d3-time-format/build/d3-time-format.min",
"html2canvas": "node_modules/html2canvas/dist/html2canvas.min", "d3-dsv": "node_modules/d3-dsv/build/d3-dsv.min"
"painterro": "node_modules/painterro/build/painterro.min",
"printj": "node_modules/printj/dist/printj.min"
}, },
"shim": { "shim": {
"angular": { "angular": {
@ -63,12 +62,12 @@ requirejs.config({
"EventEmitter": { "EventEmitter": {
"exports": "EventEmitter" "exports": "EventEmitter"
}, },
"html2canvas": {
"exports": "html2canvas"
},
"moment-duration-format": { "moment-duration-format": {
"deps": ["moment"] "deps": ["moment"]
}, },
"painterro": {
"exports": "Painterro"
},
"saveAs": { "saveAs": {
"exports": "saveAs" "exports": "saveAs"
}, },
@ -90,9 +89,6 @@ requirejs.config({
}, },
"d3-axis": { "d3-axis": {
"exports": "d3-axis" "exports": "d3-axis"
},
"dom-to-image": {
"exports": "domtoimage"
} }
} }
}); });

View File

@ -1,6 +1,6 @@
{ {
"name": "openmct", "name": "openmct",
"version": "0.14.0-SNAPSHOT", "version": "0.13.3-SNAPSHOT",
"description": "The Open MCT core platform", "description": "The Open MCT core platform",
"dependencies": { "dependencies": {
"d3-array": "1.2.x", "d3-array": "1.2.x",
@ -8,6 +8,7 @@
"d3-collection": "1.0.x", "d3-collection": "1.0.x",
"d3-color": "1.0.x", "d3-color": "1.0.x",
"d3-format": "1.2.x", "d3-format": "1.2.x",
"d3-dsv": "^1.0.8",
"d3-interpolate": "1.1.x", "d3-interpolate": "1.1.x",
"d3-scale": "1.0.x", "d3-scale": "1.0.x",
"d3-selection": "1.3.x", "d3-selection": "1.3.x",
@ -15,7 +16,6 @@
"d3-time-format": "2.1.x", "d3-time-format": "2.1.x",
"express": "^4.13.1", "express": "^4.13.1",
"minimist": "^1.1.1", "minimist": "^1.1.1",
"painterro": "^0.2.65",
"request": "^2.69.0", "request": "^2.69.0",
"vue": "^2.5.6" "vue": "^2.5.6"
}, },
@ -31,18 +31,18 @@
"gulp-requirejs-optimize": "^0.3.1", "gulp-requirejs-optimize": "^0.3.1",
"gulp-sass": "^3.1.0", "gulp-sass": "^3.1.0",
"gulp-sourcemaps": "^1.6.0", "gulp-sourcemaps": "^1.6.0",
"html2canvas": "^1.0.0-alpha.12", "jasmine-core": "^2.3.0",
"jasmine-core": "^3.1.0",
"jscs-html-reporter": "^0.1.0", "jscs-html-reporter": "^0.1.0",
"jsdoc": "^3.3.2", "jsdoc": "^3.3.2",
"jshint": "^2.7.0", "jshint": "^2.7.0",
"karma": "^2.0.3", "karma": "^0.13.3",
"karma-chrome-launcher": "^2.2.0", "karma-chrome-launcher": "^0.1.12",
"karma-cli": "^1.0.1", "karma-cli": "0.0.4",
"karma-coverage": "^1.1.2", "karma-coverage": "^0.5.3",
"karma-html-reporter": "^0.2.7", "karma-html-reporter": "^0.2.7",
"karma-jasmine": "^1.1.2", "karma-jasmine": "^0.1.5",
"karma-requirejs": "^1.1.0", "karma-junit-reporter": "^0.3.8",
"karma-requirejs": "^0.2.2",
"lodash": "^3.10.1", "lodash": "^3.10.1",
"markdown-toc": "^0.11.7", "markdown-toc": "^0.11.7",
"marked": "^0.3.5", "marked": "^0.3.5",
@ -50,7 +50,6 @@
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"moment": "^2.11.1", "moment": "^2.11.1",
"node-bourbon": "^4.2.3", "node-bourbon": "^4.2.3",
"printj": "^1.1.0",
"requirejs": "2.1.x", "requirejs": "2.1.x",
"split": "^1.0.0", "split": "^1.0.0",
"v8-compile-cache": "^1.1.0" "v8-compile-cache": "^1.1.0"

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.
@ -24,7 +24,7 @@
<div class="s-text l-content"> <div class="s-text l-content">
<h1 class="l-title s-title">Open MCT</h1> <h1 class="l-title s-title">Open MCT</h1>
<div class="l-description s-description"> <div class="l-description s-description">
<p>Open MCT, Copyright &copy; 2014-2018, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.</p> <p>Open MCT, Copyright &copy; 2014-2017, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.</p>
<p>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 <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>.</p> <p>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 <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>.</p>
<p>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.</p> <p>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.</p>
<p>Open MCT includes source code licensed under additional open source licenses. See the Open Source Licenses file included with this distribution or <a ng-click="about.openLicenses()">click here for licensing information</a>.</p> <p>Open MCT includes source code licensed under additional open source licenses. See the Open Source Licenses file included with this distribution or <a ng-click="about.openLicenses()">click here for licensing information</a>.</p>

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -113,8 +113,7 @@ define([
"agentService", "agentService",
"$window", "$window",
"$location", "$location",
"$attrs", "$attrs"
"navigationService"
] ]
}, },
{ {

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.
@ -65,7 +65,7 @@
<div class='split-pane-component t-object pane primary-pane left'> <div class='split-pane-component t-object pane primary-pane left'>
<mct-representation mct-object="navigatedObject" <mct-representation mct-object="navigatedObject"
key="navigatedObject.getCapability('status').get('editing') ? 'edit-object' : 'browse-object'" key="navigatedObject.getCapability('status').get('editing') ? 'edit-object' : 'browse-object'"
class="abs holder holder-object t-main-view"> class="abs holder holder-object">
</mct-representation> </mct-representation>
<a class="mini-tab-icon anchor-right mobile-hide toggle-pane toggle-inspect flush-right" <a class="mini-tab-icon anchor-right mobile-hide toggle-pane toggle-inspect flush-right"
title="{{ modelPaneInspect.visible()? 'Hide' : 'Show' }} the Inspection pane" title="{{ modelPaneInspect.visible()? 'Hide' : 'Show' }} the Inspection pane"

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.
@ -19,23 +19,21 @@
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.
--> -->
<div ng-controller="ObjectInspectorController as controller" class="grid-properties"> <div ng-controller="ObjectInspectorController as controller">
<ul class="l-inspector-part"> <ul class="flex-elem grows l-inspector-part">
<h2 class="first">Properties</h2> <li>
<li class="t-repeat grid-row" <em class="t-inspector-part-header">Properties</em>
<div class="inspector-properties"
ng-repeat="data in metadata" ng-repeat="data in metadata"
ng-class="{ first:$index === 0 }"> ng-class="{ first:$index === 0 }">
<div class="grid-cell label">{{ data.name }}</div> <div class="label">{{ data.name }}</div>
<div class="grid-cell value">{{ data.value }}</div> <div class="value">{{ data.value }}</div>
</div>
</li> </li>
</ul> <li ng-if="contextutalParents.length > 0">
<em class="t-inspector-part-header" title="The location of this linked object.">Location</em>
<ul class="l-inspector-part" ng-if="contextutalParents.length > 0"> <div ng-if="primaryParents.length > 0" class="section-header">This Object</div>
<h2 title="The location of this linked object.">Location</h2> <span class="inspector-location"
<li class="grid-row">
<div class="label" ng-if="primaryParents.length > 0">This Link</div>
<div class="grid-cell value">
<div class="t-repeat inspector-location"
ng-repeat="parent in contextutalParents" ng-repeat="parent in contextutalParents"
ng-class="{ last:($index + 1) === contextualParents.length }"> ng-class="{ last:($index + 1) === contextualParents.length }">
<mct-representation key="'label'" <mct-representation key="'label'"
@ -43,13 +41,11 @@
ng-click="parent.getCapability('action').perform('navigate')" ng-click="parent.getCapability('action').perform('navigate')"
class="location-item"> class="location-item">
</mct-representation> </mct-representation>
</div> </span>
</div>
</li> </li>
<li class="grid-row" ng-if="primaryParents.length > 0"> <li ng-if="primaryParents.length > 0">
<div class="grid-cell label">Original</div> <div class="section-header">Object's Original</div>
<div class="grid-cell value"> <span class="inspector-location"
<div class="t-repeat inspector-location value"
ng-repeat="parent in primaryParents" ng-repeat="parent in primaryParents"
ng-class="{ last:($index + 1) === primaryParents.length }"> ng-class="{ last:($index + 1) === primaryParents.length }">
<mct-representation key="'label'" <mct-representation key="'label'"
@ -57,8 +53,7 @@
ng-click="parent.getCapability('action').perform('navigate')" ng-click="parent.getCapability('action').perform('navigate')"
class="location-item"> class="location-item">
</mct-representation> </mct-representation>
</div> </span>
</div>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -47,8 +47,8 @@ define(
urlService, urlService,
defaultPath defaultPath
) { ) {
var initialPath = ($route.current.params.ids || defaultPath).split("/"), var initialPath = ($route.current.params.ids || defaultPath).split("/");
currentIds; var currentIds;
$scope.treeModel = { $scope.treeModel = {
selectedObject: undefined, selectedObject: undefined,
@ -56,25 +56,8 @@ define(
navigationService.setNavigation(object, true); navigationService.setNavigation(object, true);
}, },
allowSelection: function (object) { allowSelection: function (object) {
var domainObjectInView = navigationService.getNavigation(),
isInEditMode = domainObjectInView.getCapability('status').get('editing');
if (isInEditMode) {
var actions = object.getCapability('action'),
previewAction = actions.getActions({key: 'mct-preview-action'})[0];
if (previewAction && previewAction.perform) {
previewAction.perform();
return false;
} else {
return navigationService.shouldNavigate(); return navigationService.shouldNavigate();
} }
} else {
return true;
}
}
}; };
function idsForObject(domainObject) { function idsForObject(domainObject) {

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -24,14 +24,14 @@
define( define(
[], [],
function () { function () {
var navigationListenerAdded = false;
/** /**
* Controller to provide the ability to show/hide the tree in * Controller to provide the ability to show/hide the tree in
* Browse mode. * Browse mode.
* @constructor * @constructor
* @memberof platform/commonUI/browse * @memberof platform/commonUI/browse
*/ */
function PaneController($scope, agentService, $window, $location, $attrs, navigationService) { function PaneController($scope, agentService, $window, $location, $attrs) {
var self = this; var self = this;
this.agentService = agentService; this.agentService = agentService;
var hideParameterPresent = $location.search().hasOwnProperty($attrs.hideParameter); var hideParameterPresent = $location.search().hasOwnProperty($attrs.hideParameter);
@ -61,11 +61,6 @@ define(
self.state = false; self.state = false;
} }
}; };
if (navigationService && navigationService.addListener && !navigationListenerAdded) {
navigationService.addListener(this.callback);
navigationListenerAdded = true;
}
} }
/** /**

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -162,6 +162,7 @@ define(
*/ */
NavigationService.prototype.shouldWarnBeforeNavigate = function () { NavigationService.prototype.shouldWarnBeforeNavigate = function () {
var reasons = []; var reasons = [];
this.checks.forEach(function (checkFn) { this.checks.forEach(function (checkFn) {
var reason = checkFn(); var reason = checkFn();
if (reason) { if (reason) {

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,7 +19,6 @@
* 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.
*****************************************************************************/ *****************************************************************************/
/*global console*/
/** /**
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14. * MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
@ -49,19 +48,9 @@ define(
controller; controller;
function waitsForNavigation() { function waitsForNavigation() {
return new Promise(function (resolve) { var calls = mockNavigationService.setNavigation.calls.length;
mockNavigationService.setNavigation.and.callFake(function (obj) { waitsFor(function () {
var returnValue; return mockNavigationService.setNavigation.calls.length > calls;
try {
returnValue = NavigationService.prototype.setNavigation.call(mockNavigationService, obj);
} catch (err) {
console.error(err);
//Not rejecting because 'setNavigation' has been called, which is what's being tested here.
//Rejecting will fail tests.
}
resolve();
return returnValue;
});
}); });
} }
@ -89,7 +78,7 @@ define(
"urlService", "urlService",
["urlForLocation"] ["urlForLocation"]
); );
mockUrlService.urlForLocation.and.callFake(function (mode, object) { mockUrlService.urlForLocation.andCallFake(function (mode, object) {
if (object === mockDefaultRootObject) { if (object === mockDefaultRootObject) {
return [mode, testDefaultRoot].join('/'); return [mode, testDefaultRoot].join('/');
} }
@ -117,7 +106,7 @@ define(
"removeListener" "removeListener"
].forEach(function (method) { ].forEach(function (method) {
spyOn(mockNavigationService, method) spyOn(mockNavigationService, method)
.and.callThrough(); .andCallThrough();
}); });
mockRootObject = jasmine.createSpyObj( mockRootObject = jasmine.createSpyObj(
"rootObjectContainer", "rootObjectContainer",
@ -135,31 +124,32 @@ define(
"nestedDomainObject", "nestedDomainObject",
["getId", "getCapability", "getModel", "useCapability", "hasCapability"] ["getId", "getCapability", "getModel", "useCapability", "hasCapability"]
); );
mockObjectService.getObjects.and.returnValue(Promise.resolve({ mockObjectService.getObjects.andReturn(Promise.resolve({
ROOT: mockRootObject ROOT: mockRootObject
})); }));
mockRootObject.useCapability.and.returnValue(Promise.resolve([ mockRootObject.useCapability.andReturn(Promise.resolve([
mockOtherDomainObject, mockOtherDomainObject,
mockDefaultRootObject mockDefaultRootObject
])); ]));
mockRootObject.hasCapability.and.returnValue(true); mockRootObject.hasCapability.andReturn(true);
mockDefaultRootObject.useCapability.and.returnValue(Promise.resolve([ mockDefaultRootObject.useCapability.andReturn(Promise.resolve([
mockNextObject mockNextObject
])); ]));
mockDefaultRootObject.hasCapability.and.returnValue(true); mockDefaultRootObject.hasCapability.andReturn(true);
mockOtherDomainObject.hasCapability.and.returnValue(false); mockOtherDomainObject.hasCapability.andReturn(false);
mockNextObject.useCapability.and.returnValue(undefined); mockNextObject.useCapability.andReturn(undefined);
mockNextObject.hasCapability.and.returnValue(false); mockNextObject.hasCapability.andReturn(false);
mockNextObject.getId.and.returnValue("next"); mockNextObject.getId.andReturn("next");
mockDefaultRootObject.getId.and.returnValue(testDefaultRoot); mockDefaultRootObject.getId.andReturn(testDefaultRoot);
instantiateController(); instantiateController();
return waitsForNavigation(); waitsForNavigation();
}); });
it("uses composition to set the navigated object, if there is none", function () { it("uses composition to set the navigated object, if there is none", function () {
instantiateController(); instantiateController();
return waitsForNavigation().then(function () { waitsForNavigation();
runs(function () {
expect(mockNavigationService.setNavigation) expect(mockNavigationService.setNavigation)
.toHaveBeenCalledWith(mockDefaultRootObject); .toHaveBeenCalledWith(mockDefaultRootObject);
}); });
@ -167,26 +157,27 @@ define(
it("navigates to a root-level object, even when default path is not found", function () { it("navigates to a root-level object, even when default path is not found", function () {
mockDefaultRootObject.getId mockDefaultRootObject.getId
.and.returnValue("something-other-than-the-" + testDefaultRoot); .andReturn("something-other-than-the-" + testDefaultRoot);
instantiateController(); instantiateController();
return waitsForNavigation().then(function () { waitsForNavigation();
runs(function () {
expect(mockNavigationService.setNavigation) expect(mockNavigationService.setNavigation)
.toHaveBeenCalledWith(mockDefaultRootObject); .toHaveBeenCalledWith(mockDefaultRootObject);
}); });
});
});
//
it("does not try to override navigation", function () { it("does not try to override navigation", function () {
mockNavigationService.getNavigation.and.returnValue(mockDefaultRootObject); mockNavigationService.getNavigation.andReturn(mockDefaultRootObject);
instantiateController(); instantiateController();
return waitsForNavigation().then(function () { waitsForNavigation();
expect(mockScope.navigatedObject).toBe(mockDefaultRootObject); expect(mockScope.navigatedObject).toBe(mockDefaultRootObject);
}); });
}); //
it("updates scope when navigated object changes", function () { it("updates scope when navigated object changes", function () {
// Should have registered a listener - call it // Should have registered a listener - call it
mockNavigationService.addListener.calls.mostRecent().args[0]( mockNavigationService.addListener.mostRecentCall.args[0](
mockOtherDomainObject mockOtherDomainObject
); );
expect(mockScope.navigatedObject).toEqual(mockOtherDomainObject); expect(mockScope.navigatedObject).toEqual(mockOtherDomainObject);
@ -198,18 +189,19 @@ define(
"$destroy", "$destroy",
jasmine.any(Function) jasmine.any(Function)
); );
mockScope.$on.calls.mostRecent().args[1](); mockScope.$on.mostRecentCall.args[1]();
// Should remove the listener it added earlier // Should remove the listener it added earlier
expect(mockNavigationService.removeListener).toHaveBeenCalledWith( expect(mockNavigationService.removeListener).toHaveBeenCalledWith(
mockNavigationService.addListener.calls.mostRecent().args[0] mockNavigationService.addListener.mostRecentCall.args[0]
); );
}); });
it("uses route parameters to choose initially-navigated object", function () { it("uses route parameters to choose initially-navigated object", function () {
mockRoute.current.params.ids = testDefaultRoot + "/next"; mockRoute.current.params.ids = testDefaultRoot + "/next";
instantiateController(); instantiateController();
return waitsForNavigation().then(function () { waitsForNavigation();
runs(function () {
expect(mockScope.navigatedObject).toBe(mockNextObject); expect(mockScope.navigatedObject).toBe(mockNextObject);
expect(mockNavigationService.setNavigation) expect(mockNavigationService.setNavigation)
.toHaveBeenCalledWith(mockNextObject); .toHaveBeenCalledWith(mockNextObject);
@ -222,10 +214,12 @@ define(
// it hits an invalid ID. // it hits an invalid ID.
mockRoute.current.params.ids = testDefaultRoot + "/junk"; mockRoute.current.params.ids = testDefaultRoot + "/junk";
instantiateController(); instantiateController();
return waitsForNavigation().then(function () { waitsForNavigation();
runs(function () {
expect(mockScope.navigatedObject).toBe(mockDefaultRootObject); expect(mockScope.navigatedObject).toBe(mockDefaultRootObject);
expect(mockNavigationService.setNavigation) expect(mockNavigationService.setNavigation)
.toHaveBeenCalledWith(mockDefaultRootObject); .toHaveBeenCalledWith(mockDefaultRootObject);
}); });
}); });
@ -235,7 +229,8 @@ define(
// should stop at it since remaining IDs cannot be loaded. // should stop at it since remaining IDs cannot be loaded.
mockRoute.current.params.ids = testDefaultRoot + "/next/junk"; mockRoute.current.params.ids = testDefaultRoot + "/next/junk";
instantiateController(); instantiateController();
return waitsForNavigation().then(function () { waitsForNavigation();
runs(function () {
expect(mockScope.navigatedObject).toBe(mockNextObject); expect(mockScope.navigatedObject).toBe(mockNextObject);
expect(mockNavigationService.setNavigation) expect(mockNavigationService.setNavigation)
.toHaveBeenCalledWith(mockNextObject); .toHaveBeenCalledWith(mockNextObject);
@ -249,11 +244,11 @@ define(
expect(mockRoute.current.pathParams.ids) expect(mockRoute.current.pathParams.ids)
.not .not
.toBe(testDefaultRoot + '/next'); .toBe(testDefaultRoot + '/next');
mockLocation.path.and.callFake(function () { mockLocation.path.andCallFake(function () {
expect(mockRoute.current.pathParams.ids) expect(mockRoute.current.pathParams.ids)
.toBe(testDefaultRoot + '/next'); .toBe(testDefaultRoot + '/next');
}); });
mockNavigationService.addListener.calls.mostRecent().args[0]( mockNavigationService.addListener.mostRecentCall.args[0](
mockNextObject mockNextObject
); );
expect(mockLocation.path).toHaveBeenCalledWith( expect(mockLocation.path).toHaveBeenCalledWith(

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -20,6 +20,7 @@
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
define( define(
["../src/BrowseObjectController"], ["../src/BrowseObjectController"],
function (BrowseObjectController) { function (BrowseObjectController) {
@ -32,7 +33,7 @@ define(
// Utility function; look for a $watch on scope and fire it // Utility function; look for a $watch on scope and fire it
function fireWatch(expr, value) { function fireWatch(expr, value) {
mockScope.$watch.calls.all().forEach(function (call) { mockScope.$watch.calls.forEach(function (call) {
if (call.args[0] === expr) { if (call.args[0] === expr) {
call.args[1](value); call.args[1](value);
} }
@ -49,7 +50,7 @@ define(
"$location", "$location",
["path", "search"] ["path", "search"]
); );
mockLocation.search.and.returnValue({}); mockLocation.search.andReturn({});
controller = new BrowseObjectController( controller = new BrowseObjectController(
mockScope, mockScope,
@ -64,7 +65,7 @@ define(
// Allows the path index to be checked // Allows the path index to be checked
// prior to setting $route.current // prior to setting $route.current
mockLocation.path.and.returnValue("/browse/"); mockLocation.path.andReturn("/browse/");
}); });
it("sets the active view from query parameters", function () { it("sets the active view from query parameters", function () {
@ -78,10 +79,10 @@ define(
{ key: 'xyz' } { key: 'xyz' }
]; ];
mockDomainObject.useCapability.and.callFake(function (c) { mockDomainObject.useCapability.andCallFake(function (c) {
return (c === 'view') && testViews; return (c === 'view') && testViews;
}); });
mockLocation.search.and.returnValue({ view: 'def' }); mockLocation.search.andReturn({ view: 'def' });
fireWatch('domainObject', mockDomainObject); fireWatch('domainObject', mockDomainObject);
expect(mockScope.representation.selected) expect(mockScope.representation.selected)

View File

@ -50,14 +50,14 @@ define(
"navigationService", "navigationService",
["getNavigation", "addListener"] ["getNavigation", "addListener"]
); );
mockNavigationService.addListener.and.returnValue(mockNavigationUnlistener); mockNavigationService.addListener.andReturn(mockNavigationUnlistener);
mockStatusUnlistener = jasmine.createSpy("statusUnlistener"); mockStatusUnlistener = jasmine.createSpy("statusUnlistener");
mockStatusCapability = jasmine.createSpyObj( mockStatusCapability = jasmine.createSpyObj(
"statusCapability", "statusCapability",
["listen"] ["listen"]
); );
mockStatusCapability.listen.and.returnValue(mockStatusUnlistener); mockStatusCapability.listen.andReturn(mockStatusUnlistener);
mockDomainObject = jasmine.createSpyObj( mockDomainObject = jasmine.createSpyObj(
'domainObject', 'domainObject',
@ -68,13 +68,13 @@ define(
'hasCapability' 'hasCapability'
] ]
); );
mockDomainObject.getId.and.returnValue("domainObject"); mockDomainObject.getId.andReturn("domainObject");
mockDomainObject.getModel.and.returnValue({}); mockDomainObject.getModel.andReturn({});
mockDomainObject.hasCapability.and.returnValue(true); mockDomainObject.hasCapability.andReturn(true);
mockDomainObject.getCapability.and.returnValue(mockStatusCapability); mockDomainObject.getCapability.andReturn(mockStatusCapability);
mockLocation = jasmine.createSpyObj('location', ['search']); mockLocation = jasmine.createSpyObj('location', ['search']);
mockLocation.search.and.returnValue({}); mockLocation.search.andReturn({});
mockAttrs = {}; mockAttrs = {};
@ -84,7 +84,7 @@ define(
it("listens for changes to navigation and attaches a status" + it("listens for changes to navigation and attaches a status" +
" listener", function () { " listener", function () {
expect(mockNavigationService.addListener).toHaveBeenCalledWith(jasmine.any(Function)); expect(mockNavigationService.addListener).toHaveBeenCalledWith(jasmine.any(Function));
mockNavigationService.addListener.calls.mostRecent().args[0](mockDomainObject); mockNavigationService.addListener.mostRecentCall.args[0](mockDomainObject);
expect(mockStatusCapability.listen).toHaveBeenCalledWith(jasmine.any(Function)); expect(mockStatusCapability.listen).toHaveBeenCalledWith(jasmine.any(Function));
}); });
@ -93,8 +93,8 @@ define(
controller.toggle(); controller.toggle();
// test pre-condition that inspector is hidden // test pre-condition that inspector is hidden
expect(controller.visible()).toBe(false); expect(controller.visible()).toBe(false);
mockNavigationService.addListener.calls.mostRecent().args[0](mockDomainObject); mockNavigationService.addListener.mostRecentCall.args[0](mockDomainObject);
mockStatusCapability.listen.calls.mostRecent().args[0](["editing"]); mockStatusCapability.listen.mostRecentCall.args[0](["editing"]);
expect(controller.visible()).toBe(true); expect(controller.visible()).toBe(true);
}); });

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -60,8 +60,8 @@ define(
mockActionContext.domainObject = mockDomainObject; mockActionContext.domainObject = mockDomainObject;
mockActionContext.event = mockEvent; mockActionContext.event = mockEvent;
mockScope.domainObject = mockDomainObject; mockScope.domainObject = mockDomainObject;
mockDomainObject.getCapability.and.returnValue(mockContextMenuAction); mockDomainObject.getCapability.andReturn(mockContextMenuAction);
mockContextMenuAction.perform.and.returnValue(jasmine.any(Function)); mockContextMenuAction.perform.andReturn(jasmine.any(Function));
controller = new MenuArrowController(mockScope); controller = new MenuArrowController(mockScope);
}); });

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -39,7 +39,7 @@ define(
mockMutationCapability = jasmine.createSpyObj("mutation", ["mutate"]); mockMutationCapability = jasmine.createSpyObj("mutation", ["mutate"]);
mockTypeCapability = jasmine.createSpyObj("type", ["typeDef", "hasFeature"]); mockTypeCapability = jasmine.createSpyObj("type", ["typeDef", "hasFeature"]);
mockTypeCapability.typeDef = { name: ""}; mockTypeCapability.typeDef = { name: ""};
mockTypeCapability.hasFeature.and.callFake(function (feature) { mockTypeCapability.hasFeature.andCallFake(function (feature) {
return feature === 'creation'; return feature === 'creation';
}); });
@ -52,8 +52,8 @@ define(
name: "Test name" name: "Test name"
}; };
mockDomainObject = jasmine.createSpyObj("domainObject", ["getCapability", "getModel"]); mockDomainObject = jasmine.createSpyObj("domainObject", ["getCapability", "getModel"]);
mockDomainObject.getModel.and.returnValue(model); mockDomainObject.getModel.andReturn(model);
mockDomainObject.getCapability.and.callFake(function (key) { mockDomainObject.getCapability.andCallFake(function (key) {
return mockCapabilities[key]; return mockCapabilities[key];
}); });
@ -62,7 +62,7 @@ define(
}; };
mockCurrentTarget = jasmine.createSpyObj("currentTarget", ["blur", "textContent"]); mockCurrentTarget = jasmine.createSpyObj("currentTarget", ["blur", "textContent"]);
mockCurrentTarget.blur.and.returnValue(mockCurrentTarget); mockCurrentTarget.blur.andReturn(mockCurrentTarget);
mockEvent = { mockEvent = {
which: {}, which: {},
@ -109,7 +109,7 @@ define(
expect(mockMutationCapability.mutate).toHaveBeenCalledWith(jasmine.any(Function)); expect(mockMutationCapability.mutate).toHaveBeenCalledWith(jasmine.any(Function));
mockMutationCapability.mutate.calls.mostRecent().args[0](model); mockMutationCapability.mutate.mostRecentCall.args[0](model);
expect(mockDomainObject.getModel().name).toBe("New name"); expect(mockDomainObject.getModel().name).toBe("New name");
}); });
@ -127,7 +127,7 @@ define(
}); });
it("disallows editting name when object is non-creatable", function () { it("disallows editting name when object is non-creatable", function () {
mockTypeCapability.hasFeature.and.returnValue(false); mockTypeCapability.hasFeature.andReturn(false);
expect(controller.allowEdit()).toBe(false); expect(controller.allowEdit()).toBe(false);

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -53,8 +53,8 @@ define(
['getId', 'getModel', 'getCapability'] ['getId', 'getModel', 'getCapability']
); );
mockDomainObject.getId.and.returnValue(id); mockDomainObject.getId.andReturn(id);
mockDomainObject.getModel.and.returnValue({}); mockDomainObject.getModel.andReturn({});
return mockDomainObject; return mockDomainObject;
}); });
@ -65,7 +65,7 @@ define(
mockWindow = jasmine.createSpyObj("$window", ["open"]); mockWindow = jasmine.createSpyObj("$window", ["open"]);
mockLocation = jasmine.createSpyObj('location', ['search']); mockLocation = jasmine.createSpyObj('location', ['search']);
mockLocation.search.and.returnValue({}); mockLocation.search.andReturn({});
mockAttrs = {}; mockAttrs = {};
}); });
@ -83,9 +83,9 @@ define(
}); });
it("collapses on navigation changes on portrait-oriented phones", function () { it("collapses on navigation changes on portrait-oriented phones", function () {
mockAgentService.isMobile.and.returnValue(true); mockAgentService.isMobile.andReturn(true);
mockAgentService.isPhone.and.returnValue(true); mockAgentService.isPhone.andReturn(true);
mockAgentService.isPortrait.and.returnValue(true); mockAgentService.isPortrait.andReturn(true);
controller = instantiateController(); controller = instantiateController();
expect(controller.visible()).toBeTruthy(); expect(controller.visible()).toBeTruthy();
@ -102,13 +102,13 @@ define(
}); });
it("sets pane state to false when in location.search", function () { it("sets pane state to false when in location.search", function () {
mockLocation.search.and.returnValue({'hideTree': true}); mockLocation.search.andReturn({'hideTree': true});
expect(instantiateController().visible()).toBe(false); expect(instantiateController().visible()).toBe(false);
expect(mockLocation.search).toHaveBeenCalledWith('hideTree', undefined); expect(mockLocation.search).toHaveBeenCalledWith('hideTree', undefined);
}); });
it("sets state to true when not found in location.search", function () { it("sets state to true when not found in location.search", function () {
mockLocation.search.and.returnValue({}); mockLocation.search.andReturn({});
expect(instantiateController().visible()).toBe(true); expect(instantiateController().visible()).toBe(true);
expect(mockLocation.search).not.toHaveBeenCalledWith('hideTree', undefined); expect(mockLocation.search).not.toHaveBeenCalledWith('hideTree', undefined);
}); });

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -34,6 +34,17 @@ define([
mockDomainObject, mockDomainObject,
action; action;
function waitForCall() {
var called = false;
waitsFor(function () {
return called;
});
return function () {
called = true;
};
}
beforeEach(function () { beforeEach(function () {
mockNavigationService = jasmine.createSpyObj( mockNavigationService = jasmine.createSpyObj(
"navigationService", "navigationService",
@ -52,19 +63,21 @@ define([
}); });
it("sets navigation if it is allowed", function () { it("sets navigation if it is allowed", function () {
mockNavigationService.shouldNavigate.and.returnValue(true); mockNavigationService.shouldNavigate.andReturn(true);
return action.perform() action.perform()
.then(function () { .then(waitForCall());
runs(function () {
expect(mockNavigationService.setNavigation) expect(mockNavigationService.setNavigation)
.toHaveBeenCalledWith(mockDomainObject, true); .toHaveBeenCalledWith(mockDomainObject, true);
}); });
}); });
it("does not set navigation if it is not allowed", function () { it("does not set navigation if it is not allowed", function () {
mockNavigationService.shouldNavigate.and.returnValue(false); mockNavigationService.shouldNavigate.andReturn(false);
var onSuccess = jasmine.createSpy('onSuccess'); var onSuccess = jasmine.createSpy('onSuccess');
return action.perform() action.perform()
.then(onSuccess, function () { .then(onSuccess, waitForCall());
runs(function () {
expect(onSuccess).not.toHaveBeenCalled(); expect(onSuccess).not.toHaveBeenCalled();
expect(mockNavigationService.setNavigation) expect(mockNavigationService.setNavigation)
.not .not

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -69,7 +69,7 @@ define(
navigationService.addListener(callback); navigationService.addListener(callback);
navigationService.setNavigation(testObject); navigationService.setNavigation(testObject);
navigationService.setNavigation(testObject); navigationService.setNavigation(testObject);
expect(callback.calls.count()).toEqual(1); expect(callback.calls.length).toEqual(1);
}); });
it("stops notifying listeners after removal", function () { it("stops notifying listeners after removal", function () {

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -65,35 +65,34 @@ define([
mockActionCapability = jasmine.createSpyObj('action', ['perform']); mockActionCapability = jasmine.createSpyObj('action', ['perform']);
mockEditor = jasmine.createSpyObj('editor', ['isEditContextRoot']); mockEditor = jasmine.createSpyObj('editor', ['isEditContextRoot']);
mockThrottle.and.callFake(function (fn) { mockThrottle.andCallFake(function (fn) {
var mockThrottledFn = var mockThrottledFn =
jasmine.createSpy('throttled-' + mockThrottledFns.length); jasmine.createSpy('throttled-' + mockThrottledFns.length);
mockThrottledFn.and.callFake(fn); mockThrottledFn.andCallFake(fn);
mockThrottledFns.push(mockThrottledFn); mockThrottledFns.push(mockThrottledFn);
return mockThrottledFn; return mockThrottledFn;
}); });
mockTopic.and.returnValue(mockMutationTopic); mockTopic.andReturn(mockMutationTopic);
mockDomainObject.getId.and.returnValue(testId); mockDomainObject.getId.andReturn(testId);
mockDomainObject.getCapability.and.callFake(function (c) { mockDomainObject.getCapability.andCallFake(function (c) {
return { return {
context: mockContext, context: mockContext,
editor: mockEditor editor: mockEditor
}[c]; }[c];
}); });
mockDomainObject.hasCapability.and.callFake(function (c) { mockDomainObject.hasCapability.andCallFake(function (c) {
return !!mockDomainObject.getCapability(c); return !!mockDomainObject.getCapability(c);
}); });
mockParentObject.getCapability.and.callFake(function (c) { mockParentObject.getCapability.andCallFake(function (c) {
return { return {
action: mockActionCapability action: mockActionCapability
}[c]; }[c];
}); });
testParentComposition = []; testParentComposition = [];
mockParentObject.useCapability.and.returnValue(Promise.resolve(testParentComposition)); mockParentObject.useCapability.andReturn(Promise.resolve(testParentComposition));
mockContext.getParent.andReturn(mockParentObject);
mockContext.getParent.and.returnValue(mockParentObject); mockNavigationService.getNavigation.andReturn(mockDomainObject);
mockNavigationService.getNavigation.and.returnValue(mockDomainObject); mockEditor.isEditContextRoot.andReturn(false);
mockEditor.isEditContextRoot.and.returnValue(false);
return new OrphanNavigationHandler( return new OrphanNavigationHandler(
mockThrottle, mockThrottle,
@ -107,7 +106,7 @@ define([
expect(mockMutationTopic.listen) expect(mockMutationTopic.listen)
.toHaveBeenCalledWith(jasmine.any(Function)); .toHaveBeenCalledWith(jasmine.any(Function));
expect(mockThrottledFns.indexOf( expect(mockThrottledFns.indexOf(
mockMutationTopic.listen.calls.mostRecent().args[0] mockMutationTopic.listen.mostRecentCall.args[0]
)).not.toEqual(-1); )).not.toEqual(-1);
}); });
@ -115,7 +114,7 @@ define([
expect(mockNavigationService.addListener) expect(mockNavigationService.addListener)
.toHaveBeenCalledWith(jasmine.any(Function)); .toHaveBeenCalledWith(jasmine.any(Function));
expect(mockThrottledFns.indexOf( expect(mockThrottledFns.indexOf(
mockNavigationService.addListener.calls.mostRecent().args[0] mockNavigationService.addListener.mostRecentCall.args[0]
)).not.toEqual(-1); )).not.toEqual(-1);
}); });
@ -135,14 +134,28 @@ define([
function itNavigatesAsExpected() { function itNavigatesAsExpected() {
if (isOrphan && !isEditRoot) { if (isOrphan && !isEditRoot) {
it("navigates to the parent", function () { it("navigates to the parent", function () {
return Promise.resolve().then(function () { var done = false;
waitsFor(function () {
return done;
});
setTimeout(function () {
done = true;
}, 5);
runs(function () {
expect(mockActionCapability.perform) expect(mockActionCapability.perform)
.toHaveBeenCalledWith('navigate'); .toHaveBeenCalledWith('navigate');
}); });
}); });
} else { } else {
it("does nothing", function () { it("does nothing", function () {
return Promise.resolve().then(function () { var done = false;
waitsFor(function () {
return done;
});
setTimeout(function () {
done = true;
}, 5);
runs(function () {
expect(mockActionCapability.perform) expect(mockActionCapability.perform)
.not.toHaveBeenCalled(); .not.toHaveBeenCalled();
}); });
@ -152,12 +165,12 @@ define([
describe(caseName, function () { describe(caseName, function () {
beforeEach(function () { beforeEach(function () {
mockEditor.isEditContextRoot.and.returnValue(isEditRoot); mockEditor.isEditContextRoot.andReturn(isEditRoot);
}); });
describe("when navigation changes", function () { describe("when navigation changes", function () {
beforeEach(function () { beforeEach(function () {
mockNavigationService.addListener.calls.mostRecent() mockNavigationService.addListener.mostRecentCall
.args[0](mockDomainObject); .args[0](mockDomainObject);
}); });
itNavigatesAsExpected(); itNavigatesAsExpected();
@ -165,7 +178,7 @@ define([
describe("when mutation occurs", function () { describe("when mutation occurs", function () {
beforeEach(function () { beforeEach(function () {
mockMutationTopic.listen.calls.mostRecent() mockMutationTopic.listen.mostRecentCall
.args[0](mockParentObject); .args[0](mockParentObject);
}); });

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -49,8 +49,8 @@ define(
); );
mockDocument = [{}]; mockDocument = [{}];
mockDomainObject.getModel.and.returnValue({ name: 'Test name' }); mockDomainObject.getModel.andReturn({ name: 'Test name' });
mockNavigationService.getNavigation.and.returnValue(mockDomainObject); mockNavigationService.getNavigation.andReturn(mockDomainObject);
titler = new WindowTitler( titler = new WindowTitler(
mockNavigationService, mockNavigationService,
@ -64,12 +64,12 @@ define(
jasmine.any(Function), jasmine.any(Function),
jasmine.any(Function) jasmine.any(Function)
); );
expect(mockRootScope.$watch.calls.mostRecent().args[0]()) expect(mockRootScope.$watch.mostRecentCall.args[0]())
.toEqual('Test name'); .toEqual('Test name');
}); });
it("sets the title to the name of the navigated object", function () { it("sets the title to the name of the navigated object", function () {
mockRootScope.$watch.calls.mostRecent().args[1]("Some name"); mockRootScope.$watch.mostRecentCall.args[1]("Some name");
expect(mockDocument[0].title).toEqual("Some name"); expect(mockDocument[0].title).toEqual("Some name");
}); });

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -4,10 +4,7 @@
<div class="top-bar"> <div class="top-bar">
<div class="title">{{ngModel.title}}</div> <div class="title">{{ngModel.title}}</div>
</div> </div>
<div class="hint" ng-hide="ngModel.hint === undefined"> <div class="hint" ng-hide="ngModel.hint === undefined">{{ngModel.hint}}</div>
{{ngModel.hint}}
<span ng-if="ngModel.timestamp !== undefined">[{{ngModel.timestamp}}]</span>
</div>
<div class="message-body"> <div class="message-body">
<div class="message-action"> <div class="message-action">
{{ngModel.actionText}} {{ngModel.actionText}}

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -63,12 +63,12 @@ define(
["find"] ["find"]
); );
mockBody = jasmine.createSpyObj('body', ['on', 'off']); mockBody = jasmine.createSpyObj('body', ['on', 'off']);
mockDocument.find.and.returnValue(mockBody); mockDocument.find.andReturn(mockBody);
mockDeferred.promise = "mock promise"; mockDeferred.promise = "mock promise";
mockQ.defer.and.returnValue(mockDeferred); mockQ.defer.andReturn(mockDeferred);
mockOverlayService.createOverlay.and.returnValue(mockOverlay); mockOverlayService.createOverlay.andReturn(mockOverlay);
dialogService = new DialogService( dialogService = new DialogService(
mockOverlayService, mockOverlayService,
@ -85,7 +85,7 @@ define(
it("allows user input to be canceled", function () { it("allows user input to be canceled", function () {
dialogService.getUserInput({}, { someKey: "some value" }); dialogService.getUserInput({}, { someKey: "some value" });
mockOverlayService.createOverlay.calls.mostRecent().args[1].cancel(); mockOverlayService.createOverlay.mostRecentCall.args[1].cancel();
expect(mockDeferred.reject).toHaveBeenCalled(); expect(mockDeferred.reject).toHaveBeenCalled();
expect(mockDeferred.resolve).not.toHaveBeenCalled(); expect(mockDeferred.resolve).not.toHaveBeenCalled();
}); });
@ -93,7 +93,7 @@ define(
it("passes back the result of user input when confirmed", function () { it("passes back the result of user input when confirmed", function () {
var value = { someKey: 42 }; var value = { someKey: 42 };
dialogService.getUserInput({}, value); dialogService.getUserInput({}, value);
mockOverlayService.createOverlay.calls.mostRecent().args[1].confirm(); mockOverlayService.createOverlay.mostRecentCall.args[1].confirm();
expect(mockDeferred.reject).not.toHaveBeenCalled(); expect(mockDeferred.reject).not.toHaveBeenCalled();
expect(mockDeferred.resolve).toHaveBeenCalledWith(value); expect(mockDeferred.resolve).toHaveBeenCalledWith(value);
}); });
@ -109,7 +109,7 @@ define(
it("can show multiple dialogs if prior ones are dismissed", function () { it("can show multiple dialogs if prior ones are dismissed", function () {
dialogService.getUserInput({}, {}); dialogService.getUserInput({}, {});
expect(mockLog.warn).not.toHaveBeenCalled(); expect(mockLog.warn).not.toHaveBeenCalled();
mockOverlayService.createOverlay.calls.mostRecent().args[1].confirm(); mockOverlayService.createOverlay.mostRecentCall.args[1].confirm();
dialogService.getUserInput({}, {}); dialogService.getUserInput({}, {});
expect(mockLog.warn).not.toHaveBeenCalled(); expect(mockLog.warn).not.toHaveBeenCalled();
expect(mockDeferred.reject).not.toHaveBeenCalled(); expect(mockDeferred.reject).not.toHaveBeenCalled();
@ -148,13 +148,13 @@ define(
it("destroys the event listener when the dialog is cancelled", function () { it("destroys the event listener when the dialog is cancelled", function () {
dialogService.getUserInput({}, {}); dialogService.getUserInput({}, {});
mockOverlayService.createOverlay.calls.mostRecent().args[1].cancel(); mockOverlayService.createOverlay.mostRecentCall.args[1].cancel();
expect(mockBody.off).toHaveBeenCalledWith("keydown", jasmine.any(Function)); expect(mockBody.off).toHaveBeenCalledWith("keydown", jasmine.any(Function));
}); });
it("cancels the dialog when an escape keydown event is triggered", function () { it("cancels the dialog when an escape keydown event is triggered", function () {
dialogService.getUserInput({}, {}); dialogService.getUserInput({}, {});
mockBody.on.calls.mostRecent().args[1]({ mockBody.on.mostRecentCall.args[1]({
keyCode: 27 keyCode: 27
}); });
expect(mockDeferred.reject).toHaveBeenCalled(); expect(mockDeferred.reject).toHaveBeenCalled();
@ -163,7 +163,7 @@ define(
it("ignores non escape keydown events", function () { it("ignores non escape keydown events", function () {
dialogService.getUserInput({}, {}); dialogService.getUserInput({}, {});
mockBody.on.calls.mostRecent().args[1]({ mockBody.on.mostRecentCall.args[1]({
keyCode: 13 keyCode: 13
}); });
expect(mockDeferred.reject).not.toHaveBeenCalled(); expect(mockDeferred.reject).not.toHaveBeenCalled();
@ -197,7 +197,7 @@ define(
"overlay", "overlay",
["dismiss"] ["dismiss"]
); );
mockOverlayService.createOverlay.and.returnValue(secondMockOverlay); mockOverlayService.createOverlay.andReturn(secondMockOverlay);
secondDialogHandle = dialogService.showBlockingMessage(dialogModel); secondDialogHandle = dialogService.showBlockingMessage(dialogModel);
//Dismiss the first dialog. It should only dismiss if it //Dismiss the first dialog. It should only dismiss if it

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -46,10 +46,10 @@ define(
mockElement = jasmine.createSpyObj("element", ["remove"]); mockElement = jasmine.createSpyObj("element", ["remove"]);
mockScope = jasmine.createSpyObj("scope", ["$destroy"]); mockScope = jasmine.createSpyObj("scope", ["$destroy"]);
mockDocument.find.and.returnValue(mockBody); mockDocument.find.andReturn(mockBody);
mockCompile.and.returnValue(mockTemplate); mockCompile.andReturn(mockTemplate);
mockRootScope.$new.and.returnValue(mockScope); mockRootScope.$new.andReturn(mockScope);
mockTemplate.and.returnValue(mockElement); mockTemplate.andReturn(mockElement);
overlayService = new OverlayService( overlayService = new OverlayService(
mockDocument, mockDocument,
@ -61,7 +61,7 @@ define(
it("prepends an mct-include to create overlays", function () { it("prepends an mct-include to create overlays", function () {
overlayService.createOverlay("test", {}); overlayService.createOverlay("test", {});
expect(mockCompile).toHaveBeenCalled(); expect(mockCompile).toHaveBeenCalled();
expect(mockCompile.calls.mostRecent().args[0].indexOf("mct-include")) expect(mockCompile.mostRecentCall.args[0].indexOf("mct-include"))
.not.toEqual(-1); .not.toEqual(-1);
}); });

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -39,6 +39,7 @@ define([
"./src/policies/EditableMovePolicy", "./src/policies/EditableMovePolicy",
"./src/policies/EditContextualActionPolicy", "./src/policies/EditContextualActionPolicy",
"./src/representers/EditRepresenter", "./src/representers/EditRepresenter",
"./src/representers/EditToolbarRepresenter",
"./src/capabilities/EditorCapability", "./src/capabilities/EditorCapability",
"./src/capabilities/TransactionCapabilityDecorator", "./src/capabilities/TransactionCapabilityDecorator",
"./src/services/TransactionManager", "./src/services/TransactionManager",
@ -77,6 +78,7 @@ define([
EditableMovePolicy, EditableMovePolicy,
EditContextualActionPolicy, EditContextualActionPolicy,
EditRepresenter, EditRepresenter,
EditToolbarRepresenter,
EditorCapability, EditorCapability,
TransactionCapabilityDecorator, TransactionCapabilityDecorator,
TransactionManager, TransactionManager,
@ -379,6 +381,12 @@ define([
"depends": [ "depends": [
"$log" "$log"
] ]
},
{
"implementation": EditToolbarRepresenter,
"depends": [
"openmct"
]
} }
], ],
"constants": [ "constants": [
@ -416,17 +424,6 @@ define([
"transactionService" "transactionService"
] ]
} }
],
"runs": [
{
depends: [
"toolbars[]",
"openmct"
],
implementation: function (toolbars, openmct) {
toolbars.forEach(openmct.toolbars.addProvider, openmct.toolbars);
}
}
] ]
} }
}); });

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.
@ -24,8 +24,7 @@
<div class="items-select left flex-elem l-flex-row grows"> <div class="items-select left flex-elem l-flex-row grows">
<mct-representation key="'back-arrow'" <mct-representation key="'back-arrow'"
mct-object="domainObject" mct-object="domainObject"
class="flex-elem l-back"> class="flex-elem l-back"></mct-representation>
</mct-representation>
<mct-representation key="'object-header'" <mct-representation key="'object-header'"
mct-object="domainObject" mct-object="domainObject"
class="l-flex-row flex-elem grows object-header"> class="l-flex-row flex-elem grows object-header">
@ -49,8 +48,8 @@
<!-- Toolbar and Save/Cancel buttons --> <!-- Toolbar and Save/Cancel buttons -->
<div class="l-edit-controls flex-elem l-flex-row flex-align-end"> <div class="l-edit-controls flex-elem l-flex-row flex-align-end">
<mct-toolbar name="mctToolbar" <mct-toolbar name="mctToolbar"
structure="editToolbar.structure" structure="toolbar.structure"
ng-model="editToolbar.state" ng-model="toolbar.state"
class="flex-elem grows"> class="flex-elem grows">
</mct-toolbar> </mct-toolbar>
<mct-representation key="'edit-action-buttons'" <mct-representation key="'edit-action-buttons'"
@ -62,6 +61,7 @@
<mct-representation key="representation.selected.key" <mct-representation key="representation.selected.key"
mct-object="representation.selected.key && domainObject" mct-object="representation.selected.key && domainObject"
class="abs flex-elem grows object-holder-main scroll" class="abs flex-elem grows object-holder-main scroll"
toolbar="toolbar"
mct-selectable="{ mct-selectable="{
item: domainObject.useCapability('adapter'), item: domainObject.useCapability('adapter'),
oldItem: domainObject oldItem: domainObject

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.
@ -24,18 +24,10 @@
class="flex-elem holder" class="flex-elem holder"
ng-model="filterBy"> ng-model="filterBy">
</mct-include> </mct-include>
<div class="flex-elem grows vscroll scroll-pad"> <div class="flex-elem grows vscroll">
<ul class="tree" id="inspector-elements-tree" <ul class="tree" ng-if="composition.length > 0">
ng-if="composition.length > 0">
<li ng-repeat="containedObject in composition | filter:searchElements"> <li ng-repeat="containedObject in composition | filter:searchElements">
<span class="tree-item"> <span class="tree-item">
<span class="grippy-sm"
ng-if="composition.length > 1"
data-id="{{ containedObject.id }}"
mct-drag-down="dragDown($event)"
mct-drag="drag($event)"
mct-drag-up="dragUp($event)">
</span>
<mct-representation <mct-representation
class="rep-object-label" class="rep-object-label"
key="'label'" key="'label'"

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

Some files were not shown because too many files have changed in this diff Show More