Compare commits
134 Commits
plot-sync
...
akhenry-pa
Author | SHA1 | Date | |
---|---|---|---|
92e57c94e0 | |||
419285c396 | |||
3f6f893e29 | |||
14e8c7a401 | |||
3dee6db5e2 | |||
98c8e19d93 | |||
a8ba3b3fdb | |||
1b31a472a5 | |||
e5fe8fd975 | |||
b36d1ca2bc | |||
e9730ced9e | |||
ff2f79b087 | |||
76e163473a | |||
6fdc24ab21 | |||
cb93124ee1 | |||
4bda4080d2 | |||
e710cafb2c | |||
e9643ad07f | |||
ca16892237 | |||
a2b0d350d8 | |||
534bdbae50 | |||
831873e7de | |||
622d246fdd | |||
4a1ca9f299 | |||
4e1de2678c | |||
33a4792531 | |||
37dd4856a6 | |||
6a9cf3389d | |||
9582fb2b06 | |||
3c075b7ff2 | |||
081edfbd70 | |||
04cc8f7aa2 | |||
2da2395473 | |||
a1d206bfc3 | |||
00ecd27bb3 | |||
0fa4486dcf | |||
ef9c6d5fed | |||
15a75ac134 | |||
cde3994979 | |||
1a10c966e0 | |||
9288880e47 | |||
d2c5476cdd | |||
8d21d420ae | |||
cc22fd4e9d | |||
4a046b3eea | |||
b0702ceff5 | |||
5af14cd3b9 | |||
d7eb4c17ca | |||
8c9fe2d36b | |||
3246480f82 | |||
8055e050b6 | |||
b0f73fff0d | |||
755cf21d3f | |||
95457a1981 | |||
da0ed95662 | |||
c8919708bb | |||
cc5bfda730 | |||
433dee0314 | |||
013eba744d | |||
29de11167f | |||
eaa9514453 | |||
b8f278cabf | |||
63bb183bec | |||
9d2c7a6de5 | |||
07fb20c32f | |||
90a6bbc13e | |||
73e38f1955 | |||
de8f8d174d | |||
b187762d55 | |||
45a152df86 | |||
a3e78bbf91 | |||
374e4afc32 | |||
2f8a0c2c2b | |||
163043635e | |||
ec9fd59d4a | |||
e03ea25392 | |||
56c16ed263 | |||
2e99f90b7c | |||
0520b03b97 | |||
08bed6c23a | |||
c909831dd4 | |||
e19ce4ac8c | |||
fab1def790 | |||
28311fd4dd | |||
c55eaeb193 | |||
2e6cdfc457 | |||
210808ed54 | |||
062ba4a9d7 | |||
e2217e008a | |||
61e583dbb2 | |||
7d754ea143 | |||
865b99f445 | |||
ec8b4db2e5 | |||
d6bd09fabf | |||
241d75e393 | |||
f4271c96a3 | |||
8c739e9fd9 | |||
75ae5ab3bb | |||
78a5ace18d | |||
ba0077498c | |||
909a21ee8a | |||
94c35a67c5 | |||
19fc05b76d | |||
1326dae27a | |||
7d8dc00996 | |||
a958055f50 | |||
1f86a5a131 | |||
8ad07fa8de | |||
fa7298a752 | |||
ae42298d08 | |||
1a23f2b390 | |||
4df6d6141b | |||
1c97138607 | |||
8db75bf41e | |||
00fb071fe2 | |||
2bf6a48d49 | |||
eca3c57bd8 | |||
7753703034 | |||
f9060a485d | |||
39a7f43cd0 | |||
5103207a70 | |||
8c2cc90f04 | |||
ce431848b3 | |||
5726fe6313 | |||
6145843e86 | |||
0225cbab6a | |||
e477beb587 | |||
ee5d59024a | |||
5288dadafb | |||
7f3cc09cbc | |||
94fa70abb1 | |||
12574a1333 | |||
8c72729a2a | |||
129ab1791b |
40
.circleci/config.yml
Normal file
@ -0,0 +1,40 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/node:8-browsers
|
||||
environment:
|
||||
CHROME_BIN: "/usr/bin/google-chrome"
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Update npm
|
||||
command: 'sudo npm install -g npm@latest'
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}-{{ checksum "bower.json" }}
|
||||
- run:
|
||||
name: Installing dependencies (npm install)
|
||||
command: npm install
|
||||
- save_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}-{{ checksum "bower.json" }}
|
||||
paths:
|
||||
- node_modules
|
||||
- bower_components
|
||||
- run:
|
||||
name: npm run test
|
||||
command: npm run test
|
||||
- run:
|
||||
name: npm run lint
|
||||
command: npm run lint
|
||||
- run:
|
||||
name: npm run checkstyle
|
||||
command: npm run checkstyle
|
||||
- store_artifacts:
|
||||
path: dist
|
||||
prefix: dist
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
test:
|
||||
jobs:
|
||||
- build
|
286
API.md
@ -1,3 +1,60 @@
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
**Table of Contents**
|
||||
|
||||
- [Building Applications With Open MCT](#building-applications-with-open-mct)
|
||||
- [Scope and purpose of this document](#scope-and-purpose-of-this-document)
|
||||
- [Building From Source](#building-from-source)
|
||||
- [Starting an Open MCT application](#starting-an-open-mct-application)
|
||||
- [Plugins](#plugins)
|
||||
- [Defining and Installing a New Plugin](#defining-and-installing-a-new-plugin)
|
||||
- [Domain Objects and Identifiers](#domain-objects-and-identifiers)
|
||||
- [Object Attributes](#object-attributes)
|
||||
- [Domain Object Types](#domain-object-types)
|
||||
- [Root Objects](#root-objects)
|
||||
- [Object Providers](#object-providers)
|
||||
- [Composition Providers](#composition-providers)
|
||||
- [Adding Composition Providers](#adding-composition-providers)
|
||||
- [Default Composition Provider](#default-composition-provider)
|
||||
- [Telemetry API](#telemetry-api)
|
||||
- [Integrating Telemetry Sources](#integrating-telemetry-sources)
|
||||
- [Telemetry Metadata](#telemetry-metadata)
|
||||
- [Values](#values)
|
||||
- [Value Hints](#value-hints)
|
||||
- [The Time Conductor and Telemetry](#the-time-conductor-and-telemetry)
|
||||
- [Telemetry Providers](#telemetry-providers)
|
||||
- [Telemetry Requests and Responses.](#telemetry-requests-and-responses)
|
||||
- [Request Strategies **draft**](#request-strategies-draft)
|
||||
- [`latest` request strategy](#latest-request-strategy)
|
||||
- [`minmax` request strategy](#minmax-request-strategy)
|
||||
- [Telemetry Formats **draft**](#telemetry-formats-draft)
|
||||
- [Registering Formats](#registering-formats)
|
||||
- [Telemetry Data](#telemetry-data)
|
||||
- [Telemetry Datums](#telemetry-datums)
|
||||
- [Limit Evaluators **draft**](#limit-evaluators-draft)
|
||||
- [Telemetry Consumer APIs **draft**](#telemetry-consumer-apis-draft)
|
||||
- [Time API](#time-api)
|
||||
- [Time Systems and Bounds](#time-systems-and-bounds)
|
||||
- [Defining and Registering Time Systems](#defining-and-registering-time-systems)
|
||||
- [Getting and Setting the Active Time System](#getting-and-setting-the-active-time-system)
|
||||
- [Time Bounds](#time-bounds)
|
||||
- [Clocks](#clocks)
|
||||
- [Defining and registering clocks](#defining-and-registering-clocks)
|
||||
- [Getting and setting active clock](#getting-and-setting-active-clock)
|
||||
- [Stopping an active clock](#stopping-an-active-clock)
|
||||
- [Clock Offsets](#clock-offsets)
|
||||
- [Time Events](#time-events)
|
||||
- [List of Time Events](#list-of-time-events)
|
||||
- [The Time Conductor](#the-time-conductor)
|
||||
- [Time Conductor Configuration](#time-conductor-configuration)
|
||||
- [Example conductor configuration](#example-conductor-configuration)
|
||||
- [Indicators](#indicators)
|
||||
- [The URL Status Indicator](#the-url-status-indicator)
|
||||
- [Creating a Simple Indicator](#creating-a-simple-indicator)
|
||||
- [Custom Indicators](#custom-indicators)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
# Building Applications With Open MCT
|
||||
|
||||
## Scope and purpose of this document
|
||||
@ -154,7 +211,7 @@ registry.
|
||||
|
||||
eg.
|
||||
```javascript
|
||||
openmct.types.addType('my-type', {
|
||||
openmct.types.addType('example.my-type', {
|
||||
name: "My Type",
|
||||
description: "This is a type that I added!",
|
||||
creatable: true
|
||||
@ -162,8 +219,9 @@ openmct.types.addType('my-type', {
|
||||
```
|
||||
|
||||
The `addType` function accepts two arguments:
|
||||
* A `string` key identifying the type. This key is used when specifying a type
|
||||
for an object.
|
||||
* A `string` key identifying the type. This key is used when specifying a type
|
||||
for an object. We recommend prefixing your types with a namespace to avoid
|
||||
conflicts with other plugins.
|
||||
* An object type specification. An object type definition supports the following
|
||||
attributes
|
||||
* `name`: a `string` naming this object type
|
||||
@ -194,7 +252,7 @@ To do so, use the `addRoot` method of the object API.
|
||||
eg.
|
||||
```javascript
|
||||
openmct.objects.addRoot({
|
||||
namespace: "my-namespace",
|
||||
namespace: "example.namespace",
|
||||
key: "my-key"
|
||||
});
|
||||
```
|
||||
@ -235,13 +293,12 @@ It is expected that the `get` function will return a
|
||||
[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
||||
that resolves with the object being requested.
|
||||
|
||||
In future, object providers will support other methods to enable other operations
|
||||
with persistence stores, such as creating, updating, and deleting objects.
|
||||
In future, object providers will support other methods to enable other operations with persistence stores, such as creating, updating, and deleting objects.
|
||||
|
||||
## Composition Providers
|
||||
|
||||
The _composition_ of a domain object is the list of objects it contains, as shown
|
||||
(for example) in the tree for browsing. Open MCT provides a
|
||||
The _composition_ of a domain object is the list of objects it contains, as
|
||||
shown (for example) in the tree for browsing. Open MCT provides a
|
||||
[default solution](#default-composition-provider) for composition, but there
|
||||
may be cases where you want to provide the composition of a certain object
|
||||
(or type of object) dynamically.
|
||||
@ -255,7 +312,7 @@ Composition Provider:
|
||||
```javascript
|
||||
openmct.composition.addProvider({
|
||||
appliesTo: function (domainObject) {
|
||||
return domainObject.type === 'my-type';
|
||||
return domainObject.type === 'example.my-type';
|
||||
},
|
||||
load: function (domainObject) {
|
||||
return Promise.resolve(myDomainObjects);
|
||||
@ -273,8 +330,9 @@ These identifiers will be used to fetch Domain Objects from an [Object Provider]
|
||||
|
||||
### Default Composition Provider
|
||||
|
||||
The default composition provider applies to any domain object with a `composition`
|
||||
property. The value of `composition` should be an array of identifiers, e.g.:
|
||||
The default composition provider applies to any domain object with a
|
||||
`composition` property. The value of `composition` should be an array of
|
||||
identifiers, e.g.:
|
||||
|
||||
```javascript
|
||||
var domainObject = {
|
||||
@ -295,13 +353,17 @@ var domainObject = {
|
||||
|
||||
## Telemetry API
|
||||
|
||||
The Open MCT telemetry API provides two main sets of interfaces-- one for integrating telemetry data into Open MCT, and another for developing Open MCT visualization plugins utilizing telemetry API.
|
||||
The Open MCT telemetry API provides two main sets of interfaces-- one for
|
||||
integrating telemetry data into Open MCT, and another for developing Open MCT
|
||||
visualization plugins utilizing the telemetry API.
|
||||
|
||||
The APIs for visualization plugins are still a work in progress and docs may change at any time. However, the APIs for integrating telemetry metadata into Open MCT are stable and documentation is included below.
|
||||
The APIs for visualization plugins are still a work in progress and docs may
|
||||
change at any time. However, the APIs for integrating telemetry metadata into
|
||||
Open MCT are stable and documentation is included below.
|
||||
|
||||
### Integrating Telemetry Sources
|
||||
|
||||
There are two main tasks for integrating telemetry sources-- describing telemetry objects with relevant metadata, and then providing telemetry data for those objects. You'll use an [Object Provider](#object-providers) to provide objects with the necessary [Telemetry Metadata](#telemetry-metadata), and then register a [Telemetry Provider](#telemetry-providers) to retrieve telemetry data for those objects.
|
||||
There are two main tasks for integrating telemetry sources-- describing telemetry objects with relevant metadata, and then providing telemetry data for those objects. You'll use an [Object Provider](#object-providers) to provide objects with the necessary [Telemetry Metadata](#telemetry-metadata), and then register a [Telemetry Provider](#telemetry-providers) to retrieve telemetry data for those objects. Alternatively, you can register a telemetry metadata provider to provide the necessary telemetry metadata.
|
||||
|
||||
For a step-by-step guide to building a telemetry adapter, please see the
|
||||
[Open MCT Tutorials](https://github.com/nasa/openmct-tutorial).
|
||||
@ -355,7 +417,7 @@ attribute | type | flags | notes
|
||||
--- | --- | --- | ---
|
||||
`key` | string | required | unique identifier for this field.
|
||||
`hints` | object | required | Hints allow views to intelligently select relevant attributes for display, and are required for most views to function. See section on "Value Hints" below.
|
||||
`name` | string | optional | a human readible label for this field. If omitted, defaults to `key`.
|
||||
`name` | string | optional | a human readable label for this field. If omitted, defaults to `key`.
|
||||
`source` | string | optional | identifies the property of a datum where this value is stored. If omitted, defaults to `key`.
|
||||
`format` | string | optional | a specific format identifier, mapping to a formatter. If omitted, uses a default formatter. For enumerations, use `enum`. For timestamps, use `utc` if you are using utc dates, otherwise use a key mapping to your custom date format.
|
||||
`units` | string | optional | the units of this value, e.g. `km`, `seconds`, `parsecs`
|
||||
@ -366,7 +428,7 @@ attribute | type | flags | notes
|
||||
|
||||
###### Value Hints
|
||||
|
||||
Each telemetry value description has an object defining hints. Keys in this this object represent the hint itself, and the value represents the weight of that hint. A lower weight means the hint has a higher priority. For example, multiple values could be hinted for use as the y axis of a plot (raw, engineering), but the highest priority would be the default choice. Likewise, a table will use hints to determine the default order of columns.
|
||||
Each telemetry value description has an object defining hints. Keys in this this object represent the hint itself, and the value represents the weight of that hint. A lower weight means the hint has a higher priority. For example, multiple values could be hinted for use as the y-axis of a plot (raw, engineering), but the highest priority would be the default choice. Likewise, a table will use hints to determine the default order of columns.
|
||||
|
||||
Known hints:
|
||||
|
||||
@ -383,14 +445,18 @@ In order for the time conductor to work, there will always be an active "time sy
|
||||
|
||||
#### Telemetry Providers
|
||||
|
||||
Telemetry providers are responsible for providing historical and real time telemetry data for telemetry objects. Each telemetry provider determines which objects it can provide telemetry for, and then must implement methods to provide telemetry for those objects.
|
||||
Telemetry providers are responsible for providing historical and real-time telemetry data for telemetry objects. Each telemetry provider determines which objects it can provide telemetry for, and then must implement methods to provide telemetry for those objects.
|
||||
|
||||
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).
|
||||
* `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.
|
||||
* `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.
|
||||
* `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.
|
||||
* `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.
|
||||
* `supportsLimits(domainObject)` optional. Implement and return `true` for domain objects that you want to provide a limit evaluator for.
|
||||
* `getLimitEvaluator(domainObject)` required if `supportsLimits` is implemented. Must return a valid LimitEvaluator for a given domain object.
|
||||
|
||||
Telemetry providers are registered by calling `openmct.telemetry.addProvider(provider)`, e.g.
|
||||
|
||||
@ -398,14 +464,15 @@ Telemetry providers are registered by calling `openmct.telemetry.addProvider(pro
|
||||
openmct.telemetry.addProvider({
|
||||
supportsRequest: function (domainObject, options) { /*...*/ },
|
||||
request: function (domainObject, options) { /*...*/ },
|
||||
supportsSubscribe: function (domainObject, callback, options) { /*...*/ },
|
||||
subscribe: function (domainObject, callback, options) { /*...*/ }
|
||||
})
|
||||
```
|
||||
|
||||
#### Telemetry Requests
|
||||
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 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:
|
||||
|
||||
```javascript
|
||||
{
|
||||
start: 1487981997240,
|
||||
@ -414,7 +481,53 @@ Telemetry requests support time bounded queries. A call to a _Telemetry Provider
|
||||
}
|
||||
```
|
||||
|
||||
#### Telemetry Formats
|
||||
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.
|
||||
|
||||
#### Request Strategies **draft**
|
||||
|
||||
To improve performance views may request a certain strategy for data reduction. These are intended to improve visualization performance by reducing the amount of data needed to be sent to the client. These strategies will be indicated by additional parameters in the request options. You may choose to handle them or ignore them.
|
||||
|
||||
Note: these strategies are currently being tested in core plugins and may change based on developer feedback.
|
||||
|
||||
##### `latest` request strategy
|
||||
|
||||
This request is a "depth based" strategy. When a view is only capable of
|
||||
displaying a single value (or perhaps the last ten values), then it can
|
||||
use the `latest` request strategy with a `size` parameter that specifies
|
||||
the number of results it desires. The `size` parameter is a hint; views
|
||||
must not assume the response will have the exact number of results requested.
|
||||
|
||||
example:
|
||||
```javascript
|
||||
{
|
||||
start: 1487981997240,
|
||||
end: 1487982897240,
|
||||
domain: 'utc',
|
||||
strategy: 'latest',
|
||||
size: 1
|
||||
}
|
||||
```
|
||||
|
||||
This strategy says "I want the latest data point in this time range". A provider which recognizes this request should return only one value-- the latest-- in the requested time range. Depending on your back-end implementation, performing these queries in bulk can be a large performance increase. These are generally issued by views that are only capable of displaying a single value and only need to show the latest value.
|
||||
|
||||
##### `minmax` request strategy
|
||||
|
||||
example:
|
||||
```javascript
|
||||
{
|
||||
start: 1487981997240,
|
||||
end: 1487982897240,
|
||||
domain: 'utc',
|
||||
strategy: 'minmax',
|
||||
size: 720
|
||||
}
|
||||
```
|
||||
|
||||
MinMax queries are issued by plots, and may be issued by other types as well. The aim is to reduce the amount of data returned but still faithfully represent the full extent of the data. In order to do this, the view calculates the maximum data resolution it can display (i.e. the number of horizontal pixels in a plot) and sends that as the `size`. The response should include at least one minimum and one maximum value per point of resolution.
|
||||
|
||||
#### Telemetry Formats **draft**
|
||||
|
||||
Telemetry format objects define how to interpret and display telemetry data.
|
||||
They have a simple structure:
|
||||
@ -484,6 +597,17 @@ The key-value pairs of this object are described by the telemetry metadata of
|
||||
a domain object, as discussed in the [Telemetry Metadata](#telemetry-metadata)
|
||||
section.
|
||||
|
||||
#### Limit Evaluators **draft**
|
||||
|
||||
Limit evaluators allow a telemetry integrator to define how limits should be
|
||||
applied to telemetry from a given domain object. For an example of a limit
|
||||
evaluator, take a look at `examples/generator/SinewaveLimitProvider.js`.
|
||||
|
||||
### Telemetry Consumer APIs **draft**
|
||||
|
||||
The APIs for requesting telemetry from Open MCT -- e.g. for use in custom views -- are currently in draft state and are being revised. If you'd like to experiment with them before they are finalized, please contact the team via the contact-us link on our website.
|
||||
|
||||
|
||||
## Time API
|
||||
|
||||
Open MCT provides API for managing the temporal state of the application.
|
||||
@ -567,7 +691,7 @@ openmct.time.timeSystem(utcTimeSystem, bounds);
|
||||
Setting the active time system will trigger a [`'timeSystem'`](#time-events)
|
||||
event. If you supplied bounds, a [`'bounds'`](#time-events) event will be triggered afterwards with your newly supplied bounds.
|
||||
|
||||
### Time Bounds
|
||||
#### Time Bounds
|
||||
|
||||
The TimeAPI provides a getter/setter for querying and setting time bounds. Time
|
||||
bounds are simply an object with a `start` and an end `end` attribute.
|
||||
@ -591,7 +715,7 @@ openmct.time.bounds({start: now - ONE_HOUR, now);
|
||||
To respond to bounds change events, listen for the [`'bounds'`](#time-events)
|
||||
event.
|
||||
|
||||
## Clocks
|
||||
### Clocks
|
||||
|
||||
The Time API can be set to follow a clock source which will cause the bounds
|
||||
to be updated automatically whenever the clock source "ticks". A clock is simply
|
||||
@ -610,7 +734,7 @@ be defined to tick on some remote timing source.
|
||||
The values provided by clocks are simple `number`s, which are interpreted in the
|
||||
context of the active [Time System](#defining-and-registering-time-systems).
|
||||
|
||||
### Defining and registering clocks
|
||||
#### Defining and registering clocks
|
||||
|
||||
A clock is an object that defines certain required metadata and functions:
|
||||
|
||||
@ -724,7 +848,7 @@ __Note:__ Setting the clock offsets will trigger an immediate bounds change, as
|
||||
new bounds will be calculated based on the `currentValue()` of the active clock.
|
||||
Clock offsets are only relevant when a clock source is active.
|
||||
|
||||
## Time Events
|
||||
### Time Events
|
||||
|
||||
The Time API is a standard event emitter; you can register callbacks for events using the `on` method and remove callbacks for events with the `off` method.
|
||||
|
||||
@ -766,7 +890,7 @@ The events emitted by the Time API are:
|
||||
* `clockOffsets`: The new [clock offsets](#clock-offsets).
|
||||
|
||||
|
||||
## The Time Conductor
|
||||
### The Time Conductor
|
||||
|
||||
The Time Conductor provides a user interface for managing time bounds in Open
|
||||
MCT. It allows a user to select from configured time systems and clocks, and to set bounds and clock offsets.
|
||||
@ -856,58 +980,68 @@ openmct.install(openmct.plugins.Conductor({
|
||||
}));
|
||||
```
|
||||
|
||||
## Included Plugins
|
||||
## Indicators
|
||||
|
||||
Open MCT is packaged along with a few general-purpose plugins:
|
||||
Indicators are small widgets that reside at the bottom of the screen and are visible from
|
||||
every screen in Open MCT. They can be used to convey system state using an icon and text.
|
||||
Typically an indicator will display an icon (customizable with a CSS class) that will
|
||||
reveal additional information when the mouse cursor is hovered over it.
|
||||
|
||||
* `openmct.plugins.Conductor` provides a user interface for working with time
|
||||
within the application. If activated, configuration must be provided. This is
|
||||
detailed in the section on [Time Conductor Configuration](#time-conductor-configuration).
|
||||
* `openmct.plugins.CouchDB` is an adapter for using CouchDB for persistence
|
||||
of user-created objects. This is a constructor that takes the URL for the
|
||||
CouchDB database as a parameter, e.g.
|
||||
```javascript
|
||||
openmct.install(openmct.plugins.CouchDB('http://localhost:5984/openmct'))
|
||||
```
|
||||
* `openmct.plugins.Elasticsearch` is an adapter for using Elasticsearch for
|
||||
persistence of user-created objects. This is a
|
||||
constructor that takes the URL for the Elasticsearch instance as a
|
||||
parameter. eg.
|
||||
```javascript
|
||||
openmct.install(openmct.plugins.CouchDB('http://localhost:9200'))
|
||||
```
|
||||
* `openmct.plugins.Espresso` and `openmct.plugins.Snow` are two different
|
||||
themes (dark and light) available for Open MCT. Note that at least one
|
||||
of these themes must be installed for Open MCT to appear correctly.
|
||||
* `openmct.plugins.URLIndicatorPlugin` adds an indicator which shows the
|
||||
availability of a URL with the following options:
|
||||
- `url` : URL to indicate the status of
|
||||
- `cssClass`: Icon to show in the status bar, defaults to `icon-database`, [list of all icons](https://nasa.github.io/openmct/style-guide/#/browse/styleguide:home?view=items)
|
||||
- `interval`: Interval between checking the connection, defaults to `10000`
|
||||
- `label` Name showing up as text in the status bar, defaults to url
|
||||
```javascript
|
||||
openmct.install(openmct.plugins.URLIndicatorPlugin({
|
||||
url: 'http://google.com',
|
||||
cssClass: 'check',
|
||||
interval: 10000,
|
||||
label: 'Google'
|
||||
})
|
||||
);
|
||||
```
|
||||
* `openmct.plugins.LocalStorage` provides persistence of user-created
|
||||
objects in browser-local storage. This is particularly useful in
|
||||
development environments.
|
||||
* `openmct.plugins.MyItems` adds a top-level folder named "My Items"
|
||||
when the application is first started, providing a place for a
|
||||
user to store created items.
|
||||
* `openmct.plugins.UTCTimeSystem` provides a default time system for Open MCT.
|
||||
### The URL Status Indicator
|
||||
|
||||
Generally, you will want to either install these plugins, or install
|
||||
different plugins that provide persistence and an initial folder
|
||||
hierarchy.
|
||||
A common use case for indicators is to convey the state of some external system such as a
|
||||
persistence backend or HTTP server. So long as this system is accessible via HTTP request,
|
||||
Open MCT provides a general purpose indicator to show whether the server is available and
|
||||
returing a 2xx status code. The URL Status Indicator is made available as a default plugin. See
|
||||
the [documentation](./src/plugins/URLIndicatorPlugin) for details on how to install and configure the
|
||||
URL Status Indicator.
|
||||
|
||||
### Creating a Simple Indicator
|
||||
|
||||
A simple indicator with an icon and some text can be created and added with minimal code. An indicator
|
||||
of this type exposes functions for customizing the text, icon, and style of the indicator.
|
||||
|
||||
eg.
|
||||
```javascript
|
||||
openmct.install(openmct.plugins.LocalStorage());
|
||||
openmct.install(openmct.plugins.MyItems());
|
||||
``` javascript
|
||||
var myIndicator = openmct.indicators.simpleIndicator();
|
||||
myIndicator.text("Hello World!");
|
||||
openmct.indicators.add(myIndicator);
|
||||
```
|
||||
|
||||
This will create a new indicator and add it to the bottom of the screen in Open MCT.
|
||||
By default, the indicator will appear as an information icon. Hovering over the icon will
|
||||
reveal the text set via the call to `.text()`. The Indicator object returned by the API
|
||||
call exposes a number of functions for customizing the content and appearance of the indicator:
|
||||
|
||||
* `.text([text])`: Gets or sets the text shown when the user hovers over the indicator.
|
||||
Accepts an __optional__ `string` argument that, if provided, will be used to set the text.
|
||||
Hovering over the indicator will expand it to its full size, revealing this text alongside
|
||||
the icon. Returns the currently set text as a `string`.
|
||||
* `.description([description])`: Gets or sets the indicator's description. Accepts an
|
||||
__optional__ `string` argument that, if provided, will be used to set the text. The description
|
||||
allows for more detail to be provided in a tooltip when the user hovers over the indicator.
|
||||
Returns the currently set text as a `string`.
|
||||
* `.iconClass([className])`: Gets or sets the CSS class used to define the icon. Accepts an __optional__
|
||||
`string` parameter to be used to set the class applied to the indicator. Any of
|
||||
[the built-in glyphs](https://nasa.github.io/openmct/style-guide/#/browse/styleguide:home/glyphs?view=styleguide.glyphs)
|
||||
may be used here, or a custom CSS class can be provided. Returns the currently defined CSS
|
||||
class as a `string`.
|
||||
* `.statusClass([className])`: Gets or sets the CSS class used to determine status. Accepts an __optional __
|
||||
`string` parameter to be used to set a status class applied to the indicator. May be used to apply
|
||||
different colors to indicate status.
|
||||
|
||||
### Custom Indicators
|
||||
|
||||
A completely custom indicator can be added by simply providing a DOM element to place alongside other indicators.
|
||||
|
||||
``` javascript
|
||||
var domNode = document.createElement('div');
|
||||
domNode.innerText = new Date().toString();
|
||||
setInterval(function () {
|
||||
domNode.innerText = new Date().toString();
|
||||
}, 1000);
|
||||
|
||||
openmct.indicators.add({
|
||||
element: domNode
|
||||
});
|
||||
```
|
||||
|
7
LICENSE.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Open MCT License
|
||||
|
||||
Open MCT, Copyright (c) 2014-2019, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.
|
||||
|
||||
Open MCT is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
691
LICENSES.md
@ -1,691 +0,0 @@
|
||||
# Open MCT Licenses
|
||||
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.
|
||||
|
||||
Open MCT is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
Open MCT includes source code licensed under additional open source licenses as follows.
|
||||
|
||||
## Software Components Licenses
|
||||
|
||||
This software includes components released under the following licenses:
|
||||
|
||||
---
|
||||
|
||||
### SuperSocket
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://supersocket.codeplex.com/
|
||||
|
||||
* Version: 0.9.0.2
|
||||
|
||||
* Author: Kerry Jiang
|
||||
|
||||
* Description: Supports SuperWebSocket
|
||||
|
||||
#### License
|
||||
|
||||
Copyright 2012 Kerry Jiang (kerry-jiang@hotmail.com)
|
||||
|
||||
SuperSocket is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
---
|
||||
|
||||
### SuperWebSocket
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://superswebocket.codeplex.com/
|
||||
|
||||
* Version: 0.9.0.2
|
||||
|
||||
* Author: Kerry Jiang
|
||||
|
||||
* Description: WebSocket implementation for client-server communication
|
||||
|
||||
#### License
|
||||
|
||||
Copyright 2010-2013 Kerry Jiang (kerry-jiang@hotmail.com)
|
||||
|
||||
SuperWebSocket is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
|
||||
---
|
||||
|
||||
### log4net
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://logging.apache.org/log4net/
|
||||
|
||||
* Version: 1.2.13
|
||||
|
||||
* Author: Apache Software Foundation
|
||||
|
||||
* Description: Logging.
|
||||
|
||||
#### License
|
||||
|
||||
Copyright © 2004-2015 Apache Software Foundation.
|
||||
|
||||
log4net is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
---
|
||||
|
||||
### Blanket.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://blanketjs.org/
|
||||
|
||||
* Version: 1.1.5
|
||||
|
||||
* Author: Alex Seville
|
||||
|
||||
* Description: Code coverage measurement and reporting
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2013 Alex Seville
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Jasmine
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://jasmine.github.io/
|
||||
|
||||
* Version: 1.3.1
|
||||
|
||||
* Author: Pivotal Labs
|
||||
|
||||
* Description: Unit testing
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2008-2011 Pivotal Labs
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### RequireJS
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://requirejs.org/
|
||||
|
||||
* Version: 2.1.22
|
||||
|
||||
* Author: The Dojo Foundation
|
||||
|
||||
* Description: Script loader
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2015, The Dojo Foundation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### requirejs-text
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/requirejs/text
|
||||
|
||||
* Version: 2.0.14
|
||||
|
||||
* Author: The Dojo Foundation
|
||||
|
||||
* Description: Text loading plugin for RequireJS
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2014, The Dojo Foundation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### AngularJS
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://angularjs.org/
|
||||
|
||||
* Version: 1.4.4
|
||||
|
||||
* Author: Google
|
||||
|
||||
* Description: Client-side web application framework
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Angular-Route
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://angularjs.org/
|
||||
|
||||
* Version: 1.4.4
|
||||
|
||||
* Author: Google
|
||||
|
||||
* Description: Client-side view routing
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### ES6-Promise
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/jakearchibald/es6-promise
|
||||
|
||||
* Version: 3.0.2
|
||||
|
||||
* Authors: Yehuda Katz, Tom Dale, Stefan Penner and contributors
|
||||
|
||||
* Description: Promise polyfill for pre-ECMAScript 6 browsers
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### screenfull.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/sindresorhus/screenfull.js/
|
||||
|
||||
* Version: 3.0.0
|
||||
|
||||
* Author: Sindre Sorhus
|
||||
|
||||
* Description: Wrapper for cross-browser usage of fullscreen API
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Math.uuid.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/broofa/node-uuid
|
||||
|
||||
* Version: 1.4.7
|
||||
|
||||
* Author: Robert Kieffer
|
||||
|
||||
* Description: Unique identifer generation.
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2012 Robert Kieffer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Normalize.css
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/necolas/normalize.css
|
||||
|
||||
* Version: 1.1.2
|
||||
|
||||
* Authors: Nicolas Gallagher, Jonathan Neal
|
||||
|
||||
* Description: Browser style normalization
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) Nicolas Gallagher and Jonathan Neal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Moment.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://momentjs.com
|
||||
|
||||
* Version: 2.11.1
|
||||
|
||||
* Authors: Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
|
||||
* Description: Time/date parsing/formatting
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2011-2014 Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### moment-duration-format
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/jsmreese/moment-duration-format
|
||||
|
||||
* Version: 1.3.0
|
||||
|
||||
* Authors: John Madhavan-Reese
|
||||
|
||||
* Description: Duration parsing/formatting
|
||||
|
||||
#### License
|
||||
|
||||
Copyright 2014 John Madhavan-Reese
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### CSV.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/knrz/CSV.js
|
||||
|
||||
* Version: 3.6.4
|
||||
|
||||
* Authors: Kash Nouroozi
|
||||
|
||||
* Description: Encoder for CSV (comma separated values) export
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2014 Kash Nouroozi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### FileSaver.js
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: https://github.com/eligrey/FileSaver.js/
|
||||
|
||||
* Version: 0.0.2
|
||||
|
||||
* Authors: Eli Grey
|
||||
|
||||
* Description: File download initiator (for file exports)
|
||||
|
||||
#### License
|
||||
|
||||
Copyright © 2015 Eli Grey.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Zepto
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://zeptojs.com/
|
||||
|
||||
* Version: 1.1.6
|
||||
|
||||
* Authors: Thomas Fuchs
|
||||
|
||||
* Description: DOM manipulation
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2010-2016 Thomas Fuchs
|
||||
http://zeptojs.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Json.NET
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://www.newtonsoft.com/json
|
||||
|
||||
* Version: 6.0.8
|
||||
|
||||
* Author: Newtonsoft
|
||||
|
||||
* Description: JSON serialization/deserialization
|
||||
|
||||
#### License
|
||||
|
||||
Copyright (c) 2007 James Newton-King
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Nancy
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://nancyfx.org
|
||||
|
||||
* Version: 0.23.2
|
||||
|
||||
* Author: Andreas Håkansson, Steven Robbins and contributors
|
||||
|
||||
* Description: Embedded web server
|
||||
|
||||
#### License
|
||||
|
||||
Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Nancy.Hosting.Self
|
||||
|
||||
#### Info
|
||||
|
||||
* Link: http://nancyfx.org
|
||||
|
||||
* Version: 0.23.2
|
||||
|
||||
* Author: Andreas Håkansson, Steven Robbins and contributors
|
||||
|
||||
* Description: Embedded web server
|
||||
|
||||
#### License
|
||||
|
||||
Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
### Almond
|
||||
|
||||
* Link: https://github.com/requirejs/almond
|
||||
|
||||
* Version: 0.3.3
|
||||
|
||||
* Author: jQuery Foundation
|
||||
|
||||
* Description: Lightweight RequireJS replacement for builds
|
||||
|
||||
#### License
|
||||
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/requirejs/almond
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code displayed within the prose of the
|
||||
documentation.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
Files located in the node_modules directory, and certain utilities used
|
||||
to build or test the software in the test and dist directories, are
|
||||
externally maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
||||
|
||||
|
||||
### Lodash
|
||||
|
||||
* Link: https://lodash.com
|
||||
|
||||
* Version: 3.10.1
|
||||
|
||||
* Author: Dojo Foundation
|
||||
|
||||
* Description: Utility functions
|
||||
|
||||
#### License
|
||||
|
||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
### EventEmitter3
|
||||
|
||||
* Link: https://github.com/primus/eventemitter3
|
||||
|
||||
* Version: 1.2.0
|
||||
|
||||
* Author: Arnout Kazemier
|
||||
|
||||
* Description: Event-driven programming support
|
||||
|
||||
#### License
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Arnout Kazemier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
111
README.md
@ -9,26 +9,6 @@ Please visit our [Official Site](https://nasa.github.io/openmct/) and [Getting S
|
||||
Try Open MCT now with our [live demo](https://openmct-demo.herokuapp.com/).
|
||||

|
||||
|
||||
## New API
|
||||
|
||||
A simpler, [easier-to-use API](https://nasa.github.io/openmct/docs/api/)
|
||||
has been added to Open MCT. Changes in this
|
||||
API include a move away from a declarative system of JSON configuration files
|
||||
towards an imperative system based on function calls. Developers will be able
|
||||
to extend and build on Open MCT by making direct function calls to a public
|
||||
API. Open MCT is also being refactored to minimize the dependencies that using
|
||||
Open MCT imposes on developers, such as the current requirement to use
|
||||
AngularJS.
|
||||
|
||||
This new API has not yet been heavily used and is likely to contain defects.
|
||||
You can help by trying it out, and reporting any issues you encounter
|
||||
using our GitHub issue tracker. Such issues may include bugs, suggestions,
|
||||
missing documentation, or even just requests for help if you're having
|
||||
trouble.
|
||||
|
||||
We want Open MCT to be as easy to use, install, run, and develop for as
|
||||
possible, and your feedback will help us get there!
|
||||
|
||||
## Building and Running Open MCT Locally
|
||||
|
||||
Building and running Open MCT in your local dev environment is very easy. Be sure you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed, then follow the directions below. Need additional information? Check out the [Getting Started](https://nasa.github.io/openmct/getting-started/) page on our website.
|
||||
@ -50,7 +30,7 @@ Open MCT is now running, and can be accessed by pointing a web browser at [http:
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available on the [Open MCT website](https://nasa.github.io/openmct/documentation/). The documentation can also be built locally.
|
||||
Documentation is available on the [Open MCT website](https://nasa.github.io/openmct/documentation/).
|
||||
|
||||
### Examples
|
||||
|
||||
@ -58,68 +38,29 @@ The clearest examples for developing Open MCT plugins are in the
|
||||
[tutorials](https://github.com/nasa/openmct-tutorial) provided in
|
||||
our documentation.
|
||||
|
||||
For a practical example of a telemetry adapter, see David Hudson's
|
||||
[Kerbal Space Program plugin](https://github.com/hudsonfoo/kerbal-openmct),
|
||||
which allows [Kerbal Space Program](https://kerbalspaceprogram.com) players
|
||||
to build and use displays for their own missions in Open MCT.
|
||||
We want Open MCT to be as easy to use, install, run, and develop for as
|
||||
possible, and your feedback will help us get there! Feedback can be provided via [GitHub issues](https://github.com/nasa/openmct/issues), or by emailing us at [arc-dl-openmct@mail.nasa.gov](mailto:arc-dl-openmct@mail.nasa.gov).
|
||||
|
||||
Additional examples are available in the `examples` hierarchy of this
|
||||
repository; however, be aware that these examples are
|
||||
[not fully-documented](https://github.com/nasa/openmct/issues/846), so
|
||||
the tutorials will likely serve as a better starting point.
|
||||
## Building Applications With Open MCT
|
||||
|
||||
### Building the Open MCT Documentation Locally
|
||||
Open MCT's documentation is generated by an
|
||||
[npm](https://www.npmjs.com/)-based build. It has additional dependencies that
|
||||
may not be available on every platform and thus is not covered in the standard
|
||||
npm install. Ensure your system has [libcairo](http://cairographics.org/)
|
||||
installed and then run the following commands:
|
||||
Open MCT is built using [`npm`](http://npmjs.com/) and [`webpack`](https://webpack.js.org/).
|
||||
|
||||
* `npm install`
|
||||
* `npm install canvas nomnoml`
|
||||
* `npm run docs`
|
||||
See our documentation for a guide on [building Applications with Open MCT](https://github.com/nasa/openmct/blob/master/API.md#starting-an-open-mct-application).
|
||||
|
||||
Documentation will be generated in `target/docs`.
|
||||
## Plugins
|
||||
|
||||
## Deploying Open MCT
|
||||
Open MCT can be extended via plugins that make calls to the Open MCT API. A plugin is a group
|
||||
of software components (including source code and resources such as images and HTML templates)
|
||||
that is intended to be added or removed as a single unit.
|
||||
|
||||
Open MCT is built using [`npm`](http://npmjs.com/)
|
||||
and [`gulp`](http://gulpjs.com/).
|
||||
As well as providing an extension mechanism, most of the core Open MCT codebase is also
|
||||
written as plugins.
|
||||
|
||||
To build Open MCT for deployment:
|
||||
|
||||
`npm run prepare`
|
||||
|
||||
This will compile and minify JavaScript sources, as well as copy over assets.
|
||||
The contents of the `dist` folder will contain a runnable Open MCT
|
||||
instance (e.g. by starting an HTTP server in that directory), including:
|
||||
|
||||
* A `main.js` file containing Open MCT source code.
|
||||
* Various assets in the `example` and `platform` directories.
|
||||
* An `index.html` that runs Open MCT in its default configuration.
|
||||
|
||||
Additional `gulp` tasks are defined in [the gulpfile](gulpfile.js).
|
||||
|
||||
## Bundles
|
||||
|
||||
A bundle is a group of software components (including source code, declared
|
||||
as AMD modules, as well as resources such as images and HTML templates)
|
||||
that is intended to be added or removed as a single unit. A plug-in for
|
||||
Open MCT will be expressed as a bundle; platform components are also
|
||||
expressed as bundles.
|
||||
|
||||
A bundle is also just a directory which contains a file `bundle.json`,
|
||||
which declares its contents.
|
||||
|
||||
The file `bundles.json` (note the plural), at the top level of the
|
||||
repository, is a JSON file containing an array of all bundles (expressed as
|
||||
directory names) to include in a running instance of Open MCT. Adding or
|
||||
removing paths from this list will add or remove bundles from the running
|
||||
application.
|
||||
For information on writing plugins, please see [our API documentation](https://github.com/nasa/openmct/blob/master/API.md#plugins).
|
||||
|
||||
## Tests
|
||||
|
||||
Tests are written for [Jasmine 1.3](http://jasmine.github.io/1.3/introduction.html)
|
||||
Tests are written for [Jasmine 3](https://jasmine.github.io/api/3.1/global)
|
||||
and run by [Karma](http://karma-runner.github.io). To run:
|
||||
|
||||
`npm test`
|
||||
@ -135,7 +76,7 @@ naming convention is otherwise the same.)
|
||||
### Test Reporting
|
||||
|
||||
When `npm test` is run, test results will be written as HTML to
|
||||
`target/tests`. Code coverage information is written to `target/coverage`.
|
||||
`dist/reports/tests/`. Code coverage information is written to `dist/reports/coverage`.
|
||||
|
||||
# Glossary
|
||||
|
||||
@ -145,11 +86,8 @@ addressed (either by updating this glossary or changing code to reflect
|
||||
correct usage.) Other developer documentation, particularly in-line
|
||||
documentation, may presume an understanding of these terms.
|
||||
|
||||
* _bundle_: A bundle is a removable, reusable grouping of software elements.
|
||||
The application is composed of bundles. Plug-ins are bundles. For more
|
||||
information, refer to framework documentation (under `platform/framework`.)
|
||||
* _capability_: An object which exposes dynamic behavior or non-persistent
|
||||
state associated with a domain object.
|
||||
* _plugin_: A plugin is a removable, reusable grouping of software elements.
|
||||
The application is composed of plugins.
|
||||
* _composition_: In the context of a domain object, this refers to the set of
|
||||
other domain objects that compose or are contained by that object. A domain
|
||||
object's composition is the set of domain objects that should appear
|
||||
@ -164,13 +102,8 @@ documentation, may presume an understanding of these terms.
|
||||
* _domain object_: A meaningful object to the user; a distinct thing in
|
||||
the work support by Open MCT. Anything that appears in the left-hand
|
||||
tree is a domain object.
|
||||
* _extension_: An extension is a unit of functionality exposed to the
|
||||
platform in a declarative fashion by a bundle. For more
|
||||
information, refer to framework documentation (under `platform/framework`.)
|
||||
* _id_: A string which uniquely identifies a domain object.
|
||||
* _key_: When used as an object property, this refers to the machine-readable
|
||||
identifier for a specific thing in a set of things. (Most often used in the
|
||||
context of extensions or other similar application-specific object sets.)
|
||||
* _identifier_: A tuple consisting of a namespace and a key, which together uniquely
|
||||
identifies a domain object.
|
||||
* _model_: The persistent state associated with a domain object. A domain
|
||||
object's model is a JavaScript object which can be converted to JSON
|
||||
without losing information (that is, it contains no methods.)
|
||||
@ -182,7 +115,5 @@ documentation, may presume an understanding of these terms.
|
||||
a user clicks on a domain object in the tree, they are _navigating_ to
|
||||
it, and it is thereafter considered the _navigated_ object (until the
|
||||
user makes another such choice.)
|
||||
* _space_: A name used to identify a persistence store. Interactions with
|
||||
persistence will generally involve a `space` parameter in some form, to
|
||||
distinguish multiple persistence stores from one another (for cases
|
||||
where there are multiple valid persistence locations available.)
|
||||
* _namespace_: A name used to identify a persistence store. A running open MCT
|
||||
application could potentially use multiple persistence stores, with the
|
||||
|
14
app.js
@ -19,6 +19,7 @@
|
||||
|
||||
// Defaults
|
||||
options.port = options.port || options.p || 8080;
|
||||
options.host = options.host || 'localhost'
|
||||
options.directory = options.directory || options.D || '.';
|
||||
['include', 'exclude', 'i', 'x'].forEach(function (opt) {
|
||||
options[opt] = options[opt] || [];
|
||||
@ -33,10 +34,11 @@
|
||||
if (options.help || options.h) {
|
||||
console.log("\nUsage: node app.js [options]\n");
|
||||
console.log("Options:");
|
||||
console.log(" --help, -h Show this message.");
|
||||
console.log(" --port, -p <number> Specify port.");
|
||||
console.log(" --include, -i <bundle> Include the specified bundle.");
|
||||
console.log(" --exclude, -x <bundle> Exclude the specified bundle.");
|
||||
console.log(" --help, -h Show this message.");
|
||||
console.log(" --port, -p <number> Specify port.");
|
||||
console.log(" --host <host> Specify host to listen on.");
|
||||
console.log(" --include, -i <bundle> Include the specified bundle.");
|
||||
console.log(" --exclude, -x <bundle> Exclude the specified bundle.");
|
||||
console.log(" --directory, -D <bundle> Serve files from specified directory.");
|
||||
console.log("");
|
||||
process.exit(0);
|
||||
@ -78,7 +80,7 @@
|
||||
app.use(express['static'](options.directory));
|
||||
|
||||
// Finally, open the HTTP server and log the instance to the console
|
||||
app.listen(options.port, function() {
|
||||
console.log('Open MCT application running at localhost:' + options.port)
|
||||
app.listen(options.port, options.host, function() {
|
||||
console.log('Open MCT application running at %s:%s', options.host, options.port)
|
||||
});
|
||||
}());
|
||||
|
@ -17,12 +17,11 @@
|
||||
"screenfull": "^3.0.0",
|
||||
"node-uuid": "^1.4.7",
|
||||
"comma-separated-values": "^3.6.4",
|
||||
"file-saver": "^1.3.3",
|
||||
"file-saver": "1.3.3",
|
||||
"zepto": "^1.1.6",
|
||||
"eventemitter3": "^1.2.0",
|
||||
"lodash": "3.10.1",
|
||||
"almond": "~0.3.2",
|
||||
"html2canvas": "^0.4.1",
|
||||
"moment-timezone": "^0.5.13"
|
||||
}
|
||||
}
|
||||
}
|
27
circle.yml
@ -1,27 +0,0 @@
|
||||
machine:
|
||||
node:
|
||||
version: 4.7.0
|
||||
|
||||
dependencies:
|
||||
pre:
|
||||
- npm install -g npm@latest
|
||||
|
||||
deployment:
|
||||
production:
|
||||
branch: master
|
||||
commands:
|
||||
- npm install canvas nomnoml
|
||||
- ./build-docs.sh
|
||||
openmctweb-staging-deux:
|
||||
branch: mobile
|
||||
heroku:
|
||||
appname: openmctweb-staging-deux
|
||||
test:
|
||||
post:
|
||||
- gulp lint
|
||||
- gulp checkstyle
|
||||
|
||||
general:
|
||||
branches:
|
||||
ignore:
|
||||
- gh-pages
|
@ -33,5 +33,5 @@ As we transition to a new API, the following documentation for the old API
|
||||
* The [Developer's Guide](guide/) goes into more detail about how to use the
|
||||
platform and the functionality that it provides.
|
||||
|
||||
* The [Tutorials](tutorials/) give examples of extending the platform to add
|
||||
* The [Tutorials](https://github.com/nasa/openmct-tutorial) give examples of extending the platform to add
|
||||
functionality, and integrate with data sources.
|
||||
|
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 43 KiB |
@ -60,8 +60,8 @@ define([
|
||||
"source": "eventGenerator",
|
||||
"domains": [
|
||||
{
|
||||
"key": "time",
|
||||
"name": "Time",
|
||||
"key": "utc",
|
||||
"name": "Timestamp",
|
||||
"format": "utc"
|
||||
}
|
||||
],
|
||||
|
110
example/generator/GeneratorMetadataProvider.js
Normal file
@ -0,0 +1,110 @@
|
||||
define([
|
||||
'lodash'
|
||||
], function (
|
||||
_
|
||||
) {
|
||||
|
||||
var METADATA_BY_TYPE = {
|
||||
'generator': {
|
||||
values: [
|
||||
{
|
||||
key: "name",
|
||||
name: "Name"
|
||||
},
|
||||
{
|
||||
key: "utc",
|
||||
name: "Time",
|
||||
format: "utc",
|
||||
hints: {
|
||||
domain: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "yesterday",
|
||||
name: "Yesterday",
|
||||
format: "utc",
|
||||
hints: {
|
||||
domain: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "sin",
|
||||
name: "Sine",
|
||||
formatString: '%0.2f',
|
||||
hints: {
|
||||
range: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "cos",
|
||||
name: "Cosine",
|
||||
formatString: '%0.2f',
|
||||
hints: {
|
||||
range: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'example.state-generator': {
|
||||
values: [
|
||||
{
|
||||
key: "name",
|
||||
name: "Name"
|
||||
},
|
||||
{
|
||||
key: "utc",
|
||||
name: "Time",
|
||||
format: "utc",
|
||||
hints: {
|
||||
domain: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "state",
|
||||
source: "value",
|
||||
name: "State",
|
||||
format: "enum",
|
||||
enumerations: [
|
||||
{
|
||||
value: 0,
|
||||
string: "OFF"
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
string: "ON"
|
||||
}
|
||||
],
|
||||
hints: {
|
||||
range: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "value",
|
||||
name: "Value",
|
||||
hints: {
|
||||
range: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
function GeneratorMetadataProvider() {
|
||||
|
||||
}
|
||||
|
||||
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
||||
return METADATA_BY_TYPE.hasOwnProperty(domainObject.type);
|
||||
};
|
||||
|
||||
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
||||
return _.extend(
|
||||
{},
|
||||
domainObject.telemetry,
|
||||
METADATA_BY_TYPE[domainObject.type]
|
||||
);
|
||||
};
|
||||
|
||||
return GeneratorMetadataProvider;
|
||||
|
||||
});
|
@ -30,7 +30,8 @@ define([
|
||||
amplitude: 1,
|
||||
period: 10,
|
||||
offset: 0,
|
||||
dataRateInHz: 1
|
||||
dataRateInHz: 1,
|
||||
phase: 0
|
||||
};
|
||||
|
||||
function GeneratorProvider() {
|
||||
@ -50,9 +51,12 @@ define([
|
||||
'amplitude',
|
||||
'period',
|
||||
'offset',
|
||||
'dataRateInHz'
|
||||
'dataRateInHz',
|
||||
'phase',
|
||||
];
|
||||
|
||||
request = request || {};
|
||||
|
||||
var workerRequest = {};
|
||||
|
||||
props.forEach(function (prop) {
|
||||
@ -62,12 +66,12 @@ define([
|
||||
if (request && request.hasOwnProperty(prop)) {
|
||||
workerRequest[prop] = request[prop];
|
||||
}
|
||||
if (!workerRequest[prop]) {
|
||||
if (!workerRequest.hasOwnProperty(prop)) {
|
||||
workerRequest[prop] = REQUEST_DEFAULTS[prop];
|
||||
}
|
||||
workerRequest[prop] = Number(workerRequest[prop]);
|
||||
});
|
||||
|
||||
workerRequest.name = domainObject.name;
|
||||
return workerRequest;
|
||||
};
|
||||
|
||||
|
@ -1,87 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
var RED = 0.9,
|
||||
YELLOW = 0.5,
|
||||
LIMITS = {
|
||||
rh: {
|
||||
cssClass: "s-limit-upr s-limit-red",
|
||||
low: RED,
|
||||
high: Number.POSITIVE_INFINITY,
|
||||
name: "Red High"
|
||||
},
|
||||
rl: {
|
||||
cssClass: "s-limit-lwr s-limit-red",
|
||||
high: -RED,
|
||||
low: Number.NEGATIVE_INFINITY,
|
||||
name: "Red Low"
|
||||
},
|
||||
yh: {
|
||||
cssClass: "s-limit-upr s-limit-yellow",
|
||||
low: YELLOW,
|
||||
high: RED,
|
||||
name: "Yellow High"
|
||||
},
|
||||
yl: {
|
||||
cssClass: "s-limit-lwr s-limit-yellow",
|
||||
low: -RED,
|
||||
high: -YELLOW,
|
||||
name: "Yellow Low"
|
||||
}
|
||||
};
|
||||
|
||||
function SinewaveLimitCapability(domainObject) {
|
||||
return {
|
||||
limits: function (range) {
|
||||
return LIMITS;
|
||||
},
|
||||
evaluate: function (datum, range) {
|
||||
range = range || 'sin';
|
||||
if (datum[range] > RED) {
|
||||
return LIMITS.rh;
|
||||
}
|
||||
if (datum[range] < -RED) {
|
||||
return LIMITS.rl;
|
||||
}
|
||||
if (datum[range] > YELLOW) {
|
||||
return LIMITS.yh;
|
||||
}
|
||||
if (datum[range] < -YELLOW) {
|
||||
return LIMITS.yl;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
SinewaveLimitCapability.appliesTo = function (model) {
|
||||
return model.type === 'generator';
|
||||
};
|
||||
|
||||
return SinewaveLimitCapability;
|
||||
}
|
||||
);
|
88
example/generator/SinewaveLimitProvider.js
Normal file
@ -0,0 +1,88 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
|
||||
], function (
|
||||
|
||||
) {
|
||||
|
||||
var RED = 0.9,
|
||||
YELLOW = 0.5,
|
||||
LIMITS = {
|
||||
rh: {
|
||||
cssClass: "s-limit-upr s-limit-red",
|
||||
low: RED,
|
||||
high: Number.POSITIVE_INFINITY,
|
||||
name: "Red High"
|
||||
},
|
||||
rl: {
|
||||
cssClass: "s-limit-lwr s-limit-red",
|
||||
high: -RED,
|
||||
low: Number.NEGATIVE_INFINITY,
|
||||
name: "Red Low"
|
||||
},
|
||||
yh: {
|
||||
cssClass: "s-limit-upr s-limit-yellow",
|
||||
low: YELLOW,
|
||||
high: RED,
|
||||
name: "Yellow High"
|
||||
},
|
||||
yl: {
|
||||
cssClass: "s-limit-lwr s-limit-yellow",
|
||||
low: -RED,
|
||||
high: -YELLOW,
|
||||
name: "Yellow Low"
|
||||
}
|
||||
};
|
||||
|
||||
function SinewaveLimitProvider() {
|
||||
|
||||
}
|
||||
|
||||
SinewaveLimitProvider.prototype.supportsLimits = function (domainObject) {
|
||||
return domainObject.type === 'generator';
|
||||
};
|
||||
|
||||
SinewaveLimitProvider.prototype.getLimitEvaluator = function (domainObject) {
|
||||
return {
|
||||
evaluate: function (datum, valueMetadata) {
|
||||
var range = valueMetadata ? valueMetadata.key : 'sin'
|
||||
if (datum[range] > RED) {
|
||||
return LIMITS.rh;
|
||||
}
|
||||
if (datum[range] < -RED) {
|
||||
return LIMITS.rl;
|
||||
}
|
||||
if (datum[range] > YELLOW) {
|
||||
return LIMITS.yh;
|
||||
}
|
||||
if (datum[range] < -YELLOW) {
|
||||
return LIMITS.yl;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
return SinewaveLimitProvider;
|
||||
});
|
82
example/generator/StateGeneratorProvider.js
Normal file
@ -0,0 +1,82 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
define([
|
||||
|
||||
], function (
|
||||
|
||||
) {
|
||||
|
||||
function StateGeneratorProvider() {
|
||||
|
||||
}
|
||||
|
||||
function pointForTimestamp(timestamp, duration, name) {
|
||||
return {
|
||||
name: name,
|
||||
utc: Math.floor(timestamp / duration) * duration,
|
||||
value: Math.floor(timestamp / duration) % 2
|
||||
};
|
||||
}
|
||||
|
||||
StateGeneratorProvider.prototype.supportsSubscribe = function (domainObject) {
|
||||
return domainObject.type === 'example.state-generator';
|
||||
};
|
||||
|
||||
StateGeneratorProvider.prototype.subscribe = function (domainObject, callback) {
|
||||
var duration = domainObject.telemetry.duration * 1000;
|
||||
|
||||
var interval = setInterval(function () {
|
||||
var now = Date.now();
|
||||
var datum = pointForTimestamp(now, duration, domainObject.name);
|
||||
datum.value += "";
|
||||
callback(datum);
|
||||
}, duration);
|
||||
|
||||
return function () {
|
||||
clearInterval(interval);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
StateGeneratorProvider.prototype.supportsRequest = function (domainObject, options) {
|
||||
return domainObject.type === 'example.state-generator';
|
||||
};
|
||||
|
||||
StateGeneratorProvider.prototype.request = function (domainObject, options) {
|
||||
var start = options.start;
|
||||
var end = options.end;
|
||||
var duration = domainObject.telemetry.duration * 1000;
|
||||
if (options.strategy === 'latest' || options.size === 1) {
|
||||
start = end;
|
||||
}
|
||||
var data = [];
|
||||
while (start <= end && data.length < 5000) {
|
||||
data.push(pointForTimestamp(start, duration, domainObject.name));
|
||||
start += duration;
|
||||
}
|
||||
return Promise.resolve(data);
|
||||
};
|
||||
|
||||
return StateGeneratorProvider;
|
||||
|
||||
});
|
@ -62,10 +62,11 @@
|
||||
self.postMessage({
|
||||
id: message.id,
|
||||
data: {
|
||||
name: data.name,
|
||||
utc: nextStep,
|
||||
yesterday: nextStep - 60*60*24*1000,
|
||||
sin: sin(nextStep, data.period, data.amplitude, data.offset),
|
||||
cos: cos(nextStep, data.period, data.amplitude, data.offset)
|
||||
sin: sin(nextStep, data.period, data.amplitude, data.offset, data.phase),
|
||||
cos: cos(nextStep, data.period, data.amplitude, data.offset, data.phase)
|
||||
}
|
||||
});
|
||||
nextStep += step;
|
||||
@ -82,21 +83,22 @@
|
||||
}
|
||||
|
||||
function onRequest(message) {
|
||||
var data = message.data;
|
||||
if (data.end == undefined) {
|
||||
data.end = Date.now();
|
||||
var request = message.data;
|
||||
if (request.end == undefined) {
|
||||
request.end = Date.now();
|
||||
}
|
||||
if (data.start == undefined){
|
||||
data.start = data.end - FIFTEEN_MINUTES;
|
||||
if (request.start == undefined){
|
||||
request.start = request.end - FIFTEEN_MINUTES;
|
||||
}
|
||||
|
||||
var now = Date.now();
|
||||
var start = data.start;
|
||||
var end = data.end > now ? now : data.end;
|
||||
var amplitude = data.amplitude;
|
||||
var period = data.period;
|
||||
var offset = data.offset;
|
||||
var dataRateInHz = data.dataRateInHz;
|
||||
var start = request.start;
|
||||
var end = request.end > now ? now : request.end;
|
||||
var amplitude = request.amplitude;
|
||||
var period = request.period;
|
||||
var offset = request.offset;
|
||||
var dataRateInHz = request.dataRateInHz;
|
||||
var phase = request.phase;
|
||||
|
||||
var step = 1000 / dataRateInHz;
|
||||
var nextStep = start - (start % step) + step;
|
||||
@ -105,10 +107,11 @@
|
||||
|
||||
for (; nextStep < end && data.length < 5000; nextStep += step) {
|
||||
data.push({
|
||||
name: request.name,
|
||||
utc: nextStep,
|
||||
yesterday: nextStep - 60*60*24*1000,
|
||||
sin: sin(nextStep, period, amplitude, offset),
|
||||
cos: cos(nextStep, period, amplitude, offset)
|
||||
sin: sin(nextStep, period, amplitude, offset, phase),
|
||||
cos: cos(nextStep, period, amplitude, offset, phase)
|
||||
});
|
||||
}
|
||||
self.postMessage({
|
||||
@ -117,14 +120,14 @@
|
||||
});
|
||||
}
|
||||
|
||||
function cos(timestamp, period, amplitude, offset) {
|
||||
function cos(timestamp, period, amplitude, offset, phase) {
|
||||
return amplitude *
|
||||
Math.cos(timestamp / period / 1000 * Math.PI * 2) + offset;
|
||||
Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + offset;
|
||||
}
|
||||
|
||||
function sin(timestamp, period, amplitude, offset) {
|
||||
function sin(timestamp, period, amplitude, offset, phase) {
|
||||
return amplitude *
|
||||
Math.sin(timestamp / period / 1000 * Math.PI * 2) + offset;
|
||||
Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + offset;
|
||||
}
|
||||
|
||||
function sendError(error, message) {
|
||||
|
@ -23,29 +23,46 @@
|
||||
|
||||
define([
|
||||
"./GeneratorProvider",
|
||||
"./SinewaveLimitCapability"
|
||||
"./SinewaveLimitProvider",
|
||||
"./StateGeneratorProvider",
|
||||
"./GeneratorMetadataProvider"
|
||||
], function (
|
||||
GeneratorProvider,
|
||||
SinewaveLimitCapability
|
||||
SinewaveLimitProvider,
|
||||
StateGeneratorProvider,
|
||||
GeneratorMetadataProvider
|
||||
) {
|
||||
|
||||
var legacyExtensions = {
|
||||
"capabilities": [
|
||||
{
|
||||
"key": "limit",
|
||||
"implementation": SinewaveLimitCapability
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return function(openmct){
|
||||
//Register legacy extensions for things not yet supported by the new API
|
||||
Object.keys(legacyExtensions).forEach(function (type){
|
||||
var extensionsOfType = legacyExtensions[type];
|
||||
extensionsOfType.forEach(function (extension) {
|
||||
openmct.legacyExtension(type, extension)
|
||||
})
|
||||
|
||||
openmct.types.addType("example.state-generator", {
|
||||
name: "State Generator",
|
||||
description: "For development use. Generates test enumerated telemetry by cycling through a given set of states",
|
||||
cssClass: "icon-telemetry",
|
||||
creatable: true,
|
||||
form: [
|
||||
{
|
||||
name: "State Duration (seconds)",
|
||||
control: "textfield",
|
||||
cssClass: "l-input-sm l-numeric",
|
||||
key: "duration",
|
||||
required: true,
|
||||
property: [
|
||||
"telemetry",
|
||||
"duration"
|
||||
],
|
||||
pattern: "^\\d*(\\.\\d*)?$"
|
||||
}
|
||||
],
|
||||
initialize: function (object) {
|
||||
object.telemetry = {
|
||||
duration: 5
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
openmct.telemetry.addProvider(new StateGeneratorProvider());
|
||||
|
||||
openmct.types.addType("generator", {
|
||||
name: "Sine Wave Generator",
|
||||
description: "For development use. Generates example streaming telemetry data using a simple sine wave algorithm.",
|
||||
@ -54,51 +71,58 @@ define([
|
||||
form: [
|
||||
{
|
||||
name: "Period",
|
||||
control: "textfield",
|
||||
control: "numberfield",
|
||||
cssClass: "l-input-sm l-numeric",
|
||||
key: "period",
|
||||
required: true,
|
||||
property: [
|
||||
"telemetry",
|
||||
"period"
|
||||
],
|
||||
pattern: "^\\d*(\\.\\d*)?$"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Amplitude",
|
||||
control: "textfield",
|
||||
control: "numberfield",
|
||||
cssClass: "l-input-sm l-numeric",
|
||||
key: "amplitude",
|
||||
required: true,
|
||||
property: [
|
||||
"telemetry",
|
||||
"amplitude"
|
||||
],
|
||||
pattern: "^\\d*(\\.\\d*)?$"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Offset",
|
||||
control: "textfield",
|
||||
control: "numberfield",
|
||||
cssClass: "l-input-sm l-numeric",
|
||||
key: "offset",
|
||||
required: true,
|
||||
property: [
|
||||
"telemetry",
|
||||
"offset"
|
||||
],
|
||||
pattern: "^\\d*(\\.\\d*)?$"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Data Rate (hz)",
|
||||
control: "textfield",
|
||||
control: "numberfield",
|
||||
cssClass: "l-input-sm l-numeric",
|
||||
key: "dataRateInHz",
|
||||
required: true,
|
||||
property: [
|
||||
"telemetry",
|
||||
"dataRateInHz"
|
||||
],
|
||||
pattern: "^\\d*(\\.\\d*)?$"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Phase (radians)",
|
||||
control: "numberfield",
|
||||
cssClass: "l-input-sm l-numeric",
|
||||
key: "phase",
|
||||
required: true,
|
||||
property: [
|
||||
"telemetry",
|
||||
"phase"
|
||||
]
|
||||
}
|
||||
],
|
||||
initialize: function (object) {
|
||||
@ -107,42 +131,14 @@ define([
|
||||
amplitude: 1,
|
||||
offset: 0,
|
||||
dataRateInHz: 1,
|
||||
values: [
|
||||
{
|
||||
key: "utc",
|
||||
name: "Time",
|
||||
format: "utc",
|
||||
hints: {
|
||||
domain: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "yesterday",
|
||||
name: "Yesterday",
|
||||
format: "utc",
|
||||
hints: {
|
||||
domain: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "sin",
|
||||
name: "Sine",
|
||||
hints: {
|
||||
range: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "cos",
|
||||
name: "Cosine",
|
||||
hints: {
|
||||
range: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
phase: 0
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
openmct.telemetry.addProvider(new GeneratorProvider());
|
||||
openmct.telemetry.addProvider(new GeneratorMetadataProvider());
|
||||
openmct.telemetry.addProvider(new SinewaveLimitProvider());
|
||||
};
|
||||
|
||||
});
|
||||
|
@ -38,7 +38,8 @@ define([
|
||||
"provides": "identityService",
|
||||
"type": "provider",
|
||||
"depends": [
|
||||
"dialogService"
|
||||
"dialogService",
|
||||
"$q"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -55,21 +55,37 @@ define(
|
||||
* @implements {IdentityService}
|
||||
* @memberof platform/identity
|
||||
*/
|
||||
function ExampleIdentityProvider(dialogService) {
|
||||
// Handle rejected dialog messages by treating the
|
||||
// current user as undefined.
|
||||
function echo(v) { return v; }
|
||||
function giveUndefined() { return undefined; }
|
||||
function ExampleIdentityProvider(dialogService, $q) {
|
||||
this.dialogService = dialogService;
|
||||
this.$q = $q;
|
||||
|
||||
this.userPromise =
|
||||
dialogService.getUserInput(DIALOG_STRUCTURE, DEFAULT_IDENTITY)
|
||||
.then(echo, giveUndefined);
|
||||
this.returnUser = this.returnUser.bind(this);
|
||||
this.returnUndefined = this.returnUndefined.bind(this);
|
||||
}
|
||||
|
||||
ExampleIdentityProvider.prototype.getUser = function () {
|
||||
return this.userPromise;
|
||||
if (this.user) {
|
||||
return this.$q.when(this.user);
|
||||
} else {
|
||||
return this.dialogService.getUserInput(DIALOG_STRUCTURE, DEFAULT_IDENTITY)
|
||||
.then(this.returnUser, this.returnUndefined);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
ExampleIdentityProvider.prototype.returnUser = function (user) {
|
||||
return this.user = user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
ExampleIdentityProvider.prototype.returnUndefined = function () {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return ExampleIdentityProvider;
|
||||
}
|
||||
);
|
||||
|
@ -48,8 +48,9 @@ define([
|
||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
|
||||
];
|
||||
|
||||
function pointForTimestamp(timestamp) {
|
||||
function pointForTimestamp(timestamp, name) {
|
||||
return {
|
||||
name: name,
|
||||
utc: Math.floor(timestamp / 5000) * 5000,
|
||||
url: IMAGE_SAMPLES[Math.floor(timestamp / 5000) % IMAGE_SAMPLES.length]
|
||||
};
|
||||
@ -61,7 +62,7 @@ define([
|
||||
},
|
||||
subscribe: function (domainObject, callback) {
|
||||
var interval = setInterval(function () {
|
||||
callback(pointForTimestamp(Date.now()));
|
||||
callback(pointForTimestamp(Date.now(), domainObject.name));
|
||||
}, 5000);
|
||||
|
||||
return function (interval) {
|
||||
@ -79,8 +80,8 @@ define([
|
||||
var start = options.start;
|
||||
var end = options.end;
|
||||
var data = [];
|
||||
while (start < end && data.length < 5000) {
|
||||
data.push(pointForTimestamp(start));
|
||||
while (start <= end && data.length < 5000) {
|
||||
data.push(pointForTimestamp(start, domainObject.name));
|
||||
start += 5000;
|
||||
}
|
||||
return Promise.resolve(data);
|
||||
@ -93,7 +94,7 @@ define([
|
||||
options.strategy === 'latest';
|
||||
},
|
||||
request: function (domainObject, options) {
|
||||
return Promise.resolve([pointForTimestamp(Date.now())]);
|
||||
return Promise.resolve([pointForTimestamp(Date.now(), domainObject.name)]);
|
||||
}
|
||||
};
|
||||
|
||||
@ -109,6 +110,10 @@ define([
|
||||
initialize: function (object) {
|
||||
object.telemetry = {
|
||||
values: [
|
||||
{
|
||||
name: 'Name',
|
||||
key: 'name'
|
||||
},
|
||||
{
|
||||
name: 'Time',
|
||||
key: 'utc',
|
||||
|
@ -1,9 +1,9 @@
|
||||
<span class="status block" ng-controller="DialogLaunchController">
|
||||
<span class="h-indicator" ng-controller="DialogLaunchController">
|
||||
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
||||
<span class="status-indicator icon-box-with-arrow"></span><span class="label">
|
||||
<a ng-click="launchProgress(true)">Known</a> |
|
||||
<a ng-click="launchProgress(false)">Unknown</a> |
|
||||
<a ng-click="launchError()">Error</a> |
|
||||
<div class="ls-indicator icon-box-with-arrow s-status-available"><span class="label">
|
||||
<a ng-click="launchProgress(true)">Known</a>
|
||||
<a ng-click="launchProgress(false)">Unknown</a>
|
||||
<a ng-click="launchError()">Error</a>
|
||||
<a ng-click="launchInfo()">Info</a>
|
||||
</span><span class="count"></span>
|
||||
</span></div>
|
||||
</span>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<span class="status block" ng-controller="NotificationLaunchController">
|
||||
<span class="h-indicator" ng-controller="NotificationLaunchController">
|
||||
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
||||
<span class="status-indicator icon-bell"></span><span class="label">
|
||||
<a ng-click="newInfo()">Success</a> |
|
||||
<a ng-click="newError()">Error</a> |
|
||||
<a ng-click="newAlert()">Alert</a> |
|
||||
<div class="ls-indicator icon-bell s-status-available"><span class="label">
|
||||
<a ng-click="newInfo()">Success</a>
|
||||
<a ng-click="newError()">Error</a>
|
||||
<a ng-click="newAlert()">Alert</a>
|
||||
<a ng-click="newProgress()">Progress</a>
|
||||
</span><span class="count"></span>
|
||||
</span></div>
|
||||
</span>
|
||||
|
@ -1,146 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
'legacyRegistry',
|
||||
'../../platform/commonUI/browse/src/InspectorRegion',
|
||||
'../../platform/commonUI/regions/src/Region'
|
||||
], function (
|
||||
legacyRegistry,
|
||||
InspectorRegion,
|
||||
Region
|
||||
) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Add a 'plot options' region part to the inspector region for the
|
||||
* Telemetry Plot type only. {@link InspectorRegion} is a default region
|
||||
* implementation that is added automatically to all types. In order to
|
||||
* customize what appears in the inspector region, you can start from a
|
||||
* blank slate by using Region, or customize the default inspector
|
||||
* region by using {@link InspectorRegion}.
|
||||
*/
|
||||
var plotInspector = new InspectorRegion(),
|
||||
/**
|
||||
* Two region parts are defined here. One that appears only in browse
|
||||
* mode, and one that appears only in edit mode. For not they both point
|
||||
* to the same representation, but a different key could be used here to
|
||||
* include a customized representation for edit mode.
|
||||
*/
|
||||
plotOptionsBrowseRegion = new Region({
|
||||
name: "plot-options",
|
||||
title: "Plot Options",
|
||||
modes: ['browse'],
|
||||
content: {
|
||||
key: "plot-options-browse"
|
||||
}
|
||||
}),
|
||||
plotOptionsEditRegion = new Region({
|
||||
name: "plot-options",
|
||||
title: "Plot Options",
|
||||
modes: ['edit'],
|
||||
content: {
|
||||
key: "plot-options-browse"
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Both parts are added, and policies of type 'region' will determine
|
||||
* which is shown based on domain object state. A default policy is
|
||||
* provided which will check the 'modes' attribute of the region part
|
||||
* definition.
|
||||
*/
|
||||
plotInspector.addRegion(plotOptionsBrowseRegion);
|
||||
plotInspector.addRegion(plotOptionsEditRegion);
|
||||
|
||||
legacyRegistry.register("example/plotType", {
|
||||
"name": "Plot Type",
|
||||
"description": "Example illustrating registration of a new object type",
|
||||
"extensions": {
|
||||
"types": [
|
||||
{
|
||||
"key": "plot",
|
||||
"name": "Example Telemetry Plot",
|
||||
"cssClass": "icon-telemetry-panel",
|
||||
"description": "For development use. A plot for displaying telemetry.",
|
||||
"priority": 10,
|
||||
"delegates": [
|
||||
"telemetry"
|
||||
],
|
||||
"features": "creation",
|
||||
"contains": [
|
||||
{
|
||||
"has": "telemetry"
|
||||
}
|
||||
],
|
||||
"model": {
|
||||
"composition": []
|
||||
},
|
||||
"inspector": plotInspector,
|
||||
"telemetry": {
|
||||
"source": "generator",
|
||||
"domains": [
|
||||
{
|
||||
"key": "time",
|
||||
"name": "Time"
|
||||
},
|
||||
{
|
||||
"key": "yesterday",
|
||||
"name": "Yesterday"
|
||||
},
|
||||
{
|
||||
"key": "delta",
|
||||
"name": "Delta",
|
||||
"format": "example.delta"
|
||||
}
|
||||
],
|
||||
"ranges": [
|
||||
{
|
||||
"key": "sin",
|
||||
"name": "Sine"
|
||||
},
|
||||
{
|
||||
"key": "cos",
|
||||
"name": "Cosine"
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"name": "Period",
|
||||
"control": "textfield",
|
||||
"cssClass": "l-input-sm l-numeric",
|
||||
"key": "period",
|
||||
"required": true,
|
||||
"property": [
|
||||
"telemetry",
|
||||
"period"
|
||||
],
|
||||
"pattern": "^\\d*(\\.\\d*)?$"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -59,9 +59,8 @@
|
||||
}
|
||||
|
||||
.w-mct-example {
|
||||
div {
|
||||
margin-bottom: $interiorMarginLg;
|
||||
}
|
||||
color: #ccc;
|
||||
> div { margin-bottom: $interiorMarginLg; }
|
||||
}
|
||||
|
||||
code,
|
||||
@ -105,11 +104,11 @@
|
||||
padding-top: 1em;
|
||||
|
||||
.cols {
|
||||
@include display(flex);
|
||||
@include flex-direction(row);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.col {
|
||||
@include flex(1 1 auto);
|
||||
flex: 1 1 auto;
|
||||
&:not(:last-child) {
|
||||
$v: $interiorMargin * 4;
|
||||
border-right: 1px solid $colorInteriorBorder;
|
||||
@ -203,7 +202,7 @@
|
||||
border-radius: 15%;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
@include transform(translateX(-50%));
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -149,12 +149,21 @@
|
||||
<h2>Local Controls</h2>
|
||||
<div class="cols cols1-1">
|
||||
<div class="col">
|
||||
<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>Local controls are typically buttons and selects that provide actions in close proximity to a component.</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>
|
||||
<mct-example><div class="plot-display-area" style="height: 100px; padding: 10px; position: relative;">Hover over me
|
||||
<div class="l-local-controls gl-plot-local-controls t-plot-display-controls">
|
||||
<mct-example><div class="plot-display-area" style="padding: 10px; position: relative;">
|
||||
Some content in here
|
||||
<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-arrows-out" title="Reset pan/zoom"></a>
|
||||
<a class="s-button icon-reset" 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></mct-example>
|
||||
</div>
|
||||
|
@ -20,12 +20,12 @@
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
<style>
|
||||
.w-mct-example div[class*="s-limit"],
|
||||
.w-mct-example div[class*="s-status"],
|
||||
.w-mct-example div[class*="s-unsynced"],
|
||||
.w-mct-example span[class*="s-status"],
|
||||
.w-mct-example div[class*="s-limit"],
|
||||
.w-mct-example span[class*="s-limit"] {
|
||||
border-radius: 4px;
|
||||
padding: 3px 7px;
|
||||
border-radius: 3px;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
.w-mct-example table {
|
||||
width: 100%;
|
||||
@ -36,65 +36,12 @@
|
||||
<h1>Status Indication</h1>
|
||||
|
||||
<div class="l-section">
|
||||
<h2>Overview</h2>
|
||||
<p>Many elements in Open MCT need to articulate a dynamic status; Open MCT provides the following styles and conventions to handle this:</p>
|
||||
<ul>
|
||||
<li><strong>Limits</strong>: when telemetry values exceed minimum or maximum values, they can be violating limits. Limit styles include both color and iconography; color is used to indicate severity while icons are used to indicate direction, upper or lower.</li>
|
||||
<li><strong>Status</strong>: Open MCT also provides a number or built-in Status styles allowing telemetry or other displayed information to be visually classified by type. Common uses for these classes are to visually denote event records.</li>
|
||||
<li><strong>Synchronization</strong>: When the system is displaying real-time data, it is very important that displays clearly indicate when they are not doing so, such as when a plot if frozen while panning or zooming. Open MCT provides a style for this.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="l-section">
|
||||
<h2>Limits</h2>
|
||||
<h2>Status Classes</h2>
|
||||
<div class="cols cols1-1">
|
||||
<div class="col">
|
||||
<p>Limit CSS classes can be applied to any block or inline element. Open MCT limit classes set color and optionally an icon, but don't effect other properties. Yellow and red limit classes can be used as is, or allow the application of any custom icon available in Open MCT's glyphs library. "Level" limit classes - upper and lower - always use an icon in addition to a color; Open MCT doesn't support level limits without color.</p>
|
||||
<ul>
|
||||
<li>Color only</li>
|
||||
<ul>
|
||||
<li><code>s-limit-yellow</code>: A yellow limit.</li>
|
||||
<li><code>s-limit-red</code>: A red limit.</li>
|
||||
</ul>
|
||||
<li>Color and icon</li>
|
||||
<ul>
|
||||
<li><code>s-limit-yellow-icon</code>: A yellow limit with icon.</li>
|
||||
<li><code>s-limit-red-icon</code>: A red limit with icon.</li>
|
||||
</ul>
|
||||
<li>Upper and lower limit indicators. Must be used with a color limit class to be visible.</li>
|
||||
<ul>
|
||||
<li><code>s-limit-upr</code>: Upper limit.
|
||||
</li>
|
||||
<li><code>s-limit-lwr</code>: Lower limit.
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<mct-example><div class="s-limit-yellow">Yellow limit</div>
|
||||
<div class="s-limit-red">Red limit</div>
|
||||
<div class="s-limit-yellow-icon">Yellow limit with icon</div>
|
||||
<div class="s-limit-red-icon">Red limit with icon</div>
|
||||
<div class="s-limit-yellow s-limit-lwr">Lower yellow limit</div>
|
||||
<div class="s-limit-red s-limit-upr">Upper red limit</div>
|
||||
<div class="s-limit-red icon-bell">Red Limit with a custom icon</div>
|
||||
<div>Some text with an <span class="s-limit-yellow-icon">inline element</span> showing a yellow limit.</div>
|
||||
|
||||
<!-- Limits applied in a table -->
|
||||
<table>
|
||||
<tr class='header'><td>Name</td><td>Value 1</td><td>Value 2</td></tr>
|
||||
<tr><td>ENG_PWR 4991</td><td>7.023</td><td class="s-limit-yellow s-limit-upr">70.23</td></tr>
|
||||
<tr><td>ENG_PWR 4992</td><td>49.784</td><td class="s-limit-red s-limit-lwr">-121.22</td></tr>
|
||||
<tr><td>ENG_PWR 4993</td><td class="s-limit-yellow icon-bell">0.451</td><td>1.007</td></tr>
|
||||
</table>
|
||||
</mct-example>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="l-section">
|
||||
<h2>Status</h2>
|
||||
<div class="cols cols1-1">
|
||||
<div class="col">
|
||||
<p>Classes here can be applied to elements as needed.</p>
|
||||
<p>Status classes allow any block or inline-block element to be decorated in order to articulate a
|
||||
status. Provided classes include color-only and color plus icon; custom icons can easily be
|
||||
employed by using a color-only status class in combination with an <a class="link" href="#/browse/styleguide:home/glyphs?tc.mode=local&tc.timeSystem=utc&tc.startDelta=1800000&tc.endDelta=0&view=styleguide.glyphs">glyph</a>.</p>
|
||||
<ul>
|
||||
<li>Color only</li>
|
||||
<ul>
|
||||
@ -106,37 +53,175 @@
|
||||
</ul>
|
||||
<li>Color and icon</li>
|
||||
<ul>
|
||||
<li><code>s-status-warning-hi-icon</code></li>
|
||||
<li><code>s-status-warning-lo-icon</code></li>
|
||||
<li><code>s-status-diagnostic-icon</code></li>
|
||||
<li><code>s-status-info-icon</code></li>
|
||||
<li><code>s-status-ok-icon</code></li>
|
||||
<li><code>s-status-icon-warning-hi</code></li>
|
||||
<li><code>s-status-icon-warning-lo</code></li>
|
||||
<li><code>s-status-icon-diagnostic</code></li>
|
||||
<li><code>s-status-icon-info</code></li>
|
||||
<li><code>s-status-icon-ok</code></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<mct-example><div class="s-status-warning-hi">WARNING HI</div>
|
||||
<mct-example><!-- Color alone examples -->
|
||||
<div class="s-status-warning-hi">WARNING HI</div>
|
||||
<div class="s-status-warning-lo">WARNING LOW</div>
|
||||
<div class="s-status-diagnostic">DIAGNOSTIC</div>
|
||||
<div class="s-status-info">INFO</div>
|
||||
<div class="s-status-ok">OK</div>
|
||||
<div class="s-status-warning-hi-icon">WARNING HI with icon</div>
|
||||
<div class="s-status-warning-lo-icon">WARNING LOW with icon</div>
|
||||
<div class="s-status-diagnostic-icon">DIAGNOSTIC with icon</div>
|
||||
<div class="s-status-info-icon">INFO with icon</div>
|
||||
<div class="s-status-ok-icon">OK with icon</div>
|
||||
<div class="s-status-warning-hi icon-gear">WARNING HI with custom icon</div>
|
||||
|
||||
<!-- Color and icon examples -->
|
||||
<div class="s-status-icon-warning-hi">WARNING HI with icon</div>
|
||||
<div class="s-status-icon-warning-lo">WARNING LOW with icon</div>
|
||||
<div class="s-status-icon-diagnostic">DIAGNOSTIC with icon</div>
|
||||
<div class="s-status-icon-info">INFO with icon</div>
|
||||
<div class="s-status-icon-ok">OK with icon</div>
|
||||
<div class="s-status-warning-hi icon-alert-triangle">WARNING HI with custom icon</div>
|
||||
<div>Some text with an <span class="s-status-icon-diagnostic">inline element</span> showing a Diagnostic status.</div>
|
||||
</mct-example>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="l-section">
|
||||
<h2>Synchronization</h2>
|
||||
<h2>Limit Classes</h2>
|
||||
<div class="cols cols1-1">
|
||||
<div class="col">
|
||||
<p>When the system is operating in real-time streaming mode, it is important for views that display real-time data to clearly articulate when they are not, such as when a user zooms or pans a plot view, freezing that view. In that case, the CSS class <code>s-unsynced</code> should be applied to that view.</p>
|
||||
<p>Limit classes are a specialized form of status, specifically meant to be applied to telemetry
|
||||
displays to indicate that a limit threshold has been violated. Open MCT provides both severity
|
||||
and direction classes; severity (yellow and red) can be used alone or in combination
|
||||
with direction (upper or lower). Direction classes cannot be used on their own.</p>
|
||||
<p>Like Status classes, Limits can be used as color-only, or color plus icon. Custom icons can
|
||||
be applied in the same fashion as described above.</p>
|
||||
<ul>
|
||||
<li>Severity color alone</li>
|
||||
<ul>
|
||||
<li><code>s-limit-yellow</code>: A yellow limit.</li>
|
||||
<li><code>s-limit-red</code>: A red limit.</li>
|
||||
</ul>
|
||||
<li>Severity color and icon</li>
|
||||
<ul>
|
||||
<li><code>s-limit-icon-yellow</code>: A yellow limit with icon.</li>
|
||||
<li><code>s-limit-icon-red</code>: A red limit with icon.</li>
|
||||
</ul>
|
||||
<li>Direction indicators. MUST be used with a "color alone" limit class. See
|
||||
examples for more.</li>
|
||||
<ul>
|
||||
<li><code>s-limit-upr</code>: Upper limit.</li>
|
||||
<li><code>s-limit-lwr</code>: Lower limit.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<mct-example><div class="s-unsynced">This element is unsynced</div>
|
||||
<mct-example><!-- Color alone examples -->
|
||||
<div class="s-limit-yellow">Yellow limit</div>
|
||||
<div class="s-limit-red">Red limit</div>
|
||||
|
||||
<!-- Color and icon examples -->
|
||||
<div class="s-limit-icon-yellow">Yellow limit with icon</div>
|
||||
<div class="s-limit-icon-red">Red limit with icon</div>
|
||||
<div class="s-limit-red icon-alert-rect">Red Limit with a custom icon</div>
|
||||
<div>Some text with an <span class="s-limit-icon-yellow">inline element</span> showing a yellow limit.</div>
|
||||
|
||||
<!-- Severity and direction examples -->
|
||||
<div class="s-limit-yellow s-limit-lwr">Lower yellow limit</div>
|
||||
<div class="s-limit-red s-limit-upr">Upper red limit</div>
|
||||
|
||||
<!-- Limits applied in a table -->
|
||||
<table>
|
||||
<tr class='header'><td>Name</td><td>Value 1</td><td>Value 2</td></tr>
|
||||
<tr><td>ENG_PWR 4991</td><td>7.023</td><td class="s-limit-yellow s-limit-upr">70.23</td></tr>
|
||||
<tr><td>ENG_PWR 4992</td><td>49.784</td><td class="s-limit-red s-limit-lwr">-121.22</td></tr>
|
||||
<tr><td>ENG_PWR 4993</td><td class="s-limit-yellow icon-alert-triangle">0.451</td><td>1.007</td></tr>
|
||||
</table>
|
||||
</mct-example>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="l-section">
|
||||
<h2>Status Bar Indicators</h2>
|
||||
<div class="cols cols1-1">
|
||||
<div class="col">
|
||||
<p>Indicators are small iconic notification elements that appear in the Status Bar area of
|
||||
the application at the window's bottom. Indicators should be used to articulate the state of a
|
||||
system and optionally provide gestures related to that system. They use a combination of icon and
|
||||
color to identify themselves and articulate a state respectively.</p>
|
||||
<h3>Recommendations</h3>
|
||||
<ul>
|
||||
<li><strong>Keep the icon consistent</strong>. The icon is the principal identifier of the system and is a valuable
|
||||
recall aid for the user. Don't change the icon as a system's state changes, use color and
|
||||
text for that purpose.</li>
|
||||
<li><strong>Don't use the same icon more than once</strong>. Select meaningful and distinct icons so the user
|
||||
will be able to quickly identify what they're looking for.</li>
|
||||
</ul>
|
||||
|
||||
<h3>States</h3>
|
||||
<ul>
|
||||
<li><strong>Disabled</strong>: The system is not available to the user.</li>
|
||||
<li><strong>Off / Available</strong>: The system is accessible to the user but is not currently
|
||||
"On" or has not been configured. If the Indicator directly provides gestures
|
||||
related to the system, such as opening a configuration dialog box, then use
|
||||
"Available"; if the user must act elsewhere or the system isn't user-controllable,
|
||||
use "Off".</li>
|
||||
<li><strong>On</strong>: The system is enabled or configured; it is having an effect on the larger application.</li>
|
||||
<li><strong>Alert / Error</strong>: There has been a problem with the system. Generally, "Alert"
|
||||
should be used to call attention to an issue that isn't critical, while "Error"
|
||||
should be used to call attention to a problem that the user should really be aware of or do
|
||||
something about.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Structure</h3>
|
||||
<p>Indicators consist of a <code>.ls-indicator</code>
|
||||
wrapper element with <code>.icon-*</code> classes for the type of thing they represent and
|
||||
<code>.s-status-*</code> classes to articulate the current state. Title attributes should be used
|
||||
to provide more verbose information about the thing and/or its status.</p>
|
||||
<p>The wrapper encloses a <code>.label</code> element that is displayed on hover. This element should
|
||||
include a brief statement of the current status, and can also include clickable elements
|
||||
as <code><a></code> tags. An optional <code>.count</code> element can be included to display
|
||||
information such as a number of messages.</p>
|
||||
<p>Icon classes are as defined on the
|
||||
<a class="link" href="#/browse/styleguide:home/glyphs?tc.mode=local&tc.timeSystem=utc&tc.startDelta=1800000&tc.endDelta=0&view=styleguide.glyphs">
|
||||
Glyphs page</a>. Status classes applicable to Indicators are as follows:</p>
|
||||
<ul>
|
||||
<li><code>s-status-disabled</code></li>
|
||||
<li><code>s-status-off</code></li>
|
||||
<li><code>s-status-available</code></li>
|
||||
<li><code>s-status-on</code></li>
|
||||
<li><code>s-status-alert</code></li>
|
||||
<li><code>s-status-error</code></li>
|
||||
</ul>
|
||||
</div>
|
||||
<mct-example><div class="s-ue-bottom-bar status-holder s-status-bar">
|
||||
<span class="ls-indicator icon-database s-status-disabled" title="The system is currently disabled.">
|
||||
<span class="label">System not enabled.</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-ue-bottom-bar status-holder s-status-bar">
|
||||
<span class="ls-indicator icon-database s-status-available" title="Configure data connection.">
|
||||
<span class="label">Data connection available
|
||||
<a class="icon-gear">Configure</a>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-ue-bottom-bar status-holder s-status-bar">
|
||||
<span class="ls-indicator icon-database s-status-on" title="Data connected.">
|
||||
<span class="label">Connected to Skynet
|
||||
<a class="icon-gear">Change</a>
|
||||
<a>Disconnect</a>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-ue-bottom-bar status-holder s-status-bar">
|
||||
<span class="ls-indicator icon-database s-status-alert" title="System is self-aware.">
|
||||
<span class="label">Skynet at Turing Level 5</span>
|
||||
</span>
|
||||
<span class="ls-indicator icon-bell s-status-error" title="You have alerts.">
|
||||
<span class="label">
|
||||
<a class="icon-alert-triangle">View Alerts</a>
|
||||
</span>
|
||||
<span class="count">495</span>
|
||||
</span>
|
||||
</div>
|
||||
</mct-example>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,7 +54,7 @@ define(
|
||||
return "icon-object-unknown";
|
||||
},
|
||||
getText: function () {
|
||||
return latest;
|
||||
return "" + latest;
|
||||
},
|
||||
getDescription: function () {
|
||||
return "";
|
||||
|
@ -31,7 +31,6 @@ var gulp = require('gulp'),
|
||||
git = require('git-rev-sync'),
|
||||
moment = require('moment'),
|
||||
project = require('./package.json'),
|
||||
_ = require('lodash'),
|
||||
paths = {
|
||||
main: 'openmct.js',
|
||||
dist: 'dist',
|
||||
@ -140,7 +139,7 @@ gulp.task('checkstyle', function () {
|
||||
var mkdirp = require('mkdirp');
|
||||
var reportName = 'jscs-html-report.html';
|
||||
var reportPath = path.resolve(paths.reports, 'checkstyle', reportName);
|
||||
var moveReport = fs.rename.bind(fs, reportName, reportPath, _.noop);
|
||||
var moveReport = fs.rename.bind(fs, reportName, reportPath, function () {});
|
||||
|
||||
mkdirp.sync(path.resolve(paths.reports, 'checkstyle'));
|
||||
|
||||
@ -179,4 +178,4 @@ gulp.task('install', [ 'assets', 'scripts' ]);
|
||||
|
||||
gulp.task('verify', [ 'lint', 'test', 'checkstyle' ]);
|
||||
|
||||
gulp.task('build', [ 'verify', 'install' ]);
|
||||
gulp.task('build', [ 'verify', 'install' ]);
|
||||
|
127
index.html
@ -21,68 +21,71 @@
|
||||
-->
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title></title>
|
||||
<script src="bower_components/requirejs/require.js"> </script>
|
||||
<script>
|
||||
var THIRTY_MINUTES = 30 * 60 * 1000;
|
||||
<head>
|
||||
<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="apple-mobile-web-app-capable" content="yes">
|
||||
<title></title>
|
||||
<script src="bower_components/requirejs/require.js"> </script>
|
||||
<script>
|
||||
var THIRTY_MINUTES = 30 * 60 * 1000;
|
||||
|
||||
require(['openmct'], function (openmct) {
|
||||
[
|
||||
'example/eventGenerator',
|
||||
'example/styleguide'
|
||||
].forEach(
|
||||
openmct.legacyRegistry.enable.bind(openmct.legacyRegistry)
|
||||
);
|
||||
openmct.install(openmct.plugins.MyItems());
|
||||
openmct.install(openmct.plugins.LocalStorage());
|
||||
openmct.install(openmct.plugins.Espresso());
|
||||
openmct.install(openmct.plugins.Generator());
|
||||
openmct.install(openmct.plugins.ExampleImagery());
|
||||
openmct.install(openmct.plugins.UTCTimeSystem());
|
||||
openmct.install(openmct.plugins.ImportExport());
|
||||
openmct.install(openmct.plugins.AutoflowView({
|
||||
type: "telemetry.panel"
|
||||
}));
|
||||
openmct.install(openmct.plugins.Conductor({
|
||||
menuOptions: [
|
||||
{
|
||||
name: "Fixed",
|
||||
timeSystem: 'utc',
|
||||
bounds: {
|
||||
start: Date.now() - THIRTY_MINUTES,
|
||||
end: Date.now()
|
||||
require(['openmct'], function (openmct) {
|
||||
[
|
||||
'example/eventGenerator',
|
||||
'example/styleguide'
|
||||
].forEach(
|
||||
openmct.legacyRegistry.enable.bind(openmct.legacyRegistry)
|
||||
);
|
||||
openmct.install(openmct.plugins.MyItems());
|
||||
openmct.install(openmct.plugins.LocalStorage());
|
||||
openmct.install(openmct.plugins.Espresso());
|
||||
openmct.install(openmct.plugins.Generator());
|
||||
openmct.install(openmct.plugins.ExampleImagery());
|
||||
openmct.install(openmct.plugins.UTCTimeSystem());
|
||||
openmct.install(openmct.plugins.ImportExport());
|
||||
openmct.install(openmct.plugins.AutoflowView({
|
||||
type: "telemetry.panel"
|
||||
}));
|
||||
openmct.install(openmct.plugins.Conductor({
|
||||
menuOptions: [
|
||||
{
|
||||
name: "Fixed",
|
||||
timeSystem: 'utc',
|
||||
bounds: {
|
||||
start: Date.now() - THIRTY_MINUTES,
|
||||
end: Date.now()
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "Realtime",
|
||||
timeSystem: 'utc',
|
||||
clock: 'local',
|
||||
clockOffsets: {
|
||||
start: -25 * 60 * 1000,
|
||||
end: 5 * 60 * 1000
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "Realtime",
|
||||
timeSystem: 'utc',
|
||||
clock: 'local',
|
||||
clockOffsets: {
|
||||
start: -25 * 60 * 1000,
|
||||
end: 5 * 60 * 1000
|
||||
}
|
||||
}
|
||||
]
|
||||
}));
|
||||
openmct.install(openmct.plugins.SummaryWidget());
|
||||
openmct.time.clock('local', {start: -THIRTY_MINUTES, end: 0});
|
||||
openmct.time.timeSystem('utc');
|
||||
openmct.start();
|
||||
});
|
||||
</script>
|
||||
<link rel="stylesheet" href="platform/commonUI/general/res/css/startup-base.css">
|
||||
<link rel="stylesheet" href="platform/commonUI/general/res/css/openmct.css">
|
||||
<link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<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="shortcut icon" href="platform/commonUI/general/res/images/favicons/favicon.ico">
|
||||
</head>
|
||||
<body class="user-environ">
|
||||
<div class="l-splash-holder s-splash-holder">
|
||||
<div class="l-splash s-splash"></div>
|
||||
</div>
|
||||
</body>
|
||||
]
|
||||
}));
|
||||
openmct.install(openmct.plugins.SummaryWidget());
|
||||
openmct.install(openmct.plugins.Notebook());
|
||||
openmct.time.clock('local', {start: -THIRTY_MINUTES, end: 0});
|
||||
openmct.time.timeSystem('utc');
|
||||
openmct.start();
|
||||
window.openmct = openmct;
|
||||
});
|
||||
</script>
|
||||
<link rel="stylesheet" href="platform/commonUI/general/res/css/startup-base.css">
|
||||
<link rel="stylesheet" href="platform/commonUI/general/res/css/openmct.css">
|
||||
<link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<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="shortcut icon" href="platform/commonUI/general/res/images/favicons/favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<div class="l-splash-holder s-splash-holder">
|
||||
<div class="l-splash s-splash"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -37,14 +37,16 @@ module.exports = function(config) {
|
||||
{pattern: 'bower_components/**/*.js', included: false},
|
||||
{pattern: 'node_modules/d3-*/**/*.js', included: false},
|
||||
{pattern: 'node_modules/vue/**/*.js', included: false},
|
||||
{pattern: 'src/**/*.js', included: false},
|
||||
{pattern: 'node_modules/printj/dist/*.js', 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/**/*.js', included: false},
|
||||
{pattern: 'example/**/*.json', included: false},
|
||||
{pattern: 'platform/**/*.js', included: false},
|
||||
{pattern: 'warp/**/*.js', included: false},
|
||||
{pattern: 'platform/**/*.html', included: false},
|
||||
{pattern: 'src/**/*.html', included: false},
|
||||
'test-main.js'
|
||||
],
|
||||
|
||||
@ -63,7 +65,7 @@ module.exports = function(config) {
|
||||
// Test results reporter to use
|
||||
// Possible values: 'dots', 'progress'
|
||||
// Available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||
reporters: ['progress', 'coverage', 'html', 'junit'],
|
||||
reporters: ['progress', 'coverage', 'html'],
|
||||
|
||||
// Web server port.
|
||||
port: 9876,
|
||||
@ -79,7 +81,7 @@ module.exports = function(config) {
|
||||
// Specify browsers to run tests in.
|
||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||
browsers: [
|
||||
'Chrome'
|
||||
'ChromeHeadless'
|
||||
],
|
||||
|
||||
// Code coverage reporting.
|
||||
@ -89,7 +91,8 @@ module.exports = function(config) {
|
||||
"dist/reports/coverage",
|
||||
check: {
|
||||
global: {
|
||||
lines: 80
|
||||
lines: 80,
|
||||
excludes: ['src/plugins/plot/**/*.js']
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -101,10 +104,6 @@ module.exports = function(config) {
|
||||
foldAll: false
|
||||
},
|
||||
|
||||
junitReporter: {
|
||||
outputDir: process.env.CIRCLE_TEST_REPORTS || 'dist/reports/junit'
|
||||
},
|
||||
|
||||
// Continuous Integration mode.
|
||||
// If true, Karma captures browsers, runs the tests and exits.
|
||||
singleRun: true
|
||||
|
24
openmct.js
@ -29,7 +29,6 @@ requirejs.config({
|
||||
"csv": "bower_components/comma-separated-values/csv.min",
|
||||
"EventEmitter": "bower_components/eventemitter3/index",
|
||||
"es6-promise": "bower_components/es6-promise/es6-promise.min",
|
||||
"html2canvas": "bower_components/html2canvas/build/html2canvas.min",
|
||||
"moment": "bower_components/moment/moment",
|
||||
"moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format",
|
||||
"moment-timezone": "bower_components/moment-timezone/builds/moment-timezone-with-data",
|
||||
@ -42,14 +41,17 @@ requirejs.config({
|
||||
"lodash": "bower_components/lodash/lodash",
|
||||
"d3-selection": "node_modules/d3-selection/dist/d3-selection.min",
|
||||
"d3-scale": "node_modules/d3-scale/build/d3-scale.min",
|
||||
"d3-axis": "node_modules/d3-axis/build/d3-axis.min",
|
||||
"d3-array": "node_modules/d3-array/build/d3-array.min",
|
||||
"d3-collection": "node_modules/d3-collection/build/d3-collection.min",
|
||||
"d3-axis": "node_modules/d3-axis/dist/d3-axis.min",
|
||||
"d3-array": "node_modules/d3-array/dist/d3-array.min",
|
||||
"d3-collection": "node_modules/d3-collection/dist/d3-collection.min",
|
||||
"d3-color": "node_modules/d3-color/build/d3-color.min",
|
||||
"d3-format": "node_modules/d3-format/build/d3-format.min",
|
||||
"d3-interpolate": "node_modules/d3-interpolate/build/d3-interpolate.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": "node_modules/d3-time/dist/d3-time.min",
|
||||
"d3-time-format": "node_modules/d3-time-format/dist/d3-time-format.min",
|
||||
"html2canvas": "node_modules/html2canvas/dist/html2canvas.min",
|
||||
"painterro": "node_modules/painterro/build/painterro.min",
|
||||
"printj": "node_modules/printj/dist/printj.min"
|
||||
},
|
||||
"shim": {
|
||||
"angular": {
|
||||
@ -61,12 +63,12 @@ requirejs.config({
|
||||
"EventEmitter": {
|
||||
"exports": "EventEmitter"
|
||||
},
|
||||
"html2canvas": {
|
||||
"exports": "html2canvas"
|
||||
},
|
||||
"moment-duration-format": {
|
||||
"deps": ["moment"]
|
||||
},
|
||||
"painterro": {
|
||||
"exports": "Painterro"
|
||||
},
|
||||
"saveAs": {
|
||||
"exports": "saveAs"
|
||||
},
|
||||
@ -88,6 +90,9 @@ requirejs.config({
|
||||
},
|
||||
"d3-axis": {
|
||||
"exports": "d3-axis"
|
||||
},
|
||||
"dom-to-image": {
|
||||
"exports": "domtoimage"
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -101,6 +106,7 @@ define([
|
||||
var openmct = new MCT();
|
||||
|
||||
openmct.legacyRegistry = defaultRegistry;
|
||||
openmct.install(openmct.plugins.Plot());
|
||||
|
||||
if (typeof BUILD_CONSTANTS !== 'undefined') {
|
||||
openmct.install(buildInfo(BUILD_CONSTANTS));
|
||||
|
47
package.json
@ -1,20 +1,21 @@
|
||||
{
|
||||
"name": "openmct",
|
||||
"version": "0.12.1-SNAPSHOT",
|
||||
"description": "The Open MCT core platform",
|
||||
"version": "0.14.0-SNAPSHOT",
|
||||
"description": "The Open MCT core platform.",
|
||||
"dependencies": {
|
||||
"d3-array": "^1.0.2",
|
||||
"d3-axis": "^1.0.4",
|
||||
"d3-collection": "^1.0.2",
|
||||
"d3-color": "^1.0.2",
|
||||
"d3-format": "^1.0.2",
|
||||
"d3-interpolate": "^1.1.3",
|
||||
"d3-scale": "^1.0.4",
|
||||
"d3-selection": "^1.0.3",
|
||||
"d3-time": "^1.0.4",
|
||||
"d3-time-format": "^2.0.3",
|
||||
"d3-array": "1.2.x",
|
||||
"d3-axis": "1.0.x",
|
||||
"d3-collection": "1.0.x",
|
||||
"d3-color": "1.0.x",
|
||||
"d3-format": "1.2.x",
|
||||
"d3-interpolate": "1.1.x",
|
||||
"d3-scale": "1.0.x",
|
||||
"d3-selection": "1.3.x",
|
||||
"d3-time": "1.0.x",
|
||||
"d3-time-format": "2.1.x",
|
||||
"express": "^4.13.1",
|
||||
"minimist": "^1.1.1",
|
||||
"painterro": "0.2.65",
|
||||
"request": "^2.69.0",
|
||||
"vue": "^2.5.6"
|
||||
},
|
||||
@ -28,27 +29,27 @@
|
||||
"gulp-jshint-html-reporter": "^0.1.3",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-requirejs-optimize": "^0.3.1",
|
||||
"gulp-sass": "^2.2.0",
|
||||
"gulp-sass": "^3.1.0",
|
||||
"gulp-sourcemaps": "^1.6.0",
|
||||
"jasmine-core": "^2.3.0",
|
||||
"html2canvas": "^1.0.0-alpha.12",
|
||||
"jasmine-core": "^3.1.0",
|
||||
"jscs-html-reporter": "^0.1.0",
|
||||
"jsdoc": "^3.3.2",
|
||||
"jshint": "^2.7.0",
|
||||
"karma": "^0.13.3",
|
||||
"karma-chrome-launcher": "^0.1.12",
|
||||
"karma-cli": "0.0.4",
|
||||
"karma-coverage": "^0.5.3",
|
||||
"karma": "^2.0.3",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-cli": "^1.0.1",
|
||||
"karma-coverage": "^1.1.2",
|
||||
"karma-html-reporter": "^0.2.7",
|
||||
"karma-jasmine": "^0.1.5",
|
||||
"karma-junit-reporter": "^0.3.8",
|
||||
"karma-requirejs": "^0.2.2",
|
||||
"lodash": "^3.10.1",
|
||||
"karma-jasmine": "^1.1.2",
|
||||
"karma-requirejs": "^1.1.0",
|
||||
"markdown-toc": "^0.11.7",
|
||||
"marked": "^0.3.5",
|
||||
"merge-stream": "^1.0.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"moment": "^2.11.1",
|
||||
"node-bourbon": "^4.2.3",
|
||||
"printj": "^1.1.0",
|
||||
"requirejs": "2.1.x",
|
||||
"split": "^1.0.0",
|
||||
"v8-compile-cache": "^1.1.0"
|
||||
@ -57,6 +58,8 @@
|
||||
"start": "node app.js",
|
||||
"test": "karma start --single-run",
|
||||
"jshint": "jshint platform example",
|
||||
"lint": "./node_modules/gulp/bin/gulp.js lint",
|
||||
"checkstyle": "./node_modules/gulp/bin/gulp.js checkstyle",
|
||||
"watch": "karma start",
|
||||
"jsdoc": "jsdoc -c jsdoc.json -R API.md -r -d dist/docs/api",
|
||||
"otherdoc": "node docs/gendocs.js --in docs/src --out dist/docs --suppress-toc 'docs/src/index.md|docs/src/process/index.md'",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<div class="s-text l-content">
|
||||
<h1 class="l-title s-title">Open MCT</h1>
|
||||
<div class="l-description s-description">
|
||||
<p>Open MCT, Copyright © 2014-2017, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.</p>
|
||||
<p>Open MCT, Copyright © 2014-2018, 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>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>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -113,7 +113,8 @@ define([
|
||||
"agentService",
|
||||
"$window",
|
||||
"$location",
|
||||
"$attrs"
|
||||
"$attrs",
|
||||
"navigationService"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
<div class='split-pane-component t-object pane primary-pane left'>
|
||||
<mct-representation mct-object="navigatedObject"
|
||||
key="navigatedObject.getCapability('status').get('editing') ? 'edit-object' : 'browse-object'"
|
||||
class="abs holder holder-object">
|
||||
class="abs holder holder-object t-main-view">
|
||||
</mct-representation>
|
||||
<a class="mini-tab-icon anchor-right mobile-hide toggle-pane toggle-inspect flush-right"
|
||||
title="{{ modelPaneInspect.visible()? 'Hide' : 'Show' }} the Inspection pane"
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
@ -19,39 +19,46 @@
|
||||
this source code distribution or the Licensing information page available
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
<div ng-controller="ObjectInspectorController as controller">
|
||||
<ul class="flex-elem grows l-inspector-part">
|
||||
<li>
|
||||
<em class="t-inspector-part-header">Properties</em>
|
||||
<div class="inspector-properties"
|
||||
ng-repeat="data in metadata"
|
||||
ng-class="{ first:$index === 0 }">
|
||||
<div class="label">{{ data.name }}</div>
|
||||
<div class="value">{{ data.value }}</div>
|
||||
<div ng-controller="ObjectInspectorController as controller" class="grid-properties">
|
||||
<ul class="l-inspector-part">
|
||||
<h2 class="first">Properties</h2>
|
||||
<li class="t-repeat grid-row"
|
||||
ng-repeat="data in metadata"
|
||||
ng-class="{ first:$index === 0 }">
|
||||
<div class="grid-cell label">{{ data.name }}</div>
|
||||
<div class="grid-cell value">{{ data.value }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="l-inspector-part" ng-if="contextutalParents.length > 0">
|
||||
<h2 title="The location of this linked object.">Location</h2>
|
||||
<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-class="{ last:($index + 1) === contextualParents.length }">
|
||||
<mct-representation key="'label'"
|
||||
mct-object="parent"
|
||||
ng-click="parent.getCapability('action').perform('navigate')"
|
||||
class="location-item">
|
||||
</mct-representation>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li ng-if="contextutalParents.length > 0">
|
||||
<em class="t-inspector-part-header" title="The location of this linked object.">Location</em>
|
||||
<div ng-if="primaryParents.length > 0" class="section-header">This Object</div>
|
||||
<span class="inspector-location"
|
||||
ng-repeat="parent in contextutalParents"
|
||||
ng-class="{ last:($index + 1) === contextualParents.length }">
|
||||
<mct-representation key="'label'"
|
||||
mct-object="parent"
|
||||
class="location-item">
|
||||
</mct-representation>
|
||||
</span>
|
||||
</li>
|
||||
<li ng-if="primaryParents.length > 0">
|
||||
<div class="section-header">Object's Original</div>
|
||||
<span class="inspector-location"
|
||||
ng-repeat="parent in primaryParents"
|
||||
ng-class="{ last:($index + 1) === primaryParents.length }">
|
||||
<mct-representation key="'label'"
|
||||
mct-object="parent"
|
||||
class="location-item">
|
||||
</mct-representation>
|
||||
</span>
|
||||
<li class="grid-row" ng-if="primaryParents.length > 0">
|
||||
<div class="grid-cell label">Original</div>
|
||||
<div class="grid-cell value">
|
||||
<div class="t-repeat inspector-location value"
|
||||
ng-repeat="parent in primaryParents"
|
||||
ng-class="{ last:($index + 1) === primaryParents.length }">
|
||||
<mct-representation key="'label'"
|
||||
mct-object="parent"
|
||||
ng-click="parent.getCapability('action').perform('navigate')"
|
||||
class="location-item">
|
||||
</mct-representation>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -47,8 +47,8 @@ define(
|
||||
urlService,
|
||||
defaultPath
|
||||
) {
|
||||
var initialPath = ($route.current.params.ids || defaultPath).split("/");
|
||||
var currentIds;
|
||||
var initialPath = ($route.current.params.ids || defaultPath).split("/"),
|
||||
currentIds;
|
||||
|
||||
$scope.treeModel = {
|
||||
selectedObject: undefined,
|
||||
@ -56,7 +56,24 @@ define(
|
||||
navigationService.setNavigation(object, true);
|
||||
},
|
||||
allowSelection: function (object) {
|
||||
return navigationService.shouldNavigate();
|
||||
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();
|
||||
}
|
||||
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -24,14 +24,14 @@
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
|
||||
var navigationListenerAdded = false;
|
||||
/**
|
||||
* Controller to provide the ability to show/hide the tree in
|
||||
* Browse mode.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/browse
|
||||
*/
|
||||
function PaneController($scope, agentService, $window, $location, $attrs) {
|
||||
function PaneController($scope, agentService, $window, $location, $attrs, navigationService) {
|
||||
var self = this;
|
||||
this.agentService = agentService;
|
||||
var hideParameterPresent = $location.search().hasOwnProperty($attrs.hideParameter);
|
||||
@ -61,6 +61,11 @@ define(
|
||||
self.state = false;
|
||||
}
|
||||
};
|
||||
|
||||
if (navigationService && navigationService.addListener && !navigationListenerAdded) {
|
||||
navigationService.addListener(this.callback);
|
||||
navigationListenerAdded = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -162,7 +162,6 @@ define(
|
||||
*/
|
||||
NavigationService.prototype.shouldWarnBeforeNavigate = function () {
|
||||
var reasons = [];
|
||||
|
||||
this.checks.forEach(function (checkFn) {
|
||||
var reason = checkFn();
|
||||
if (reason) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,6 +19,7 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global console*/
|
||||
|
||||
/**
|
||||
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
|
||||
@ -48,9 +49,19 @@ define(
|
||||
controller;
|
||||
|
||||
function waitsForNavigation() {
|
||||
var calls = mockNavigationService.setNavigation.calls.length;
|
||||
waitsFor(function () {
|
||||
return mockNavigationService.setNavigation.calls.length > calls;
|
||||
return new Promise(function (resolve) {
|
||||
mockNavigationService.setNavigation.and.callFake(function (obj) {
|
||||
var returnValue;
|
||||
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;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -78,7 +89,7 @@ define(
|
||||
"urlService",
|
||||
["urlForLocation"]
|
||||
);
|
||||
mockUrlService.urlForLocation.andCallFake(function (mode, object) {
|
||||
mockUrlService.urlForLocation.and.callFake(function (mode, object) {
|
||||
if (object === mockDefaultRootObject) {
|
||||
return [mode, testDefaultRoot].join('/');
|
||||
}
|
||||
@ -106,7 +117,7 @@ define(
|
||||
"removeListener"
|
||||
].forEach(function (method) {
|
||||
spyOn(mockNavigationService, method)
|
||||
.andCallThrough();
|
||||
.and.callThrough();
|
||||
});
|
||||
mockRootObject = jasmine.createSpyObj(
|
||||
"rootObjectContainer",
|
||||
@ -124,60 +135,58 @@ define(
|
||||
"nestedDomainObject",
|
||||
["getId", "getCapability", "getModel", "useCapability", "hasCapability"]
|
||||
);
|
||||
mockObjectService.getObjects.andReturn(Promise.resolve({
|
||||
mockObjectService.getObjects.and.returnValue(Promise.resolve({
|
||||
ROOT: mockRootObject
|
||||
}));
|
||||
mockRootObject.useCapability.andReturn(Promise.resolve([
|
||||
mockRootObject.useCapability.and.returnValue(Promise.resolve([
|
||||
mockOtherDomainObject,
|
||||
mockDefaultRootObject
|
||||
]));
|
||||
mockRootObject.hasCapability.andReturn(true);
|
||||
mockDefaultRootObject.useCapability.andReturn(Promise.resolve([
|
||||
mockRootObject.hasCapability.and.returnValue(true);
|
||||
mockDefaultRootObject.useCapability.and.returnValue(Promise.resolve([
|
||||
mockNextObject
|
||||
]));
|
||||
mockDefaultRootObject.hasCapability.andReturn(true);
|
||||
mockOtherDomainObject.hasCapability.andReturn(false);
|
||||
mockNextObject.useCapability.andReturn(undefined);
|
||||
mockNextObject.hasCapability.andReturn(false);
|
||||
mockNextObject.getId.andReturn("next");
|
||||
mockDefaultRootObject.getId.andReturn(testDefaultRoot);
|
||||
mockDefaultRootObject.hasCapability.and.returnValue(true);
|
||||
mockOtherDomainObject.hasCapability.and.returnValue(false);
|
||||
mockNextObject.useCapability.and.returnValue(undefined);
|
||||
mockNextObject.hasCapability.and.returnValue(false);
|
||||
mockNextObject.getId.and.returnValue("next");
|
||||
mockDefaultRootObject.getId.and.returnValue(testDefaultRoot);
|
||||
|
||||
instantiateController();
|
||||
waitsForNavigation();
|
||||
return waitsForNavigation();
|
||||
});
|
||||
|
||||
it("uses composition to set the navigated object, if there is none", function () {
|
||||
instantiateController();
|
||||
waitsForNavigation();
|
||||
runs(function () {
|
||||
return waitsForNavigation().then(function () {
|
||||
expect(mockNavigationService.setNavigation)
|
||||
.toHaveBeenCalledWith(mockDefaultRootObject);
|
||||
.toHaveBeenCalledWith(mockDefaultRootObject);
|
||||
});
|
||||
});
|
||||
|
||||
it("navigates to a root-level object, even when default path is not found", function () {
|
||||
mockDefaultRootObject.getId
|
||||
.andReturn("something-other-than-the-" + testDefaultRoot);
|
||||
.and.returnValue("something-other-than-the-" + testDefaultRoot);
|
||||
instantiateController();
|
||||
|
||||
waitsForNavigation();
|
||||
runs(function () {
|
||||
return waitsForNavigation().then(function () {
|
||||
expect(mockNavigationService.setNavigation)
|
||||
.toHaveBeenCalledWith(mockDefaultRootObject);
|
||||
.toHaveBeenCalledWith(mockDefaultRootObject);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
//
|
||||
it("does not try to override navigation", function () {
|
||||
mockNavigationService.getNavigation.andReturn(mockDefaultRootObject);
|
||||
mockNavigationService.getNavigation.and.returnValue(mockDefaultRootObject);
|
||||
instantiateController();
|
||||
waitsForNavigation();
|
||||
expect(mockScope.navigatedObject).toBe(mockDefaultRootObject);
|
||||
return waitsForNavigation().then(function () {
|
||||
expect(mockScope.navigatedObject).toBe(mockDefaultRootObject);
|
||||
});
|
||||
});
|
||||
//
|
||||
|
||||
it("updates scope when navigated object changes", function () {
|
||||
// Should have registered a listener - call it
|
||||
mockNavigationService.addListener.mostRecentCall.args[0](
|
||||
mockNavigationService.addListener.calls.mostRecent().args[0](
|
||||
mockOtherDomainObject
|
||||
);
|
||||
expect(mockScope.navigatedObject).toEqual(mockOtherDomainObject);
|
||||
@ -189,19 +198,18 @@ define(
|
||||
"$destroy",
|
||||
jasmine.any(Function)
|
||||
);
|
||||
mockScope.$on.mostRecentCall.args[1]();
|
||||
mockScope.$on.calls.mostRecent().args[1]();
|
||||
|
||||
// Should remove the listener it added earlier
|
||||
expect(mockNavigationService.removeListener).toHaveBeenCalledWith(
|
||||
mockNavigationService.addListener.mostRecentCall.args[0]
|
||||
mockNavigationService.addListener.calls.mostRecent().args[0]
|
||||
);
|
||||
});
|
||||
|
||||
it("uses route parameters to choose initially-navigated object", function () {
|
||||
mockRoute.current.params.ids = testDefaultRoot + "/next";
|
||||
instantiateController();
|
||||
waitsForNavigation();
|
||||
runs(function () {
|
||||
return waitsForNavigation().then(function () {
|
||||
expect(mockScope.navigatedObject).toBe(mockNextObject);
|
||||
expect(mockNavigationService.setNavigation)
|
||||
.toHaveBeenCalledWith(mockNextObject);
|
||||
@ -214,12 +222,10 @@ define(
|
||||
// it hits an invalid ID.
|
||||
mockRoute.current.params.ids = testDefaultRoot + "/junk";
|
||||
instantiateController();
|
||||
waitsForNavigation();
|
||||
runs(function () {
|
||||
return waitsForNavigation().then(function () {
|
||||
expect(mockScope.navigatedObject).toBe(mockDefaultRootObject);
|
||||
expect(mockNavigationService.setNavigation)
|
||||
.toHaveBeenCalledWith(mockDefaultRootObject);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -229,8 +235,7 @@ define(
|
||||
// should stop at it since remaining IDs cannot be loaded.
|
||||
mockRoute.current.params.ids = testDefaultRoot + "/next/junk";
|
||||
instantiateController();
|
||||
waitsForNavigation();
|
||||
runs(function () {
|
||||
return waitsForNavigation().then(function () {
|
||||
expect(mockScope.navigatedObject).toBe(mockNextObject);
|
||||
expect(mockNavigationService.setNavigation)
|
||||
.toHaveBeenCalledWith(mockNextObject);
|
||||
@ -244,11 +249,11 @@ define(
|
||||
expect(mockRoute.current.pathParams.ids)
|
||||
.not
|
||||
.toBe(testDefaultRoot + '/next');
|
||||
mockLocation.path.andCallFake(function () {
|
||||
mockLocation.path.and.callFake(function () {
|
||||
expect(mockRoute.current.pathParams.ids)
|
||||
.toBe(testDefaultRoot + '/next');
|
||||
});
|
||||
mockNavigationService.addListener.mostRecentCall.args[0](
|
||||
mockNavigationService.addListener.calls.mostRecent().args[0](
|
||||
mockNextObject
|
||||
);
|
||||
expect(mockLocation.path).toHaveBeenCalledWith(
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
define(
|
||||
["../src/BrowseObjectController"],
|
||||
function (BrowseObjectController) {
|
||||
@ -33,7 +32,7 @@ define(
|
||||
|
||||
// Utility function; look for a $watch on scope and fire it
|
||||
function fireWatch(expr, value) {
|
||||
mockScope.$watch.calls.forEach(function (call) {
|
||||
mockScope.$watch.calls.all().forEach(function (call) {
|
||||
if (call.args[0] === expr) {
|
||||
call.args[1](value);
|
||||
}
|
||||
@ -50,7 +49,7 @@ define(
|
||||
"$location",
|
||||
["path", "search"]
|
||||
);
|
||||
mockLocation.search.andReturn({});
|
||||
mockLocation.search.and.returnValue({});
|
||||
|
||||
controller = new BrowseObjectController(
|
||||
mockScope,
|
||||
@ -65,7 +64,7 @@ define(
|
||||
|
||||
// Allows the path index to be checked
|
||||
// prior to setting $route.current
|
||||
mockLocation.path.andReturn("/browse/");
|
||||
mockLocation.path.and.returnValue("/browse/");
|
||||
});
|
||||
|
||||
it("sets the active view from query parameters", function () {
|
||||
@ -79,10 +78,10 @@ define(
|
||||
{ key: 'xyz' }
|
||||
];
|
||||
|
||||
mockDomainObject.useCapability.andCallFake(function (c) {
|
||||
mockDomainObject.useCapability.and.callFake(function (c) {
|
||||
return (c === 'view') && testViews;
|
||||
});
|
||||
mockLocation.search.andReturn({ view: 'def' });
|
||||
mockLocation.search.and.returnValue({ view: 'def' });
|
||||
|
||||
fireWatch('domainObject', mockDomainObject);
|
||||
expect(mockScope.representation.selected)
|
||||
|
@ -50,14 +50,14 @@ define(
|
||||
"navigationService",
|
||||
["getNavigation", "addListener"]
|
||||
);
|
||||
mockNavigationService.addListener.andReturn(mockNavigationUnlistener);
|
||||
mockNavigationService.addListener.and.returnValue(mockNavigationUnlistener);
|
||||
|
||||
mockStatusUnlistener = jasmine.createSpy("statusUnlistener");
|
||||
mockStatusCapability = jasmine.createSpyObj(
|
||||
"statusCapability",
|
||||
["listen"]
|
||||
);
|
||||
mockStatusCapability.listen.andReturn(mockStatusUnlistener);
|
||||
mockStatusCapability.listen.and.returnValue(mockStatusUnlistener);
|
||||
|
||||
mockDomainObject = jasmine.createSpyObj(
|
||||
'domainObject',
|
||||
@ -68,13 +68,13 @@ define(
|
||||
'hasCapability'
|
||||
]
|
||||
);
|
||||
mockDomainObject.getId.andReturn("domainObject");
|
||||
mockDomainObject.getModel.andReturn({});
|
||||
mockDomainObject.hasCapability.andReturn(true);
|
||||
mockDomainObject.getCapability.andReturn(mockStatusCapability);
|
||||
mockDomainObject.getId.and.returnValue("domainObject");
|
||||
mockDomainObject.getModel.and.returnValue({});
|
||||
mockDomainObject.hasCapability.and.returnValue(true);
|
||||
mockDomainObject.getCapability.and.returnValue(mockStatusCapability);
|
||||
|
||||
mockLocation = jasmine.createSpyObj('location', ['search']);
|
||||
mockLocation.search.andReturn({});
|
||||
mockLocation.search.and.returnValue({});
|
||||
|
||||
mockAttrs = {};
|
||||
|
||||
@ -84,7 +84,7 @@ define(
|
||||
it("listens for changes to navigation and attaches a status" +
|
||||
" listener", function () {
|
||||
expect(mockNavigationService.addListener).toHaveBeenCalledWith(jasmine.any(Function));
|
||||
mockNavigationService.addListener.mostRecentCall.args[0](mockDomainObject);
|
||||
mockNavigationService.addListener.calls.mostRecent().args[0](mockDomainObject);
|
||||
expect(mockStatusCapability.listen).toHaveBeenCalledWith(jasmine.any(Function));
|
||||
});
|
||||
|
||||
@ -93,8 +93,8 @@ define(
|
||||
controller.toggle();
|
||||
// test pre-condition that inspector is hidden
|
||||
expect(controller.visible()).toBe(false);
|
||||
mockNavigationService.addListener.mostRecentCall.args[0](mockDomainObject);
|
||||
mockStatusCapability.listen.mostRecentCall.args[0](["editing"]);
|
||||
mockNavigationService.addListener.calls.mostRecent().args[0](mockDomainObject);
|
||||
mockStatusCapability.listen.calls.mostRecent().args[0](["editing"]);
|
||||
expect(controller.visible()).toBe(true);
|
||||
});
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -60,8 +60,8 @@ define(
|
||||
mockActionContext.domainObject = mockDomainObject;
|
||||
mockActionContext.event = mockEvent;
|
||||
mockScope.domainObject = mockDomainObject;
|
||||
mockDomainObject.getCapability.andReturn(mockContextMenuAction);
|
||||
mockContextMenuAction.perform.andReturn(jasmine.any(Function));
|
||||
mockDomainObject.getCapability.and.returnValue(mockContextMenuAction);
|
||||
mockContextMenuAction.perform.and.returnValue(jasmine.any(Function));
|
||||
|
||||
controller = new MenuArrowController(mockScope);
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -39,7 +39,7 @@ define(
|
||||
mockMutationCapability = jasmine.createSpyObj("mutation", ["mutate"]);
|
||||
mockTypeCapability = jasmine.createSpyObj("type", ["typeDef", "hasFeature"]);
|
||||
mockTypeCapability.typeDef = { name: ""};
|
||||
mockTypeCapability.hasFeature.andCallFake(function (feature) {
|
||||
mockTypeCapability.hasFeature.and.callFake(function (feature) {
|
||||
return feature === 'creation';
|
||||
});
|
||||
|
||||
@ -52,8 +52,8 @@ define(
|
||||
name: "Test name"
|
||||
};
|
||||
mockDomainObject = jasmine.createSpyObj("domainObject", ["getCapability", "getModel"]);
|
||||
mockDomainObject.getModel.andReturn(model);
|
||||
mockDomainObject.getCapability.andCallFake(function (key) {
|
||||
mockDomainObject.getModel.and.returnValue(model);
|
||||
mockDomainObject.getCapability.and.callFake(function (key) {
|
||||
return mockCapabilities[key];
|
||||
});
|
||||
|
||||
@ -62,7 +62,7 @@ define(
|
||||
};
|
||||
|
||||
mockCurrentTarget = jasmine.createSpyObj("currentTarget", ["blur", "textContent"]);
|
||||
mockCurrentTarget.blur.andReturn(mockCurrentTarget);
|
||||
mockCurrentTarget.blur.and.returnValue(mockCurrentTarget);
|
||||
|
||||
mockEvent = {
|
||||
which: {},
|
||||
@ -109,7 +109,7 @@ define(
|
||||
|
||||
expect(mockMutationCapability.mutate).toHaveBeenCalledWith(jasmine.any(Function));
|
||||
|
||||
mockMutationCapability.mutate.mostRecentCall.args[0](model);
|
||||
mockMutationCapability.mutate.calls.mostRecent().args[0](model);
|
||||
|
||||
expect(mockDomainObject.getModel().name).toBe("New name");
|
||||
});
|
||||
@ -127,7 +127,7 @@ define(
|
||||
});
|
||||
|
||||
it("disallows editting name when object is non-creatable", function () {
|
||||
mockTypeCapability.hasFeature.andReturn(false);
|
||||
mockTypeCapability.hasFeature.and.returnValue(false);
|
||||
|
||||
expect(controller.allowEdit()).toBe(false);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -53,8 +53,8 @@ define(
|
||||
['getId', 'getModel', 'getCapability']
|
||||
);
|
||||
|
||||
mockDomainObject.getId.andReturn(id);
|
||||
mockDomainObject.getModel.andReturn({});
|
||||
mockDomainObject.getId.and.returnValue(id);
|
||||
mockDomainObject.getModel.and.returnValue({});
|
||||
|
||||
return mockDomainObject;
|
||||
});
|
||||
@ -65,7 +65,7 @@ define(
|
||||
mockWindow = jasmine.createSpyObj("$window", ["open"]);
|
||||
|
||||
mockLocation = jasmine.createSpyObj('location', ['search']);
|
||||
mockLocation.search.andReturn({});
|
||||
mockLocation.search.and.returnValue({});
|
||||
|
||||
mockAttrs = {};
|
||||
});
|
||||
@ -83,9 +83,9 @@ define(
|
||||
});
|
||||
|
||||
it("collapses on navigation changes on portrait-oriented phones", function () {
|
||||
mockAgentService.isMobile.andReturn(true);
|
||||
mockAgentService.isPhone.andReturn(true);
|
||||
mockAgentService.isPortrait.andReturn(true);
|
||||
mockAgentService.isMobile.and.returnValue(true);
|
||||
mockAgentService.isPhone.and.returnValue(true);
|
||||
mockAgentService.isPortrait.and.returnValue(true);
|
||||
controller = instantiateController();
|
||||
expect(controller.visible()).toBeTruthy();
|
||||
|
||||
@ -102,13 +102,13 @@ define(
|
||||
});
|
||||
|
||||
it("sets pane state to false when in location.search", function () {
|
||||
mockLocation.search.andReturn({'hideTree': true});
|
||||
mockLocation.search.and.returnValue({'hideTree': true});
|
||||
expect(instantiateController().visible()).toBe(false);
|
||||
expect(mockLocation.search).toHaveBeenCalledWith('hideTree', undefined);
|
||||
});
|
||||
|
||||
it("sets state to true when not found in location.search", function () {
|
||||
mockLocation.search.andReturn({});
|
||||
mockLocation.search.and.returnValue({});
|
||||
expect(instantiateController().visible()).toBe(true);
|
||||
expect(mockLocation.search).not.toHaveBeenCalledWith('hideTree', undefined);
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -34,17 +34,6 @@ define([
|
||||
mockDomainObject,
|
||||
action;
|
||||
|
||||
|
||||
function waitForCall() {
|
||||
var called = false;
|
||||
waitsFor(function () {
|
||||
return called;
|
||||
});
|
||||
return function () {
|
||||
called = true;
|
||||
};
|
||||
}
|
||||
|
||||
beforeEach(function () {
|
||||
mockNavigationService = jasmine.createSpyObj(
|
||||
"navigationService",
|
||||
@ -63,26 +52,24 @@ define([
|
||||
});
|
||||
|
||||
it("sets navigation if it is allowed", function () {
|
||||
mockNavigationService.shouldNavigate.andReturn(true);
|
||||
action.perform()
|
||||
.then(waitForCall());
|
||||
runs(function () {
|
||||
expect(mockNavigationService.setNavigation)
|
||||
mockNavigationService.shouldNavigate.and.returnValue(true);
|
||||
return action.perform()
|
||||
.then(function () {
|
||||
expect(mockNavigationService.setNavigation)
|
||||
.toHaveBeenCalledWith(mockDomainObject, true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("does not set navigation if it is not allowed", function () {
|
||||
mockNavigationService.shouldNavigate.andReturn(false);
|
||||
mockNavigationService.shouldNavigate.and.returnValue(false);
|
||||
var onSuccess = jasmine.createSpy('onSuccess');
|
||||
action.perform()
|
||||
.then(onSuccess, waitForCall());
|
||||
runs(function () {
|
||||
expect(onSuccess).not.toHaveBeenCalled();
|
||||
expect(mockNavigationService.setNavigation)
|
||||
.not
|
||||
.toHaveBeenCalledWith(mockDomainObject);
|
||||
});
|
||||
return action.perform()
|
||||
.then(onSuccess, function () {
|
||||
expect(onSuccess).not.toHaveBeenCalled();
|
||||
expect(mockNavigationService.setNavigation)
|
||||
.not
|
||||
.toHaveBeenCalledWith(mockDomainObject);
|
||||
});
|
||||
});
|
||||
|
||||
it("is only applicable when a domain object is in context", function () {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -69,7 +69,7 @@ define(
|
||||
navigationService.addListener(callback);
|
||||
navigationService.setNavigation(testObject);
|
||||
navigationService.setNavigation(testObject);
|
||||
expect(callback.calls.length).toEqual(1);
|
||||
expect(callback.calls.count()).toEqual(1);
|
||||
});
|
||||
|
||||
it("stops notifying listeners after removal", function () {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -65,34 +65,35 @@ define([
|
||||
mockActionCapability = jasmine.createSpyObj('action', ['perform']);
|
||||
mockEditor = jasmine.createSpyObj('editor', ['isEditContextRoot']);
|
||||
|
||||
mockThrottle.andCallFake(function (fn) {
|
||||
mockThrottle.and.callFake(function (fn) {
|
||||
var mockThrottledFn =
|
||||
jasmine.createSpy('throttled-' + mockThrottledFns.length);
|
||||
mockThrottledFn.andCallFake(fn);
|
||||
mockThrottledFn.and.callFake(fn);
|
||||
mockThrottledFns.push(mockThrottledFn);
|
||||
return mockThrottledFn;
|
||||
});
|
||||
mockTopic.andReturn(mockMutationTopic);
|
||||
mockDomainObject.getId.andReturn(testId);
|
||||
mockDomainObject.getCapability.andCallFake(function (c) {
|
||||
mockTopic.and.returnValue(mockMutationTopic);
|
||||
mockDomainObject.getId.and.returnValue(testId);
|
||||
mockDomainObject.getCapability.and.callFake(function (c) {
|
||||
return {
|
||||
context: mockContext,
|
||||
editor: mockEditor
|
||||
}[c];
|
||||
});
|
||||
mockDomainObject.hasCapability.andCallFake(function (c) {
|
||||
mockDomainObject.hasCapability.and.callFake(function (c) {
|
||||
return !!mockDomainObject.getCapability(c);
|
||||
});
|
||||
mockParentObject.getCapability.andCallFake(function (c) {
|
||||
mockParentObject.getCapability.and.callFake(function (c) {
|
||||
return {
|
||||
action: mockActionCapability
|
||||
}[c];
|
||||
});
|
||||
testParentComposition = [];
|
||||
mockParentObject.useCapability.andReturn(Promise.resolve(testParentComposition));
|
||||
mockContext.getParent.andReturn(mockParentObject);
|
||||
mockNavigationService.getNavigation.andReturn(mockDomainObject);
|
||||
mockEditor.isEditContextRoot.andReturn(false);
|
||||
mockParentObject.useCapability.and.returnValue(Promise.resolve(testParentComposition));
|
||||
|
||||
mockContext.getParent.and.returnValue(mockParentObject);
|
||||
mockNavigationService.getNavigation.and.returnValue(mockDomainObject);
|
||||
mockEditor.isEditContextRoot.and.returnValue(false);
|
||||
|
||||
return new OrphanNavigationHandler(
|
||||
mockThrottle,
|
||||
@ -106,7 +107,7 @@ define([
|
||||
expect(mockMutationTopic.listen)
|
||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||
expect(mockThrottledFns.indexOf(
|
||||
mockMutationTopic.listen.mostRecentCall.args[0]
|
||||
mockMutationTopic.listen.calls.mostRecent().args[0]
|
||||
)).not.toEqual(-1);
|
||||
});
|
||||
|
||||
@ -114,7 +115,7 @@ define([
|
||||
expect(mockNavigationService.addListener)
|
||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||
expect(mockThrottledFns.indexOf(
|
||||
mockNavigationService.addListener.mostRecentCall.args[0]
|
||||
mockNavigationService.addListener.calls.mostRecent().args[0]
|
||||
)).not.toEqual(-1);
|
||||
});
|
||||
|
||||
@ -134,28 +135,14 @@ define([
|
||||
function itNavigatesAsExpected() {
|
||||
if (isOrphan && !isEditRoot) {
|
||||
it("navigates to the parent", function () {
|
||||
var done = false;
|
||||
waitsFor(function () {
|
||||
return done;
|
||||
});
|
||||
setTimeout(function () {
|
||||
done = true;
|
||||
}, 5);
|
||||
runs(function () {
|
||||
return Promise.resolve().then(function () {
|
||||
expect(mockActionCapability.perform)
|
||||
.toHaveBeenCalledWith('navigate');
|
||||
});
|
||||
});
|
||||
} else {
|
||||
it("does nothing", function () {
|
||||
var done = false;
|
||||
waitsFor(function () {
|
||||
return done;
|
||||
});
|
||||
setTimeout(function () {
|
||||
done = true;
|
||||
}, 5);
|
||||
runs(function () {
|
||||
return Promise.resolve().then(function () {
|
||||
expect(mockActionCapability.perform)
|
||||
.not.toHaveBeenCalled();
|
||||
});
|
||||
@ -165,12 +152,12 @@ define([
|
||||
|
||||
describe(caseName, function () {
|
||||
beforeEach(function () {
|
||||
mockEditor.isEditContextRoot.andReturn(isEditRoot);
|
||||
mockEditor.isEditContextRoot.and.returnValue(isEditRoot);
|
||||
});
|
||||
|
||||
describe("when navigation changes", function () {
|
||||
beforeEach(function () {
|
||||
mockNavigationService.addListener.mostRecentCall
|
||||
mockNavigationService.addListener.calls.mostRecent()
|
||||
.args[0](mockDomainObject);
|
||||
});
|
||||
itNavigatesAsExpected();
|
||||
@ -178,7 +165,7 @@ define([
|
||||
|
||||
describe("when mutation occurs", function () {
|
||||
beforeEach(function () {
|
||||
mockMutationTopic.listen.mostRecentCall
|
||||
mockMutationTopic.listen.calls.mostRecent()
|
||||
.args[0](mockParentObject);
|
||||
});
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -49,8 +49,8 @@ define(
|
||||
);
|
||||
mockDocument = [{}];
|
||||
|
||||
mockDomainObject.getModel.andReturn({ name: 'Test name' });
|
||||
mockNavigationService.getNavigation.andReturn(mockDomainObject);
|
||||
mockDomainObject.getModel.and.returnValue({ name: 'Test name' });
|
||||
mockNavigationService.getNavigation.and.returnValue(mockDomainObject);
|
||||
|
||||
titler = new WindowTitler(
|
||||
mockNavigationService,
|
||||
@ -64,12 +64,12 @@ define(
|
||||
jasmine.any(Function),
|
||||
jasmine.any(Function)
|
||||
);
|
||||
expect(mockRootScope.$watch.mostRecentCall.args[0]())
|
||||
expect(mockRootScope.$watch.calls.mostRecent().args[0]())
|
||||
.toEqual('Test name');
|
||||
});
|
||||
|
||||
it("sets the title to the name of the navigated object", function () {
|
||||
mockRootScope.$watch.mostRecentCall.args[1]("Some name");
|
||||
mockRootScope.$watch.calls.mostRecent().args[1]("Some name");
|
||||
expect(mockDocument[0].title).toEqual("Some name");
|
||||
});
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|