Compare commits
1 Commits
remove-ang
...
edit-sizin
Author | SHA1 | Date | |
---|---|---|---|
c2db5c3cce |
@ -1,36 +0,0 @@
|
|||||||
version: 2
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
docker:
|
|
||||||
- image: circleci/node:13-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" }}
|
|
||||||
- run:
|
|
||||||
name: Installing dependencies (npm install)
|
|
||||||
command: npm install
|
|
||||||
- save_cache:
|
|
||||||
key: dependency-cache-{{ checksum "package.json" }}
|
|
||||||
paths:
|
|
||||||
- node_modules
|
|
||||||
- run:
|
|
||||||
name: npm run test:coverage
|
|
||||||
command: npm run test:coverage
|
|
||||||
- run:
|
|
||||||
name: npm run lint
|
|
||||||
command: npm run lint
|
|
||||||
- store_artifacts:
|
|
||||||
path: dist
|
|
||||||
prefix: dist
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
test:
|
|
||||||
jobs:
|
|
||||||
- build
|
|
270
.eslintrc.js
@ -1,270 +0,0 @@
|
|||||||
const LEGACY_FILES = ["platform/**", "example/**"];
|
|
||||||
module.exports = {
|
|
||||||
"env": {
|
|
||||||
"browser": true,
|
|
||||||
"es6": true,
|
|
||||||
"jasmine": true,
|
|
||||||
"amd": true
|
|
||||||
},
|
|
||||||
"globals": {
|
|
||||||
"_": "readonly"
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:vue/recommended",
|
|
||||||
"plugin:you-dont-need-lodash-underscore/compatible"
|
|
||||||
],
|
|
||||||
"parser": "vue-eslint-parser",
|
|
||||||
"parserOptions": {
|
|
||||||
"parser": "babel-eslint",
|
|
||||||
"allowImportExportEverywhere": true,
|
|
||||||
"ecmaVersion": 2015,
|
|
||||||
"ecmaFeatures": {
|
|
||||||
"impliedStrict": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"you-dont-need-lodash-underscore/omit": "off",
|
|
||||||
"you-dont-need-lodash-underscore/throttle": "off",
|
|
||||||
"you-dont-need-lodash-underscore/flatten": "off",
|
|
||||||
"no-bitwise": "error",
|
|
||||||
"curly": "error",
|
|
||||||
"eqeqeq": "error",
|
|
||||||
"guard-for-in": "error",
|
|
||||||
"no-extend-native": "error",
|
|
||||||
"no-inner-declarations": "off",
|
|
||||||
"no-use-before-define": ["error", "nofunc"],
|
|
||||||
"no-caller": "error",
|
|
||||||
"no-sequences": "error",
|
|
||||||
"no-irregular-whitespace": "error",
|
|
||||||
"no-new": "error",
|
|
||||||
"no-shadow": "error",
|
|
||||||
"no-undef": "error",
|
|
||||||
"no-unused-vars": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"vars": "all",
|
|
||||||
"args": "none"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"no-console": "off",
|
|
||||||
"no-trailing-spaces": "error",
|
|
||||||
"space-before-function-paren": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"anonymous": "always",
|
|
||||||
"asyncArrow": "always",
|
|
||||||
"named": "never"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"array-bracket-spacing": "error",
|
|
||||||
"space-in-parens": "error",
|
|
||||||
"space-before-blocks": "error",
|
|
||||||
"comma-dangle": "error",
|
|
||||||
"eol-last": "error",
|
|
||||||
"new-cap": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"capIsNew": false,
|
|
||||||
"properties": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"dot-notation": "error",
|
|
||||||
"indent": ["error", 4],
|
|
||||||
|
|
||||||
// https://eslint.org/docs/rules/no-case-declarations
|
|
||||||
"no-case-declarations": "error",
|
|
||||||
// https://eslint.org/docs/rules/max-classes-per-file
|
|
||||||
"max-classes-per-file": ["error", 1],
|
|
||||||
// https://eslint.org/docs/rules/no-eq-null
|
|
||||||
"no-eq-null": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-eval
|
|
||||||
"no-eval": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-floating-decimal
|
|
||||||
"no-floating-decimal": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-implicit-globals
|
|
||||||
"no-implicit-globals": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-implied-eval
|
|
||||||
"no-implied-eval": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-lone-blocks
|
|
||||||
"no-lone-blocks": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-loop-func
|
|
||||||
"no-loop-func": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-new-func
|
|
||||||
"no-new-func": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-new-wrappers
|
|
||||||
"no-new-wrappers": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-octal-escape
|
|
||||||
"no-octal-escape": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-proto
|
|
||||||
"no-proto": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-return-await
|
|
||||||
"no-return-await": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-script-url
|
|
||||||
"no-script-url": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-self-compare
|
|
||||||
"no-self-compare": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-sequences
|
|
||||||
"no-sequences": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-unmodified-loop-condition
|
|
||||||
"no-unmodified-loop-condition": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-useless-call
|
|
||||||
"no-useless-call": "error",
|
|
||||||
// https://eslint.org/docs/rules/wrap-iife
|
|
||||||
"wrap-iife": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-nested-ternary
|
|
||||||
"no-nested-ternary": "error",
|
|
||||||
// https://eslint.org/docs/rules/switch-colon-spacing
|
|
||||||
"switch-colon-spacing": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-useless-computed-key
|
|
||||||
"no-useless-computed-key": "error",
|
|
||||||
// https://eslint.org/docs/rules/rest-spread-spacing
|
|
||||||
"rest-spread-spacing": ["error"],
|
|
||||||
// https://eslint.org/docs/rules/no-var
|
|
||||||
"no-var": "error",
|
|
||||||
// https://eslint.org/docs/rules/one-var
|
|
||||||
"one-var": ["error", "never"],
|
|
||||||
// https://eslint.org/docs/rules/default-case-last
|
|
||||||
"default-case-last": "error",
|
|
||||||
// https://eslint.org/docs/rules/default-param-last
|
|
||||||
"default-param-last": "error",
|
|
||||||
// https://eslint.org/docs/rules/grouped-accessor-pairs
|
|
||||||
"grouped-accessor-pairs": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-constructor-return
|
|
||||||
"no-constructor-return": "error",
|
|
||||||
// https://eslint.org/docs/rules/array-callback-return
|
|
||||||
"array-callback-return": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-invalid-this
|
|
||||||
"no-invalid-this": "error", // Believe this one actually surfaces some bugs
|
|
||||||
// https://eslint.org/docs/rules/func-style
|
|
||||||
"func-style": ["error", "declaration"],
|
|
||||||
// https://eslint.org/docs/rules/no-unused-expressions
|
|
||||||
"no-unused-expressions": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-useless-concat
|
|
||||||
"no-useless-concat": "error",
|
|
||||||
// https://eslint.org/docs/rules/radix
|
|
||||||
"radix": "error",
|
|
||||||
// https://eslint.org/docs/rules/require-await
|
|
||||||
"require-await": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-alert
|
|
||||||
"no-alert": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-useless-constructor
|
|
||||||
"no-useless-constructor": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-duplicate-imports
|
|
||||||
"no-duplicate-imports": "error",
|
|
||||||
|
|
||||||
// https://eslint.org/docs/rules/no-implicit-coercion
|
|
||||||
"no-implicit-coercion": "error",
|
|
||||||
//https://eslint.org/docs/rules/no-unneeded-ternary
|
|
||||||
"no-unneeded-ternary": "error",
|
|
||||||
// https://eslint.org/docs/rules/semi
|
|
||||||
"semi": ["error", "always"],
|
|
||||||
// https://eslint.org/docs/rules/no-multi-spaces
|
|
||||||
"no-multi-spaces": "error",
|
|
||||||
// https://eslint.org/docs/rules/key-spacing
|
|
||||||
"key-spacing": ["error", {
|
|
||||||
"afterColon": true
|
|
||||||
}],
|
|
||||||
// https://eslint.org/docs/rules/keyword-spacing
|
|
||||||
"keyword-spacing": ["error", {
|
|
||||||
"before": true,
|
|
||||||
"after": true
|
|
||||||
}],
|
|
||||||
// https://eslint.org/docs/rules/comma-spacing
|
|
||||||
// Also requires one line code fix
|
|
||||||
"comma-spacing": ["error", {
|
|
||||||
"after": true
|
|
||||||
}],
|
|
||||||
//https://eslint.org/docs/rules/no-whitespace-before-property
|
|
||||||
"no-whitespace-before-property": "error",
|
|
||||||
// https://eslint.org/docs/rules/object-curly-newline
|
|
||||||
"object-curly-newline": ["error", {
|
|
||||||
"consistent": true,
|
|
||||||
"multiline": true
|
|
||||||
}],
|
|
||||||
// https://eslint.org/docs/rules/object-property-newline
|
|
||||||
"object-property-newline": "error",
|
|
||||||
// https://eslint.org/docs/rules/brace-style
|
|
||||||
"brace-style": "error",
|
|
||||||
// https://eslint.org/docs/rules/no-multiple-empty-lines
|
|
||||||
"no-multiple-empty-lines": ["error", {"max": 1}],
|
|
||||||
// https://eslint.org/docs/rules/operator-linebreak
|
|
||||||
"operator-linebreak": ["error", "before", {"overrides": {"=": "after"}}],
|
|
||||||
// https://eslint.org/docs/rules/padding-line-between-statements
|
|
||||||
"padding-line-between-statements": ["error", {
|
|
||||||
"blankLine": "always",
|
|
||||||
"prev": "multiline-block-like",
|
|
||||||
"next": "*"
|
|
||||||
}, {
|
|
||||||
"blankLine": "always",
|
|
||||||
"prev": "*",
|
|
||||||
"next": "return"
|
|
||||||
}],
|
|
||||||
// https://eslint.org/docs/rules/space-infix-ops
|
|
||||||
"space-infix-ops": "error",
|
|
||||||
// https://eslint.org/docs/rules/space-unary-ops
|
|
||||||
"space-unary-ops": ["error", {
|
|
||||||
"words": true,
|
|
||||||
"nonwords": false
|
|
||||||
}],
|
|
||||||
// https://eslint.org/docs/rules/arrow-spacing
|
|
||||||
"arrow-spacing": "error",
|
|
||||||
// https://eslint.org/docs/rules/semi-spacing
|
|
||||||
"semi-spacing": ["error", {
|
|
||||||
"before": false,
|
|
||||||
"after": true
|
|
||||||
}],
|
|
||||||
|
|
||||||
"vue/html-indent": [
|
|
||||||
"error",
|
|
||||||
4,
|
|
||||||
{
|
|
||||||
"attribute": 1,
|
|
||||||
"baseIndent": 0,
|
|
||||||
"closeBracket": 0,
|
|
||||||
"alignAttributesVertically": true,
|
|
||||||
"ignores": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"vue/html-self-closing": ["error",
|
|
||||||
{
|
|
||||||
"html": {
|
|
||||||
"void": "never",
|
|
||||||
"normal": "never",
|
|
||||||
"component": "always"
|
|
||||||
},
|
|
||||||
"svg": "always",
|
|
||||||
"math": "always"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"vue/max-attributes-per-line": ["error", {
|
|
||||||
"singleline": 1,
|
|
||||||
"multiline": {
|
|
||||||
"max": 1,
|
|
||||||
"allowFirstLine": true
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
"vue/multiline-html-element-content-newline": "off",
|
|
||||||
"vue/singleline-html-element-content-newline": "off",
|
|
||||||
"vue/no-mutating-props": "off"
|
|
||||||
|
|
||||||
},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": LEGACY_FILES,
|
|
||||||
"rules": {
|
|
||||||
"no-unused-vars": [
|
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
"vars": "all",
|
|
||||||
"args": "none",
|
|
||||||
"varsIgnorePattern": "controller"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"no-nested-ternary": "off",
|
|
||||||
"no-var": "off",
|
|
||||||
"one-var": "off"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
3
.gitignore
vendored
@ -37,7 +37,4 @@ protractor/logs
|
|||||||
# npm-debug log
|
# npm-debug log
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
# karma reports
|
|
||||||
report.*.json
|
|
||||||
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
5
.jscsrc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"preset": "crockford",
|
||||||
|
"requireMultipleVarDecl": false,
|
||||||
|
"requireVarDeclFirst": false
|
||||||
|
}
|
25
.jshintrc
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"bitwise": true,
|
||||||
|
"browser": true,
|
||||||
|
"curly": true,
|
||||||
|
"eqeqeq": true,
|
||||||
|
"forin": true,
|
||||||
|
"freeze": true,
|
||||||
|
"funcscope": false,
|
||||||
|
"futurehostile": true,
|
||||||
|
"latedef": true,
|
||||||
|
"noarg": true,
|
||||||
|
"nocomma": true,
|
||||||
|
"nonbsp": true,
|
||||||
|
"nonew": true,
|
||||||
|
"predef": [
|
||||||
|
"define",
|
||||||
|
"Promise",
|
||||||
|
"WeakMap",
|
||||||
|
"Map"
|
||||||
|
],
|
||||||
|
"shadow": "outer",
|
||||||
|
"strict": "implied",
|
||||||
|
"undef": true,
|
||||||
|
"unused": "vars"
|
||||||
|
}
|
280
API.md
@ -1,60 +1,3 @@
|
|||||||
<!-- 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
|
# Building Applications With Open MCT
|
||||||
|
|
||||||
## Scope and purpose of this document
|
## Scope and purpose of this document
|
||||||
@ -108,13 +51,15 @@ script loaders are also supported.
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Open MCT</title>
|
<title>Open MCT</title>
|
||||||
<script src="dist/openmct.js"></script>
|
<script src="openmct.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
|
openmct.setAssetPath('openmct/dist');
|
||||||
openmct.install(openmct.plugins.LocalStorage());
|
openmct.install(openmct.plugins.LocalStorage());
|
||||||
openmct.install(openmct.plugins.MyItems());
|
openmct.install(openmct.plugins.MyItems());
|
||||||
openmct.install(openmct.plugins.UTCTimeSystem());
|
openmct.install(openmct.plugins.UTCTimeSystem());
|
||||||
|
openmct.install(openmct.plugins.Espresso());
|
||||||
openmct.start();
|
openmct.start();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
@ -125,6 +70,9 @@ The Open MCT library included above requires certain assets such as html
|
|||||||
templates, images, and css. If you installed Open MCT from GitHub as described
|
templates, images, and css. If you installed Open MCT from GitHub as described
|
||||||
in the section on [Building from Source](#building-from-source) then these
|
in the section on [Building from Source](#building-from-source) then these
|
||||||
assets will have been downloaded along with the Open MCT javascript library.
|
assets will have been downloaded along with the Open MCT javascript library.
|
||||||
|
You can specify the location of these assets by calling `openmct.setAssetPath()`.
|
||||||
|
Typically this will be the same location as the `openmct.js` library is
|
||||||
|
included from.
|
||||||
|
|
||||||
There are some plugins bundled with the application that provide UI,
|
There are some plugins bundled with the application that provide UI,
|
||||||
persistence, and other default configuration which are necessary to be able to
|
persistence, and other default configuration which are necessary to be able to
|
||||||
@ -206,7 +154,7 @@ registry.
|
|||||||
|
|
||||||
eg.
|
eg.
|
||||||
```javascript
|
```javascript
|
||||||
openmct.types.addType('example.my-type', {
|
openmct.types.addType('my-type', {
|
||||||
name: "My Type",
|
name: "My Type",
|
||||||
description: "This is a type that I added!",
|
description: "This is a type that I added!",
|
||||||
creatable: true
|
creatable: true
|
||||||
@ -215,8 +163,7 @@ openmct.types.addType('example.my-type', {
|
|||||||
|
|
||||||
The `addType` function accepts two arguments:
|
The `addType` function accepts two arguments:
|
||||||
* A `string` key identifying the type. This key is used when specifying a type
|
* 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
|
for an object.
|
||||||
conflicts with other plugins.
|
|
||||||
* An object type specification. An object type definition supports the following
|
* An object type specification. An object type definition supports the following
|
||||||
attributes
|
attributes
|
||||||
* `name`: a `string` naming this object type
|
* `name`: a `string` naming this object type
|
||||||
@ -231,7 +178,7 @@ attributes
|
|||||||
of this object. This is used for specifying an icon to appear next to each
|
of this object. This is used for specifying an icon to appear next to each
|
||||||
object of this type.
|
object of this type.
|
||||||
|
|
||||||
The [Open MCT Tutorials](https://github.com/nasa/openmct-tutorial) provide a
|
The [Open MCT Tutorials](https://github.com/openmct/openmct-tutorial) provide a
|
||||||
step-by-step examples of writing code for Open MCT that includes a [section on
|
step-by-step examples of writing code for Open MCT that includes a [section on
|
||||||
defining a new object type](https://github.com/nasa/openmct-tutorial#step-3---providing-objects).
|
defining a new object type](https://github.com/nasa/openmct-tutorial#step-3---providing-objects).
|
||||||
|
|
||||||
@ -247,7 +194,7 @@ To do so, use the `addRoot` method of the object API.
|
|||||||
eg.
|
eg.
|
||||||
```javascript
|
```javascript
|
||||||
openmct.objects.addRoot({
|
openmct.objects.addRoot({
|
||||||
namespace: "example.namespace",
|
namespace: "my-namespace",
|
||||||
key: "my-key"
|
key: "my-key"
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -288,12 +235,13 @@ It is expected that the `get` function will return a
|
|||||||
[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
||||||
that resolves with the object being requested.
|
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
|
## Composition Providers
|
||||||
|
|
||||||
The _composition_ of a domain object is the list of objects it contains, as
|
The _composition_ of a domain object is the list of objects it contains, as shown
|
||||||
shown (for example) in the tree for browsing. Open MCT provides a
|
(for example) in the tree for browsing. Open MCT provides a
|
||||||
[default solution](#default-composition-provider) for composition, but there
|
[default solution](#default-composition-provider) for composition, but there
|
||||||
may be cases where you want to provide the composition of a certain object
|
may be cases where you want to provide the composition of a certain object
|
||||||
(or type of object) dynamically.
|
(or type of object) dynamically.
|
||||||
@ -307,7 +255,7 @@ Composition Provider:
|
|||||||
```javascript
|
```javascript
|
||||||
openmct.composition.addProvider({
|
openmct.composition.addProvider({
|
||||||
appliesTo: function (domainObject) {
|
appliesTo: function (domainObject) {
|
||||||
return domainObject.type === 'example.my-type';
|
return domainObject.type === 'my-type';
|
||||||
},
|
},
|
||||||
load: function (domainObject) {
|
load: function (domainObject) {
|
||||||
return Promise.resolve(myDomainObjects);
|
return Promise.resolve(myDomainObjects);
|
||||||
@ -325,9 +273,8 @@ These identifiers will be used to fetch Domain Objects from an [Object Provider]
|
|||||||
|
|
||||||
### Default Composition Provider
|
### Default Composition Provider
|
||||||
|
|
||||||
The default composition provider applies to any domain object with a
|
The default composition provider applies to any domain object with a `composition`
|
||||||
`composition` property. The value of `composition` should be an array of
|
property. The value of `composition` should be an array of identifiers, e.g.:
|
||||||
identifiers, e.g.:
|
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var domainObject = {
|
var domainObject = {
|
||||||
@ -348,17 +295,13 @@ var domainObject = {
|
|||||||
|
|
||||||
## Telemetry API
|
## Telemetry API
|
||||||
|
|
||||||
The Open MCT telemetry API provides two main sets of interfaces-- one for
|
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.
|
||||||
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
|
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.
|
||||||
change at any time. However, the APIs for integrating telemetry metadata into
|
|
||||||
Open MCT are stable and documentation is included below.
|
|
||||||
|
|
||||||
### Integrating Telemetry Sources
|
### 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. Alternatively, you can register a telemetry metadata provider to provide the necessary telemetry metadata.
|
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.
|
||||||
|
|
||||||
For a step-by-step guide to building a telemetry adapter, please see the
|
For a step-by-step guide to building a telemetry adapter, please see the
|
||||||
[Open MCT Tutorials](https://github.com/nasa/openmct-tutorial).
|
[Open MCT Tutorials](https://github.com/nasa/openmct-tutorial).
|
||||||
@ -412,7 +355,7 @@ attribute | type | flags | notes
|
|||||||
--- | --- | --- | ---
|
--- | --- | --- | ---
|
||||||
`key` | string | required | unique identifier for this field.
|
`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.
|
`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 readable label for this field. If omitted, defaults to `key`.
|
`name` | string | optional | a human readible 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`.
|
`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.
|
`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`
|
`units` | string | optional | the units of this value, e.g. `km`, `seconds`, `parsecs`
|
||||||
@ -423,12 +366,12 @@ attribute | type | flags | notes
|
|||||||
|
|
||||||
###### Value Hints
|
###### 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:
|
Known hints:
|
||||||
|
|
||||||
* `domain`: Values with a `domain` hint will be used for the x-axis of a plot, and tables will render columns for these values first.
|
* `domain`: Indicates that the value represents the "input" of a datum. Values with a `domain` hint will be used for the x-axis of a plot, and tables will render columns for these values first.
|
||||||
* `range`: Values with a `range` hint will be used as the y-axis on a plot, and tables will render columns for these values after the `domain` values.
|
* `range`: Indicates that the value is the "output" of a datum. Values with a `range` hint will be used as the y-axis on a plot, and tables will render columns for these values after the `domain` values.
|
||||||
* `image`: Indicates that the value may be interpreted as the URL to an image file, in which case appropriate views will be made available.
|
* `image`: Indicates that the value may be interpreted as the URL to an image file, in which case appropriate views will be made available.
|
||||||
|
|
||||||
##### The Time Conductor and Telemetry
|
##### The Time Conductor and Telemetry
|
||||||
@ -440,18 +383,14 @@ In order for the time conductor to work, there will always be an active "time sy
|
|||||||
|
|
||||||
#### Telemetry Providers
|
#### 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:
|
A telemetry provider is a javascript object with up to four methods:
|
||||||
|
|
||||||
* `supportsSubscribe(domainObject, callback, options)` optional. Must be implemented to provide realtime telemetry. Should return `true` if the provider supports subscriptions for the given domain object (and request options).
|
* `supportsSubscribe(domainObject, callback, options)` optional. Must be implemented to provide realtime telemetry. Should return `true` if the provider supports subscriptions for the given domain object (and request options).
|
||||||
* `subscribe(domainObject, callback, options)` required if `supportsSubscribe` is implemented. Establish a subscription for realtime data for the given domain object. Should invoke `callback` with a single telemetry datum every time data is received. Must return an unsubscribe function. Multiple views can subscribe to the same telemetry object, so it should always return a new unsubscribe function.
|
* `subscribe(domainObject, callback, options)` required if `supportsSubscribe` is implemented. Establish a subscription for realtime data for the given domain object. Should invoke `callback` with a single telemetry datum every time data is received. Must return an unsubscribe function. Multiple views can subscribe to the same telemetry object, so it should always return a new unsubscribe function.
|
||||||
* `supportsRequest(domainObject, options)` optional. Must be implemented to provide historical telemetry. Should return `true` if the provider supports historical requests for the given domain object.
|
* `supportsRequest(domainObject, options)` optional. Must be implemented to provide historical telemetry. Should return `true` if the provider supports historical requests for the given domain object.
|
||||||
* `request(domainObject, options)` required if `supportsRequest` is implemented. Must return a promise for an array of telemetry datums that fulfills the request. The `options` argument will include a `start`, `end`, and `domain` attribute representing the query bounds. See [Telemetry Requests and Responses](#telemetry-requests-and-responses) for more info on how to respond to requests.
|
* `request(domainObject, options)` required if `supportsRequest` is implemented. Must return a promise for an array of telemetry datums that fulfills the request. The `options` argument will include a `start`, `end`, and `domain` attribute representing the query bounds. For more request properties, see Request Properties below.
|
||||||
* `supportsMetadata(domainObject)` optional. Implement and return `true` for objects that you want to provide dynamic metadata for.
|
|
||||||
* `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.
|
Telemetry providers are registered by calling `openmct.telemetry.addProvider(provider)`, e.g.
|
||||||
|
|
||||||
@ -459,15 +398,14 @@ Telemetry providers are registered by calling `openmct.telemetry.addProvider(pro
|
|||||||
openmct.telemetry.addProvider({
|
openmct.telemetry.addProvider({
|
||||||
supportsRequest: function (domainObject, options) { /*...*/ },
|
supportsRequest: function (domainObject, options) { /*...*/ },
|
||||||
request: function (domainObject, options) { /*...*/ },
|
request: function (domainObject, options) { /*...*/ },
|
||||||
|
supportsSubscribe: function (domainObject, callback, options) { /*...*/ },
|
||||||
|
subscribe: function (domainObject, callback, options) { /*...*/ }
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
#### 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:
|
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
|
```javascript
|
||||||
{
|
{
|
||||||
start: 1487981997240,
|
start: 1487981997240,
|
||||||
@ -476,53 +414,7 @@ Telemetry requests support time bounded queries. A call to a _Telemetry Provider
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
In this case, the `domain` is the currently selected time-system, and the start and end dates are valid dates in that time system.
|
#### Telemetry Formats
|
||||||
|
|
||||||
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.
|
Telemetry format objects define how to interpret and display telemetry data.
|
||||||
They have a simple structure:
|
They have a simple structure:
|
||||||
@ -592,17 +484,6 @@ 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)
|
a domain object, as discussed in the [Telemetry Metadata](#telemetry-metadata)
|
||||||
section.
|
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
|
## Time API
|
||||||
|
|
||||||
Open MCT provides API for managing the temporal state of the application.
|
Open MCT provides API for managing the temporal state of the application.
|
||||||
@ -686,7 +567,7 @@ openmct.time.timeSystem(utcTimeSystem, bounds);
|
|||||||
Setting the active time system will trigger a [`'timeSystem'`](#time-events)
|
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.
|
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
|
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.
|
bounds are simply an object with a `start` and an end `end` attribute.
|
||||||
@ -710,7 +591,7 @@ openmct.time.bounds({start: now - ONE_HOUR, now);
|
|||||||
To respond to bounds change events, listen for the [`'bounds'`](#time-events)
|
To respond to bounds change events, listen for the [`'bounds'`](#time-events)
|
||||||
event.
|
event.
|
||||||
|
|
||||||
### Clocks
|
## Clocks
|
||||||
|
|
||||||
The Time API can be set to follow a clock source which will cause the bounds
|
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
|
to be updated automatically whenever the clock source "ticks". A clock is simply
|
||||||
@ -729,7 +610,7 @@ be defined to tick on some remote timing source.
|
|||||||
The values provided by clocks are simple `number`s, which are interpreted in the
|
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).
|
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:
|
A clock is an object that defines certain required metadata and functions:
|
||||||
|
|
||||||
@ -843,7 +724,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.
|
new bounds will be calculated based on the `currentValue()` of the active clock.
|
||||||
Clock offsets are only relevant when a clock source is active.
|
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.
|
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.
|
||||||
|
|
||||||
@ -885,7 +766,7 @@ The events emitted by the Time API are:
|
|||||||
* `clockOffsets`: The new [clock offsets](#clock-offsets).
|
* `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
|
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.
|
MCT. It allows a user to select from configured time systems and clocks, and to set bounds and clock offsets.
|
||||||
@ -975,68 +856,43 @@ openmct.install(openmct.plugins.Conductor({
|
|||||||
}));
|
}));
|
||||||
```
|
```
|
||||||
|
|
||||||
## Indicators
|
## Included Plugins
|
||||||
|
|
||||||
Indicators are small widgets that reside at the bottom of the screen and are visible from
|
Open MCT is packaged along with a few general-purpose plugins:
|
||||||
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.
|
|
||||||
|
|
||||||
### The URL Status Indicator
|
* `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.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.
|
||||||
|
|
||||||
A common use case for indicators is to convey the state of some external system such as a
|
Generally, you will want to either install these plugins, or install
|
||||||
persistence backend or HTTP server. So long as this system is accessible via HTTP request,
|
different plugins that provide persistence and an initial folder
|
||||||
Open MCT provides a general purpose indicator to show whether the server is available and
|
hierarchy.
|
||||||
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.
|
eg.
|
||||||
```javascript
|
```javascript
|
||||||
var myIndicator = openmct.indicators.simpleIndicator();
|
openmct.install(openmct.plugins.LocalStorage());
|
||||||
myIndicator.text("Hello World!");
|
openmct.install(openmct.plugins.MyItems());
|
||||||
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
|
|
||||||
});
|
|
||||||
```
|
```
|
||||||
|
186
CONTRIBUTING.md
@ -103,7 +103,7 @@ the name chosen could not be mistaken for a topic or master branch.
|
|||||||
### Merging
|
### Merging
|
||||||
|
|
||||||
When development is complete on an issue, the first step toward merging it
|
When development is complete on an issue, the first step toward merging it
|
||||||
back into the master branch is to file a Pull Request (PR). The contributions
|
back into the master branch is to file a Pull Request. The contributions
|
||||||
should meet code, test, and commit message standards as described below,
|
should meet code, test, and commit message standards as described below,
|
||||||
and the pull request should include a completed author checklist, also
|
and the pull request should include a completed author checklist, also
|
||||||
as described below. Pull requests may be assigned to specific team
|
as described below. Pull requests may be assigned to specific team
|
||||||
@ -114,15 +114,6 @@ request. When the reviewer is satisfied, they should add a comment to
|
|||||||
the pull request containing the reviewer checklist (from below) and complete
|
the pull request containing the reviewer checklist (from below) and complete
|
||||||
the merge back to the master branch.
|
the merge back to the master branch.
|
||||||
|
|
||||||
Additionally:
|
|
||||||
* Every pull request must link to the issue that it addresses. Eg. “Addresses #1234” or “Closes #1234”. This is the responsibility of the pull request’s __author__. If no issue exists, create one.
|
|
||||||
* Every __author__ must include testing instructions. These instructions should identify the areas of code affected, and some minimal test steps. If addressing a bug, reproduction steps should be included, if they were not included in the original issue. If reproduction steps were included on the original issue, and are sufficient, refer to them.
|
|
||||||
* A pull request that closes an issue should say so in the description. Including the text “Closes #1234” will cause the linked issue to be automatically closed when the pull request is merged. This is the responsibility of the pull request’s __author__.
|
|
||||||
* When a pull request is merged, and the corresponding issue closed, the __reviewer__ must add the tag “unverified” to the original issue. This will indicate that although the issue is closed, it has not been tested yet.
|
|
||||||
* Every PR must have two reviewers assigned, though only one approval is necessary for merge.
|
|
||||||
* Changes to API require approval by a senior developer.
|
|
||||||
* When creating a PR, it is the author's responsibility to apply any priority label from the issue to the PR as well. This helps with prioritization.
|
|
||||||
|
|
||||||
## Standards
|
## Standards
|
||||||
|
|
||||||
Contributions to Open MCT are expected to meet the following standards.
|
Contributions to Open MCT are expected to meet the following standards.
|
||||||
@ -131,104 +122,97 @@ changes.
|
|||||||
|
|
||||||
### Code Standards
|
### Code Standards
|
||||||
|
|
||||||
JavaScript sources in Open MCT must satisfy the ESLint rules defined in
|
JavaScript sources in Open MCT must satisfy JSLint under its default
|
||||||
this repository. This is verified by the command line build.
|
settings. This is verified by the command line build.
|
||||||
|
|
||||||
#### Code Guidelines
|
#### Code Guidelines
|
||||||
|
|
||||||
The following guidelines are provided for anyone contributing source code to the Open MCT project:
|
JavaScript sources in Open MCT should:
|
||||||
|
|
||||||
1. Write clean code. Here’s a good summary - https://github.com/ryanmcdermott/clean-code-javascript.
|
* Use four spaces for indentation. Tabs should not be used.
|
||||||
1. Include JSDoc for any exposed API (e.g. public methods, classes).
|
* Include JSDoc for any exposed API (e.g. public methods, constructors).
|
||||||
1. Include non-JSDoc comments as-needed for explaining private variables,
|
* Include non-JSDoc comments as-needed for explaining private variables,
|
||||||
methods, or algorithms when they are non-obvious. Otherwise code
|
methods, or algorithms when they are non-obvious.
|
||||||
should be self-documenting.
|
* Define one public class per script, expressed as a constructor function
|
||||||
1. Classes and Vue components should use camel case, first letter capitalized
|
returned from an AMD-style module.
|
||||||
|
* Follow “Java-like” naming conventions. These includes:
|
||||||
|
* Classes should use camel case, first letter capitalized
|
||||||
(e.g. SomeClassName).
|
(e.g. SomeClassName).
|
||||||
1. Methods, variables, fields, events, and function names should use camelCase,
|
* Methods, variables, fields, and function names should use camel case,
|
||||||
first letter lower-case (e.g. someVariableName).
|
first letter lower-case (e.g. someVariableName).
|
||||||
1. Source files that export functions should use camelCase, first letter lower-case (eg. testTools.js)
|
* Constants (variables or fields which are meant to be declared and
|
||||||
1. Constants (variables or fields which are meant to be declared and
|
|
||||||
initialized statically, and never changed) should use only capital
|
initialized statically, and never changed) should use only capital
|
||||||
letters, with underscores between words (e.g. SOME_CONSTANT). They should always be declared as `const`s
|
letters, with underscores between words (e.g. SOME_CONSTANT).
|
||||||
1. File names should be the name of the exported class, plus a .js extension
|
* File names should be the name of the exported class, plus a .js extension
|
||||||
(e.g. SomeClassName.js).
|
(e.g. SomeClassName.js).
|
||||||
1. Avoid anonymous functions, except when functions are short (one or two lines)
|
* Avoid anonymous functions, except when functions are short (a few lines)
|
||||||
and their inclusion makes sense within the flow of the code
|
and/or their inclusion makes sense within the flow of the code
|
||||||
(e.g. as arguments to a forEach call). Anonymous functions should always be arrow functions.
|
(e.g. as arguments to a forEach call).
|
||||||
1. Named functions are preferred over functions assigned to variables.
|
* Avoid deep nesting (especially of functions), except where necessary
|
||||||
eg.
|
|
||||||
```JavaScript
|
|
||||||
function renameObject(object, newName) {
|
|
||||||
Object.name = newName;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
is preferable to
|
|
||||||
```JavaScript
|
|
||||||
const rename = (object, newName) => {
|
|
||||||
Object.name = newName;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
1. Avoid deep nesting (especially of functions), except where necessary
|
|
||||||
(e.g. due to closure scope).
|
(e.g. due to closure scope).
|
||||||
1. End with a single new-line character.
|
* End with a single new-line character.
|
||||||
1. Always use ES6 `Class`es and inheritence rather than the pre-ES6 prototypal
|
* Expose public methods by declaring them on the class's prototype.
|
||||||
pattern.
|
* Within a given function's scope, do not mix declarations and imperative
|
||||||
1. Within a given function's scope, do not mix declarations and imperative
|
|
||||||
code, and present these in the following order:
|
code, and present these in the following order:
|
||||||
* First, variable declarations and initialization.
|
* First, variable declarations and initialization.
|
||||||
* Secondly, imperative statements.
|
* Second, function declarations.
|
||||||
* Finally, the returned value. A single return statement at the end of the function should be used, except where an early return would improve code clarity.
|
* Third, imperative statements.
|
||||||
1. Avoid the use of "magic" values.
|
* Finally, the returned value.
|
||||||
eg.
|
|
||||||
```JavaScript
|
|
||||||
const UNAUTHORIZED = 401;
|
|
||||||
if (responseCode === UNAUTHORIZED)
|
|
||||||
```
|
|
||||||
is preferable to
|
|
||||||
```JavaScript
|
|
||||||
if (responseCode === 401)
|
|
||||||
```
|
|
||||||
1. Use the ternary operator only for simple cases such as variable assignment. Nested ternaries should be avoided in all cases.
|
|
||||||
1. Test specs should reside alongside the source code they test, not in a separate directory.
|
|
||||||
1. Organize code by feature, not by type.
|
|
||||||
eg.
|
|
||||||
```
|
|
||||||
- telemetryTable
|
|
||||||
- row
|
|
||||||
TableRow.js
|
|
||||||
TableRowCollection.js
|
|
||||||
TableRow.vue
|
|
||||||
- column
|
|
||||||
TableColumn.js
|
|
||||||
TableColumn.vue
|
|
||||||
plugin.js
|
|
||||||
pluginSpec.js
|
|
||||||
```
|
|
||||||
is preferable to
|
|
||||||
```
|
|
||||||
- telemetryTable
|
|
||||||
- components
|
|
||||||
TableRow.vue
|
|
||||||
TableColumn.vue
|
|
||||||
- collections
|
|
||||||
TableRowCollection.js
|
|
||||||
TableColumn.js
|
|
||||||
TableRow.js
|
|
||||||
plugin.js
|
|
||||||
pluginSpec.js
|
|
||||||
```
|
|
||||||
Deviations from Open MCT code style guidelines require two-party agreement,
|
Deviations from Open MCT code style guidelines require two-party agreement,
|
||||||
typically from the author of the change and its reviewer.
|
typically from the author of the change and its reviewer.
|
||||||
|
|
||||||
|
#### Code Example
|
||||||
|
|
||||||
|
```js
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bundles should declare themselves as namespaces in whichever source
|
||||||
|
* file is most like the "main point of entry" to the bundle.
|
||||||
|
* @namespace some/bundle
|
||||||
|
*/
|
||||||
|
define(
|
||||||
|
['./OtherClass'],
|
||||||
|
function (OtherClass) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A summary of how to use this class goes here.
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
* @memberof some/bundle
|
||||||
|
*/
|
||||||
|
function ExampleClass() {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Methods which are not intended for external use should
|
||||||
|
// not have JSDoc (or should be marked @private)
|
||||||
|
ExampleClass.prototype.privateMethod = function () {
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A summary of this method goes here.
|
||||||
|
* @param {number} n a parameter
|
||||||
|
* @returns {number} a return value
|
||||||
|
*/
|
||||||
|
ExampleClass.prototype.publicMethod = function (n) {
|
||||||
|
return n * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ExampleClass;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
### Test Standards
|
### Test Standards
|
||||||
|
|
||||||
Automated testing shall occur whenever changes are merged into the main
|
Automated testing shall occur whenever changes are merged into the main
|
||||||
development branch and must be confirmed alongside any pull request.
|
development branch and must be confirmed alongside any pull request.
|
||||||
|
|
||||||
Automated tests are tests which exercise plugins, API, and utility classes.
|
Automated tests are typically unit tests which exercise individual software
|
||||||
Tests are subject to code review along with the actual implementation, to
|
components. Tests are subject to code review along with the actual
|
||||||
ensure that tests are applicable and useful.
|
implementation, to ensure that tests are applicable and useful.
|
||||||
|
|
||||||
Examples of useful tests:
|
Examples of useful tests:
|
||||||
* Tests which replicate bugs (or their root causes) to verify their
|
* Tests which replicate bugs (or their root causes) to verify their
|
||||||
@ -238,26 +222,8 @@ Examples of useful tests:
|
|||||||
* Tests which verify expected interactions with other components in the
|
* Tests which verify expected interactions with other components in the
|
||||||
system.
|
system.
|
||||||
|
|
||||||
#### Guidelines
|
During automated testing, code coverage metrics will be reported. Line
|
||||||
* 100% statement coverage is achievable and desirable.
|
coverage must remain at or above 80%.
|
||||||
* Do blackbox testing. Test external behaviors, not internal details. Write tests that describe what your plugin is supposed to do. How it does this doesn't matter, so don't test it.
|
|
||||||
* Unit test specs for plugins should be defined at the plugin level. Start with one test spec per plugin named pluginSpec.js, and as this test spec grows too big, break it up into multiple test specs that logically group related tests.
|
|
||||||
* Unit tests for API or for utility functions and classes may be defined at a per-source file level.
|
|
||||||
* Wherever possible only use and mock public API, builtin functions, and UI in your test specs. Do not directly invoke any private functions. ie. only call or mock functions and objects exposed by openmct.* (eg. openmct.telemetry, openmct.objectView, etc.), and builtin browser functions (fetch, requestAnimationFrame, setTimeout, etc.).
|
|
||||||
* Where builtin functions have been mocked, be sure to clear them between tests.
|
|
||||||
* Test at an appropriate level of isolation. Eg.
|
|
||||||
* If you’re testing a view, you do not need to test the whole application UI, you can just fetch the view provider using the public API and render the view into an element that you have created.
|
|
||||||
* You do not need to test that the view switcher works, there should be separate tests for that.
|
|
||||||
* You do not need to test that telemetry providers work, you can mock openmct.telemetry.request() to feed test data to the view.
|
|
||||||
* Use your best judgement when deciding on appropriate scope.
|
|
||||||
* Automated tests for plugins should start by actually installing the plugin being tested, and then test that installing the plugin adds the desired features and behavior to Open MCT, observing the above rules.
|
|
||||||
* All variables used in a test spec, including any instances of the Open MCT API should be declared inside of an appropriate block scope (not at the root level of the source file), and should be initialized in the relevant beforeEach block. `beforeEach` is preferable to `beforeAll` to avoid leaking of state between tests.
|
|
||||||
* A `afterEach` or `afterAll` should be used to do any clean up necessary to prevent leakage of state between test specs. This can happen when functions on `window` are wrapped, or when the URL is changed. [A convenience function](https://github.com/nasa/openmct/blob/master/src/utils/testing.js#L59) is provided for resetting the URL and clearing builtin spies between tests.
|
|
||||||
* If writing unit tests for legacy Angular code be sure to follow [best practices in order to avoid memory leaks](https://www.thecodecampus.de/blog/avoid-memory-leaks-angularjs-unit-tests/).
|
|
||||||
|
|
||||||
#### Examples
|
|
||||||
* [Example of an automated test spec for an object view plugin](https://github.com/nasa/openmct/blob/master/src/plugins/telemetryTable/pluginSpec.js)
|
|
||||||
* [Example of an automated test spec for API](https://github.com/nasa/openmct/blob/master/src/api/time/TimeAPISpec.js)
|
|
||||||
|
|
||||||
### Commit Message Standards
|
### Commit Message Standards
|
||||||
|
|
||||||
@ -326,7 +292,6 @@ checklist).
|
|||||||
2. Unit tests included and/or updated with changes?
|
2. Unit tests included and/or updated with changes?
|
||||||
3. Command line build passes?
|
3. Command line build passes?
|
||||||
4. Changes have been smoke-tested?
|
4. Changes have been smoke-tested?
|
||||||
5. Testing instructions included?
|
|
||||||
|
|
||||||
### Reviewer Checklist
|
### Reviewer Checklist
|
||||||
|
|
||||||
@ -334,4 +299,3 @@ checklist).
|
|||||||
2. Appropriate unit tests included?
|
2. Appropriate unit tests included?
|
||||||
3. Code style and in-line documentation are appropriate?
|
3. Code style and in-line documentation are appropriate?
|
||||||
4. Commit messages meet standards?
|
4. Commit messages meet standards?
|
||||||
5. Has associated issue been labelled `unverified`? (only applicable if this PR closes the issue)
|
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# Open MCT License
|
|
||||||
|
|
||||||
Open MCT, Copyright (c) 2014-2021, 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
Normal file
@ -0,0 +1,691 @@
|
|||||||
|
# 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.
|
116
README.md
@ -9,6 +9,26 @@ 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/).
|
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 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.
|
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.
|
||||||
@ -28,14 +48,9 @@ Building and running Open MCT in your local dev environment is very easy. Be sur
|
|||||||
|
|
||||||
Open MCT is now running, and can be accessed by pointing a web browser at [http://localhost:8080/](http://localhost:8080/)
|
Open MCT is now running, and can be accessed by pointing a web browser at [http://localhost:8080/](http://localhost:8080/)
|
||||||
|
|
||||||
## Open MCT v1.0.0
|
|
||||||
This represents a major overhaul of Open MCT with significant changes under the hood. We aim to maintain backward compatibility but if you do find compatibility issues, please let us know by filing an issue in this repository. If you are having major issues with v1.0.0 please check-out the v0.14.0 tag until we can resolve them for you.
|
|
||||||
|
|
||||||
If you are migrating an application built with Open MCT as a dependency to v1.0.0 from an earlier version, please refer to [our migration guide](https://nasa.github.io/openmct/documentation/migration-guide).
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Documentation is available on the [Open MCT website](https://nasa.github.io/openmct/documentation/).
|
Documentation is available on the [Open MCT website](https://nasa.github.io/openmct/documentation/). The documentation can also be built locally.
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
@ -43,29 +58,68 @@ The clearest examples for developing Open MCT plugins are in the
|
|||||||
[tutorials](https://github.com/nasa/openmct-tutorial) provided in
|
[tutorials](https://github.com/nasa/openmct-tutorial) provided in
|
||||||
our documentation.
|
our documentation.
|
||||||
|
|
||||||
We want Open MCT to be as easy to use, install, run, and develop for as
|
For a practical example of a telemetry adapter, see David Hudson's
|
||||||
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).
|
[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.
|
||||||
|
|
||||||
## Building Applications With Open MCT
|
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.
|
||||||
|
|
||||||
Open MCT is built using [`npm`](http://npmjs.com/) and [`webpack`](https://webpack.js.org/).
|
### 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:
|
||||||
|
|
||||||
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).
|
* `npm install`
|
||||||
|
* `npm install canvas nomnoml`
|
||||||
|
* `npm run docs`
|
||||||
|
|
||||||
## Plugins
|
Documentation will be generated in `target/docs`.
|
||||||
|
|
||||||
Open MCT can be extended via plugins that make calls to the Open MCT API. A plugin is a group
|
## Deploying Open MCT
|
||||||
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.
|
|
||||||
|
|
||||||
As well as providing an extension mechanism, most of the core Open MCT codebase is also
|
Open MCT is built using [`npm`](http://npmjs.com/)
|
||||||
written as plugins.
|
and [`gulp`](http://gulpjs.com/).
|
||||||
|
|
||||||
For information on writing plugins, please see [our API documentation](https://github.com/nasa/openmct/blob/master/API.md#plugins).
|
To build Open MCT for deployment:
|
||||||
|
|
||||||
|
`npm run prepublish`
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
Tests are written for [Jasmine 3](https://jasmine.github.io/api/3.1/global)
|
Tests are written for [Jasmine 1.3](http://jasmine.github.io/1.3/introduction.html)
|
||||||
and run by [Karma](http://karma-runner.github.io). To run:
|
and run by [Karma](http://karma-runner.github.io). To run:
|
||||||
|
|
||||||
`npm test`
|
`npm test`
|
||||||
@ -81,7 +135,7 @@ naming convention is otherwise the same.)
|
|||||||
### Test Reporting
|
### Test Reporting
|
||||||
|
|
||||||
When `npm test` is run, test results will be written as HTML to
|
When `npm test` is run, test results will be written as HTML to
|
||||||
`dist/reports/tests/`. Code coverage information is written to `dist/reports/coverage`.
|
`target/tests`. Code coverage information is written to `target/coverage`.
|
||||||
|
|
||||||
# Glossary
|
# Glossary
|
||||||
|
|
||||||
@ -91,8 +145,11 @@ addressed (either by updating this glossary or changing code to reflect
|
|||||||
correct usage.) Other developer documentation, particularly in-line
|
correct usage.) Other developer documentation, particularly in-line
|
||||||
documentation, may presume an understanding of these terms.
|
documentation, may presume an understanding of these terms.
|
||||||
|
|
||||||
* _plugin_: A plugin is a removable, reusable grouping of software elements.
|
* _bundle_: A bundle is a removable, reusable grouping of software elements.
|
||||||
The application is composed of plugins.
|
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.
|
||||||
* _composition_: In the context of a domain object, this refers to the set of
|
* _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
|
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
|
object's composition is the set of domain objects that should appear
|
||||||
@ -107,8 +164,13 @@ documentation, may presume an understanding of these terms.
|
|||||||
* _domain object_: A meaningful object to the user; a distinct thing in
|
* _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
|
the work support by Open MCT. Anything that appears in the left-hand
|
||||||
tree is a domain object.
|
tree is a domain object.
|
||||||
* _identifier_: A tuple consisting of a namespace and a key, which together uniquely
|
* _extension_: An extension is a unit of functionality exposed to the
|
||||||
identifies a domain object.
|
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.)
|
||||||
* _model_: The persistent state associated with a domain object. A domain
|
* _model_: The persistent state associated with a domain object. A domain
|
||||||
object's model is a JavaScript object which can be converted to JSON
|
object's model is a JavaScript object which can be converted to JSON
|
||||||
without losing information (that is, it contains no methods.)
|
without losing information (that is, it contains no methods.)
|
||||||
@ -120,5 +182,7 @@ documentation, may presume an understanding of these terms.
|
|||||||
a user clicks on a domain object in the tree, they are _navigating_ to
|
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
|
it, and it is thereafter considered the _navigated_ object (until the
|
||||||
user makes another such choice.)
|
user makes another such choice.)
|
||||||
* _namespace_: A name used to identify a persistence store. A running open MCT
|
* _space_: A name used to identify a persistence store. Interactions with
|
||||||
application could potentially use multiple persistence stores, with the
|
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.)
|
||||||
|
84
app.js
@ -7,17 +7,27 @@
|
|||||||
* node app.js [options]
|
* node app.js [options]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const options = require('minimist')(process.argv.slice(2));
|
var BUNDLE_FILE = 'bundles.json',
|
||||||
const express = require('express');
|
options = require('minimist')(process.argv.slice(2)),
|
||||||
const app = express();
|
express = require('express'),
|
||||||
const fs = require('fs');
|
app = express(),
|
||||||
const request = require('request');
|
fs = require('fs'),
|
||||||
|
request = require('request');
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
options.port = options.port || options.p || 8080;
|
options.port = options.port || options.p || 8080;
|
||||||
options.host = options.host || 'localhost';
|
|
||||||
options.directory = options.directory || options.D || '.';
|
options.directory = options.directory || options.D || '.';
|
||||||
|
['include', 'exclude', 'i', 'x'].forEach(function (opt) {
|
||||||
|
options[opt] = options[opt] || [];
|
||||||
|
// Make sure includes/excludes always end up as arrays
|
||||||
|
options[opt] = Array.isArray(options[opt]) ?
|
||||||
|
options[opt] : [options[opt]];
|
||||||
|
});
|
||||||
|
options.include = options.include.concat(options.i);
|
||||||
|
options.exclude = options.exclude.concat(options.x);
|
||||||
|
|
||||||
// Show command line options
|
// Show command line options
|
||||||
if (options.help || options.h) {
|
if (options.help || options.h) {
|
||||||
@ -25,6 +35,8 @@ if (options.help || options.h) {
|
|||||||
console.log("Options:");
|
console.log("Options:");
|
||||||
console.log(" --help, -h Show this message.");
|
console.log(" --help, -h Show this message.");
|
||||||
console.log(" --port, -p <number> Specify port.");
|
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(" --directory, -D <bundle> Serve files from specified directory.");
|
console.log(" --directory, -D <bundle> Serve files from specified directory.");
|
||||||
console.log("");
|
console.log("");
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
@ -32,6 +44,28 @@ if (options.help || options.h) {
|
|||||||
|
|
||||||
app.disable('x-powered-by');
|
app.disable('x-powered-by');
|
||||||
|
|
||||||
|
// Override bundles.json for HTTP requests
|
||||||
|
app.use('/' + BUNDLE_FILE, function (req, res) {
|
||||||
|
var bundles;
|
||||||
|
|
||||||
|
try {
|
||||||
|
bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8'));
|
||||||
|
} catch (e) {
|
||||||
|
bundles = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle command line inclusions/exclusions
|
||||||
|
bundles = bundles.concat(options.include);
|
||||||
|
bundles = bundles.filter(function (bundle) {
|
||||||
|
return options.exclude.indexOf(bundle) === -1;
|
||||||
|
});
|
||||||
|
bundles = bundles.filter(function (bundle, index) { // Uniquify
|
||||||
|
return bundles.indexOf(bundle) === index;
|
||||||
|
});
|
||||||
|
|
||||||
|
res.send(JSON.stringify(bundles));
|
||||||
|
});
|
||||||
|
|
||||||
app.use('/proxyUrl', function proxyRequest(req, res, next) {
|
app.use('/proxyUrl', function proxyRequest(req, res, next) {
|
||||||
console.log('Proxying request to: ', req.query.url);
|
console.log('Proxying request to: ', req.query.url);
|
||||||
req.pipe(request({
|
req.pipe(request({
|
||||||
@ -40,39 +74,11 @@ app.use('/proxyUrl', function proxyRequest(req, res, next) {
|
|||||||
}).on('error', next)).pipe(res);
|
}).on('error', next)).pipe(res);
|
||||||
});
|
});
|
||||||
|
|
||||||
const webpack = require('webpack');
|
// Expose everything else as static files
|
||||||
const webpackConfig = require('./webpack.config.js');
|
app.use(express['static'](options.directory));
|
||||||
webpackConfig.plugins.push(new webpack.HotModuleReplacementPlugin());
|
|
||||||
webpackConfig.plugins.push(function() { this.plugin('watch-run', function(watching, callback) { console.log('Begin compile at ' + new Date()); callback(); }) });
|
|
||||||
|
|
||||||
webpackConfig.entry.openmct = [
|
|
||||||
'webpack-hot-middleware/client?reload=true',
|
|
||||||
webpackConfig.entry.openmct
|
|
||||||
];
|
|
||||||
|
|
||||||
const compiler = webpack(webpackConfig);
|
|
||||||
|
|
||||||
app.use(require('webpack-dev-middleware')(
|
|
||||||
compiler,
|
|
||||||
{
|
|
||||||
publicPath: '/dist',
|
|
||||||
logLevel: 'warn'
|
|
||||||
}
|
|
||||||
));
|
|
||||||
|
|
||||||
app.use(require('webpack-hot-middleware')(
|
|
||||||
compiler,
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
));
|
|
||||||
|
|
||||||
// Expose index.html for development users.
|
|
||||||
app.get('/', function (req, res) {
|
|
||||||
fs.createReadStream('index.html').pipe(res);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Finally, open the HTTP server and log the instance to the console
|
// Finally, open the HTTP server and log the instance to the console
|
||||||
app.listen(options.port, options.host, function() {
|
app.listen(options.port, function() {
|
||||||
console.log('Open MCT application running at %s:%s', options.host, options.port)
|
console.log('Open MCT application running at localhost:' + options.port)
|
||||||
});
|
});
|
||||||
|
}());
|
||||||
|
28
bower.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "openmct",
|
||||||
|
"description": "The Open MCT core platform",
|
||||||
|
"main": "",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"moduleType": [],
|
||||||
|
"homepage": "http://nasa.github.io/openmct/",
|
||||||
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"angular": "1.4.4",
|
||||||
|
"angular-route": "1.4.4",
|
||||||
|
"moment": "^2.11.1",
|
||||||
|
"moment-duration-format": "^1.3.0",
|
||||||
|
"requirejs": "~2.1.22",
|
||||||
|
"text": "requirejs-text#^2.0.14",
|
||||||
|
"es6-promise": "^3.3.0",
|
||||||
|
"screenfull": "^3.0.0",
|
||||||
|
"node-uuid": "^1.4.7",
|
||||||
|
"comma-separated-values": "^3.6.4",
|
||||||
|
"FileSaver.js": "^0.0.2",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#* Open MCT, Copyright (c) 2014-2021, United States Government
|
#* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
#* as represented by the Administrator of the National Aeronautics and Space
|
#* as represented by the Administrator of the National Aeronautics and Space
|
||||||
#* Administration. All rights reserved.
|
#* Administration. All rights reserved.
|
||||||
#*
|
#*
|
||||||
|
19
circle.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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
|
@ -1,21 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2021, 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.
|
|
||||||
*****************************************************************************/
|
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -2283,7 +2283,7 @@ To install build dependencies (only needs to be run once):
|
|||||||
|
|
||||||
To build:
|
To build:
|
||||||
|
|
||||||
`npm run prepare`
|
`npm run prepublish`
|
||||||
|
|
||||||
This will compile and minify JavaScript sources, as well as copy over assets.
|
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
|
The contents of the `dist` folder will contain a runnable Open MCT
|
||||||
|
@ -1,121 +0,0 @@
|
|||||||
# Security Guide
|
|
||||||
|
|
||||||
Open MCT is a rich client with plugin support that executes as a single page
|
|
||||||
web application in a browser environment. Security concerns and
|
|
||||||
vulnerabilities associated with the web as a platform should be considered
|
|
||||||
before deploying Open MCT (or any other web application) for mission or
|
|
||||||
production usage.
|
|
||||||
|
|
||||||
This document describes several important points to consider when developing
|
|
||||||
for or deploying Open MCT securely. Other resources such as
|
|
||||||
[Open Web Application Security Project (OWASP)](https://www.owasp.org)
|
|
||||||
provide a deeper and more general overview of security for web applications.
|
|
||||||
|
|
||||||
|
|
||||||
## Security Model
|
|
||||||
|
|
||||||
Open MCT has been architected assuming the following deployment pattern:
|
|
||||||
|
|
||||||
* A tagged, tested Open MCT version will be used.
|
|
||||||
* Externally authored plugins will be installed.
|
|
||||||
* A server will provide persistent storage, telemetry, and other shared data.
|
|
||||||
* Authorization, authentication, and auditing will be handled by a server.
|
|
||||||
|
|
||||||
|
|
||||||
## Security Procedures
|
|
||||||
|
|
||||||
The Open MCT team secures our code base using a combination of code review,
|
|
||||||
dependency review, and periodic security reviews. Static analysis performed
|
|
||||||
during automated verification additionally safeguards against common
|
|
||||||
coding errors which may result in vulnerabilities.
|
|
||||||
|
|
||||||
|
|
||||||
### Code Review
|
|
||||||
|
|
||||||
All contributions are reviewed by internal team members. External
|
|
||||||
contributors receive increased scrutiny for security and quality,
|
|
||||||
and must sign a licensing agreement.
|
|
||||||
|
|
||||||
### Dependency Review
|
|
||||||
|
|
||||||
Before integrating third-party dependencies, they are reviewed for security
|
|
||||||
and quality, with consideration given to authors and users of these
|
|
||||||
dependencies, as well as review of open source code.
|
|
||||||
|
|
||||||
### Periodic Security Reviews
|
|
||||||
|
|
||||||
Open MCT's code, design, and architecture are periodically reviewed
|
|
||||||
(approximately annually) for common security issues, such as the
|
|
||||||
[OWASP Top Ten](https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project).
|
|
||||||
|
|
||||||
|
|
||||||
## Security Concerns
|
|
||||||
|
|
||||||
Certain security concerns deserve special attention when deploying Open MCT,
|
|
||||||
or when authoring plugins.
|
|
||||||
|
|
||||||
### Identity Spoofing
|
|
||||||
|
|
||||||
Open MCT issues calls to web services with the privileges of a logged in user.
|
|
||||||
Compromised sources (either for Open MCT itself or a plugin) could
|
|
||||||
therefore allow malicious code to execute with those privileges.
|
|
||||||
|
|
||||||
To avoid this:
|
|
||||||
|
|
||||||
* Serve Open MCT and other scripts over SSL (https rather than http)
|
|
||||||
to prevent man-in-the-middle attacks.
|
|
||||||
* Exercise precautions such as security reviews for any plugins or
|
|
||||||
applications built for or with Open MCT to reject malicious changes.
|
|
||||||
|
|
||||||
### Information Disclosure
|
|
||||||
|
|
||||||
If Open MCT is used to handle or display sensitive data, any components
|
|
||||||
(such as adapter plugins) must take care to avoid leaking or disclosing
|
|
||||||
this information. For example, avoid sending sensitive data to third-party
|
|
||||||
servers or insecure APIs.
|
|
||||||
|
|
||||||
### Data Tampering
|
|
||||||
|
|
||||||
The web application architecture leaves open the possibility that direct
|
|
||||||
calls will be made to back-end services, circumventing Open MCT entirely.
|
|
||||||
As such, Open MCT assumes that server components will perform any necessary
|
|
||||||
data validation during calls issues to the server.
|
|
||||||
|
|
||||||
Additionally, plugins which serialize and write data to the server must
|
|
||||||
escape that data to avoid database injection attacks, and similar.
|
|
||||||
|
|
||||||
### Repudiation
|
|
||||||
|
|
||||||
Open MCT assumes that servers log any relevant interactions and associates
|
|
||||||
these with a user identity; the specific user actions taken within the
|
|
||||||
application are assumed not to be of concern for auditing.
|
|
||||||
|
|
||||||
In the absence of server-side logging, users may disclaim (maliciously,
|
|
||||||
mistakenly, or otherwise) actions taken within the system without any
|
|
||||||
way to prove otherwise.
|
|
||||||
|
|
||||||
If keeping client-level interactions is important, this will need to be
|
|
||||||
implemented via a plugin.
|
|
||||||
|
|
||||||
### Denial-of-service
|
|
||||||
|
|
||||||
Open MCT assumes that server-side components will be insulated against
|
|
||||||
denial-of-service attacks. Services should only permit resource-intensive
|
|
||||||
tasks to be initiated by known or trusted users.
|
|
||||||
|
|
||||||
### Elevation of Privilege
|
|
||||||
|
|
||||||
Corollary to the assumption that servers guide against identity spoofing,
|
|
||||||
Open MCT assumes that services do not allow a user to act with
|
|
||||||
inappropriately escalated privileges. Open MCT cannot protect against
|
|
||||||
such escalation; in the clearest case, a malicious actor could interact
|
|
||||||
with web services directly to exploit such a vulnerability.
|
|
||||||
|
|
||||||
## Additional Reading
|
|
||||||
|
|
||||||
The following resources have been used as a basis for identifying potential
|
|
||||||
security threats to Open MCT deployments in preparation of this document:
|
|
||||||
|
|
||||||
* [STRIDE model](https://www.owasp.org/index.php/Threat_Risk_Modeling#STRIDE)
|
|
||||||
* [Attack Surface Analysis Cheat Sheet](https://www.owasp.org/index.php/Attack_Surface_Analysis_Cheat_Sheet)
|
|
||||||
* [XSS Prevention Cheat Sheet](https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet)
|
|
@ -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
|
* The [Developer's Guide](guide/) goes into more detail about how to use the
|
||||||
platform and the functionality that it provides.
|
platform and the functionality that it provides.
|
||||||
|
|
||||||
* The [Tutorials](https://github.com/nasa/openmct-tutorial) give examples of extending the platform to add
|
* The [Tutorials](tutorials/) give examples of extending the platform to add
|
||||||
functionality, and integrate with data sources.
|
functionality, and integrate with data sources.
|
||||||
|
@ -125,22 +125,3 @@ A release is not closed until both categories have been performed on
|
|||||||
the latest snapshot of the software, _and_ no issues labelled as
|
the latest snapshot of the software, _and_ no issues labelled as
|
||||||
["blocker" or "critical"](https://github.com/nasa/openmctweb/blob/master/CONTRIBUTING.md#issue-reporting)
|
["blocker" or "critical"](https://github.com/nasa/openmctweb/blob/master/CONTRIBUTING.md#issue-reporting)
|
||||||
remain open.
|
remain open.
|
||||||
|
|
||||||
### Testathons
|
|
||||||
Testathons can be used as a means of performing per-sprint and per-release testing.
|
|
||||||
|
|
||||||
#### Timing
|
|
||||||
For per-sprint testing, a testathon is typically performed at the beginning of the third week of a sprint, and again later that week to verify any fixes. For per-release testing, a testathon is typically performed prior to any formal testing processes that are applicable to that release.
|
|
||||||
|
|
||||||
#### Process
|
|
||||||
|
|
||||||
1. Prior to the scheduled testathon, a list will be compiled of all issues that are closed and unverified.
|
|
||||||
2. For each issue, testers should review the associated PR for testing instructions. See the contributing guide for instructions on [pull requests](https://github.com/nasa/openmct/blob/master/CONTRIBUTING.md#merging).
|
|
||||||
3. As each issue is verified via testing, any team members testing it should leave a comment on that issue indicating that it has been verified fixed.
|
|
||||||
4. If a bug is found that relates to an issue being tested, notes should be included on the associated issue, and the issue should be reopened. Bug notes should include reproduction steps.
|
|
||||||
5. For any bugs that are not obviously related to any of the issues under test, a new issue should be created with details about the bug, including reproduction steps. If unsure about whether a bug relates to an issue being tested, just create a new issue.
|
|
||||||
6. At the end of the testathon, triage will take place, where all tested issues will be reviewed.
|
|
||||||
7. If verified fixed, an issue will remain closed, and will have the “unverified” label removed.
|
|
||||||
8. For any bugs found, a severity will be assigned.
|
|
||||||
9. A second testathon will be scheduled for later in the week that will aim to address all issues identified as blockers, as well as any other issues scoped by the team during triage.
|
|
||||||
10. Any issues that were not tested will remain "unverified" and will be picked up in the next testathon.
|
|
||||||
|
@ -92,59 +92,47 @@ should update (or delegate the task of updating) Open MCT version
|
|||||||
numbers by the following process:
|
numbers by the following process:
|
||||||
|
|
||||||
1. Update version number in `package.json`
|
1. Update version number in `package.json`
|
||||||
1. Create a new branch off the `master` branch.
|
1. Remove `-SNAPSHOT` suffix.
|
||||||
2. Remove `-SNAPSHOT` suffix from the version in `package.json`.
|
2. Verify that resulting version number meets semantic versioning
|
||||||
3. Verify that resulting version number meets semantic versioning
|
requirements relative to previous stable version. Increment if
|
||||||
requirements relative to previous stable version. Increment the
|
necessary.
|
||||||
version number if necessary.
|
3. If version is considered unstable (which may be the case during
|
||||||
4. If version is considered unstable (which may be the case during
|
|
||||||
the first three sprints of a release), apply a new suffix per
|
the first three sprints of a release), apply a new suffix per
|
||||||
[Version Numbering](#version-numbering) guidance above.
|
[Version Numbering](#version-numbering) guidance above.
|
||||||
2. Tag the release.
|
2. Tag the release.
|
||||||
1. Commit changes to `package.json` on the new branch created in
|
1. Commit changes to `package.json` on the `master` branch.
|
||||||
the previous step.
|
|
||||||
The commit message should reference the sprint being closed,
|
The commit message should reference the sprint being closed,
|
||||||
preferably by a URL reference to the associated Milestone in
|
preferably by a URL reference to the associated Milestone in
|
||||||
GitHub.
|
GitHub.
|
||||||
2. Verify that build still completes, that application passes
|
2. Verify that build still completes, that application passes
|
||||||
smoke-testing, and that only differences from tested versions
|
smoke-testing, and that only differences from tested versions
|
||||||
are the changes to version number above.
|
are the changes to version number above.
|
||||||
3. Push the new branch.
|
3. Push the `master` branch.
|
||||||
4. Tag this commit with the version number, prepending the letter "v".
|
4. Tag this commit with the version number, prepending the letter "v".
|
||||||
(e.g. `git tag v0.9.3-alpha`)
|
(e.g. `git tag v0.9.3-alpha`)
|
||||||
5. Push the tag to GitHub. (e.g. `git push origin v0.9.3-alpha`).
|
5. Push the tag to GitHub. (e.g. `git push origin v0.9.3-alpha`).
|
||||||
3. Upload a release archive.
|
3. Upload a release archive.
|
||||||
1. Use the [GitHub release interface](https://github.com/nasa/openmct/releases)
|
1. Run `npm pack` to generate the archive.
|
||||||
|
2. Use the [GitHub release interface](https://github.com/nasa/openmct/releases)
|
||||||
to draft a new release.
|
to draft a new release.
|
||||||
2. Choose the existing tag for the new version (created and pushed above.)
|
3. Choose the existing tag for the new version (created and pushed above.)
|
||||||
Enter the tag name as the release name as well; see existing releases
|
Enter the tag name as the release name as well; see existing releases
|
||||||
for examples. (e.g. `Open MCT v0.9.3-alpha`)
|
for examples.
|
||||||
3. Designate the release as a "pre-release" as appropriate (for instance,
|
4. Attach the release archive.
|
||||||
|
5. Designate the release as a "pre-release" as appropriate (for instance,
|
||||||
when the version number has been suffixed as unstable, or when
|
when the version number has been suffixed as unstable, or when
|
||||||
the version number is below 1.0.0.)
|
the version number is below 1.0.0.)
|
||||||
4. Add release notes including any breaking changes, enhancements,
|
4. Restore snapshot status in `package.json`
|
||||||
bug fixes with solutions in brief.
|
1. Remove any suffix from the version number, or increment the
|
||||||
5. Publish the release.
|
_patch_ version if there is no suffix.
|
||||||
4. Publish the release to npm
|
2. Append a `-SNAPSHOT` suffix.
|
||||||
1. Login to npm
|
3. Commit changes to `package.json` on the `master` branch.
|
||||||
2. Checkout the tag created in the previous step.
|
|
||||||
3. In `package.json` change package to be public (private: false)
|
|
||||||
4. Test the package before publishing by doing `npm publish --dry-run`
|
|
||||||
if necessary.
|
|
||||||
5. Publish the package to the npmjs registry (e.g. `npm publish --access public`)
|
|
||||||
6. Confirm the package has been published (e.g. `https://www.npmjs.com/package/openmct`)
|
|
||||||
5. Update snapshot status in `package.json`
|
|
||||||
1. Create a new branch off the `master` branch.
|
|
||||||
2. Remove any suffix from the version number,
|
|
||||||
or increment the _patch_ version if there is no suffix.
|
|
||||||
3. Append a `-SNAPSHOT` suffix.
|
|
||||||
4. Commit changes to `package.json` on the `master` branch.
|
|
||||||
The commit message should reference the sprint being opened,
|
The commit message should reference the sprint being opened,
|
||||||
preferably by a URL reference to the associated Milestone in
|
preferably by a URL reference to the associated Milestone in
|
||||||
GitHub.
|
GitHub.
|
||||||
5. Verify that build still completes, that application passes
|
4. Verify that build still completes, that application passes
|
||||||
smoke-testing.
|
smoke-testing.
|
||||||
6. Create a PR to be merged into the `master` branch.
|
5. Push the `master` branch.
|
||||||
|
|
||||||
Projects dependent on Open MCT being co-developed by the Open MCT
|
Projects dependent on Open MCT being co-developed by the Open MCT
|
||||||
team should follow a similar process, except that they should
|
team should follow a similar process, except that they should
|
||||||
|
BIN
docs/src/tutorials/images/add-task.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
docs/src/tutorials/images/bar-plot-2.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
docs/src/tutorials/images/bar-plot-3.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
docs/src/tutorials/images/bar-plot-4.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
docs/src/tutorials/images/bar-plot.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
docs/src/tutorials/images/chrome.png
Normal file
After Width: | Height: | Size: 140 KiB |
BIN
docs/src/tutorials/images/remove-task.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
docs/src/tutorials/images/telemetry-1.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
docs/src/tutorials/images/telemetry-2.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
docs/src/tutorials/images/telemetry-3.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
docs/src/tutorials/images/todo-edit.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
docs/src/tutorials/images/todo-list.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
docs/src/tutorials/images/todo-restyled.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
docs/src/tutorials/images/todo-selection.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
docs/src/tutorials/images/todo.png
Normal file
After Width: | Height: | Size: 43 KiB |
3309
docs/src/tutorials/index.md
Normal file
8
example/builtins/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
This bundle is intended to serve as an example of registering
|
||||||
|
extensions which are mapped directly to built-in Angular features.
|
||||||
|
|
||||||
|
These are:
|
||||||
|
* Controllers
|
||||||
|
* Directives
|
||||||
|
* Routes
|
||||||
|
* Services
|
74
example/builtins/bundle.js
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* 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([
|
||||||
|
"./src/ExampleController",
|
||||||
|
"./src/ExampleDirective",
|
||||||
|
"./src/ExampleService",
|
||||||
|
'legacyRegistry'
|
||||||
|
], function (
|
||||||
|
ExampleController,
|
||||||
|
ExampleDirective,
|
||||||
|
ExampleService,
|
||||||
|
legacyRegistry
|
||||||
|
) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
legacyRegistry.register("example/builtins", {
|
||||||
|
"name": "Angular Built-ins Example",
|
||||||
|
"description": "Example showing how to declare extensions with built-in support from Angular.",
|
||||||
|
"sources": "src",
|
||||||
|
"extensions": {
|
||||||
|
"controllers": [
|
||||||
|
{
|
||||||
|
"key": "ExampleController",
|
||||||
|
"implementation": ExampleController,
|
||||||
|
"depends": [
|
||||||
|
"$scope",
|
||||||
|
"exampleService"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"directives": [
|
||||||
|
{
|
||||||
|
"key": "exampleDirective",
|
||||||
|
"implementation": ExampleDirective,
|
||||||
|
"depends": [
|
||||||
|
"examples[]"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"templateUrl": "templates/example.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"key": "exampleService",
|
||||||
|
"implementation": ExampleService
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
@ -1,33 +1,24 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the
|
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.
|
"License"); you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0.
|
http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
License for the specific language governing permissions and limitations
|
License for the specific language governing permissions and limitations
|
||||||
under the License.
|
under the License.
|
||||||
|
|
||||||
Open MCT includes source code licensed under additional open source
|
Open MCT includes source code licensed under additional open source
|
||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
this source code distribution or the Licensing information page available
|
this source code distribution or the Licensing information page available
|
||||||
at runtime from the About dialog for additional information.
|
at runtime from the About dialog for additional information.
|
||||||
-->
|
-->
|
||||||
<template>
|
<p>Hello, world! I am the default route.</p>
|
||||||
<div></div>
|
<p ng-controller="ExampleController">My controller has told me: "{{phrase}}"</p>
|
||||||
</template>
|
<span example-directive></span>
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
inject: ['openmct'],
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
this.openmct.indicators.indicatorObjects.forEach((indicator) => {
|
|
||||||
this.$el.appendChild(indicator.element);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,21 +19,24 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define,Promise*/
|
||||||
|
|
||||||
define([
|
/**
|
||||||
'./MCTChartSeriesElement'
|
* Module defining ExampleController. Created by vwoeltje on 11/4/14.
|
||||||
], function (
|
*/
|
||||||
MCTChartSeriesElement
|
define(
|
||||||
) {
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const MCTChartPointSet = MCTChartSeriesElement.extend({
|
/**
|
||||||
addPoint: function (point, start, count) {
|
*
|
||||||
this.buffer[start] = point.x;
|
* @constructor
|
||||||
this.buffer[start + 1] = point.y;
|
*/
|
||||||
|
function ExampleController($scope, exampleService) {
|
||||||
|
$scope.phrase = exampleService.getMessage();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
return MCTChartPointSet;
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
return ExampleController;
|
||||||
|
}
|
||||||
|
);
|
66
example/builtins/src/ExampleDirective.js
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* 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,Promise*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module defining ExampleDirective. Created by vwoeltje on 11/4/14.
|
||||||
|
*/
|
||||||
|
define(
|
||||||
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var HAS_EXTENSIONS = "A directive loaded these message from " +
|
||||||
|
"example extensions.",
|
||||||
|
NO_EXTENSIONS = "A directive tried to load example extensions," +
|
||||||
|
" but found none.",
|
||||||
|
MESSAGE = "I heard this from my partial constructor.";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function ExampleDirective(examples) {
|
||||||
|
// Build up a template from example extensions
|
||||||
|
var template = examples.length > 0 ?
|
||||||
|
HAS_EXTENSIONS : NO_EXTENSIONS;
|
||||||
|
|
||||||
|
template += "<ul>";
|
||||||
|
examples.forEach(function (E) {
|
||||||
|
template += "<li>";
|
||||||
|
if (typeof E === 'function') {
|
||||||
|
template += (new E(MESSAGE)).getText();
|
||||||
|
} else {
|
||||||
|
template += E.text;
|
||||||
|
}
|
||||||
|
template += "</li>";
|
||||||
|
});
|
||||||
|
template += "</ul>";
|
||||||
|
|
||||||
|
return {
|
||||||
|
template: template
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return ExampleDirective;
|
||||||
|
}
|
||||||
|
);
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,22 +19,28 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define,Promise*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module defining ExampleService. Created by vwoeltje on 11/4/14.
|
||||||
|
*/
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
function () {
|
function () {
|
||||||
function MCTIndicators(openmct) {
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function ExampleService() {
|
||||||
return {
|
return {
|
||||||
restrict: "E",
|
getMessage: function () {
|
||||||
link: function link(scope, element) {
|
return "I heard this from a service";
|
||||||
openmct.indicators.indicatorElements
|
|
||||||
.forEach(function (indicatorElement) {
|
|
||||||
element.append(indicatorElement);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return MCTIndicators;
|
return ExampleService;
|
||||||
}
|
}
|
||||||
);
|
);
|
82
example/composite/bundle.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.
|
||||||
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
|
define([
|
||||||
|
"./src/SomeProvider",
|
||||||
|
"./src/SomeOtherProvider",
|
||||||
|
"./src/SomeDecorator",
|
||||||
|
"./src/SomeOtherDecorator",
|
||||||
|
"./src/SomeAggregator",
|
||||||
|
"./src/SomeOtherExample",
|
||||||
|
'legacyRegistry'
|
||||||
|
], function (
|
||||||
|
SomeProvider,
|
||||||
|
SomeOtherProvider,
|
||||||
|
SomeDecorator,
|
||||||
|
SomeOtherDecorator,
|
||||||
|
SomeAggregator,
|
||||||
|
SomeOtherExample,
|
||||||
|
legacyRegistry
|
||||||
|
) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
legacyRegistry.register("example/composite", {
|
||||||
|
"extensions": {
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"implementation": SomeProvider,
|
||||||
|
"provides": "someService",
|
||||||
|
"type": "provider"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"implementation": SomeOtherProvider,
|
||||||
|
"provides": "someService",
|
||||||
|
"type": "provider"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"implementation": SomeDecorator,
|
||||||
|
"provides": "someService",
|
||||||
|
"type": "decorator"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"implementation": SomeOtherDecorator,
|
||||||
|
"provides": "someService",
|
||||||
|
"type": "decorator"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"implementation": SomeAggregator,
|
||||||
|
"provides": "someService",
|
||||||
|
"type": "aggregator"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"examples": [
|
||||||
|
{
|
||||||
|
"implementation": SomeOtherExample,
|
||||||
|
"depends": [
|
||||||
|
"someService"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
50
example/composite/src/SomeAggregator.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* 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,Promise*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module defining SomeAggregator. Created by vwoeltje on 11/5/14.
|
||||||
|
*/
|
||||||
|
define(
|
||||||
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function SomeAggregator(someProviders) {
|
||||||
|
return {
|
||||||
|
getMessages: function () {
|
||||||
|
return someProviders.map(function (provider) {
|
||||||
|
return provider.getMessages();
|
||||||
|
}).reduce(function (a, b) {
|
||||||
|
return a.concat(b);
|
||||||
|
}, []);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return SomeAggregator;
|
||||||
|
}
|
||||||
|
);
|
48
example/composite/src/SomeDecorator.js
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* 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,Promise*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module defining SomeDecorator. Created by vwoeltje on 11/5/14.
|
||||||
|
*/
|
||||||
|
define(
|
||||||
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function SomeDecorator(someProvider) {
|
||||||
|
return {
|
||||||
|
getMessages: function () {
|
||||||
|
return someProvider.getMessages().map(function (msg) {
|
||||||
|
return msg.toLocaleUpperCase();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return SomeDecorator;
|
||||||
|
}
|
||||||
|
);
|
48
example/composite/src/SomeOtherDecorator.js
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* 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,Promise*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module defining SomeOtherDecorator. Created by vwoeltje on 11/5/14.
|
||||||
|
*/
|
||||||
|
define(
|
||||||
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function SomeOtherDecorator(someProvider) {
|
||||||
|
return {
|
||||||
|
getMessages: function () {
|
||||||
|
return someProvider.getMessages().map(function (msg) {
|
||||||
|
return msg + "...";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return SomeOtherDecorator;
|
||||||
|
}
|
||||||
|
);
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,17 +19,28 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
define(['./URLIndicator'],
|
/*global define,Promise*/
|
||||||
function URLIndicatorPlugin(URLIndicator) {
|
|
||||||
return function (opts) {
|
|
||||||
return function install(openmct) {
|
|
||||||
const simpleIndicator = openmct.indicators.simpleIndicator();
|
|
||||||
const urlIndicator = new URLIndicator(opts, simpleIndicator);
|
|
||||||
|
|
||||||
openmct.indicators.add(simpleIndicator);
|
/**
|
||||||
|
* Module defining SomeOtherExample. Created by vwoeltje on 11/5/14.
|
||||||
|
*/
|
||||||
|
define(
|
||||||
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return urlIndicator;
|
/**
|
||||||
};
|
*
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function SomeOtherExample(someService) {
|
||||||
|
return {
|
||||||
|
getText: function () {
|
||||||
|
return someService.getMessages().join(" | ");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return SomeOtherExample;
|
||||||
|
}
|
||||||
);
|
);
|
48
example/composite/src/SomeOtherProvider.js
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* 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,Promise*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module defining SomeOtherProvider. Created by vwoeltje on 11/5/14.
|
||||||
|
*/
|
||||||
|
define(
|
||||||
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function SomeOtherProvider() {
|
||||||
|
return {
|
||||||
|
getMessages: function () {
|
||||||
|
return [
|
||||||
|
"I am a message from some other provider."
|
||||||
|
];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return SomeOtherProvider;
|
||||||
|
}
|
||||||
|
);
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,19 +19,30 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define,Promise*/
|
||||||
|
|
||||||
define(function () {
|
/**
|
||||||
|
* Module defining SomeProvider. Created by vwoeltje on 11/5/14.
|
||||||
|
*/
|
||||||
|
define(
|
||||||
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function SomeProvider() {
|
||||||
return {
|
return {
|
||||||
name: 'Telemetry Table',
|
getMessages: function () {
|
||||||
description: 'Display telemetry values for the current time bounds in tabular form. Supports filtering and sorting.',
|
return [
|
||||||
creatable: true,
|
"I am a message from some provider."
|
||||||
cssClass: 'icon-tabular-realtime',
|
];
|
||||||
initialize(domainObject) {
|
|
||||||
domainObject.composition = [];
|
|
||||||
domainObject.configuration = {
|
|
||||||
columnWidths: {},
|
|
||||||
hiddenColumns: {}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
|
|
||||||
|
return SomeProvider;
|
||||||
|
}
|
||||||
|
);
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,17 +19,18 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/EventTelemetryProvider"
|
"./src/EventTelemetryProvider",
|
||||||
|
'legacyRegistry'
|
||||||
], function (
|
], function (
|
||||||
EventTelemetryProvider
|
EventTelemetryProvider,
|
||||||
|
legacyRegistry
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
legacyRegistry.register("example/eventGenerator", {
|
||||||
name: "example/eventGenerator",
|
|
||||||
definition: {
|
|
||||||
"name": "Event Message Generator",
|
"name": "Event Message Generator",
|
||||||
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -48,7 +49,7 @@ define([
|
|||||||
{
|
{
|
||||||
"key": "eventGenerator",
|
"key": "eventGenerator",
|
||||||
"name": "Event Message Generator",
|
"name": "Event Message Generator",
|
||||||
"cssClass": "icon-generator-events",
|
"cssClass": "icon-folder-new",
|
||||||
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
||||||
"priority": 10,
|
"priority": 10,
|
||||||
"features": "creation",
|
"features": "creation",
|
||||||
@ -59,8 +60,8 @@ define([
|
|||||||
"source": "eventGenerator",
|
"source": "eventGenerator",
|
||||||
"domains": [
|
"domains": [
|
||||||
{
|
{
|
||||||
"key": "utc",
|
"key": "time",
|
||||||
"name": "Timestamp",
|
"name": "Time",
|
||||||
"format": "utc"
|
"format": "utc"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -75,6 +76,5 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining EventTelemetry.
|
* Module defining EventTelemetry.
|
||||||
@ -26,11 +27,12 @@
|
|||||||
* Modified by shale on 06/23/2015.
|
* Modified by shale on 06/23/2015.
|
||||||
*/
|
*/
|
||||||
define(
|
define(
|
||||||
['../data/transcript.json'],
|
['text!../data/transcript.json'],
|
||||||
function (messages) {
|
function (transcript) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var firstObservedTime = Date.now();
|
var firstObservedTime = Date.now(),
|
||||||
|
messages = JSON.parse(transcript);
|
||||||
|
|
||||||
function EventTelemetry(request, interval) {
|
function EventTelemetry(request, interval) {
|
||||||
|
|
||||||
@ -43,14 +45,13 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
generatorData.getDomainValue = function (i, domain) {
|
generatorData.getDomainValue = function (i, domain) {
|
||||||
return i * interval
|
return i * interval +
|
||||||
+ (domain !== 'delta' ? firstObservedTime : 0);
|
(domain !== 'delta' ? firstObservedTime : 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
generatorData.getRangeValue = function (i, range) {
|
generatorData.getRangeValue = function (i, range) {
|
||||||
var domainDelta = this.getDomainValue(i) - firstObservedTime,
|
var domainDelta = this.getDomainValue(i) - firstObservedTime,
|
||||||
ind = i % messages.length;
|
ind = i % messages.length;
|
||||||
|
|
||||||
return messages[ind] + " - [" + domainDelta.toString() + "]";
|
return messages[ind] + " - [" + domainDelta.toString() + "]";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define,Promise*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
|
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
|
||||||
@ -33,9 +34,11 @@ define(
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EventTelemetryProvider($q, $timeout) {
|
function EventTelemetryProvider($q, $timeout) {
|
||||||
var subscriptions = [],
|
var
|
||||||
|
subscriptions = [],
|
||||||
genInterval = 1000,
|
genInterval = 1000,
|
||||||
generating = false;
|
generating = false,
|
||||||
|
id = Math.random() * 100000;
|
||||||
|
|
||||||
//
|
//
|
||||||
function matchesSource(request) {
|
function matchesSource(request) {
|
||||||
@ -44,6 +47,7 @@ define(
|
|||||||
|
|
||||||
// Used internally; this will be repacked by doPackage
|
// Used internally; this will be repacked by doPackage
|
||||||
function generateData(request) {
|
function generateData(request) {
|
||||||
|
//console.log("generateData " + (Date.now() - startTime).toString());
|
||||||
return {
|
return {
|
||||||
key: request.key,
|
key: request.key,
|
||||||
telemetry: new EventTelemetry(request, genInterval)
|
telemetry: new EventTelemetry(request, genInterval)
|
||||||
@ -56,7 +60,6 @@ define(
|
|||||||
results.forEach(function (result) {
|
results.forEach(function (result) {
|
||||||
packaged[result.key] = result.telemetry;
|
packaged[result.key] = result.telemetry;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Format as expected (sources -> keys -> telemetry)
|
// Format as expected (sources -> keys -> telemetry)
|
||||||
return { eventGenerator: packaged };
|
return { eventGenerator: packaged };
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([], function () {
|
define([], function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -57,15 +58,15 @@ define([], function () {
|
|||||||
row,
|
row,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
function copyDomainsToRow(telemetryRow, index) {
|
function copyDomainsToRow(row, index) {
|
||||||
domains.forEach(function (domain) {
|
domains.forEach(function (domain) {
|
||||||
telemetryRow[domain.name] = series.getDomainValue(index, domain.key);
|
row[domain.name] = series.getDomainValue(index, domain.key);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyRangesToRow(telemetryRow, index) {
|
function copyRangesToRow(row, index) {
|
||||||
ranges.forEach(function (range) {
|
ranges.forEach(function (range) {
|
||||||
telemetryRow[range.name] = series.getRangeValue(index, range.key);
|
row[range.name] = series.getRangeValue(index, range.key);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,14 +76,13 @@ define([], function () {
|
|||||||
copyRangesToRow(row, i);
|
copyRangesToRow(row, i);
|
||||||
rows.push(row);
|
rows.push(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
exportService.exportCSV(rows, { headers: headers });
|
exportService.exportCSV(rows, { headers: headers });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
ExportTelemetryAsCSVAction.appliesTo = function (context) {
|
ExportTelemetryAsCSVAction.appliesTo = function (context) {
|
||||||
return context.domainObject
|
return context.domainObject &&
|
||||||
&& context.domainObject.hasCapability("telemetry");
|
context.domainObject.hasCapability("telemetry");
|
||||||
};
|
};
|
||||||
|
|
||||||
return ExportTelemetryAsCSVAction;
|
return ExportTelemetryAsCSVAction;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,15 +19,15 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
|
'legacyRegistry',
|
||||||
'./ExportTelemetryAsCSVAction'
|
'./ExportTelemetryAsCSVAction'
|
||||||
], function (ExportTelemetryAsCSVAction) {
|
], function (legacyRegistry, ExportTelemetryAsCSVAction) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
legacyRegistry.register("example/export", {
|
||||||
name: "example/export",
|
|
||||||
definition: {
|
|
||||||
"name": "Example of using CSV Export",
|
"name": "Example of using CSV Export",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"actions": [
|
"actions": [
|
||||||
@ -41,6 +41,5 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
51
example/extensions/bundle.js
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* 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([
|
||||||
|
"./src/SomeExample",
|
||||||
|
'legacyRegistry'
|
||||||
|
], function (
|
||||||
|
SomeExample,
|
||||||
|
legacyRegistry
|
||||||
|
) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
legacyRegistry.register("example/extensions", {
|
||||||
|
"name": "Custom Extensions Examples",
|
||||||
|
"description": "Example showing how to declare custom extensions.",
|
||||||
|
"sources": "src",
|
||||||
|
"extensions": {
|
||||||
|
"examples": [
|
||||||
|
{
|
||||||
|
"text": "I came from example/extensions"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"implementation": SomeExample,
|
||||||
|
"depends": [
|
||||||
|
"exampleService"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
52
example/extensions/src/SomeExample.js
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* 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,Promise*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module defining SomeExample. Created by vwoeltje on 11/5/14.
|
||||||
|
*/
|
||||||
|
define(
|
||||||
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function SomeExample(exampleService, message) {
|
||||||
|
return {
|
||||||
|
getText: function () {
|
||||||
|
return [
|
||||||
|
'"',
|
||||||
|
exampleService.getMessage(),
|
||||||
|
'" and "',
|
||||||
|
message,
|
||||||
|
'"'
|
||||||
|
].join("");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return SomeExample;
|
||||||
|
}
|
||||||
|
);
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,17 +19,18 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExampleFormController"
|
"./src/ExampleFormController",
|
||||||
|
'legacyRegistry'
|
||||||
], function (
|
], function (
|
||||||
ExampleFormController
|
ExampleFormController,
|
||||||
|
legacyRegistry
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
legacyRegistry.register("example/forms", {
|
||||||
name: "example/forms",
|
|
||||||
definition: {
|
|
||||||
"name": "Declarative Forms example",
|
"name": "Declarative Forms example",
|
||||||
"sources": "src",
|
"sources": "src",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -48,6 +49,5 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define,window*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -79,7 +80,7 @@ define(
|
|||||||
control: "button",
|
control: "button",
|
||||||
csslass: "icon-save",
|
csslass: "icon-save",
|
||||||
click: function () {
|
click: function () {
|
||||||
console.log("Save");
|
window.alert("Save");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -87,7 +88,7 @@ define(
|
|||||||
csslass: "icon-x",
|
csslass: "icon-x",
|
||||||
description: "Button B",
|
description: "Button B",
|
||||||
click: function () {
|
click: function () {
|
||||||
console.log("Cancel");
|
window.alert("Cancel");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -96,7 +97,7 @@ define(
|
|||||||
description: "Button C",
|
description: "Button C",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
click: function () {
|
click: function () {
|
||||||
console.log("Delete");
|
window.alert("Delete");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -151,22 +152,10 @@ define(
|
|||||||
name: "Choose something",
|
name: "Choose something",
|
||||||
control: "select",
|
control: "select",
|
||||||
options: [
|
options: [
|
||||||
{
|
{ name: "Hats", value: "hats" },
|
||||||
name: "Hats",
|
{ name: "Bats", value: "bats" },
|
||||||
value: "hats"
|
{ name: "Cats", value: "cats" },
|
||||||
},
|
{ name: "Mats", value: "mats" }
|
||||||
{
|
|
||||||
name: "Bats",
|
|
||||||
value: "bats"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Cats",
|
|
||||||
value: "cats"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Mats",
|
|
||||||
value: "mats"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
key: "aChoice"
|
key: "aChoice"
|
||||||
},
|
},
|
||||||
@ -175,22 +164,10 @@ define(
|
|||||||
control: "select",
|
control: "select",
|
||||||
required: true,
|
required: true,
|
||||||
options: [
|
options: [
|
||||||
{
|
{ name: "Hats", value: "hats" },
|
||||||
name: "Hats",
|
{ name: "Bats", value: "bats" },
|
||||||
value: "hats"
|
{ name: "Cats", value: "cats" },
|
||||||
},
|
{ name: "Mats", value: "mats" }
|
||||||
{
|
|
||||||
name: "Bats",
|
|
||||||
value: "bats"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Cats",
|
|
||||||
value: "cats"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Mats",
|
|
||||||
value: "mats"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
key: "aRequiredChoice"
|
key: "aRequiredChoice"
|
||||||
}
|
}
|
||||||
|
@ -1,133 +0,0 @@
|
|||||||
define([
|
|
||||||
'lodash'
|
|
||||||
], function (
|
|
||||||
_
|
|
||||||
) {
|
|
||||||
|
|
||||||
var METADATA_BY_TYPE = {
|
|
||||||
'generator': {
|
|
||||||
values: [
|
|
||||||
{
|
|
||||||
key: "name",
|
|
||||||
name: "Name",
|
|
||||||
format: "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "utc",
|
|
||||||
name: "Time",
|
|
||||||
format: "utc",
|
|
||||||
hints: {
|
|
||||||
domain: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "yesterday",
|
|
||||||
name: "Yesterday",
|
|
||||||
format: "utc",
|
|
||||||
hints: {
|
|
||||||
domain: 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// Need to enable "LocalTimeSystem" plugin to make use of this
|
|
||||||
// {
|
|
||||||
// key: "local",
|
|
||||||
// name: "Time",
|
|
||||||
// format: "local-format",
|
|
||||||
// source: "utc",
|
|
||||||
// hints: {
|
|
||||||
// domain: 3
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
key: "sin",
|
|
||||||
name: "Sine",
|
|
||||||
unit: "Hz",
|
|
||||||
formatString: '%0.2f',
|
|
||||||
hints: {
|
|
||||||
range: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "cos",
|
|
||||||
name: "Cosine",
|
|
||||||
unit: "deg",
|
|
||||||
formatString: '%0.2f',
|
|
||||||
hints: {
|
|
||||||
range: 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
'example.state-generator': {
|
|
||||||
values: [
|
|
||||||
{
|
|
||||||
key: "name",
|
|
||||||
name: "Name",
|
|
||||||
format: "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "utc",
|
|
||||||
name: "Time",
|
|
||||||
format: "utc",
|
|
||||||
hints: {
|
|
||||||
domain: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "local",
|
|
||||||
name: "Time",
|
|
||||||
format: "utc",
|
|
||||||
source: "utc",
|
|
||||||
hints: {
|
|
||||||
domain: 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
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 Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type);
|
|
||||||
};
|
|
||||||
|
|
||||||
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
|
||||||
return Object.assign(
|
|
||||||
{},
|
|
||||||
domainObject.telemetry,
|
|
||||||
METADATA_BY_TYPE[domainObject.type]
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
return GeneratorMetadataProvider;
|
|
||||||
|
|
||||||
});
|
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -30,9 +30,7 @@ define([
|
|||||||
amplitude: 1,
|
amplitude: 1,
|
||||||
period: 10,
|
period: 10,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
dataRateInHz: 1,
|
dataRateInHz: 1
|
||||||
randomness: 0,
|
|
||||||
phase: 0
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function GeneratorProvider() {
|
function GeneratorProvider() {
|
||||||
@ -52,33 +50,24 @@ define([
|
|||||||
'amplitude',
|
'amplitude',
|
||||||
'period',
|
'period',
|
||||||
'offset',
|
'offset',
|
||||||
'dataRateInHz',
|
'dataRateInHz'
|
||||||
'phase',
|
|
||||||
'randomness'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
request = request || {};
|
|
||||||
|
|
||||||
var workerRequest = {};
|
var workerRequest = {};
|
||||||
|
|
||||||
props.forEach(function (prop) {
|
props.forEach(function (prop) {
|
||||||
if (domainObject.telemetry && Object.prototype.hasOwnProperty.call(domainObject.telemetry, prop)) {
|
if (domainObject.telemetry && domainObject.telemetry.hasOwnProperty(prop)) {
|
||||||
workerRequest[prop] = domainObject.telemetry[prop];
|
workerRequest[prop] = domainObject.telemetry[prop];
|
||||||
}
|
}
|
||||||
|
if (request.hasOwnProperty(prop)) {
|
||||||
if (request && Object.prototype.hasOwnProperty.call(request, prop)) {
|
|
||||||
workerRequest[prop] = request[prop];
|
workerRequest[prop] = request[prop];
|
||||||
}
|
}
|
||||||
|
if (!workerRequest[prop]) {
|
||||||
if (!Object.prototype.hasOwnProperty.call(workerRequest, prop)) {
|
|
||||||
workerRequest[prop] = REQUEST_DEFAULTS[prop];
|
workerRequest[prop] = REQUEST_DEFAULTS[prop];
|
||||||
}
|
}
|
||||||
|
|
||||||
workerRequest[prop] = Number(workerRequest[prop]);
|
workerRequest[prop] = Number(workerRequest[prop]);
|
||||||
});
|
});
|
||||||
|
|
||||||
workerRequest.name = domainObject.name;
|
|
||||||
|
|
||||||
return workerRequest;
|
return workerRequest;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -86,13 +75,11 @@ define([
|
|||||||
var workerRequest = this.makeWorkerRequest(domainObject, request);
|
var workerRequest = this.makeWorkerRequest(domainObject, request);
|
||||||
workerRequest.start = request.start;
|
workerRequest.start = request.start;
|
||||||
workerRequest.end = request.end;
|
workerRequest.end = request.end;
|
||||||
|
|
||||||
return this.workerInterface.request(workerRequest);
|
return this.workerInterface.request(workerRequest);
|
||||||
};
|
};
|
||||||
|
|
||||||
GeneratorProvider.prototype.subscribe = function (domainObject, callback) {
|
GeneratorProvider.prototype.subscribe = function (domainObject, callback) {
|
||||||
var workerRequest = this.makeWorkerRequest(domainObject, {});
|
var workerRequest = this.makeWorkerRequest(domainObject, {});
|
||||||
|
|
||||||
return this.workerInterface.subscribe(workerRequest, callback);
|
return this.workerInterface.subscribe(workerRequest, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
87
example/generator/SinewaveLimitCapability.js
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
);
|
@ -1,97 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2021, 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 (
|
|
||||||
|
|
||||||
) {
|
|
||||||
|
|
||||||
var RED = {
|
|
||||||
sin: 0.9,
|
|
||||||
cos: 0.9
|
|
||||||
},
|
|
||||||
YELLOW = {
|
|
||||||
sin: 0.5,
|
|
||||||
cos: 0.5
|
|
||||||
},
|
|
||||||
LIMITS = {
|
|
||||||
rh: {
|
|
||||||
cssClass: "is-limit--upr is-limit--red",
|
|
||||||
low: RED,
|
|
||||||
high: Number.POSITIVE_INFINITY,
|
|
||||||
name: "Red High"
|
|
||||||
},
|
|
||||||
rl: {
|
|
||||||
cssClass: "is-limit--lwr is-limit--red",
|
|
||||||
high: -RED,
|
|
||||||
low: Number.NEGATIVE_INFINITY,
|
|
||||||
name: "Red Low"
|
|
||||||
},
|
|
||||||
yh: {
|
|
||||||
cssClass: "is-limit--upr is-limit--yellow",
|
|
||||||
low: YELLOW,
|
|
||||||
high: RED,
|
|
||||||
name: "Yellow High"
|
|
||||||
},
|
|
||||||
yl: {
|
|
||||||
cssClass: "is-limit--lwr is-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;
|
|
||||||
|
|
||||||
if (datum[range] > RED[range]) {
|
|
||||||
return LIMITS.rh;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (datum[range] < -RED[range]) {
|
|
||||||
return LIMITS.rl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (datum[range] > YELLOW[range]) {
|
|
||||||
return LIMITS.yh;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (datum[range] < -YELLOW[range]) {
|
|
||||||
return LIMITS.yl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
return SinewaveLimitProvider;
|
|
||||||
});
|
|
@ -1,83 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2021, 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 = String(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;
|
|
||||||
|
|
||||||
});
|
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -21,7 +21,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'raw-loader!./generatorWorker.js',
|
'text!./generatorWorker.js',
|
||||||
'uuid'
|
'uuid'
|
||||||
], function (
|
], function (
|
||||||
workerText,
|
workerText,
|
||||||
@ -44,7 +44,9 @@ define([
|
|||||||
message = message.data;
|
message = message.data;
|
||||||
var callback = this.callbacks[message.id];
|
var callback = this.callbacks[message.id];
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback(message);
|
if (callback(message)) {
|
||||||
|
delete this.callbacks[message.id];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -70,39 +72,44 @@ define([
|
|||||||
deferred.resolve = resolve;
|
deferred.resolve = resolve;
|
||||||
deferred.reject = reject;
|
deferred.reject = reject;
|
||||||
});
|
});
|
||||||
var messageId;
|
|
||||||
|
|
||||||
let self = this;
|
|
||||||
function callback(message) {
|
function callback(message) {
|
||||||
if (message.error) {
|
if (message.error) {
|
||||||
deferred.reject(message.error);
|
deferred.reject(message.error);
|
||||||
} else {
|
} else {
|
||||||
deferred.resolve(message.data);
|
deferred.resolve(message.data);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
delete self.callbacks[messageId];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
messageId = this.dispatch('request', request, callback.bind(this));
|
this.dispatch('request', request, callback);
|
||||||
|
|
||||||
return promise;
|
return promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkerInterface.prototype.subscribe = function (request, cb) {
|
WorkerInterface.prototype.subscribe = function (request, cb) {
|
||||||
function callback(message) {
|
var isCancelled = false;
|
||||||
cb(message.data);
|
|
||||||
}
|
|
||||||
|
|
||||||
var messageId = this.dispatch('subscribe', request, callback);
|
var callback = function (message) {
|
||||||
|
if (isCancelled) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
cb(message.data);
|
||||||
|
};
|
||||||
|
|
||||||
|
var messageId = this.dispatch('subscribe', request, callback)
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
|
isCancelled = true;
|
||||||
this.dispatch('unsubscribe', {
|
this.dispatch('unsubscribe', {
|
||||||
id: messageId
|
id: messageId
|
||||||
});
|
});
|
||||||
delete this.callbacks[messageId];
|
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return WorkerInterface;
|
return WorkerInterface;
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -20,6 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/*global self*/
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
var FIFTEEN_MINUTES = 15 * 60 * 1000;
|
var FIFTEEN_MINUTES = 15 * 60 * 1000;
|
||||||
@ -60,16 +62,14 @@
|
|||||||
self.postMessage({
|
self.postMessage({
|
||||||
id: message.id,
|
id: message.id,
|
||||||
data: {
|
data: {
|
||||||
name: data.name,
|
|
||||||
utc: nextStep,
|
utc: nextStep,
|
||||||
yesterday: nextStep - 60*60*24*1000,
|
yesterday: nextStep - 60*60*24*1000,
|
||||||
sin: sin(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness),
|
sin: sin(nextStep, data.period, data.amplitude, data.offset),
|
||||||
cos: cos(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness)
|
cos: cos(nextStep, data.period, data.amplitude, data.offset)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
nextStep += step;
|
nextStep += step;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nextStep;
|
return nextStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,24 +82,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onRequest(message) {
|
function onRequest(message) {
|
||||||
var request = message.data;
|
var data = message.data;
|
||||||
if (request.end === undefined) {
|
if (data.end == undefined) {
|
||||||
request.end = Date.now();
|
data.end = Date.now();
|
||||||
}
|
}
|
||||||
|
if (data.start == undefined){
|
||||||
if (request.start === undefined) {
|
data.start = data.end - FIFTEEN_MINUTES;
|
||||||
request.start = request.end - FIFTEEN_MINUTES;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
var start = request.start;
|
var start = data.start;
|
||||||
var end = request.end > now ? now : request.end;
|
var end = data.end > now ? now : data.end;
|
||||||
var amplitude = request.amplitude;
|
var amplitude = data.amplitude;
|
||||||
var period = request.period;
|
var period = data.period;
|
||||||
var offset = request.offset;
|
var offset = data.offset;
|
||||||
var dataRateInHz = request.dataRateInHz;
|
var dataRateInHz = data.dataRateInHz;
|
||||||
var phase = request.phase;
|
|
||||||
var randomness = request.randomness;
|
|
||||||
|
|
||||||
var step = 1000 / dataRateInHz;
|
var step = 1000 / dataRateInHz;
|
||||||
var nextStep = start - (start % step) + step;
|
var nextStep = start - (start % step) + step;
|
||||||
@ -110,25 +107,24 @@
|
|||||||
data.push({
|
data.push({
|
||||||
utc: nextStep,
|
utc: nextStep,
|
||||||
yesterday: nextStep - 60*60*24*1000,
|
yesterday: nextStep - 60*60*24*1000,
|
||||||
sin: sin(nextStep, period, amplitude, offset, phase, randomness),
|
sin: sin(nextStep, period, amplitude, offset),
|
||||||
cos: cos(nextStep, period, amplitude, offset, phase, randomness)
|
cos: cos(nextStep, period, amplitude, offset)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.postMessage({
|
self.postMessage({
|
||||||
id: message.id,
|
id: message.id,
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function cos(timestamp, period, amplitude, offset, phase, randomness) {
|
function cos(timestamp, period, amplitude, offset) {
|
||||||
return amplitude
|
return amplitude *
|
||||||
* Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
Math.cos(timestamp / period / 1000 * Math.PI * 2) + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sin(timestamp, period, amplitude, offset, phase, randomness) {
|
function sin(timestamp, period, amplitude, offset) {
|
||||||
return amplitude
|
return amplitude *
|
||||||
* Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
Math.sin(timestamp / period / 1000 * Math.PI * 2) + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendError(error, message) {
|
function sendError(error, message) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,119 +19,86 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./GeneratorProvider",
|
"./GeneratorProvider",
|
||||||
"./SinewaveLimitProvider",
|
"./SinewaveLimitCapability"
|
||||||
"./StateGeneratorProvider",
|
|
||||||
"./GeneratorMetadataProvider"
|
|
||||||
], function (
|
], function (
|
||||||
GeneratorProvider,
|
GeneratorProvider,
|
||||||
SinewaveLimitProvider,
|
SinewaveLimitCapability
|
||||||
StateGeneratorProvider,
|
|
||||||
GeneratorMetadataProvider
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
return function (openmct) {
|
var legacyExtensions = {
|
||||||
|
"capabilities": [
|
||||||
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-generator-telemetry",
|
|
||||||
creatable: true,
|
|
||||||
form: [
|
|
||||||
{
|
{
|
||||||
name: "State Duration (seconds)",
|
"key": "limit",
|
||||||
control: "numberfield",
|
"implementation": SinewaveLimitCapability
|
||||||
cssClass: "l-input-sm l-numeric",
|
}
|
||||||
key: "duration",
|
|
||||||
required: true,
|
|
||||||
property: [
|
|
||||||
"telemetry",
|
|
||||||
"duration"
|
|
||||||
]
|
]
|
||||||
}
|
|
||||||
],
|
|
||||||
initialize: function (object) {
|
|
||||||
object.telemetry = {
|
|
||||||
duration: 5
|
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
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.telemetry.addProvider(new StateGeneratorProvider());
|
|
||||||
|
|
||||||
openmct.types.addType("generator", {
|
openmct.types.addType("generator", {
|
||||||
name: "Sine Wave Generator",
|
name: "Sine Wave Generator",
|
||||||
description: "For development use. Generates example streaming telemetry data using a simple sine wave algorithm.",
|
description: "For development use. Generates example streaming telemetry data using a simple sine wave algorithm.",
|
||||||
cssClass: "icon-generator-telemetry",
|
cssClass: "icon-telemetry",
|
||||||
creatable: true,
|
creatable: true,
|
||||||
form: [
|
form: [
|
||||||
{
|
{
|
||||||
name: "Period",
|
name: "Period",
|
||||||
control: "numberfield",
|
control: "textfield",
|
||||||
cssClass: "l-input-sm l-numeric",
|
cssClass: "l-input-sm l-numeric",
|
||||||
key: "period",
|
key: "period",
|
||||||
required: true,
|
required: true,
|
||||||
property: [
|
property: [
|
||||||
"telemetry",
|
"telemetry",
|
||||||
"period"
|
"period"
|
||||||
]
|
],
|
||||||
|
pattern: "^\\d*(\\.\\d*)?$"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Amplitude",
|
name: "Amplitude",
|
||||||
control: "numberfield",
|
control: "textfield",
|
||||||
cssClass: "l-input-sm l-numeric",
|
cssClass: "l-input-sm l-numeric",
|
||||||
key: "amplitude",
|
key: "amplitude",
|
||||||
required: true,
|
required: true,
|
||||||
property: [
|
property: [
|
||||||
"telemetry",
|
"telemetry",
|
||||||
"amplitude"
|
"amplitude"
|
||||||
]
|
],
|
||||||
|
pattern: "^\\d*(\\.\\d*)?$"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Offset",
|
name: "Offset",
|
||||||
control: "numberfield",
|
control: "textfield",
|
||||||
cssClass: "l-input-sm l-numeric",
|
cssClass: "l-input-sm l-numeric",
|
||||||
key: "offset",
|
key: "offset",
|
||||||
required: true,
|
required: true,
|
||||||
property: [
|
property: [
|
||||||
"telemetry",
|
"telemetry",
|
||||||
"offset"
|
"offset"
|
||||||
]
|
],
|
||||||
|
pattern: "^\\d*(\\.\\d*)?$"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Data Rate (hz)",
|
name: "Data Rate (hz)",
|
||||||
control: "numberfield",
|
control: "textfield",
|
||||||
cssClass: "l-input-sm l-numeric",
|
cssClass: "l-input-sm l-numeric",
|
||||||
key: "dataRateInHz",
|
key: "dataRateInHz",
|
||||||
required: true,
|
required: true,
|
||||||
property: [
|
property: [
|
||||||
"telemetry",
|
"telemetry",
|
||||||
"dataRateInHz"
|
"dataRateInHz"
|
||||||
]
|
],
|
||||||
},
|
pattern: "^\\d*(\\.\\d*)?$"
|
||||||
{
|
|
||||||
name: "Phase (radians)",
|
|
||||||
control: "numberfield",
|
|
||||||
cssClass: "l-input-sm l-numeric",
|
|
||||||
key: "phase",
|
|
||||||
required: true,
|
|
||||||
property: [
|
|
||||||
"telemetry",
|
|
||||||
"phase"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Randomness",
|
|
||||||
control: "numberfield",
|
|
||||||
cssClass: "l-input-sm l-numeric",
|
|
||||||
key: "randomness",
|
|
||||||
required: true,
|
|
||||||
property: [
|
|
||||||
"telemetry",
|
|
||||||
"randomness"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
initialize: function (object) {
|
initialize: function (object) {
|
||||||
@ -140,15 +107,42 @@ define([
|
|||||||
amplitude: 1,
|
amplitude: 1,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
dataRateInHz: 1,
|
dataRateInHz: 1,
|
||||||
phase: 0,
|
values: [
|
||||||
randomness: 0
|
{
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
openmct.telemetry.addProvider(new GeneratorProvider());
|
openmct.telemetry.addProvider(new GeneratorProvider());
|
||||||
openmct.telemetry.addProvider(new GeneratorMetadataProvider());
|
|
||||||
openmct.telemetry.addProvider(new SinewaveLimitProvider());
|
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,17 +19,18 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExampleIdentityService"
|
"./src/ExampleIdentityService",
|
||||||
|
'legacyRegistry'
|
||||||
], function (
|
], function (
|
||||||
ExampleIdentityService
|
ExampleIdentityService,
|
||||||
|
legacyRegistry
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
legacyRegistry.register("example/identity", {
|
||||||
name: "example/identity",
|
|
||||||
definition: {
|
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@ -37,12 +38,10 @@ define([
|
|||||||
"provides": "identityService",
|
"provides": "identityService",
|
||||||
"type": "provider",
|
"type": "provider",
|
||||||
"depends": [
|
"depends": [
|
||||||
"dialogService",
|
"dialogService"
|
||||||
"$q"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,19 +19,16 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var DEFAULT_IDENTITY = {
|
var DEFAULT_IDENTITY = { key: "user", name: "Example User" },
|
||||||
key: "user",
|
|
||||||
name: "Example User"
|
|
||||||
},
|
|
||||||
DIALOG_STRUCTURE = {
|
DIALOG_STRUCTURE = {
|
||||||
name: "Identify Yourself",
|
name: "Identify Yourself",
|
||||||
sections: [{
|
sections: [{ rows: [
|
||||||
rows: [
|
|
||||||
{
|
{
|
||||||
name: "User ID",
|
name: "User ID",
|
||||||
control: "textfield",
|
control: "textfield",
|
||||||
@ -44,10 +41,10 @@ define(
|
|||||||
key: "name",
|
key: "name",
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
]
|
]}]
|
||||||
}]
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example implementation of an identity service. This prompts the
|
* Example implementation of an identity service. This prompts the
|
||||||
* user to enter a name and user ID; in a more realistic
|
* user to enter a name and user ID; in a more realistic
|
||||||
@ -58,35 +55,19 @@ define(
|
|||||||
* @implements {IdentityService}
|
* @implements {IdentityService}
|
||||||
* @memberof platform/identity
|
* @memberof platform/identity
|
||||||
*/
|
*/
|
||||||
function ExampleIdentityProvider(dialogService, $q) {
|
function ExampleIdentityProvider(dialogService) {
|
||||||
this.dialogService = dialogService;
|
// Handle rejected dialog messages by treating the
|
||||||
this.$q = $q;
|
// current user as undefined.
|
||||||
|
function echo(v) { return v; }
|
||||||
|
function giveUndefined() { return undefined; }
|
||||||
|
|
||||||
this.returnUser = this.returnUser.bind(this);
|
this.userPromise =
|
||||||
this.returnUndefined = this.returnUndefined.bind(this);
|
dialogService.getUserInput(DIALOG_STRUCTURE, DEFAULT_IDENTITY)
|
||||||
|
.then(echo, giveUndefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExampleIdentityProvider.prototype.getUser = function () {
|
ExampleIdentityProvider.prototype.getUser = function () {
|
||||||
if (this.user) {
|
return this.userPromise;
|
||||||
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;
|
return ExampleIdentityProvider;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -27,7 +27,7 @@ define([
|
|||||||
) {
|
) {
|
||||||
function ImageryPlugin() {
|
function ImageryPlugin() {
|
||||||
|
|
||||||
const IMAGE_SAMPLES = [
|
var IMAGE_SAMPLES = [
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg",
|
||||||
@ -47,14 +47,11 @@ define([
|
|||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
|
||||||
];
|
];
|
||||||
const IMAGE_DELAY = 20000;
|
|
||||||
|
|
||||||
function pointForTimestamp(timestamp, name) {
|
function pointForTimestamp(timestamp) {
|
||||||
return {
|
return {
|
||||||
name: name,
|
utc: Math.floor(timestamp / 5000) * 5000,
|
||||||
utc: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
url: IMAGE_SAMPLES[Math.floor(timestamp / 5000) % IMAGE_SAMPLES.length]
|
||||||
local: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
|
||||||
url: IMAGE_SAMPLES[Math.floor(timestamp / IMAGE_DELAY) % IMAGE_SAMPLES.length]
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,10 +61,10 @@ define([
|
|||||||
},
|
},
|
||||||
subscribe: function (domainObject, callback) {
|
subscribe: function (domainObject, callback) {
|
||||||
var interval = setInterval(function () {
|
var interval = setInterval(function () {
|
||||||
callback(pointForTimestamp(Date.now(), domainObject.name));
|
callback(pointForTimestamp(Date.now()));
|
||||||
}, IMAGE_DELAY);
|
}, 5000);
|
||||||
|
|
||||||
return function () {
|
return function (interval) {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -80,54 +77,42 @@ define([
|
|||||||
},
|
},
|
||||||
request: function (domainObject, options) {
|
request: function (domainObject, options) {
|
||||||
var start = options.start;
|
var start = options.start;
|
||||||
var end = Math.min(options.end, Date.now());
|
var end = options.end;
|
||||||
var data = [];
|
var data = [];
|
||||||
while (start <= end && data.length < IMAGE_DELAY) {
|
while (start < end && data.length < 5000) {
|
||||||
data.push(pointForTimestamp(start, domainObject.name));
|
data.push(pointForTimestamp(start));
|
||||||
start += IMAGE_DELAY;
|
start += 5000;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.resolve(data);
|
return Promise.resolve(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var ladProvider = {
|
var ladProvider = {
|
||||||
supportsRequest: function (domainObject, options) {
|
supportsRequest: function (domainObject, options) {
|
||||||
return domainObject.type === 'example.imagery'
|
return domainObject.type === 'example.imagery' &&
|
||||||
&& options.strategy === 'latest';
|
options.strategy === 'latest';
|
||||||
},
|
},
|
||||||
request: function (domainObject, options) {
|
request: function (domainObject, options) {
|
||||||
return Promise.resolve([pointForTimestamp(Date.now(), domainObject.name)]);
|
return Promise.resolve([pointForTimestamp(Date.now())]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
return function install(openmct) {
|
return function install(openmct) {
|
||||||
openmct.types.addType('example.imagery', {
|
openmct.types.addType('example.imagery', {
|
||||||
key: 'example.imagery',
|
key: 'example.imagery',
|
||||||
name: 'Example Imagery',
|
name: 'Example Imagery',
|
||||||
cssClass: 'icon-image',
|
cssClass: 'icon-image',
|
||||||
description: 'For development use. Creates example imagery '
|
description: 'For development use. Creates example imagery ' +
|
||||||
+ 'data that mimics a live imagery stream.',
|
'data that mimics a live imagery stream.',
|
||||||
creatable: true,
|
creatable: true,
|
||||||
initialize: function (object) {
|
initialize: function (object) {
|
||||||
object.telemetry = {
|
object.telemetry = {
|
||||||
values: [
|
values: [
|
||||||
{
|
|
||||||
name: 'Name',
|
|
||||||
key: 'name'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Time',
|
name: 'Time',
|
||||||
key: 'utc',
|
key: 'utc',
|
||||||
format: 'utc',
|
format: 'utc',
|
||||||
hints: {
|
|
||||||
domain: 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Local Time',
|
|
||||||
key: 'local',
|
|
||||||
format: 'local-format',
|
|
||||||
hints: {
|
hints: {
|
||||||
domain: 1
|
domain: 1
|
||||||
}
|
}
|
||||||
@ -141,7 +126,7 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,13 +19,18 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([], function () {
|
define([
|
||||||
|
|
||||||
|
'legacyRegistry'
|
||||||
|
], function (
|
||||||
|
|
||||||
|
legacyRegistry
|
||||||
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
legacyRegistry.register("example/mobile", {
|
||||||
name: "example/mobile",
|
|
||||||
definition: {
|
|
||||||
"name": "Mobile",
|
"name": "Mobile",
|
||||||
"description": "Allows elements with pertinence to mobile usage and development",
|
"description": "Allows elements with pertinence to mobile usage and development",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -36,6 +41,5 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,21 +19,22 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/RemsTelemetryServerAdapter",
|
"./src/RemsTelemetryServerAdapter",
|
||||||
"./src/RemsTelemetryModelProvider",
|
"./src/RemsTelemetryModelProvider",
|
||||||
"./src/RemsTelemetryProvider"
|
"./src/RemsTelemetryProvider",
|
||||||
|
'legacyRegistry',
|
||||||
|
"module"
|
||||||
], function (
|
], function (
|
||||||
RemsTelemetryServerAdapter,
|
RemsTelemetryServerAdapter,
|
||||||
RemsTelemetryModelProvider,
|
RemsTelemetryModelProvider,
|
||||||
RemsTelemetryProvider
|
RemsTelemetryProvider,
|
||||||
|
legacyRegistry
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
legacyRegistry.register("example/msl", {
|
||||||
return {
|
|
||||||
name: "example/msl",
|
|
||||||
definition: {
|
|
||||||
"name" : "Mars Science Laboratory Data Adapter",
|
"name" : "Mars Science Laboratory Data Adapter",
|
||||||
"extensions" : {
|
"extensions" : {
|
||||||
"types": [
|
"types": [
|
||||||
@ -109,7 +110,6 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
function (){
|
function (){
|
||||||
@ -80,7 +81,6 @@ define(
|
|||||||
(dictionary.instruments || []).forEach(function(instrument) {
|
(dictionary.instruments || []).forEach(function(instrument) {
|
||||||
addInstrument(instrument, "msl:curiosity");
|
addInstrument(instrument, "msl:curiosity");
|
||||||
});
|
});
|
||||||
|
|
||||||
return models;
|
return models;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,6 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return RemsTelemetryModelProvider;
|
return RemsTelemetryModelProvider;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define */
|
||||||
define (
|
define (
|
||||||
['./RemsTelemetrySeries'],
|
['./RemsTelemetrySeries'],
|
||||||
function (RemsTelemetrySeries) {
|
function (RemsTelemetrySeries) {
|
||||||
@ -73,7 +74,6 @@ define (
|
|||||||
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
|
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
|
||||||
return function() {};
|
return function() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
|
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
|
||||||
return function() {};
|
return function() {};
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define */
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
@ -56,7 +57,6 @@ define(
|
|||||||
RemsTelemetrySeries.prototype.getPointCount = function() {
|
RemsTelemetrySeries.prototype.getPointCount = function() {
|
||||||
return this.data.length;
|
return this.data.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The domain value at the given index. The Rems telemetry data is
|
* The domain value at the given index. The Rems telemetry data is
|
||||||
* time ordered, so the domain value is the time stamp of each data
|
* time ordered, so the domain value is the time stamp of each data
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
/*jslint es5: true */
|
/*jslint es5: true */
|
||||||
|
|
||||||
define(
|
define(
|
||||||
@ -94,32 +95,28 @@ define(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
function fallbackToLocal() {
|
function fallbackToLocal() {
|
||||||
self.$log.warn("Loading REMS data failed, probably due to"
|
self.$log.warn("Loading REMS data failed, probably due to" +
|
||||||
+ " cross origin policy. Falling back to local data");
|
" cross origin policy. Falling back to local data");
|
||||||
|
|
||||||
return self.$http.get(self.localDataURI);
|
return self.$http.get(self.localDataURI);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Filter results to match request parameters
|
//Filter results to match request parameters
|
||||||
function filterResults(results) {
|
function filterResults(results) {
|
||||||
return results.filter(function(result){
|
return results.filter(function(result){
|
||||||
return result.date >= (request.start || Number.MIN_VALUE)
|
return result.date >= (request.start || Number.MIN_VALUE) &&
|
||||||
&& result.date <= (request.end || Number.MAX_VALUE);
|
result.date <= (request.end || Number.MAX_VALUE);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function packageAndResolve(results){
|
function packageAndResolve(results){
|
||||||
return {
|
return {id: id, values: results};
|
||||||
id: id,
|
|
||||||
values: results
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return (this.promise = this.promise || this.$http.get(this.REMS_WS_URL))
|
return (this.promise = this.promise || this.$http.get(this.REMS_WS_URL))
|
||||||
.catch(fallbackToLocal)
|
.catch(fallbackToLocal)
|
||||||
.then(processResponse)
|
.then(processResponse)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,36 +19,33 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/DialogLaunchController",
|
"./src/DialogLaunchController",
|
||||||
"./src/NotificationLaunchController",
|
"./src/NotificationLaunchController",
|
||||||
"./src/DialogLaunchIndicator",
|
"./src/DialogLaunchIndicator",
|
||||||
"./src/NotificationLaunchIndicator",
|
"./src/NotificationLaunchIndicator",
|
||||||
"./res/dialog-launch.html",
|
'legacyRegistry'
|
||||||
"./res/notification-launch.html"
|
|
||||||
], function (
|
], function (
|
||||||
DialogLaunchController,
|
DialogLaunchController,
|
||||||
NotificationLaunchController,
|
NotificationLaunchController,
|
||||||
DialogLaunchIndicator,
|
DialogLaunchIndicator,
|
||||||
NotificationLaunchIndicator,
|
NotificationLaunchIndicator,
|
||||||
DialogLaunch,
|
legacyRegistry
|
||||||
NotificationLaunch
|
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
legacyRegistry.register("example/notifications", {
|
||||||
name: "example/notifications",
|
|
||||||
definition: {
|
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"templates": [
|
"templates": [
|
||||||
{
|
{
|
||||||
"key": "dialogLaunchTemplate",
|
"key": "dialogLaunchTemplate",
|
||||||
"template": DialogLaunch
|
"templateUrl": "dialog-launch.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "notificationLaunchTemplate",
|
"key": "notificationLaunchTemplate",
|
||||||
"template": NotificationLaunch
|
"templateUrl": "notification-launch.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"controllers": [
|
"controllers": [
|
||||||
@ -85,6 +82,5 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<span class="h-indicator" ng-controller="DialogLaunchController">
|
<span class="status block" ng-controller="DialogLaunchController">
|
||||||
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
||||||
<div class="c-indicator c-indicator--clickable icon-box-with-arrow s-status-available"><span class="label c-indicator__label">
|
<span class="status-indicator icon-box-with-arrow"></span><span class="label">
|
||||||
<button ng-click="launchProgress(true)">Known</button>
|
<a ng-click="launchProgress(true)">Known</a> |
|
||||||
<button ng-click="launchProgress(false)">Unknown</button>
|
<a ng-click="launchProgress(false)">Unknown</a> |
|
||||||
<button ng-click="launchError()">Error</button>
|
<a ng-click="launchError()">Error</a> |
|
||||||
<button ng-click="launchInfo()">Info</button>
|
<a ng-click="launchInfo()">Info</a>
|
||||||
</span></div>
|
</span><span class="count"></span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<span class="h-indicator" ng-controller="NotificationLaunchController">
|
<span class="status block" ng-controller="NotificationLaunchController">
|
||||||
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
||||||
<div class="c-indicator c-indicator--clickable icon-bell s-status-available"><span class="label c-indicator__label">
|
<span class="status-indicator icon-bell"></span><span class="label">
|
||||||
<button ng-click="newInfo()">Success</button>
|
<a ng-click="newInfo()">Success</a> |
|
||||||
<button ng-click="newError()">Error</button>
|
<a ng-click="newError()">Error</a> |
|
||||||
<button ng-click="newAlert()">Alert</button>
|
<a ng-click="newAlert()">Alert</a> |
|
||||||
<button ng-click="newProgress()">Progress</button>
|
<a ng-click="newProgress()">Progress</a>
|
||||||
</span></div>
|
</span><span class="count"></span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -90,6 +91,7 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Demonstrates launching an error dialog
|
Demonstrates launching an error dialog
|
||||||
*/
|
*/
|
||||||
@ -130,9 +132,9 @@ define(
|
|||||||
var dialog,
|
var dialog,
|
||||||
model = {
|
model = {
|
||||||
title: "Info Dialog Example",
|
title: "Info Dialog Example",
|
||||||
actionText: "This is an example of a blocking info"
|
actionText: "This is an example of a blocking info" +
|
||||||
+ " dialog. This dialog can be used to draw the user's"
|
" dialog. This dialog can be used to draw the user's" +
|
||||||
+ " attention to an event.",
|
" attention to an event.",
|
||||||
severity: "info",
|
severity: "info",
|
||||||
primaryOption: {
|
primaryOption: {
|
||||||
label: "OK",
|
label: "OK",
|
||||||
@ -151,7 +153,6 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return DialogLaunchController;
|
return DialogLaunchController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define,window*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -41,11 +42,9 @@ define(
|
|||||||
DialogLaunchIndicator.prototype.getGlyphClass = function () {
|
DialogLaunchIndicator.prototype.getGlyphClass = function () {
|
||||||
return 'ok';
|
return 'ok';
|
||||||
};
|
};
|
||||||
|
|
||||||
DialogLaunchIndicator.prototype.getText = function () {
|
DialogLaunchIndicator.prototype.getText = function () {
|
||||||
return "Launch test dialog";
|
return "Launch test dialog";
|
||||||
};
|
};
|
||||||
|
|
||||||
DialogLaunchIndicator.prototype.getDescription = function () {
|
DialogLaunchIndicator.prototype.getDescription = function () {
|
||||||
return "Launch test dialog";
|
return "Launch test dialog";
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -47,80 +48,125 @@ define(
|
|||||||
"Eros turpis, pulvinar turpis eros eu",
|
"Eros turpis, pulvinar turpis eros eu",
|
||||||
"Lundium nascetur a, lectus montes ac, parturient in natoque, duis risus risus pulvinar pid rhoncus, habitasse auctor natoque!"
|
"Lundium nascetur a, lectus montes ac, parturient in natoque, duis risus risus pulvinar pid rhoncus, habitasse auctor natoque!"
|
||||||
];
|
];
|
||||||
|
|
||||||
return actionTexts[Math.floor(Math.random()*3)];
|
return actionTexts[Math.floor(Math.random()*3)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getExampleActions() {
|
||||||
|
var actions = [
|
||||||
|
{
|
||||||
|
label: "Try Again",
|
||||||
|
callback: function () {
|
||||||
|
$log.debug("Try Again pressed");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Remove",
|
||||||
|
callback: function () {
|
||||||
|
$log.debug("Remove pressed");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Cancel",
|
||||||
|
callback: function () {
|
||||||
|
$log.debug("Cancel pressed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Randomly remove some actions off the top; leave at least one
|
||||||
|
actions.splice(0,Math.floor(Math.random() * actions.length));
|
||||||
|
|
||||||
|
return actions;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getExampleSeverity() {
|
||||||
|
var severities = [
|
||||||
|
"info",
|
||||||
|
"alert",
|
||||||
|
"error"
|
||||||
|
];
|
||||||
|
return severities[Math.floor(Math.random() * severities.length)];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launch a new notification with a severity level of 'Error'.
|
* Launch a new notification with a severity level of 'Error'.
|
||||||
*/
|
*/
|
||||||
$scope.newError = function(){
|
$scope.newError = function(){
|
||||||
|
|
||||||
notificationService.notify({
|
notificationService.notify({
|
||||||
title: "Example error notification " + messageCounter++,
|
title: "Example error notification " + messageCounter++,
|
||||||
hint: "An error has occurred",
|
hint: "An error has occurred",
|
||||||
severity: "error"
|
severity: "error",
|
||||||
});
|
primaryOption: {
|
||||||
|
label: 'Retry',
|
||||||
|
callback: function() {
|
||||||
|
$log.info('Retry clicked');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
options: getExampleActions()});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launch a new notification with a severity of 'Alert'.
|
* Launch a new notification with a severity of 'Alert'.
|
||||||
*/
|
*/
|
||||||
$scope.newAlert = function(){
|
$scope.newAlert = function(){
|
||||||
|
|
||||||
notificationService.notify({
|
notificationService.notify({
|
||||||
title: "Alert notification " + (messageCounter++),
|
title: "Alert notification " + (messageCounter++),
|
||||||
hint: "This is an alert message",
|
hint: "This is an alert message",
|
||||||
severity: "alert",
|
severity: "alert",
|
||||||
autoDismiss: true
|
primaryOption: {
|
||||||
});
|
label: 'Retry',
|
||||||
|
callback: function() {
|
||||||
|
$log.info('Retry clicked');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
options: getExampleActions()});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launch a new notification with a progress bar that is updated
|
* Launch a new notification with a progress bar that is updated
|
||||||
* periodically, tracking an ongoing process.
|
* periodically, tracking an ongoing process.
|
||||||
*/
|
*/
|
||||||
$scope.newProgress = function(){
|
$scope.newProgress = function(){
|
||||||
let progress = 0;
|
|
||||||
var notificationModel = {
|
var notificationModel = {
|
||||||
title: "Progress notification example",
|
title: "Progress notification example",
|
||||||
severity: "info",
|
severity: "info",
|
||||||
progress: progress,
|
progress: 0,
|
||||||
actionText: getExampleActionText()
|
actionText: getExampleActionText(),
|
||||||
|
unknownProgress: false
|
||||||
};
|
};
|
||||||
let notification;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simulate an ongoing process and update the progress bar.
|
* Simulate an ongoing process and update the progress bar.
|
||||||
* @param notification
|
* @param notification
|
||||||
*/
|
*/
|
||||||
function incrementProgress() {
|
function incrementProgress(notificationModel) {
|
||||||
progress = Math.min(100, Math.floor(progress + Math.random() * 30));
|
notificationModel.progress = Math.min(100, Math.floor(notificationModel.progress + Math.random() * 30));
|
||||||
let progressText = ["Estimated time"
|
notificationModel.progressText = ["Estimated time" +
|
||||||
+ " remaining:"
|
" remaining:" +
|
||||||
+ " about ", 60 - Math.floor((progress / 100) * 60), " seconds"].join(" ");
|
" about ", 60 - Math.floor((notificationModel.progress / 100) * 60), " seconds"].join(" ");
|
||||||
notification.progress(progress, progressText);
|
if (notificationModel.progress < 100) {
|
||||||
|
$timeout(function(){incrementProgress(notificationModel);}, 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (progress < 100) {
|
notificationService.notify(notificationModel);
|
||||||
$timeout(function () {
|
|
||||||
incrementProgress(notificationModel);
|
incrementProgress(notificationModel);
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
notification = notificationService.notify(notificationModel);
|
|
||||||
incrementProgress();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launch a new notification with severity level of INFO.
|
* Launch a new notification with severity level of INFO.
|
||||||
*/
|
*/
|
||||||
$scope.newInfo = function(){
|
$scope.newInfo = function(){
|
||||||
|
|
||||||
notificationService.info({
|
notificationService.info({
|
||||||
title: "Example Info notification " + messageCounter++
|
title: "Example Info notification " + messageCounter++
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NotificationLaunchController;
|
return NotificationLaunchController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define,window*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -41,11 +42,9 @@ define(
|
|||||||
NotificationLaunchIndicator.prototype.getGlyphClass = function () {
|
NotificationLaunchIndicator.prototype.getGlyphClass = function () {
|
||||||
return 'ok';
|
return 'ok';
|
||||||
};
|
};
|
||||||
|
|
||||||
NotificationLaunchIndicator.prototype.getText = function () {
|
NotificationLaunchIndicator.prototype.getText = function () {
|
||||||
return "Launch notification";
|
return "Launch notification";
|
||||||
};
|
};
|
||||||
|
|
||||||
NotificationLaunchIndicator.prototype.getDescription = function () {
|
NotificationLaunchIndicator.prototype.getDescription = function () {
|
||||||
return "Launch notification";
|
return "Launch notification";
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,17 +19,18 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/BrowserPersistenceProvider"
|
"./src/BrowserPersistenceProvider",
|
||||||
|
'legacyRegistry'
|
||||||
], function (
|
], function (
|
||||||
BrowserPersistenceProvider
|
BrowserPersistenceProvider,
|
||||||
|
legacyRegistry
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
legacyRegistry.register("example/persistence", {
|
||||||
name: "example/persistence",
|
|
||||||
definition: {
|
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@ -49,6 +50,5 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stubbed implementation of a persistence provider,
|
* Stubbed implementation of a persistence provider,
|
||||||
@ -29,6 +30,8 @@ define(
|
|||||||
function () {
|
function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function BrowserPersistenceProvider($q, SPACE) {
|
function BrowserPersistenceProvider($q, SPACE) {
|
||||||
var spaces = SPACE ? [SPACE] : [],
|
var spaces = SPACE ? [SPACE] : [],
|
||||||
caches = {},
|
caches = {},
|
||||||
@ -48,7 +51,6 @@ define(
|
|||||||
},
|
},
|
||||||
listObjects: function (space) {
|
listObjects: function (space) {
|
||||||
var cache = caches[space];
|
var cache = caches[space];
|
||||||
|
|
||||||
return promises.as(
|
return promises.as(
|
||||||
cache ? Object.keys(cache) : null
|
cache ? Object.keys(cache) : null
|
||||||
);
|
);
|
||||||
@ -66,7 +68,6 @@ define(
|
|||||||
},
|
},
|
||||||
readObject: function (space, key) {
|
readObject: function (space, key) {
|
||||||
var cache = caches[space];
|
var cache = caches[space];
|
||||||
|
|
||||||
return promises.as(
|
return promises.as(
|
||||||
cache ? cache[key] : null
|
cache ? cache[key] : null
|
||||||
);
|
);
|
||||||
|
146
example/plotOptions/bundle.js
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* 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*)?$"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,17 +19,18 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExamplePolicy"
|
"./src/ExamplePolicy",
|
||||||
|
'legacyRegistry'
|
||||||
], function (
|
], function (
|
||||||
ExamplePolicy
|
ExamplePolicy,
|
||||||
|
legacyRegistry
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
legacyRegistry.register("example/policy", {
|
||||||
name: "example/policy",
|
|
||||||
definition: {
|
|
||||||
"name": "Example Policy",
|
"name": "Example Policy",
|
||||||
"description": "Provides an example of using policies to prohibit actions.",
|
"description": "Provides an example of using policies to prohibit actions.",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -40,6 +41,5 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -36,7 +37,6 @@ define(
|
|||||||
model = (domainObject && domainObject.getModel()) || {},
|
model = (domainObject && domainObject.getModel()) || {},
|
||||||
name = model.name || "",
|
name = model.name || "",
|
||||||
metadata = action.getMetadata() || {};
|
metadata = action.getMetadata() || {};
|
||||||
|
|
||||||
return metadata.key !== 'remove' || name.indexOf('foo') < 0;
|
return metadata.key !== 'remove' || name.indexOf('foo') < 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,19 +19,20 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/WatchIndicator",
|
"./src/WatchIndicator",
|
||||||
"./src/DigestIndicator"
|
"./src/DigestIndicator",
|
||||||
|
'legacyRegistry'
|
||||||
], function (
|
], function (
|
||||||
WatchIndicator,
|
WatchIndicator,
|
||||||
DigestIndicator
|
DigestIndicator,
|
||||||
|
legacyRegistry
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
legacyRegistry.register("example/profiling", {
|
||||||
name: "example/profiling",
|
|
||||||
definition: {
|
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"indicators": [
|
"indicators": [
|
||||||
{
|
{
|
||||||
@ -50,6 +51,5 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,17 +19,18 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ScratchPersistenceProvider"
|
"./src/ScratchPersistenceProvider",
|
||||||
|
'legacyRegistry'
|
||||||
], function (
|
], function (
|
||||||
ScratchPersistenceProvider
|
ScratchPersistenceProvider,
|
||||||
|
legacyRegistry
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
legacyRegistry.register("example/scratchpad", {
|
||||||
name: "example/scratchpad",
|
|
||||||
definition: {
|
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"roots": [
|
"roots": [
|
||||||
{
|
{
|
||||||
@ -58,6 +59,5 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -20,6 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/*global define,window*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
function () {
|
function () {
|
||||||
@ -52,14 +54,13 @@ define(
|
|||||||
if (space === 'scratch') {
|
if (space === 'scratch') {
|
||||||
this.table[key] = JSON.stringify(value);
|
this.table[key] = JSON.stringify(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$q.when(space === 'scratch');
|
return this.$q.when(space === 'scratch');
|
||||||
};
|
};
|
||||||
|
|
||||||
ScratchPersistenceProvider.prototype.readObject = function (space, key) {
|
ScratchPersistenceProvider.prototype.readObject = function (space, key) {
|
||||||
return this.$q.when(
|
return this.$q.when(
|
||||||
(space === 'scratch' && this.table[key])
|
(space === 'scratch' && this.table[key]) ?
|
||||||
? JSON.parse(this.table[key]) : undefined
|
JSON.parse(this.table[key]) : undefined
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -67,7 +68,6 @@ define(
|
|||||||
if (space === 'scratch') {
|
if (space === 'scratch') {
|
||||||
delete this.table[key];
|
delete this.table[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$q.when(space === 'scratch');
|
return this.$q.when(space === 'scratch');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="example">{{ msg }}</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
msg: 'Hello world!'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.example {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,36 +0,0 @@
|
|||||||
import Vue from 'Vue';
|
|
||||||
import HelloWorld from './HelloWorld.vue';
|
|
||||||
|
|
||||||
function SimpleVuePlugin() {
|
|
||||||
return function install(openmct) {
|
|
||||||
openmct.types.addType('hello-world', {
|
|
||||||
name: 'Hello World',
|
|
||||||
description: 'An introduction object',
|
|
||||||
creatable: true
|
|
||||||
});
|
|
||||||
openmct.objectViews.addProvider({
|
|
||||||
name: "demo-provider",
|
|
||||||
key: "hello-world",
|
|
||||||
cssClass: "icon-packet",
|
|
||||||
canView: function (d) {
|
|
||||||
return d.type === 'hello-world';
|
|
||||||
},
|
|
||||||
view: function (domainObject) {
|
|
||||||
var vm;
|
|
||||||
|
|
||||||
return {
|
|
||||||
show: function (container) {
|
|
||||||
vm = new Vue(HelloWorld);
|
|
||||||
container.appendChild(vm.$mount().$el);
|
|
||||||
},
|
|
||||||
destroy: function (container) {
|
|
||||||
vm.$destroy();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export default SimpleVuePlugin;
|
|
@ -1,132 +1,36 @@
|
|||||||
define([
|
define([
|
||||||
"./src/ExampleStyleGuideModelProvider",
|
"./src/ExampleStyleGuideModelProvider",
|
||||||
"./src/MCTExample",
|
"./src/MCTExample",
|
||||||
"./res/templates/intro.html",
|
'legacyRegistry'
|
||||||
"./res/templates/standards.html",
|
|
||||||
"./res/templates/colors.html",
|
|
||||||
"./res/templates/status.html",
|
|
||||||
"./res/templates/glyphs.html",
|
|
||||||
"./res/templates/controls.html",
|
|
||||||
"./res/templates/input.html",
|
|
||||||
"./res/templates/menus.html"
|
|
||||||
], function (
|
], function (
|
||||||
ExampleStyleGuideModelProvider,
|
ExampleStyleGuideModelProvider,
|
||||||
MCTExample,
|
MCTExample,
|
||||||
introTemplate,
|
legacyRegistry
|
||||||
standardsTemplate,
|
|
||||||
colorsTemplate,
|
|
||||||
statusTemplate,
|
|
||||||
glyphsTemplate,
|
|
||||||
controlsTemplate,
|
|
||||||
inputTemplate,
|
|
||||||
menusTemplate
|
|
||||||
) {
|
) {
|
||||||
return {
|
legacyRegistry.register("example/styleguide", {
|
||||||
name: "example/styleguide",
|
|
||||||
definition: {
|
|
||||||
"name": "Open MCT Style Guide",
|
"name": "Open MCT Style Guide",
|
||||||
"description": "Examples and documentation illustrating UI styles in use in Open MCT.",
|
"description": "Examples and documentation illustrating UI styles in use in Open MCT.",
|
||||||
"extensions":
|
"extensions":
|
||||||
{
|
{
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{ "key": "styleguide.intro", "name": "Introduction", "cssClass": "icon-page", "description": "Introduction and overview to the style guide" },
|
||||||
"key": "styleguide.intro",
|
{ "key": "styleguide.standards", "name": "Standards", "cssClass": "icon-page", "description": "" },
|
||||||
"name": "Introduction",
|
{ "key": "styleguide.colors", "name": "Colors", "cssClass": "icon-page", "description": "" },
|
||||||
"cssClass": "icon-page",
|
{ "key": "styleguide.status", "name": "status", "cssClass": "icon-page", "description": "Limits, telemetry paused, etc." },
|
||||||
"description": "Introduction and overview to the style guide"
|
{ "key": "styleguide.glyphs", "name": "Glyphs", "cssClass": "icon-page", "description": "Glyphs overview" },
|
||||||
},
|
{ "key": "styleguide.controls", "name": "Controls", "cssClass": "icon-page", "description": "Buttons, selects, HTML controls" },
|
||||||
{
|
{ "key": "styleguide.input", "name": "Text Inputs", "cssClass": "icon-page", "description": "Various text inputs" },
|
||||||
"key": "styleguide.standards",
|
{ "key": "styleguide.menus", "name": "Menus", "cssClass": "icon-page", "description": "Context menus, dropdowns" }
|
||||||
"name": "Standards",
|
|
||||||
"cssClass": "icon-page",
|
|
||||||
"description": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.colors",
|
|
||||||
"name": "Colors",
|
|
||||||
"cssClass": "icon-page",
|
|
||||||
"description": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.status",
|
|
||||||
"name": "status",
|
|
||||||
"cssClass": "icon-page",
|
|
||||||
"description": "Limits, telemetry paused, etc."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.glyphs",
|
|
||||||
"name": "Glyphs",
|
|
||||||
"cssClass": "icon-page",
|
|
||||||
"description": "Glyphs overview"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.controls",
|
|
||||||
"name": "Controls",
|
|
||||||
"cssClass": "icon-page",
|
|
||||||
"description": "Buttons, selects, HTML controls"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.input",
|
|
||||||
"name": "Text Inputs",
|
|
||||||
"cssClass": "icon-page",
|
|
||||||
"description": "Various text inputs"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.menus",
|
|
||||||
"name": "Menus",
|
|
||||||
"cssClass": "icon-page",
|
|
||||||
"description": "Context menus, dropdowns"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"views": [
|
"views": [
|
||||||
{
|
{ "key": "styleguide.intro", "type": "styleguide.intro", "templateUrl": "templates/intro.html", "editable": false },
|
||||||
"key": "styleguide.intro",
|
{ "key": "styleguide.standards", "type": "styleguide.standards", "templateUrl": "templates/standards.html", "editable": false },
|
||||||
"type": "styleguide.intro",
|
{ "key": "styleguide.colors", "type": "styleguide.colors", "templateUrl": "templates/colors.html", "editable": false },
|
||||||
"template": introTemplate,
|
{ "key": "styleguide.status", "type": "styleguide.status", "templateUrl": "templates/status.html", "editable": false },
|
||||||
"editable": false
|
{ "key": "styleguide.glyphs", "type": "styleguide.glyphs", "templateUrl": "templates/glyphs.html", "editable": false },
|
||||||
},
|
{ "key": "styleguide.controls", "type": "styleguide.controls", "templateUrl": "templates/controls.html", "editable": false },
|
||||||
{
|
{ "key": "styleguide.input", "type": "styleguide.input", "templateUrl": "templates/input.html", "editable": false },
|
||||||
"key": "styleguide.standards",
|
{ "key": "styleguide.menus", "type": "styleguide.menus", "templateUrl": "templates/menus.html", "editable": false }
|
||||||
"type": "styleguide.standards",
|
|
||||||
"template": standardsTemplate,
|
|
||||||
"editable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.colors",
|
|
||||||
"type": "styleguide.colors",
|
|
||||||
"template": colorsTemplate,
|
|
||||||
"editable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.status",
|
|
||||||
"type": "styleguide.status",
|
|
||||||
"template": statusTemplate,
|
|
||||||
"editable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.glyphs",
|
|
||||||
"type": "styleguide.glyphs",
|
|
||||||
"template": glyphsTemplate,
|
|
||||||
"editable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.controls",
|
|
||||||
"type": "styleguide.controls",
|
|
||||||
"template": controlsTemplate,
|
|
||||||
"editable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.input",
|
|
||||||
"type": "styleguide.input",
|
|
||||||
"template": inputTemplate,
|
|
||||||
"editable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "styleguide.menus",
|
|
||||||
"type": "styleguide.menus",
|
|
||||||
"template": menusTemplate,
|
|
||||||
"editable": false
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"roots": [
|
"roots": [
|
||||||
{
|
{
|
||||||
@ -138,7 +42,7 @@ define([
|
|||||||
"id": "styleguide:home",
|
"id": "styleguide:home",
|
||||||
"priority" : "preferred",
|
"priority" : "preferred",
|
||||||
"model": {
|
"model": {
|
||||||
"type": "noneditable.folder",
|
"type": "folder",
|
||||||
"name": "Style Guide Home",
|
"name": "Style Guide Home",
|
||||||
"location": "ROOT",
|
"location": "ROOT",
|
||||||
"composition": [
|
"composition": [
|
||||||
@ -155,7 +59,7 @@ define([
|
|||||||
"id": "styleguide:ui-elements",
|
"id": "styleguide:ui-elements",
|
||||||
"priority" : "preferred",
|
"priority" : "preferred",
|
||||||
"model": {
|
"model": {
|
||||||
"type": "noneditable.folder",
|
"type": "folder",
|
||||||
"name": "UI Elements",
|
"name": "UI Elements",
|
||||||
"location": "styleguide:home",
|
"location": "styleguide:home",
|
||||||
"composition": [
|
"composition": [
|
||||||
@ -181,8 +85,17 @@ define([
|
|||||||
"$q"
|
"$q"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"stylesheets": [
|
||||||
|
{
|
||||||
|
"stylesheetUrl": "css/style-guide-espresso.css",
|
||||||
|
"theme": "espresso"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stylesheetUrl": "css/style-guide-snow.css",
|
||||||
|
"theme": "snow"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
211
example/styleguide/res/sass/_style-guide-base.scss
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2016, 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
.l-style-guide {
|
||||||
|
font-size: 0.9em;
|
||||||
|
text-align: justify;
|
||||||
|
margin: auto 10%;
|
||||||
|
|
||||||
|
a.link {
|
||||||
|
color: $colorKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, strong, b {
|
||||||
|
color: pullForward($colorBodyFg, 50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 0.9em;
|
||||||
|
margin: $interiorMargin 0;
|
||||||
|
&:not(:first-child) {
|
||||||
|
margin-top: $interiorMarginLg * 2;
|
||||||
|
}
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
strong, b {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-markup {
|
||||||
|
//Wrap markup example "pre" element
|
||||||
|
background-color: $colorCode;
|
||||||
|
border-radius: $interiorMargin;
|
||||||
|
display: block;
|
||||||
|
padding: $interiorMarginLg $interiorMarginLg;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-mct-example {
|
||||||
|
div {
|
||||||
|
margin-bottom: $interiorMarginLg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
code,
|
||||||
|
pre {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
background-color: $colorCode;
|
||||||
|
border-radius: $controlCr;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 1px $interiorMargin;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
max-height: 300px;
|
||||||
|
overflow: auto;
|
||||||
|
padding-bottom: $interiorMarginLg;
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
table, ul {
|
||||||
|
margin-bottom: $interiorMarginLg;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.themed {
|
||||||
|
display: none; // Each themed styleguide file will set this to block.
|
||||||
|
}
|
||||||
|
|
||||||
|
.doc-title {
|
||||||
|
color: rgba(#fff, 0.3);
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.l-section {
|
||||||
|
border-top: 1px solid rgba(#999, 0.3);
|
||||||
|
margin-top: 2em;
|
||||||
|
padding-top: 1em;
|
||||||
|
|
||||||
|
.cols {
|
||||||
|
@include display(flex);
|
||||||
|
@include flex-direction(row);
|
||||||
|
|
||||||
|
.col {
|
||||||
|
@include flex(1 1 auto);
|
||||||
|
&:not(:last-child) {
|
||||||
|
$v: $interiorMargin * 4;
|
||||||
|
border-right: 1px solid $colorInteriorBorder;
|
||||||
|
margin-right: $v;
|
||||||
|
padding-right: $v;
|
||||||
|
}
|
||||||
|
min-width: 300px;
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.cols1-1 {
|
||||||
|
// 2 cols, equal width
|
||||||
|
.col {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.cols1-2 {
|
||||||
|
// 3 cols, first is 1/3 of the width
|
||||||
|
.col:first-child {
|
||||||
|
width: 33%;
|
||||||
|
}
|
||||||
|
.col:last-child {
|
||||||
|
width: 66%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.cols2-1 {
|
||||||
|
// 3 cols, first is 2/3 of the width
|
||||||
|
.col:first-child {
|
||||||
|
width: 66%;
|
||||||
|
}
|
||||||
|
.col:last-child {
|
||||||
|
width: 33%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Example grid of glyphs
|
||||||
|
.items-holder.grid {
|
||||||
|
table.details {
|
||||||
|
width: 100%;
|
||||||
|
td {
|
||||||
|
font-size: inherit;
|
||||||
|
&.label {
|
||||||
|
color: pushBack($colorBodyFg, 10%);
|
||||||
|
text-transform: uppercase;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item.glyph-item,
|
||||||
|
.item.swatch-item {
|
||||||
|
margin-bottom: 50px;
|
||||||
|
margin-right: 10px;
|
||||||
|
position: relative;
|
||||||
|
text-align: left;
|
||||||
|
.glyph {
|
||||||
|
color: $colorGlyphExample;
|
||||||
|
font-size: 5em;
|
||||||
|
margin: $interiorMarginLg 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item.glyph-item {
|
||||||
|
width: 225px;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item.swatch-item {
|
||||||
|
$h: 150px;
|
||||||
|
$d: 75px;
|
||||||
|
width: 200px;
|
||||||
|
height: $h;
|
||||||
|
.glyph {
|
||||||
|
text-shadow: 0px 1px 10px rgba(black, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.h-swatch {
|
||||||
|
position: relative;
|
||||||
|
height: $d + $interiorMarginLg;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swatch {
|
||||||
|
height: $d; width: $d;
|
||||||
|
border: 1px solid $colorInteriorBorder;
|
||||||
|
border-radius: 15%;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
@include transform(translateX(-50%));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|