Compare commits

..

3 Commits

Author SHA1 Message Date
a515ccfb61 [Edit Mode] Refactor edit concerns out of browse controllers
Fixed jslint errors

Removed commented code and added line breaks
2016-02-05 10:00:01 -08:00
560897fe81 [Edit Mode] #627 slightly modified edit representer to detect newly created objects
Added some comments, renamed controller variable in markup

Removed edit references from BrowseController
2016-02-04 16:59:12 -08:00
e1d20e7275 [Edit Mode] #627 remove edit concerns from browse controller 2016-02-04 16:59:11 -08:00
1654 changed files with 118300 additions and 86182 deletions

View File

@ -1,36 +0,0 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:8-browsers
environment:
CHROME_BIN: "/usr/bin/google-chrome"
steps:
- checkout
- run:
name: Update npm
command: 'sudo npm install -g npm@latest'
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- 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
command: npm run test
- run:
name: npm run lint
command: npm run lint
- store_artifacts:
path: dist
prefix: dist
workflows:
version: 2
test:
jobs:
- build

View File

@ -1,79 +0,0 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"jasmine": true,
"amd": true
},
"extends": "eslint:recommended",
"parser": "babel-eslint",
"parserOptions": {
"allowImportExportEverywhere": true,
"ecmaVersion": 2015,
"ecmaFeatures": {
"impliedStrict": true
}
},
"rules": {
"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]
},
"overrides": [
{
"files": ["*Spec.js"],
"rules": {
"no-unused-vars": [
"warn",
{
"vars": "all",
"args": "none",
"varsIgnorePattern": "controller",
}
]
}
}
]
};

10
.gitignore vendored
View File

@ -3,13 +3,9 @@
*.gzip *.gzip
*.tgz *.tgz
*.DS_Store *.DS_Store
*.swp
# Compiled CSS, unless directly added
*.sass-cache *.sass-cache
*COMPILE.css *COMPILE.css
*.css
*.css.map
# Intellij project configuration files # Intellij project configuration files
*.idea *.idea
@ -19,7 +15,6 @@
# Build output # Build output
target target
dist
# Mac OS X Finder # Mac OS X Finder
.DS_Store .DS_Store
@ -27,14 +22,11 @@ dist
# Closed source libraries # Closed source libraries
closed-lib closed-lib
# Node, Bower dependencies # Node dependencies
node_modules node_modules
bower_components
# Protractor logs # Protractor logs
protractor/logs protractor/logs
# npm-debug log # npm-debug log
npm-debug.log npm-debug.log
package-lock.json

View File

@ -1,35 +0,0 @@
*.scssc
*.zip
*.gzip
*.tgz
*.DS_Store
*.sass-cache
*COMPILE.css
# Intellij project configuration files
*.idea
*.iml
# External dependencies
# Build output
target
# Mac OS X Finder
.DS_Store
# Closed source libraries
closed-lib
# Node, Bower dependencies
node_modules
bower_components
Procfile
# Protractor logs
protractor/logs
# npm-debug log
npm-debug.log

1104
API.md

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
# Contributing to Open MCT # Contributing to Open MCT Web
This document describes the process of contributing to Open MCT as well This document describes the process of contributing to Open MCT Web as well
as the standards that will be applied when evaluating contributions. as the standards that will be applied when evaluating contributions.
Please be aware that additional agreements will be necessary before we can Please be aware that additional agreements will be necessary before we can
@ -21,9 +21,9 @@ The short version:
## Contribution Process ## Contribution Process
Open MCT uses git for software version control, and for branching and Open MCT Web uses git for software version control, and for branching and
merging. The central repository is at merging. The central repository is at
https://github.com/nasa/openmct.git. https://github.com/nasa/openmctweb.git.
### Roles ### Roles
@ -43,9 +43,9 @@ the check-in process. These roles are:
Three basic types of branches may be included in the above repository: Three basic types of branches may be included in the above repository:
1. Master branch 1. Master branch.
2. Topic branches 2. Topic branches.
3. Developer branches 3. Developer branches.
Branches which do not fit into the above categories may be created and used Branches which do not fit into the above categories may be created and used
during the course of development for various reasons, such as large-scale during the course of development for various reasons, such as large-scale
@ -107,7 +107,7 @@ 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
members when appropriate (e.g. to draw to a specific person's attention). members when appropriate (e.g. to draw to a specific person's attention.)
Code review should take place using discussion features within the pull Code review should take place using discussion features within the pull
request. When the reviewer is satisfied, they should add a comment to request. When the reviewer is satisfied, they should add a comment to
@ -116,40 +116,40 @@ the merge back to the master branch.
## Standards ## Standards
Contributions to Open MCT are expected to meet the following standards. Contributions to Open MCT Web are expected to meet the following standards.
In addition, reviewers should use general discretion before accepting In addition, reviewers should use general discretion before accepting
changes. changes.
### Code Standards ### Code Standards
JavaScript sources in Open MCT must satisfy JSLint under its default JavaScript sources in Open MCT Web must satisfy JSLint under its default
settings. This is verified by the command line build. settings. This is verified by the command line build.
#### Code Guidelines #### Code Guidelines
JavaScript sources in Open MCT should: JavaScript sources in Open MCT Web should:
* Use four spaces for indentation. Tabs should not be used. * Use four spaces for indentation. Tabs should not be used.
* Include JSDoc for any exposed API (e.g. public methods, constructors). * Include JSDoc for any exposed API (e.g. public methods, constructors.)
* 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. methods, or algorithms when they are non-obvious.
* Define one public class per script, expressed as a constructor function * Define one public class per script, expressed as a constructor function
returned from an AMD-style module. returned from an AMD-style module.
* Follow “Java-like” naming conventions. These includes: * Follow “Java-like” naming conventions. These includes:
* Classes should use camel case, first letter capitalized * Classes should use camel case, first letter capitalized
(e.g. SomeClassName). (e.g. SomeClassName.)
* Methods, variables, fields, and function names should use camel case, * Methods, variables, fields, and function names should use camel case,
first letter lower-case (e.g. someVariableName). first letter lower-case (e.g. someVariableName.) Constants
* Constants (variables or fields which are meant to be declared and (variables or fields which are meant to be declared and initialized
initialized statically, and never changed) should use only capital statically, and never changed) should use only capital letters, with
letters, with underscores between words (e.g. SOME_CONSTANT). underscores between words (e.g. SOME_CONSTANT.)
* File names should be the name of the exported class, plus a .js extension * File name should be the name of the exported class, plus a .js extension
(e.g. SomeClassName.js). (e.g. SomeClassName.js)
* Avoid anonymous functions, except when functions are short (a few lines) * Avoid anonymous functions, except when functions are short (a few lines)
and/or 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). (e.g. as arguments to a forEach call.)
* Avoid deep nesting (especially of functions), except where necessary * Avoid deep nesting (especially of functions), except where necessary
(e.g. due to closure scope). (e.g. due to closure scope.)
* End with a single new-line character. * End with a single new-line character.
* Expose public methods by declaring them on the class's prototype. * Expose public methods by declaring them on the class's prototype.
* Within a given function's scope, do not mix declarations and imperative * Within a given function's scope, do not mix declarations and imperative
@ -159,7 +159,7 @@ JavaScript sources in Open MCT should:
* Third, imperative statements. * Third, imperative statements.
* Finally, the returned value. * Finally, the returned value.
Deviations from Open MCT code style guidelines require two-party agreement, Deviations from Open MCT Web 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 #### Code Example
@ -234,7 +234,7 @@ Commit messages should:
line of white space. line of white space.
* Contain a short (usually one word) reference to the feature or subsystem * Contain a short (usually one word) reference to the feature or subsystem
the commit effects, in square brackets, at the start of the subject line the commit effects, in square brackets, at the start of the subject line
(e.g. `[Documentation] Draft of check-in process`). (e.g. `[Documentation] Draft of check-in process`)
* Contain a reference to a relevant issue number in the body of the commit. * Contain a reference to a relevant issue number in the body of the commit.
* This is important for traceability; while branch names also provide this, * This is important for traceability; while branch names also provide this,
you cannot tell from looking at a commit what branch it was authored on. you cannot tell from looking at a commit what branch it was authored on.
@ -250,9 +250,9 @@ Commit messages should:
Commit messages should not: Commit messages should not:
* Exceed 54 characters in length on the subject line. * Exceed 54 characters in length on the subject line.
* Exceed 72 characters in length in the body of the commit, * Exceed 72 characters in length in the body of the commit.
* Except where necessary to maintain the structure of machine-readable or * Except where necessary to maintain the structure of machine-readable or
machine-generated text (e.g. error messages). machine-generated text (e.g. error messages)
See [Contributing to a Project](http://git-scm.com/book/ch5-2.html) from See [Contributing to a Project](http://git-scm.com/book/ch5-2.html) from
Pro Git by Shawn Chacon and Ben Straub for a bit of the rationale behind Pro Git by Shawn Chacon and Ben Straub for a bit of the rationale behind
@ -260,7 +260,7 @@ these standards.
## Issue Reporting ## Issue Reporting
Issues are tracked at https://github.com/nasa/openmct/issues. Issues are tracked at https://github.com/nasa/openmctweb/issues
Issues should include: Issues should include:
@ -284,7 +284,7 @@ Issue severity is categorized as follows (in ascending order):
The following check lists should be completed and attached to pull requests The following check lists should be completed and attached to pull requests
when they are filed (author checklist) and when they are merged (reviewer when they are filed (author checklist) and when they are merged (reviewer
checklist). checklist.)
### Author Checklist ### Author Checklist

View File

@ -1,12 +1,12 @@
# Open MCT Licenses # Open MCT Web 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 Web, Copyright (c) 2014-2015, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.
Open MCT 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. Open MCT Web is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 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. Open MCT Web includes source code licensed under additional open source licenses as follows.
## Software Components Licenses ## Software Components Licenses
@ -135,7 +135,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
* Link: http://requirejs.org/ * Link: http://requirejs.org/
* Version: 2.1.22 * Version: 2.1.9
* Author: The Dojo Foundation * Author: The Dojo Foundation
@ -153,49 +153,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
--- ---
### 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 ### AngularJS
#### Info #### Info
* Link: http://angularjs.org/ * Link: http://angularjs.org/
* Version: 1.4.4 * Version: 1.2.26
* Author: Google * Author: Google
@ -203,7 +167,7 @@ THE SOFTWARE.
#### License #### License
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org Copyright (c) 2010-2014 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: 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:
@ -219,7 +183,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
* Link: http://angularjs.org/ * Link: http://angularjs.org/
* Version: 1.4.4 * Version: 1.2.26
* Author: Google * Author: Google
@ -227,7 +191,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#### License #### License
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org Copyright (c) 2010-2014 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: 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:
@ -243,7 +207,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
* Link: https://github.com/jakearchibald/es6-promise * Link: https://github.com/jakearchibald/es6-promise
* Version: 3.0.2 * Version: 2.0.0
* Authors: Yehuda Katz, Tom Dale, Stefan Penner and contributors * Authors: Yehuda Katz, Tom Dale, Stefan Penner and contributors
@ -267,7 +231,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
* Link: https://github.com/sindresorhus/screenfull.js/ * Link: https://github.com/sindresorhus/screenfull.js/
* Version: 3.0.0 * Version: 1.2.0
* Author: Sindre Sorhus * Author: Sindre Sorhus
@ -291,15 +255,39 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
* Link: https://github.com/broofa/node-uuid * Link: https://github.com/broofa/node-uuid
* Version: 1.4.7 * Version: 1.4
* Author: Robert Kieffer * Author: Robert Kieffer
* Description: Unique identifer generation. * Description: Unique identifer generation (code adapted.)
#### License #### License
Copyright (c) 2010-2012 Robert Kieffer Copyright (c) 2010 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.
---
### Modernizr
#### Info
* Link: http://modernizr.com
* Version: 2.6.2
* Author: Faruk Ateş
* Description: Browser/device capability finding
#### License
Copyright (c) 20092015
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: 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:
@ -339,7 +327,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
* Link: http://momentjs.com * Link: http://momentjs.com
* Version: 2.11.1 * Version: 2.7.0
* Authors: Tim Wood, Iskren Chernev, Moment.js contributors * Authors: Tim Wood, Iskren Chernev, Moment.js contributors
@ -392,104 +380,6 @@ 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 ### Json.NET
#### Info #### Info
@ -560,132 +450,3 @@ The above copyright notice and this permission notice shall be included in all c
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. 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.

179
README.md
View File

@ -1,105 +1,49 @@
# Open MCT [![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) # Open MCT Web
Open MCT (Open Mission Control Technologies) is a next-generation mission control framework for visualization of data on desktop and mobile devices. It is developed at NASA's Ames Research Center, and is being used by NASA for data analysis of spacecraft missions, as well as planning and operation of experimental rover systems. As a generalizable and open source framework, Open MCT could be used as the basis for building applications for planning, operation, and analysis of any systems producing telemetry data. Open MCT Web is a web-based platform for mission operations user interface
software.
Please visit our [Official Site](https://nasa.github.io/openmct/) and [Getting Started Guide](https://nasa.github.io/openmct/getting-started/) ## Bundles
## See Open MCT in Action 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 are intended to be added or removed as a single unit. A plug-in for
Open MCT Web will be expressed as a bundle; platform components are also
expressed as bundles.
Try Open MCT now with our [live demo](https://openmct-demo.herokuapp.com/). A bundle is also just a directory which contains a file `bundle.json`,
![Demo](https://nasa.github.io/openmct/static/res/images/Open-MCT.Browse.Layout.Mars-Weather-1.jpg) which declares its contents.
## New API 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 Web. Adding or
removing paths from this list will add or remove bundles from the running
application.
A simpler, [easier-to-use API](https://nasa.github.io/openmct/docs/api/) ### Bundle Contents
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. A bundle directory will contain:
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 * `bundle.json`, the declaration of the bundles contents.
possible, and your feedback will help us get there! * A source code directory, named `src` by convention. This contains all
JavaScript sources exposed by the bundle. These are declared as
AMD modules.
* A directory for other resources, named `res` by convention. This
contains all HTML templates, CSS files, images, and so forth to be
used within a given bundle.
* A library directory, named `lib` by convention. This contains all
external libraries used and/or exposed by the bundle.
* A test directory, named `test` by convention. This contains all unit
tests declared for the bundle, as well as a `suite.json` that acts
as a listing of these dependencies. See the section on unit testing
below.
## Building and Running Open MCT Locally Following these bundle conventions is required, at present, to ensure
that Open MCT Web (and its build and tests) execute correctly.
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.
(These instructions assume you are installing as a non-root user; developers have [reported issues](https://github.com/nasa/openmct/issues/1151) running these steps with root privileges.)
1. Clone the source code
`git clone https://github.com/nasa/openmct.git`
2. Install development dependencies
`npm install`
3. Run a local development server
`npm start`
Open MCT is now running, and can be accessed by pointing a web browser at [http://localhost:8080/](http://localhost:8080/)
## Documentation
Documentation is available on the [Open MCT website](https://nasa.github.io/openmct/documentation/). The documentation can also be built locally.
### Examples
The clearest examples for developing Open MCT plugins are in the
[tutorials](https://github.com/nasa/openmct-tutorial) provided in
our documentation.
For a practical example of a telemetry adapter, see David Hudson's
[Kerbal Space Program plugin](https://github.com/hudsonfoo/kerbal-openmct),
which allows [Kerbal Space Program](https://kerbalspaceprogram.com) players
to build and use displays for their own missions in Open MCT.
Additional examples are available in the `examples` hierarchy of this
repository; however, be aware that these examples are
[not fully-documented](https://github.com/nasa/openmct/issues/846), so
the tutorials will likely serve as a better starting point.
### Building 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:
* `npm install`
* `npm install canvas nomnoml`
* `npm run docs`
Documentation will be generated in `target/docs`.
## Deploying Open MCT
Open MCT is built using [`npm`](http://npmjs.com/)
To build Open MCT for deployment:
`npm run prepare`
This will compile and minify JavaScript sources, as well as copy over assets.
The contents of the `dist` folder will contain a runnable Open MCT
instance (e.g. by starting an HTTP server in that directory), including:
* `openmct.js` - Open MCT source code.
* `openmct.css` - Basic styles to load to prevent a FOUC.
* `index.html`, an example to run Open MCT in the basic configuration.
## Tests ## Tests
Tests are written for [Jasmine 3](http://jasmine.github.io/) 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`
@ -117,9 +61,58 @@ naming convention is otherwise the same.)
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
`target/tests`. Code coverage information is written to `target/coverage`. `target/tests`. Code coverage information is written to `target/coverage`.
### Functional Testing
The tests described above are all at the unit-level; an additional
test suite using [Protractor](https://angular.github.io/protractor/)
us under development, in the `protractor` folder.
To run:
* Install protractor following the instructions above.
* `cd protractor`
* `npm install`
* `npm run all`
## Build
Open MCT Web includes a Maven command line build. Although Open MCT Web
can be run as-is using the repository contents (that is, by viewing
`index.html` in a web browser), the command
line build allows machine-driven verification and packaging.
This build will:
* Check all sources (excluding those in directories named `lib`) with
JSLint for code style compliance. The build will fail if any sources
do not satisfy JSLint.
* Run the [unit test suite](#tests).
* Package the application as a `war` (web archive) file. This is
convenient for deployment on Tomcat or similar. This archive will
include sources, resources, and libraries for bundles, as well
as the top-level files used to initiate running of the application
(`index.html` and `bundles.json`).
Run as `mvn clean install`.
### Building Documentation
Open MCT Web'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:
* `npm install`
* `npm install canvas nomnoml`
* `npm run docs`
Documentation will be generated in `target/docs`.
# Glossary # Glossary
Certain terms are used throughout Open MCT with consistent meanings Certain terms are used throughout Open MCT Web with consistent meanings
or conventions. Any deviations from the below are issues and should be or conventions. Any deviations from the below are issues and should be
addressed (either by updating this glossary or changing code to reflect 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
@ -142,7 +135,7 @@ documentation, may presume an understanding of these terms.
(Most often used in the context of extensions, domain (Most often used in the context of extensions, domain
object models, or other similar application-specific objects.) object models, or other similar application-specific objects.)
* _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 Web. Anything that appears in the left-hand
tree is a domain object. tree is a domain object.
* _extension_: An extension is a unit of functionality exposed to the * _extension_: An extension is a unit of functionality exposed to the
platform in a declarative fashion by a bundle. For more platform in a declarative fashion by a bundle. For more
@ -163,6 +156,6 @@ documentation, may presume an understanding of these terms.
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.)
* _space_: A name used to identify a persistence store. Interactions with * _space_: A name used to identify a persistence store. Interactions with
persistence will generally involve a `space` parameter in some form, to persistence with generally involve a `space` parameter in some form, to
distinguish multiple persistence stores from one another (for cases distinguish multiple persistence stores from one another (for cases
where there are multiple valid persistence locations available.) where there are multiple valid persistence locations available.)

113
app.js
View File

@ -7,72 +7,63 @@
* 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');
// Defaults // Defaults
options.port = options.port || options.p || 8080; options.port = options.port || options.p || 8080;
options.host = options.host || options.h || 'localhost'; ['include', 'exclude', 'i', 'x'].forEach(function (opt) {
options.directory = options.directory || options.D || '.'; 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) {
console.log("\nUsage: node app.js [options]\n"); console.log("\nUsage: node app.js [options]\n");
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(" --directory, -D <bundle> Serve files from specified directory."); console.log(" --include, -i <bundle> Include the specified bundle.");
console.log(""); console.log(" --exclude, -x <bundle> Exclude the specified bundle.");
process.exit(0); console.log("");
} process.exit(0);
app.disable('x-powered-by');
app.use('/proxyUrl', function proxyRequest(req, res, next) {
console.log('Proxying request to: ', req.query.url);
req.pipe(request({
url: req.query.url,
strictSSL: false
}).on('error', next)).pipe(res);
});
const webpack = require('webpack');
const webpackConfig = require('./webpack.config.js');
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',
webpackConfig.entry.openmct
];
const compiler = webpack(webpackConfig);
app.use(require('webpack-dev-middleware')(
compiler,
{
publicPath: '/dist',
logLevel: 'warn'
} }
));
app.use(require('webpack-hot-middleware')( // Override bundles.json for HTTP requests
compiler, app.use('/' + BUNDLE_FILE, function (req, res) {
{ var bundles;
} try {
)); bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8'));
} catch (e) {
bundles = [];
}
// Expose index.html for development users. // Handle command line inclusions/exclusions
app.get('/', function (req, res) { bundles = bundles.concat(options.include);
fs.createReadStream('index.html').pipe(res); bundles = bundles.filter(function (bundle) {
}); return options.exclude.indexOf(bundle) === -1;
});
bundles = bundles.filter(function (bundle, index) { // Uniquify
return bundles.indexOf(bundle) === index;
});
// Finally, open the HTTP server and log the instance to the console res.send(JSON.stringify(bundles));
app.listen(options.port, options.host, function() { });
console.log('Open MCT application running at %s:%s', options.host, options.port)
}); // Expose everything else as static files
app.use(express['static']('.'));
// Finally, open the HTTP server
app.listen(options.port);
}());

View File

@ -1,11 +1,11 @@
#!/bin/bash #!/bin/bash
#***************************************************************************** #*****************************************************************************
#* Open MCT, Copyright (c) 2014-2017, United States Government #* Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -16,25 +16,23 @@
#* 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 Web 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.
#***************************************************************************** #*****************************************************************************
# Script to build and deploy docs. # Script to build and deploy docs to github pages.
OUTPUT_DIRECTORY="dist/docs" OUTPUT_DIRECTORY="target/docs"
# Docs, once built, are pushed to the private website repo REPOSITORY_URL="git@github.com:nasa/openmctweb.git"
REPOSITORY_URL="git@github.com:nasa/openmct-website.git"
WEBSITE_DIRECTORY="website"
BUILD_SHA=`git rev-parse HEAD` BUILD_SHA=`git rev-parse head`
# A remote will be created for the git repository we are pushing to. # A remote will be created for the git repository we are pushing to.
# Don't worry, as this entire directory will get trashed in between builds. # Don't worry, as this entire directory will get trashed inbetween builds.
REMOTE_NAME="documentation" REMOTE_NAME="documentation"
WEBSITE_BRANCH="master" WEBSITE_BRANCH="gh-pages"
# Clean output directory, JSDOC will recreate # Clean output directory, JSDOC will recreate
if [ -d $OUTPUT_DIRECTORY ]; then if [ -d $OUTPUT_DIRECTORY ]; then
@ -42,21 +40,23 @@ if [ -d $OUTPUT_DIRECTORY ]; then
fi fi
npm run docs npm run docs
cd $OUTPUT_DIRECTORY || exit 1
echo "git clone $REPOSITORY_URL website" echo "git init"
git clone $REPOSITORY_URL website || exit 1 git init
echo "cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY"
cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY
echo "cd $WEBSITE_DIRECTORY"
cd $WEBSITE_DIRECTORY || exit 1
# Configure github for CircleCI user. # Configure github for CircleCI user.
git config user.email "buildbot@circleci.com" git config user.email "buildbot@circleci.com"
git config user.name "BuildBot" git config user.name "BuildBot"
echo "git remote add $REMOTE_NAME $REPOSITORY_URL"
git remote add $REMOTE_NAME $REPOSITORY_URL
echo "git add ." echo "git add ."
git add . git add .
echo "git commit -m \"Docs updated from build $BUILD_SHA\"" echo "git commit -m \"Generate docs from build $BUILD_SHA\""
git commit -m "Docs updated from build $BUILD_SHA" git commit -m "Generate docs from build $BUILD_SHA"
# Push to the website repo
git push echo "git push $REMOTE_NAME HEAD:$WEBSITE_BRANCH -f"
git push $REMOTE_NAME HEAD:$WEBSITE_BRANCH -f
echo "Documentation pushed to gh-pages branch."

15
circle.yml Normal file
View File

@ -0,0 +1,15 @@
deployment:
production:
branch: master
commands:
- npm install canvas nomnoml
- ./build-docs.sh
- git push git@heroku.com:openmctweb-demo.git $CIRCLE_SHA1:refs/heads/master
openmctweb-staging-un:
branch: nem_prototype
heroku:
appname: openmctweb-staging-un
openmctweb-staging-deux:
branch: mobile
heroku:
appname: openmctweb-staging-deux

View File

@ -1,21 +0,0 @@
<!--
Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved.
Open MCT is licensed under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
Open MCT includes source code licensed under additional open source
licenses. See the Open Source Licenses file (LICENSES.md) included with
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->

View File

@ -1,21 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/

View File

@ -1,3 +1,9 @@
<hr> <hr>
<cite>
This document is styled using
<a href="https://github.com/jasonm23/markdown-css-themes">
https://github.com/jasonm23/markdown-css-themes
</a>.
</cite>
</body> </body>
</html> </html>

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.

View File

@ -1,9 +1,7 @@
<html> <html>
<head> <head>
<link rel="stylesheet" <link rel="stylesheet"
href="//nasa.github.io/openmct/static/res/css/styles.css"> href="http://jasonm23.github.io/markdown-css-themes/avenir-white.css">
<link rel="stylesheet"
href="//nasa.github.io/openmct/static/res/css/documentation.css">
</head> </head>
<body> <body>

View File

@ -5,7 +5,7 @@ software components to communicate. The software components it recognizes
are: are:
* _Extensions_: Individual units of functionality that can be added to * _Extensions_: Individual units of functionality that can be added to
or removed from Open MCT. _Extension categories_ distinguish what or removed from Open MCT Web. _Extension categories_ distinguish what
type of functionality is being added/removed. type of functionality is being added/removed.
* _Bundles_: A grouping of related extensions * _Bundles_: A grouping of related extensions
(named after an analogous concept from [OSGi](http://www.osgi.org/)) (named after an analogous concept from [OSGi](http://www.osgi.org/))
@ -19,7 +19,7 @@ manner which the framework layer can understand.
```nomnoml ```nomnoml
#direction: down #direction: down
[Open MCT| [Open MCT Web|
[Dependency injection framework]-->[Platform bundle #1] [Dependency injection framework]-->[Platform bundle #1]
[Dependency injection framework]-->[Platform bundle #2] [Dependency injection framework]-->[Platform bundle #2]
[Dependency injection framework]-->[Plugin bundle #1] [Dependency injection framework]-->[Plugin bundle #1]
@ -35,7 +35,7 @@ manner which the framework layer can understand.
``` ```
The "dependency injection framework" in this case is The "dependency injection framework" in this case is
[AngularJS](https://angularjs.org/). Open MCT's framework layer [AngularJS](https://angularjs.org/). Open MCT Web's framework layer
is really just a thin wrapper over Angular that recognizes the is really just a thin wrapper over Angular that recognizes the
concepts of bundles and extensions (as declared in JSON files) and concepts of bundles and extensions (as declared in JSON files) and
registering extensions with Angular. It additionally acts as a registering extensions with Angular. It additionally acts as a
@ -60,7 +60,7 @@ activities which were performed by the framework component.
## Application Initialization ## Application Initialization
The framework component initializes an Open MCT application following The framework component initializes an Open MCT Web application following
a simple sequence of steps. a simple sequence of steps.
```nomnoml ```nomnoml
@ -97,7 +97,7 @@ a simple sequence of steps.
[Extension]o->[Dependency #3] [Extension]o->[Dependency #3]
``` ```
Open MCT's architecture relies on a simple premise: Individual units Open MCT Web's architecture relies on a simple premise: Individual units
(extensions) only have access to the dependencies they declare that they (extensions) only have access to the dependencies they declare that they
need, and they acquire references to these dependencies via dependency need, and they acquire references to these dependencies via dependency
injection. This has several desirable traits: injection. This has several desirable traits:
@ -121,17 +121,17 @@ injection. This has several desirable traits:
the framework. the framework.
A drawback to this approach is that it makes it difficult to define A drawback to this approach is that it makes it difficult to define
"the architecture" of Open MCT, in terms of describing the specific "the architecture" of Open MCT Web, in terms of describing the specific
units that interact at run-time. The run-time architecture is determined units that interact at run-time. The run-time architecture is determined
by the framework as the consequence of wiring together dependencies. by the framework as the consequence of wiring together dependencies.
As such, the specific architecture of any given application built on As such, the specific architecture of any given application built on
Open MCT can look very different. Open MCT Web can look very different.
Keeping that in mind, there are a few useful patterns supported by the Keeping that in mind, there are a few useful patterns supported by the
framework that are useful to keep in mind. framework that are useful to keep in mind.
The specific service infrastructure provided by the platform is described The specific service infrastructure provided by the platform is described
in the [Platform Architecture](platform.md). in the [Platform Architecture](Platform.md).
## Extension Categories ## Extension Categories
@ -229,4 +229,4 @@ otherwise a single provider) will be exposed as a single service that
other extensions can acquire through dependency injection. Because all other extensions can acquire through dependency injection. Because all
components of the same type of service expose the same interface, users components of the same type of service expose the same interface, users
of that service do not need to be aware that they are talking to an of that service do not need to be aware that they are talking to an
aggregator or a provider, for instance. aggregator or a provider, for instance.

View File

@ -1,14 +1,14 @@
# Introduction # Introduction
The purpose of this document is to familiarize developers with the The purpose of this document is to familiarize developers with the
overall architecture of Open MCT. overall architecture of Open MCT Web.
The target audience includes: The target audience includes:
* _Platform maintainers_: Individuals involved in developing, * _Platform maintainers_: Individuals involved in developing,
extending, and maintaining capabilities of the platform. extending, and maintaing capabilities of the platform.
* _Integration developers_: Individuals tasked with integrated * _Integration developers_: Individuals tasked with integrated
Open MCT into a larger system, who need to understand Open MCT Web into a larger system, who need to understand
its inner workings sufficiently to complete this integration. its inner workings sufficiently to complete this integration.
As the focus of this document is on architecture, whenever possible As the focus of this document is on architecture, whenever possible
@ -17,25 +17,25 @@ omitted. These details may be found in the developer guide.
# Overview # Overview
Open MCT is client software: It runs in a web browser and Open MCT Web is client software: It runs in a web browser and
provides a user interface, while communicating with various provides a user interface, while communicating with various
server-side resources through browser APIs. server-side resources through browser APIs.
```nomnoml ```nomnoml
#direction: right #direction: right
[Client|[Browser|[Open MCT]->[Browser APIs]]] [Client|[Browser|[Open MCT Web]->[Browser APIs]]]
[Server|[Web services]] [Server|[Web services]]
[Client]<->[Server] [Client]<->[Server]
``` ```
While Open MCT can be configured to run as a standalone client, While Open MCT Web can be configured to run as a standalone client,
this is rarely very useful. Instead, it is intended to be used as a this is rarely very useful. Instead, it is intended to be used as a
display and interaction layer for information obtained from a display and interaction layer for information obtained from a
variety of back-end services. Doing so requires authoring or utilizing variety of back-end services. Doing so requires authoring or utilizing
adapter plugins which allow Open MCT to interact with these services. adapter plugins which allow Open MCT Web to interact with these services.
Typically, the pattern here is to provide a known interface that Typically, the pattern here is to provide a known interface that
Open MCT can utilize, and implement it such that it interacts with Open MCT Web can utilize, and implement it such that it interacts with
whatever back-end provides the relevant information. whatever back-end provides the relevant information.
Examples of back-ends that can be utilized in this fashion include Examples of back-ends that can be utilized in this fashion include
databases for the persistence of user-created objects, or sources of databases for the persistence of user-created objects, or sources of
@ -43,13 +43,13 @@ telemetry data.
## Software Architecture ## Software Architecture
The simplest overview of Open MCT is to look at it as a "layered" The simplest overview of Open MCT Web is to look at it as a "layered"
architecture, where each layer more clearly specifies the behavior architecture, where each layer more clearly specifies the behavior
of the software. of the software.
```nomnoml ```nomnoml
#direction: down #direction: down
[Open MCT| [Open MCT Web|
[Platform]<->[Application] [Platform]<->[Application]
[Framework]->[Application] [Framework]->[Application]
[Framework]->[Platform] [Framework]->[Platform]
@ -63,14 +63,16 @@ These layers are:
application-specific knowledge; at this layer, we have only application-specific knowledge; at this layer, we have only
established an abstraction by which different software components established an abstraction by which different software components
may communicate and/or interact. may communicate and/or interact.
* [_Platform_](platform.md): The platform layer defines the general look, * [_Platform_](platform.md): The platform layer defines the general look,
feel, and behavior of Open MCT. This includes user-facing components like feel, and behavior of Open MCT Web. This includes user-facing components like
Browse mode and Edit mode, as well as underlying elements of the Browse mode and Edit mode, as well as underlying elements of the
information model and the general service infrastructure. information model and the general service infrastructure.
* _Application_: The application layer defines specific features of * _Application_: The application layer defines specific features of
an application built on Open MCT. This includes adapters to an application built on Open MCT Web. This includes adapters to
specific back-ends, new types of things for users to create, and specific back-ends, new types of things for users to create, and
new ways of visualizing objects within the system. This layer new ways of visualizing objects within the system. This layer
typically consists of a mix of custom plug-ins to Open MCT, typically consists of a mix of custom plug-ins to Open MCT Web,
as well as optional features (such as Plot view) included alongside as well as optional features (such as Plot view) included alongside
the platform. the platform.

View File

@ -1,6 +1,6 @@
# Overview # Overview
The Open MCT platform utilizes the [framework layer](framework.md) The Open MCT Web platform utilizes the [framework layer](Framework.md)
to provide an extensible baseline for applications which includes: to provide an extensible baseline for applications which includes:
* A common user interface (and user interface paradigm) for dealing with * A common user interface (and user interface paradigm) for dealing with
@ -16,7 +16,7 @@ building application, the platform adds more specificity by defining
additional extension types and allowing for integration with back end additional extension types and allowing for integration with back end
components. components.
The run-time architecture of an Open MCT application can be categorized The run-time architecture of an Open MCT Web application can be categorized
into certain high-level tiers: into certain high-level tiers:
```nomnoml ```nomnoml
@ -29,7 +29,7 @@ into certain high-level tiers:
[Browser APIs]->[Back-end] [Browser APIs]->[Back-end]
``` ```
Applications built using Open MCT may add or configure functionality Applications built using Open MCT Web may add or configure functionality
in __any of these tiers__. in __any of these tiers__.
* _DOM_: The rendered HTML document, composed from HTML templates which * _DOM_: The rendered HTML document, composed from HTML templates which
@ -38,7 +38,7 @@ in __any of these tiers__.
are initiated from here and invoke behavior in the presentation layer. HTML  are initiated from here and invoke behavior in the presentation layer. HTML 
templates are written in Angulars template syntax; see the [Angular documentation on templates](https://docs.angularjs.org/guide/templates).  templates are written in Angulars template syntax; see the [Angular documentation on templates](https://docs.angularjs.org/guide/templates). 
These describe the page as actually seen by the user. Conceptually,  These describe the page as actually seen by the user. Conceptually, 
stylesheets (controlling the look-and-feel of the rendered templates) belong  stylesheets (controlling the look­and­feel of the rendered templates) belong 
in this grouping as well.  in this grouping as well. 
* [_Presentation layer_](#presentation-layer): The presentation layer * [_Presentation layer_](#presentation-layer): The presentation layer
is responsible for updating (and providing information to update) is responsible for updating (and providing information to update)
@ -48,7 +48,7 @@ in __any of these tiers__.
display. display.
* [_Information model_](#information-model): Provides a common (within Open MCT  * [_Information model_](#information-model): Provides a common (within Open MCT 
Web) set of interfaces for dealing with “things” ­ domain objects ­ within the  Web) set of interfaces for dealing with “things” ­ domain objects ­ within the 
system. User-facing concerns in a Open MCT Web application are expressed as  system. User­facing concerns in a Open MCT Web application are expressed as 
domain objects; examples include folders (used to organize other domain  domain objects; examples include folders (used to organize other domain 
objects), layouts (used to build displays), or telemetry points (used as  objects), layouts (used to build displays), or telemetry points (used as 
handles for streams of remote measurements.) These domain objects expose a  handles for streams of remote measurements.) These domain objects expose a 
@ -60,7 +60,7 @@ in __any of these tiers__.
functionality needed to support the information model. This includes functionality needed to support the information model. This includes
exposing underlying sets of extensions and mediating with the exposing underlying sets of extensions and mediating with the
back-end. back-end.
* _Back-end_: The back-end is out of the scope of Open MCT, except * _Back-end_: The back-end is out of the scope of Open MCT Web, except
for the interfaces which are utilized by adapters participating in the for the interfaces which are utilized by adapters participating in the
service infrastructure. Includes the underlying persistence stores, telemetry  service infrastructure. Includes the underlying persistence stores, telemetry 
streams, and so forth which the Open MCT Web client is being used to interact  streams, and so forth which the Open MCT Web client is being used to interact 
@ -70,15 +70,15 @@ in __any of these tiers__.
Once the Once the
[application has been initialized](Framework.md#application-initialization) [application has been initialized](Framework.md#application-initialization)
Open MCT primarily operates in an event-driven paradigm; various Open MCT Web primarily operates in an event-driven paradigm; various
events (mouse clicks, timers firing, receiving responses to XHRs) trigger events (mouse clicks, timers firing, receiving responses to XHRs) trigger
the invocation of functions, typically in the presentation layer for the invocation of functions, typically in the presentation layer for
user actions or in the service infrastructure for server responses. user actions or in the service infrastructure for server responses.
The "main point of entry" into an initialized Open MCT application The "main point of entry" into an initialized Open MCT Web application
is effectively the is effectively the
[route](https://docs.angularjs.org/api/ngRoute/service/$route#example) [route](https://docs.angularjs.org/api/ngRoute/service/$route#example)
which is associated with the URL used to access Open MCT (or a which is associated with the URL used to access Open MCT Web (or a
default route.) This route will be associated with a template which default route.) This route will be associated with a template which
will be displayed; this template will include references to directives will be displayed; this template will include references to directives
and controllers which will be interpreted by Angular and used to and controllers which will be interpreted by Angular and used to
@ -107,11 +107,11 @@ both the information model and the service infrastructure.
# Presentation Layer # Presentation Layer
The presentation layer of Open MCT is responsible for providing The presentation layer of Open MCT Web is responsible for providing
information to display within templates, and for handling interactions information to display within templates, and for handling interactions
which are initiated from templated DOM elements. AngularJS acts as which are initiated from templated DOM elements. AngularJS acts as
an intermediary between the web page as the user sees it, and the an intermediary between the web page as the user sees it, and the
presentation layer implemented as Open MCT extensions. presentation layer implemented as Open MCT Web extensions.
```nomnoml ```nomnoml
[Presentation Layer| [Presentation Layer|
@ -143,12 +143,12 @@ to primitives from AngularJS:
attributes and tags. attributes and tags.
* [_Routes_](https://docs.angularjs.org/api/ngRoute/service/$route#example) * [_Routes_](https://docs.angularjs.org/api/ngRoute/service/$route#example)
are used to associate specific URLs (including the fragment identifier) are used to associate specific URLs (including the fragment identifier)
with specific application states. (In Open MCT, these are used to with specific application states. (In Open MCT Web, these are used to
describe the mode of usage - e.g. browse or edit - as well as to describe the mode of usage - e.g. browse or edit - as well as to
identify the object being used.) identify the object being used.)
* [_Templates_](https://docs.angularjs.org/guide/templates) are partial * [_Templates_](https://docs.angularjs.org/guide/templates) are partial
HTML documents that will be rendered and kept up-to-date by AngularJS. HTML documents that will be rendered and kept up-to-date by AngularJS.
Open MCT introduces a custom `mct-include` directive which acts Open MCT Web introduces a custom `mct-include` directive which acts
as a wrapper around `ng-include` to allow templates to be referred as a wrapper around `ng-include` to allow templates to be referred
to by symbolic names. to by symbolic names.
@ -189,10 +189,10 @@ to displaying domain objects.
] ]
``` ```
Domain objects are the most fundamental component of Open MCT's Domain objects are the most fundamental component of Open MCT Web's
information model. A domain object is some distinct thing relevant to a information model. A domain object is some distinct thing relevant to a
user's work flow, such as a telemetry channel, display, or similar. user's work flow, such as a telemetry channel, display, or similar.
Open MCT is a tool for viewing, browsing, manipulating, and otherwise Open MCT Web is a tool for viewing, browsing, manipulating, and otherwise
interacting with a graph of domain objects. interacting with a graph of domain objects.
A domain object should be conceived of as the union of the following: A domain object should be conceived of as the union of the following:
@ -254,7 +254,7 @@ Concrete examples of capabilities which follow this pattern
# Service Infrastructure # Service Infrastructure
Most services exposed by the Open MCT platform follow the Most services exposed by the Open MCT Web platform follow the
[composite services](Framework.md#composite-services) to permit [composite services](Framework.md#composite-services) to permit
a higher degree of flexibility in how a service can be modified a higher degree of flexibility in how a service can be modified
or customized for specific applications. or customized for specific applications.
@ -327,7 +327,7 @@ A short summary of the roles of these services:
[DomainObjectProvider]o-[CapabilityService] [DomainObjectProvider]o-[CapabilityService]
``` ```
As domain objects are central to Open MCT's information model, As domain objects are central to Open MCT Web's information model,
acquiring domain objects is equally important. acquiring domain objects is equally important.
```nomnoml ```nomnoml
@ -338,7 +338,7 @@ acquiring domain objects is equally important.
[<state> Instantiate DomainObject]->[<end> End] [<state> Instantiate DomainObject]->[<end> End]
``` ```
Open MCT includes an implementation of an `ObjectService` which Open MCT Web includes an implementation of an `ObjectService` which
satisfies this capability by: satisfies this capability by:
* Consulting the [Model Service](#model-service) to acquire domain object * Consulting the [Model Service](#model-service) to acquire domain object
@ -437,9 +437,9 @@ objects (this allows failures to be recognized and handled in groups.)
The telemetry service is responsible for acquiring telemetry data. The telemetry service is responsible for acquiring telemetry data.
Notably, the platform does not include any providers for Notably, the platform does not include any providers for
`TelemetryService`; applications built on Open MCT will need to `TelemetryService`; applications built on Open MCT Web will need to
implement a provider for this service if they wish to expose telemetry implement a provider for this service if they wish to expose telemetry
data. This is usually the most important step for integrating Open MCT data. This is usually the most important step for integrating Open MCT Web
into an existing telemetry system. into an existing telemetry system.
Requests for telemetry data are usually initiated in the Requests for telemetry data are usually initiated in the
@ -616,7 +616,7 @@ follows:
part of an action's extension definition. part of an action's extension definition.
* `CreateActionProvider` provides the various Create actions which * `CreateActionProvider` provides the various Create actions which
populate the Create menu. These are driven by the available types, populate the Create menu. These are driven by the available types,
so do not map easily to extension category `actions`; instead, these so do not map easily ot extension category `actions`; instead, these
are generated after looking up which actions are available from the are generated after looking up which actions are available from the
[`TypeService`](#type-service). [`TypeService`](#type-service).
* `ActionAggregator` merges together actions from multiple providers. * `ActionAggregator` merges together actions from multiple providers.
@ -721,6 +721,6 @@ disallow.
``` ```
The type service provides metadata about the different types of domain The type service provides metadata about the different types of domain
objects that exist within an Open MCT application. The platform objects that exist within an Open MCT Web application. The platform
implementation reads these types in from extension category `types` implementation reads these types in from extension category `types`
and wraps them in a JavaScript interface. and wraps them in a JavaScript interface.

View File

@ -1,7 +1,7 @@
# API Refactoring # API Refactoring
This document summarizes a path toward implementing API changes This document summarizes a path toward implementing API changes
from the [API Redesign](../proposals/APIRedesign.md) for Open MCT from the [API Redesign](../proposals/APIRedesign.md) for Open MCT Web
v1.0.0. v1.0.0.
# Goals # Goals
@ -161,7 +161,7 @@ be included in a straightforward fashion.
Some goals for this build step: Some goals for this build step:
* Compile (and, preferably, optimize/minify) Open MCT * Compile (and, preferably, optimize/minify) Open MCT Web
sources into a single `.js` file. sources into a single `.js` file.
* It is desirable to do the same for HTML sources, but * It is desirable to do the same for HTML sources, but
may wish to defer this until a subsequent refactoring may wish to defer this until a subsequent refactoring
@ -170,7 +170,7 @@ Some goals for this build step:
derivative projects in a straightforward fashion. derivative projects in a straightforward fashion.
Should also consider which dependency/packaging manager should Should also consider which dependency/packaging manager should
be used by dependent projects to obtain Open MCT. Approaches be used by dependent projects to obtain Open MCT Web. Approaches
include: include:
1. Plain `npm`. Dependents then declare their dependency with 1. Plain `npm`. Dependents then declare their dependency with
@ -203,7 +203,7 @@ to use for asset generation/management and compilation/minification/etc.
## Step 3. Separate repositories ## Step 3. Separate repositories
Refactor existing applications built on Open MCT such that they Refactor existing applications built on Open MCT Web such that they
are no longer forks, but instead separate projects with a dependency are no longer forks, but instead separate projects with a dependency
on the built artifacts from Step 2. on the built artifacts from Step 2.
@ -211,7 +211,7 @@ Note that this is achievable already using `bower` (see `warp-bower`
branch at http://developer.nasa.gov/mct/warp for an example.) branch at http://developer.nasa.gov/mct/warp for an example.)
However, changes involved in switching to an imperative API and However, changes involved in switching to an imperative API and
introducing a build process may change (and should simplify) the introducing a build process may change (and should simplify) the
approach used to utilize Open MCT as a dependency, so these approach used to utilize Open MCT Web as a dependency, so these
changes should be introduced first. changes should be introduced first.
## Step 4. Design registration API ## Step 4. Design registration API
@ -287,7 +287,7 @@ or separately in parallel) and should involve a tight cycle of:
planning should be done to spread out the changes incrementally. planning should be done to spread out the changes incrementally.
By necessity, these changes may break functionality in applications By necessity, these changes may break functionality in applications
built using Open MCT. On a case-by-case basis, should consider built using Open MCT Web. On a case-by-case basis, should consider
providing temporary "legacy support" to allow downstream updates providing temporary "legacy support" to allow downstream updates
to occur as a separate task; the relevant trade here is between to occur as a separate task; the relevant trade here is between
waste/effort required to maintain legacy support, versus the waste/effort required to maintain legacy support, versus the
@ -299,11 +299,11 @@ across several repositories.
Update bundles to remove any usages of legacy support for bundles Update bundles to remove any usages of legacy support for bundles
(including that used by dependent projects.) Then, remove legacy (including that used by dependent projects.) Then, remove legacy
support from Open MCT. support from Open MCT Web.
## Step 8. Release candidacy ## Step 8. Release candidacy
Once API changes are complete, Open MCT should enter a release Once API changes are complete, Open MCT Web should enter a release
candidacy cycle. Important things to look at here: candidacy cycle. Important things to look at here:
* Are changes really complete? * Are changes really complete?

View File

@ -1,6 +1,6 @@
# Overview # Overview
The purpose of this document is to review feedback on Open MCT's The purpose of this document is to review feedback on Open MCT Web's
current API and propose improvements to the API, particularly for a current API and propose improvements to the API, particularly for a
1.0.0 release. 1.0.0 release.
@ -64,7 +64,7 @@ useful, powerful interfaces.
## Developer Intern Feedback ## Developer Intern Feedback
This feedback comes from interns who worked closely with This feedback comes from interns who worked closely with
Open MCT as their primary task over the Summer of 2015. Open MCT Web as their primary task over the Summer of 2015.
### Developer Intern 1 ### Developer Intern 1
@ -98,13 +98,13 @@ Worked on bug fixes in the platform and a plugin for search.
It is hard to figure out what the difference between the various ways of It is hard to figure out what the difference between the various ways of
dealing with telemetry are. e.g., what is the difference between just dealing with telemetry are. e.g., what is the difference between just
"Telemetry" and the "Telemetry Service"? There are many "Telemetry" and the "Telemetry Service"? There are many
"Telemetry Things" which seem related, but in an unclear way. "Telemetry Thing"s which seem related, but in an unclear way.
### Developer Intern 2 ### Developer Intern 2
Worked on platform bug fixes and mobile support. Worked on platform bug fixes and mobile support.
* No guide for the UI and front end for the HTML/CSS part of Open MCT. * No guide for the UI and front end for the HTML/CSS part of Open MCT Web.
Not sure if this is applicable or needed for developers, however would Not sure if this is applicable or needed for developers, however would
be helpful to any front end development be helpful to any front end development
* Found it difficult to follow the plot controller & subplot * Found it difficult to follow the plot controller & subplot
@ -118,11 +118,11 @@ Worked on platform bug fixes and mobile support.
## Plugin Developer Feedback ## Plugin Developer Feedback
This feedback comes from developers who have worked on plugins for This feedback comes from developers who have worked on plugins for
Open MCT, but have not worked on the platform. Open MCT Web, but have not worked on the platform.
### Plugin Developer 1 ### Plugin Developer 1
Used Open MCT over the course of several months (on a Used Open MCT Web over the course of several months (on a
less-than-half-time basis) to develop a less-than-half-time basis) to develop a
spectrum visualization plugin. spectrum visualization plugin.
@ -138,7 +138,7 @@ spectrum visualization plugin.
### Plugin Developer 2 ### Plugin Developer 2
Used Open MCT over the course of several weeks (on a half-time basis) Used Open MCT Web over the course of several weeks (on a half-time basis)
to develop a tabular visualization plugin. to develop a tabular visualization plugin.
* Pain points * Pain points
@ -180,7 +180,7 @@ to develop a tabular visualization plugin.
* Add a model property to the bundle.json to take in "Hello World" * Add a model property to the bundle.json to take in "Hello World"
as a parameter and pass through to the controller/view as a parameter and pass through to the controller/view
### Open Source Contributor ### Open Source Contributer
* [Failures are non-graceful when services are missing.]( * [Failures are non-graceful when services are missing.](
https://github.com/nasa/openmctweb/issues/79) https://github.com/nasa/openmctweb/issues/79)
@ -197,7 +197,7 @@ to develop a tabular visualization plugin.
## Long-term Developer Notes ## Long-term Developer Notes
The following notes are from original platform developer, with long The following notes are from original platform developer, with long
term experience using Open MCT. term experience using Open MCT Web.
* Bundle mechanism allows for grouping related components across concerns, * Bundle mechanism allows for grouping related components across concerns,
and adding and removing these easily. (e.g. model and view components of and adding and removing these easily. (e.g. model and view components of
@ -214,13 +214,13 @@ to an entirely different framework.
We can expect AngularJS 1.x to reach end-of-life reasonably soon thereafter. We can expect AngularJS 1.x to reach end-of-life reasonably soon thereafter.
Our API is currently a superset of Angular's API, so this directly affects Our API is currently a superset of Angular's API, so this directly effects
our API. Specifically, API changes should be oriented towards removing our API. Specifically, API changes should be oriented towards removing
or reducing the Angular dependency. or reducing the Angular dependency.
### Angular's Role ### Angular's Role
Angular is Open MCT's: Angular is Open MCT Web's:
* Dependency injection framework. * Dependency injection framework.
* Template rendering. * Template rendering.
@ -268,7 +268,7 @@ by experience:
* Feedback from new developers is that Angular was a hindrance to * Feedback from new developers is that Angular was a hindrance to
training, not a benefit. ("One more thing to learn.") Significant training, not a benefit. ("One more thing to learn.") Significant
documentation remains necessary for Open MCT. documentation remains necessary for Open MCT Web.
* Expected enhancements to maintainability will be effectively * Expected enhancements to maintainability will be effectively
invalidated by an expected Angular end-of-life. invalidated by an expected Angular end-of-life.
* Data binding and automatic view updates do save development effort, * Data binding and automatic view updates do save development effort,
@ -456,7 +456,7 @@ Instead, propose that:
For parity with actions, a `View` would be a constructor which For parity with actions, a `View` would be a constructor which
takes an `ActionContext` as a parameter (with similarly-defined takes an `ActionContext` as a parameter (with similarly-defined
properties) and exposes a method to retrieve the HTML elements properties) and exposes a method to retrieve the HTML elements
associated with it. associateed with it.
The platform would then additionally expose an `AngularView` The platform would then additionally expose an `AngularView`
implementation to improve compatibility with existing implementation to improve compatibility with existing
@ -526,7 +526,7 @@ subset of `$http`'s functionality.
### Detriments ### Detriments
* Increases the number of interfaces in Open MCT. (Arguably, * Increases the number of interfaces in Open MCT Web. (Arguably,
not really, since the same interfaces would exist if exposed not really, since the same interfaces would exist if exposed
by Angular.) by Angular.)
@ -574,7 +574,7 @@ This would also allow for "composite bundles" which serve as
proxies for multiple bundles. The `BundleContext` could contain proxies for multiple bundles. The `BundleContext` could contain
(or later be amended to contain) filtering rules to ignore (or later be amended to contain) filtering rules to ignore
other bundles and so forth (this has been useful for administering other bundles and so forth (this has been useful for administering
Open MCT in subtly different configurations in the past.) Open MCT Web in subtly different configurations in the past.)
### Benefits ### Benefits
@ -827,7 +827,7 @@ This could be resolved by:
## Nomenclature Change ## Nomenclature Change
Instead of presenting Open MCT as a "framework" or Instead of presenting Open MCT Web as a "framework" or
"platform", present it as an "extensible application." "platform", present it as an "extensible application."
This is mostly a change for the developer guide. A This is mostly a change for the developer guide. A
@ -1040,7 +1040,7 @@ This is a more specific variant of
* Removes a whole category of API (bundle definitions), reducing * Removes a whole category of API (bundle definitions), reducing
learning curve associated with the software. learning curve associated with the software.
* Closer to Angular style, reducing disconnect between learning * Closer to Angular style, reducing disconnect between learning
Angular and learning Open MCT (reducing burden of having Angular and learning Open MCT Web (reducing burden of having
to learn multiple paradigms.) to learn multiple paradigms.)
* Clarifies "what can be found where" (albeit not perfectly) * Clarifies "what can be found where" (albeit not perfectly)
since you can look to module dependencies and follow back from there. since you can look to module dependencies and follow back from there.

View File

@ -3,7 +3,7 @@
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Reducing interface depth (the bundle.json version)](#reducing-interface-depth-the-bundlejson-version) - [Reducing interface depth (the bundle.json version)](#reducing-interface-depth-the-bundlejson-version)
- [Imperitive component registries](#imperative-component-registries) - [Imperitive component registries](#imperitive-component-registries)
- [Get rid of "extension category" concept.](#get-rid-of-extension-category-concept) - [Get rid of "extension category" concept.](#get-rid-of-extension-category-concept)
- [Reduce number and depth of extension points](#reduce-number-and-depth-of-extension-points) - [Reduce number and depth of extension points](#reduce-number-and-depth-of-extension-points)
- [Composite services should not be the default](#composite-services-should-not-be-the-default) - [Composite services should not be the default](#composite-services-should-not-be-the-default)
@ -30,11 +30,11 @@
# Reducing interface depth (the bundle.json version) # Reducing interface depth (the bundle.json version)
## Imperative component registries ## Imperitive component registries
Transition component registries to javascript, get rid of bundle.json and bundles.json. Prescribe a method for application configuration, but allow flexibility in how application configuration is defined. Transition component registries to javascript, get rid of bundle.json and bundles.json. Prescribe a method for application configuration, but allow flexibility in how application configuration is defined.
Register components in an imperative fashion, see angularApp.factory, angularApp.controller, etc. Alternatively, implement our own application object with new registries and it's own form of registering objects. Register components in an imperitive fashion, see angularApp.factory, angularApp.controller, etc. Alternatively, implement our own application object with new registries and it's own form of registering objects.
## Get rid of "extension category" concept. ## Get rid of "extension category" concept.
@ -99,7 +99,7 @@ To reduce interface depth, we can replace our own provider and registry patterns
## More angular: for all services ## More angular: for all services
Increasing our commitment to angular would mean using more of the angular factories, services, etc, and less of our home grown tools. We'd implement our services and extension points as angular providers, and make them configurable via app.config. Increasing our commitment to angular would mean using more of the angular factorys, services, etc, and less of our home grown tools. We'd implement our services and extension points as angular providers, and make them configurable via app.config.
As an example, registering a specific type of model provider in angular would look like: As an example, registering a specific type of model provider in angular would look like:
@ -126,9 +126,9 @@ Allow developers to use whatever module loading system they'd like to use, while
## Use gulp or grunt for standard tooling ## Use gulp or grunt for standard tooling
Using gulp or grunt as a task runner would bring us in line with standard web developer workflows and help standardize rendering, deployment, and packaging. Additional tools can be added to the workflow at low cost, simplifying the setup of developer environments. Using gulp or grunt as a task runner would bring us in line with standard web developer workflows and help standardize rendering, deployment, and packaging. Additional tools can be added to the workflow at low cost, simplifying the set up of developer environments.
Gulp and grunt provide useful developer tooling such as live reload, automatic scss/less/etc compilation, and ease of extensibility for standard production build processes. They're key in decoupling code. Gulp and grunt provide useful developer tooling such as live reload, automatic scss/less/etc compiliation, and ease of extensibility for standard production build processes. They're key in decoupling code.
## Package openmctweb as single versioned file. ## Package openmctweb as single versioned file.

View File

@ -1,4 +1,4 @@
# Open MCT Developer Guide # Open MCT Web Developer Guide
Victor Woeltjen Victor Woeltjen
[victor.woeltjen@nasa.gov](mailto:victor.woeltjen@nasa.gov) [victor.woeltjen@nasa.gov](mailto:victor.woeltjen@nasa.gov)
@ -6,36 +6,35 @@ Victor Woeltjen
September 23, 2015 September 23, 2015
Document Version 1.1 Document Version 1.1
Date | Version | Summary of Changes | Author Date | Version | Summary of Changes | Author
------------------- | --------- | ------------------------- | --------------- ------------------- | --------- | ----------------------- | ---------------
April 29, 2015 | 0 | Initial Draft | Victor Woeltjen April 29, 2015 | 0 | Initial Draft | Victor Woeltjen
May 12, 2015 | 0.1 | | Victor Woeltjen May 12, 2015 | 0.1 | | Victor Woeltjen
June 4, 2015 | 1.0 | Name Changes | Victor Woeltjen June 4, 2015 | 1.0 | Name Changes | Victor Woeltjen
October 4, 2015 | 1.1 | Conversion to MarkDown | Andrew Henry October 4, 2015 | 1.1 | Conversion to MarkDown | Andrew Henry
April 5, 2016 | 1.2 | Added Mct-table directive | Andrew Henry
# Introduction # Introduction
The purpose of this guide is to familiarize software developers with the Open The purpose of this guide is to familiarize software developers with the Open
MCT Web platform. MCT Web platform.
## What is Open MCT ## What is Open MCT Web
Open MCT is a platform for building user interface and display tools, Open MCT Web is a platform for building user interface and display tools,
developed at the NASA Ames Research Center in collaboration with teams at the developed at the NASA Ames Research Center in collaboration with teams at the
Jet Propulsion Laboratory. It is written in HTML5, CSS3, and JavaScript, using Jet Propulsion Laboratory. It is written in HTML5, CSS3, and JavaScript, using
[AngularJS](http://www.angularjs.org) as a framework. Its intended use is to [AngularJS](http://www.angularjs.org) as a framework. Its intended use is to
create single-page web applications which integrate data and behavior from a create single-page web applications which integrate data and behavior from a
variety of sources and domains. variety of sources and domains.
Open MCT has been developed to support the remote operation of space Open MCT Web has been developed to support the remote operation of space
vehicles, so some of its features are specific to that task; however, it is vehicles, so some of its features are specific to that task; however, it is
flexible enough to be adapted to a variety of other application domains where a flexible enough to be adapted to a variety of other application domains where a
display tool oriented toward browsing, composing, and visualizing would be display tool oriented toward browsing, composing, and visualizing would be
useful. useful.
Open MCT provides: Open MCT Web provides:
* A common user interface paradigm which can be applied to a variety of domains * A common user interface paradigm which can be applied to a variety of domains
and tasks. Open MCT is more than a widget toolkit - it provides a standard and tasks. Open MCT Web is more than a widget toolkit - it provides a standard
tree-on-the-left, view-on-the-right browsing environment which you customize by tree-on-the-left, view-on-the-right browsing environment which you customize by
adding new browsable object types, visualizations, and back-end adapters. adding new browsable object types, visualizations, and back-end adapters.
* A plugin framework and an extensible API for introducing new application * A plugin framework and an extensible API for introducing new application
@ -44,17 +43,17 @@ features of a variety of types.
visualizations and infrastructure specific to telemetry display. visualizations and infrastructure specific to telemetry display.
## Client-Server Relationship ## Client-Server Relationship
Open MCT is client software - it runs entirely in the user's web browser. As Open MCT Web is client software - it runs entirely in the user's web browser. As
such, it is largely 'server agnostic'; any web server capable of serving files such, it is largely 'server agnostic'; any web server capable of serving files
from paths is capable of providing Open MCT. from paths is capable of providing Open MCT Web.
While Open MCT can be configured to run as a standalone client, this is While Open MCT Web can be configured to run as a standalone client, this is
rarely very useful. Instead, it is intended to be used as a display and rarely very useful. Instead, it is intended to be used as a display and
interaction layer for information obtained from a variety of back-end services. interaction layer for information obtained from a variety of back-end services.
Doing so requires authoring or utilizing adapter plugins which allow Open MCT Doing so requires authoring or utilizing adapter plugins which allow Open MCT
Web to interact with these services. Web to interact with these services.
Typically, the pattern here is to provide a known interface that Open MCT Typically, the pattern here is to provide a known interface that Open MCT Web
can utilize, and implement it such that it interacts with whatever back-end can utilize, and implement it such that it interacts with whatever back-end
provides the relevant information. Examples of back-ends that can be utilized in provides the relevant information. Examples of back-ends that can be utilized in
this fashion include databases for the persistence of user-created objects, or this fashion include databases for the persistence of user-created objects, or
@ -63,52 +62,52 @@ sources of telemetry data.
See the [Architecture Guide](../architecture/index.md#Overview) for information See the [Architecture Guide](../architecture/index.md#Overview) for information
on the client-server relationship. on the client-server relationship.
## Developing with Open MCT ## Developing with Open MCT Web
Building applications with Open MCT typically means authoring and utilizing Building applications with Open MCT Web typically means authoring and utilizing
a set of plugins which provide application-specific details about how Open MCT a set of plugins which provide application-specific details about how Open MCT
Web should behave. Web should behave.
### Technologies ### Technologies
Open MCT sources are written in JavaScript, with a number of configuration Open MCT Web sources are written in JavaScript, with a number of configuration
files written in JSON. Displayable components are written in HTML5 and CSS3. files written in JSON. Displayable components are written in HTML5 and CSS3.
Open MCT is built using [AngularJS](http://www.angularjs.org) from Google. A Open MCT Web is built using [AngularJS](http://www.angularjs.org) from Google. A
good understanding of Angular is recommended for developers working with Open good understanding of Angular is recommended for developers working with Open
MCT Web. MCT Web.
### Forking ### Forking
Open MCT does not currently have a single stand-alone artifact that can be Open MCT Web does not currently have a single stand-alone artifact that can be
used as a library. Instead, the recommended approach for creating a new used as a library. Instead, the recommended approach for creating a new
application is to start by forking/branching Open MCT, and then adding new application is to start by forking/branching Open MCT Web, and then adding new
features from there. Put another way, Open MCT's source structure is built features from there. Put another way, Open MCT Web's source structure is built
to serve as a template for specific applications. to serve as a template for specific applications.
Forking in this manner should not require that you edit Open MCT's sources. Forking in this manner should not require that you edit Open MCT Web's sources.
The preferred approach is to create a new directory (peer to `index.html`) for The preferred approach is to create a new directory (peer to `index.html`) for
the new application, then add new bundles (as described in the Framework the new application, then add new bundles (as described in the Framework
chapter) within that directory. chapter) within that directory.
To initially clone the Open MCT repository: To initially clone the Open MCT Web repository:
`git clone <repository URL> <local repo directory> -b open-master` `git clone <repository URL> <local repo directory> -b open-master`
To create a fork to begin working on a new application using Open MCT: To create a fork to begin working on a new application using Open MCT Web:
cd <local repo directory> cd <local repo directory>
git checkout open-master git checkout open-master
git checkout -b <new branch name> git checkout -b <new branch name>
As a convention used internally, applications built using Open MCT have As a convention used internally, applications built using Open MCT Web have
master branch names with an identifying prefix. For instance, if building an master branch names with an identifying prefix. For instance, if building an
application called 'Foo', the last statement above would look like: application called 'Foo', the last statement above would look like:
git checkout -b foo-master git checkout -b foo-master
This convention is not enforced or understood by Open MCT in any way; it is This convention is not enforced or understood by Open MCT Web in any way; it is
mentioned here as a more general recommendation. mentioned here as a more general recommendation.
# Overview # Overview
Open MCT is implemented as a framework component which manages a set of Open MCT Web is implemented as a framework component which manages a set of
other components. These components, called _bundles_, act as containers to group other components. These components, called _bundles_, act as containers to group
sets of related functionality; individual units of functionality are expressed sets of related functionality; individual units of functionality are expressed
within these bundles as _extensions_. within these bundles as _extensions_.
@ -119,7 +118,7 @@ run-time to satisfy these declared dependency. This dependency injection
approach allows software components which have been authored separately (e.g. as approach allows software components which have been authored separately (e.g. as
plugins) but to collaborate at run-time. plugins) but to collaborate at run-time.
Open MCT's framework layer is implemented on top of AngularJS's [dependency Open MCT Web's framework layer is implemented on top of AngularJS's [dependency
injection mechanism](https://docs.angularjs.org/guide/di) and is modelled after injection mechanism](https://docs.angularjs.org/guide/di) and is modelled after
[OSGi](hhttp://www.osgi.org/) and its [Declarative Services component model](http://wiki.osgi.org/wiki/Declarative_Services). [OSGi](hhttp://www.osgi.org/) and its [Declarative Services component model](http://wiki.osgi.org/wiki/Declarative_Services).
In particular, this is where the term _bundle_ comes from. In particular, this is where the term _bundle_ comes from.
@ -134,7 +133,7 @@ The framework is described in more detail in the [Framework Overview](../archite
architecture guide. architecture guide.
### Tiers ### Tiers
While all bundles in a running Open MCT instance are effectively peers, it While all bundles in a running Open MCT Web instance are effectively peers, it
is useful to think of them as a tiered architecture, where each tier adds more is useful to think of them as a tiered architecture, where each tier adds more
specificity to the application. specificity to the application.
```nomnoml ```nomnoml
@ -152,7 +151,7 @@ It additionally interprets bundle definitions (see explanation below, as well as
further detail in the Framework chapter.) At this tier, we are at our most further detail in the Framework chapter.) At this tier, we are at our most
general: We know only that we are a plugin-based application. general: We know only that we are a plugin-based application.
* __Platform__: Components in the Platform tier describe both the general user * __Platform__: Components in the Platform tier describe both the general user
interface and corresponding developer-facing interfaces of Open MCT. This interface and corresponding developer-facing interfaces of Open MCT Web. This
tier provides the general infrastructure for applications. It is less general tier provides the general infrastructure for applications. It is less general
than the framework tier, insofar as this tier introduces a specific user than the framework tier, insofar as this tier introduces a specific user
interface paradigm, but it is still non-specific as to what useful features interface paradigm, but it is still non-specific as to what useful features
@ -160,7 +159,7 @@ will be provided. Although they can be removed or replaced easily, bundles
provided by the Platform tier generally should not be thought of as optional. provided by the Platform tier generally should not be thought of as optional.
* __Application__: The application tier consists of components which utilize the * __Application__: The application tier consists of components which utilize the
infrastructure provided by the Platform to provide functionality which will (or infrastructure provided by the Platform to provide functionality which will (or
could) be useful to specific applications built using Open MCT. These could) be useful to specific applications built using Open MCT Web. These
include adapters to specific persistence back-ends (such as ElasticSearch or include adapters to specific persistence back-ends (such as ElasticSearch or
CouchDB) as well as bundles which describe more user-facing features (such as CouchDB) as well as bundles which describe more user-facing features (such as
_Plot_ views for visualizing time series data, or _Layout_ objects for _Plot_ views for visualizing time series data, or _Layout_ objects for
@ -169,20 +168,20 @@ compromising basic application functionality, with the caveat that at least one
persistence adapter needs to be present. persistence adapter needs to be present.
* __Plugins__: Conceptually, this tier is not so different from the application * __Plugins__: Conceptually, this tier is not so different from the application
tier; it consists of bundles describing new features, back-end adapters, that tier; it consists of bundles describing new features, back-end adapters, that
are specific to the application being built on Open MCT. It is described as are specific to the application being built on Open MCT Web. It is described as
a separate tier here because it has one important distinction from the a separate tier here because it has one important distinction from the
application tier: It consists of bundles that are not included with the platform application tier: It consists of bundles that are not included with the platform
(either authored anew for the specific application, or obtained from elsewhere.) (either authored anew for the specific application, or obtained from elsewhere.)
Note that bundles in any tier can go off and consult back-end services. In Note that bundles in any tier can go off and consult back-end services. In
practice, this responsibility is handled at the Application and/or Plugin tiers; practice, this responsibility is handled at the Application and/or Plugin tiers;
Open MCT is built to be server-agnostic, so any back-end is considered an Open MCT Web is built to be server-agnostic, so any back-end is considered an
application-specific detail. application-specific detail.
## Platform Overview ## Platform Overview
The "tiered" architecture described in the preceding text describes a way of The "tiered" architecture described in the preceding text describes a way of
thinking of and categorizing software components of a Open MCT application, thinking of and categorizing software components of a Open MCT Web application,
as well as the framework layer's role in mediating between these components. as well as the framework layer's role in mediating between these components.
Once the framework layer has wired these software components together, however, Once the framework layer has wired these software components together, however,
the application's logical architecture emerges. the application's logical architecture emerges.
@ -193,7 +192,7 @@ section of the Platform guide
### Web Services ### Web Services
As mentioned in the Introduction, Open MCT is a platform single-page As mentioned in the Introduction, Open MCT Web is a platform single-page
applications which runs entirely in the browser. Most applications will want to applications which runs entirely in the browser. Most applications will want to
additionally interact with server-side resources, to (for example) read additionally interact with server-side resources, to (for example) read
telemetry data or store user-created objects. This interaction is handled by telemetry data or store user-created objects. This interaction is handled by
@ -206,7 +205,7 @@ individual bundles using APIs which are supported in browser (such as
[Web Service #2] <- [Web Browser] [Web Service #2] <- [Web Browser]
[Web Service #3] <- [Web Browser] [Web Service #3] <- [Web Browser]
[<package> Web Browser | [<package> Web Browser |
[<package> Open MCT | [<package> Open MCT Web |
[Plugin Bundle #1]-->[Core API] [Plugin Bundle #1]-->[Core API]
[Core API]<--[Plugin Bundle #2] [Core API]<--[Plugin Bundle #2]
[Platform Bundle #1]-->[Core API] [Platform Bundle #1]-->[Core API]
@ -216,16 +215,16 @@ individual bundles using APIs which are supported in browser (such as
[Core API]<--[Platform Bundle #5] [Core API]<--[Platform Bundle #5]
[Core API]<--[Plugin Bundle #3] [Core API]<--[Plugin Bundle #3]
] ]
[Open MCT] ->[Browser APIs] [Open MCT Web] ->[Browser APIs]
] ]
``` ```
This architectural approach ensures a loose coupling between applications built This architectural approach ensures a loose coupling between applications built
using Open MCT and the backends which support them. using Open MCT Web and the backends which support them.
### Glossary ### Glossary
Certain terms are used throughout Open MCT with consistent meanings or Certain terms are used throughout Open MCT Web with consistent meanings or
conventions. Other developer documentation, particularly in-line documentation, conventions. Other developer documentation, particularly in-line documentation,
may presume an understanding of these terms. may presume an understanding of these terms.
@ -247,7 +246,7 @@ readable description of a thing; usually a single sentence or short paragraph.
(Most often used in the context of extensions, domain object models, or other (Most often used in the context of extensions, domain object models, or other
similar application-specific objects.) similar application-specific objects.)
* __domain object__: A meaningful object to the user; a distinct thing in the * __domain object__: A meaningful object to the user; a distinct thing in the
work support by Open MCT. Anything that appears in the left-hand tree is a work support by Open MCT Web. Anything that appears in the left-hand tree is a
domain object. domain object.
* __extension__: An extension is a unit of functionality exposed to the platform * __extension__: An extension is a unit of functionality exposed to the platform
in a declarative fashion by a bundle. The term 'extension category' is used to in a declarative fashion by a bundle. The term 'extension category' is used to
@ -279,10 +278,10 @@ side-by-side without conflicting.
# Framework # Framework
Open MCT is built on the [AngularJS framework]( http://www.angularjs.org ). A Open MCT Web is built on the [AngularJS framework]( http://www.angularjs.org ). A
good understanding of that framework is recommended. good understanding of that framework is recommended.
Open MCT adds an extra layer on top of AngularJS to (a) generalize its Open MCT Web adds an extra layer on top of AngularJS to (a) generalize its
dependency injection mechanism slightly, particularly to handle many-to-one dependency injection mechanism slightly, particularly to handle many-to-one
relationships; and (b) handle script loading. Combined, these features become a relationships; and (b) handle script loading. Combined, these features become a
plugin mechanism. plugin mechanism.
@ -301,7 +300,7 @@ MCT Web.)
are collected together in bundles, and may interact with other extensions. are collected together in bundles, and may interact with other extensions.
The framework layer, loaded and initiated from `index.html`, is the main point The framework layer, loaded and initiated from `index.html`, is the main point
of entry for an application built on Open MCT. It is responsible for wiring of entry for an application built on Open MCT Web. It is responsible for wiring
together the application at run time (much of this responsibility is actually together the application at run time (much of this responsibility is actually
delegated to Angular); at a high-level, the framework does this by proceeding delegated to Angular); at a high-level, the framework does this by proceeding
through four stages: through four stages:
@ -321,7 +320,7 @@ have been registered.
## Bundles ## Bundles
The basic configurable unit of Open MCT is the _bundle_. This term has been The basic configurable unit of Open MCT Web is the _bundle_. This term has been
used a bit already; now we'll get to a more formal definition. used a bit already; now we'll get to a more formal definition.
A bundle is a directory which contains: A bundle is a directory which contains:
@ -329,13 +328,13 @@ A bundle is a directory which contains:
* A bundle definition; a file named `bundle.json`. * A bundle definition; a file named `bundle.json`.
* Subdirectories for sources, resources, and tests. * Subdirectories for sources, resources, and tests.
* Optionally, a `README.md` Markdown file describing its contents (this is not * Optionally, a `README.md` Markdown file describing its contents (this is not
used by Open MCT in any way, but it's a helpful convention to follow.) used by Open MCT Web in any way, but it's a helpful convention to follow.)
The bundle definition is the main point of entry for the bundle. The framework The bundle definition is the main point of entry for the bundle. The framework
looks at this to determine which components need to be loaded and how they looks at this to determine which components need to be loaded and how they
interact. interact.
A plugin in Open MCT is a bundle. The platform itself is also decomposed A plugin in Open MCT Web is a bundle. The platform itself is also decomposed
into bundles, each of which provides some category of functionality. The into bundles, each of which provides some category of functionality. The
difference between a _bundle_ and a _plugin_ is purely a matter of the intended difference between a _bundle_ and a _plugin_ is purely a matter of the intended
use; a plugin is just a bundle that is meant to be easily added or removed. When use; a plugin is just a bundle that is meant to be easily added or removed. When
@ -356,7 +355,7 @@ For instance, if `bundles.json` contained:
"example/extensions" "example/extensions"
] ]
...then the Open MCT framework would look for bundle definitions at ...then the Open MCT Web framework would look for bundle definitions at
`example/builtins/bundle.json` and `example/extensions/bundle.json`, relative `example/builtins/bundle.json` and `example/extensions/bundle.json`, relative
to the path of `index.html`. No other bundles would be loaded. to the path of `index.html`. No other bundles would be loaded.
@ -457,7 +456,7 @@ arrays of extension definitions.
### General Extensions ### General Extensions
Extensions are intended as a general-purpose mechanism for adding new types of Extensions are intended as a general-purpose mechanism for adding new types of
functionality to Open MCT. functionality to Open MCT Web.
An extension category is registered with Angular under the name of the An extension category is registered with Angular under the name of the
extension, plus a suffix of two square brackets; so, an Angular service (or, extension, plus a suffix of two square brackets; so, an Angular service (or,
@ -466,7 +465,7 @@ extensions, from all bundles, by including this string (e.g. `types[]` to get
all type definitions) in a dependency declaration. all type definitions) in a dependency declaration.
As a convention, extension categories are given single-word, plural nouns for As a convention, extension categories are given single-word, plural nouns for
names within Open MCT (e.g. `types`.) This convention is not enforced by the names within Open MCT Web (e.g. `types`.) This convention is not enforced by the
platform in any way. For extension categories introduced by external plugins, it platform in any way. For extension categories introduced by external plugins, it
is recommended to prefix the extension category with a vendor identifier (or is recommended to prefix the extension category with a vendor identifier (or
similar) followed by a dot, to avoid collisions. similar) followed by a dot, to avoid collisions.
@ -505,7 +504,7 @@ the Angular-supported method for dependency injection is (effectively)
constructor-style injection; so, both declared dependencies and run-time constructor-style injection; so, both declared dependencies and run-time
arguments are competing for space in a constructor's arguments. arguments are competing for space in a constructor's arguments.
To resolve this, the Open MCT framework registers extension instances in a To resolve this, the Open MCT Web framework registers extension instances in a
partially constructed form. That is, the constructor exposed by the extension's partially constructed form. That is, the constructor exposed by the extension's
implementation is effectively decomposed into two calls; the first takes the implementation is effectively decomposed into two calls; the first takes the
dependencies, and returns the constructor in its second form, which takes the dependencies, and returns the constructor in its second form, which takes the
@ -549,7 +548,7 @@ sorted according to these conventions when using them.
### Angular Built-ins ### Angular Built-ins
Several entities supported Angular are expressed and managed as extensions in Several entities supported Angular are expressed and managed as extensions in
Open MCT. Specifically, these extension categories are _directives_, Open MCT Web. Specifically, these extension categories are _directives_,
_controllers_, _services_, _constants_, _runs_, and _routes_. _controllers_, _services_, _constants_, _runs_, and _routes_.
#### Angular Directives #### Angular Directives
@ -592,7 +591,7 @@ property value , which is the constant value that will be registered.
In some cases, you want to register code to run as soon as the application In some cases, you want to register code to run as soon as the application
starts; these can be registered as extensions of the [ runs category](https://docs.angularjs.org/api/ng/type/angular.Module#run ). starts; these can be registered as extensions of the [ runs category](https://docs.angularjs.org/api/ng/type/angular.Module#run ).
Implementations registered in this category will be invoked (with their declared Implementations registered in this category will be invoked (with their declared
dependencies) when the Open MCT application first starts. (Note that, in dependencies) when the Open MCT Web application first starts. (Note that, in
this case, the implementation is better thought of as just a function, as this case, the implementation is better thought of as just a function, as
opposed to a constructor function.) opposed to a constructor function.)
@ -627,13 +626,13 @@ providers of the same service (that is, with matching `provides` properties);
for a decorator, this will be whichever provider, decorator, or aggregator is for a decorator, this will be whichever provider, decorator, or aggregator is
next in the sequence of decorators. next in the sequence of decorators.
Services exposed by the Open MCT platform are often declared as composite Services exposed by the Open MCT Web platform are often declared as composite
services, as this form is open for a variety of common modifications. services, as this form is open for a variety of common modifications.
# Core API # Core API
Most of Open MCT's relevant API is provided and/or mediated by the Most of Open MCT Web's relevant API is provided and/or mediated by the
framework; that is, much of developing for Open MCT is a matter of adding framework; that is, much of developing for Open MCT Web is a matter of adding
extensions which access other parts of the platform by means of dependency extensions which access other parts of the platform by means of dependency
injection. injection.
@ -642,9 +641,9 @@ to be passed along by other services.
## Domain Objects ## Domain Objects
Domain objects are the most fundamental component of Open MCT's information Domain objects are the most fundamental component of Open MCT Web's information
model. A domain object is some distinct thing relevant to a user's workflow, model. A domain object is some distinct thing relevant to a user's work flow,
such as a telemetry channel, display, or similar. Open MCT is a tool for such as a telemetry channel, display, or similar. Open MCT Web is a tool for
viewing, browsing, manipulating, and otherwise interacting with a graph of viewing, browsing, manipulating, and otherwise interacting with a graph of
domain objects. domain objects.
@ -681,7 +680,7 @@ exposed.
### Identifier Syntax ### Identifier Syntax
For most purposes, a domain object identifier can be treated as a purely For most purposes, a domain object identifier can be treated as a purely
symbolic string; these are typically generated by Open MCT and plug-ins symbolic string; these are typically generated by Open MCT Web and plug-ins
should rarely be concerned with its internal structure. should rarely be concerned with its internal structure.
A domain object identifier has one or two parts, separated by a colon. A domain object identifier has one or two parts, separated by a colon.
@ -724,7 +723,7 @@ exposed it to be removed from its container.
containing: containing:
* `name`: Human-readable name. * `name`: Human-readable name.
* `description`: Human-readable summary of this action. * `description`: Human-readable summary of this action.
* `glyph`: Single character to be displayed in Open MCT's icon font set. * `glyph`: Single character to be displayed in Open MCT Web's icon font set.
* `context`: The context in which this action is being performed (see below) * `context`: The context in which this action is being performed (see below)
Action instances are typically obtained via a domain object's `action` Action instances are typically obtained via a domain object's `action`
@ -740,7 +739,7 @@ dragged object in a drag-and-drop operation.)
## Telemetry ## Telemetry
Telemetry series data in Open MCT is represented by a common interface, and Telemetry series data in Open MCT Web is represented by a common interface, and
packaged in a consistent manner to facilitate passing telemetry updates around packaged in a consistent manner to facilitate passing telemetry updates around
multiple visualizations. multiple visualizations.
@ -753,7 +752,7 @@ is useful when multiple distinct data sources are in use side-by-side.
* `key`: A machine-readable identifier for a unique series of telemetry within * `key`: A machine-readable identifier for a unique series of telemetry within
that source. that source.
* _Note: This API is still under development; additional properties, such as * _Note: This API is still under development; additional properties, such as
start and end time, should be present in future versions of Open MCT._ start and end time, should be present in future versions of Open MCT Web._
Additional properties may be included in telemetry requests which have specific Additional properties may be included in telemetry requests which have specific
interpretations for specific sources. interpretations for specific sources.
@ -777,7 +776,7 @@ not. (Typically, domain values are interpreted as UTC timestamps in milliseconds
relative to the UNIX epoch.) A series must have at least one domain and one relative to the UNIX epoch.) A series must have at least one domain and one
range, and may have more than one. range, and may have more than one.
Telemetry series data in Open MCT is expressed via the following Telemetry series data in Open MCT Web is expressed via the following
`TelemetrySeries` interface: `TelemetrySeries` interface:
* `getPointCount()`: Returns the number of unique points/samples in this series. * `getPointCount()`: Returns the number of unique points/samples in this series.
@ -816,7 +815,7 @@ interface:
* `getName()`: Get the human-readable name for this type. * `getName()`: Get the human-readable name for this type.
* `getDescription()`: Get a human-readable summary of this type. * `getDescription()`: Get a human-readable summary of this type.
* `getGlyph()`: Get the single character to be rendered as an icon for this type * `getGlyph()`: Get the single character to be rendered as an icon for this type
in Open MCT's custom font set. in Open MCT Web's custom font set.
* `getInitialModel()`: Get a domain object model that represents the initial * `getInitialModel()`: Get a domain object model that represents the initial
state (before user specification of properties) for domain objects of this type. state (before user specification of properties) for domain objects of this type.
* `getDefinition()`: Get the extension definition for this type, as a JavaScript * `getDefinition()`: Get the extension definition for this type, as a JavaScript
@ -832,7 +831,7 @@ an array of `TypeProperty` instances.
### Type Features ### Type Features
Features of a domain object type are expressed as symbolic string identifiers. Features of a domain object type are expressed as symbolic string identifiers.
They are defined in practice by usage; currently, the Open MCT platform only They are defined in practice by usage; currently, the Open MCT Web platform only
uses the creation feature to determine which domain object types should appear uses the creation feature to determine which domain object types should appear
in the Create menu. in the Create menu.
@ -886,7 +885,7 @@ Categories supported by the platform include:
* `key`: A machine-readable identifier for this action. * `key`: A machine-readable identifier for this action.
* `name`: A human-readable name for this action (e.g. to show in a menu) * `name`: A human-readable name for this action (e.g. to show in a menu)
* `description`: A human-readable summary of the behavior of this action. * `description`: A human-readable summary of the behavior of this action.
* `glyph`: A single character which will be rendered in Open MCT's custom * `glyph`: A single character which will be rendered in Open MCT Web's custom
font set as an icon for this action. font set as an icon for this action.
## Capabilities Category ## Capabilities Category
@ -911,44 +910,20 @@ A capability's implementation may also expose a static method `appliesTo(model)`
which should return a boolean value, and will be used by the platform to filter which should return a boolean value, and will be used by the platform to filter
down capabilities to those which should be exposed by specific domain objects, down capabilities to those which should be exposed by specific domain objects,
based on their domain object models. based on their domain object models.
## Containers Category
Containers provide options for the `mct-container` directive.
The definition for an extension in the `containers` category should include:
* `key`: An identifier for the container.
* `template`: An Angular template for the container, including an
`ng-transclude` where contained content should go.
* `attributes`: An array of attribute names. The values associated with
these attributes will be exposed in the template's scope under the
name provided by the `alias` property.
* `alias`: The property name in scope under which attributes will be
exposed. Optional; defaults to "container".
Note that `templateUrl` is not supported for `containers`.
## Controls Category ## Controls Category
Controls provide options for the `mct-control` directive. Controls provide options for the `mct-control` directive.
These standard control types are included in the forms bundle: Six standard control types are included in the forms bundle:
* `textfield`: A text input to enter plain text. * `textfield`: An area to enter plain text.
* `numberfield`: A text input to enter numbers.
* `select`: A drop-down list of options. * `select`: A drop-down list of options.
* `checkbox`: A box which may be checked/unchecked. * `checkbox`: A box which may be checked/unchecked.
* `color`: A color picker. * `color`: A color picker.
* `button`: A button. * `button`: A button.
* `datetime`: An input for UTC date/time entry; gives result as a UNIX * `datetime`: An input for UTC date/time entry; gives result as a UNIX
timestamp, in milliseconds since start of 1970, UTC. timestamp, in milliseconds since start of 1970, UTC.
* `composite`: A control parenting an array of other controls.
* `menu-button`: A drop-down list of items supporting custom behavior
on click.
* `dialog-button`: A button which opens a dialog allowing a single property
to be edited.
* `radio`: A radio button.
New controls may be added as extensions of the controls category. Extensions of New controls may be added as extensions of the controls category. Extensions of
this category have two properties: this category have two properties:
@ -988,7 +963,7 @@ Examples of gestures included in the platform are:
composition. composition.
* `drop`: For representations that can be drop targets for drag-and-drop * `drop`: For representations that can be drop targets for drag-and-drop
composition. composition.
* `menu`: For representations that can be used to popup a context menu. * `menu`: For representations that can be used to pop up a context menu.
Gesture definitions have a property `key` which is used as a machine-readable Gesture definitions have a property `key` which is used as a machine-readable
identifier for the gesture (e.g. `drag`, `drop`, `menu` above.) identifier for the gesture (e.g. `drag`, `drop`, `menu` above.)
@ -1004,7 +979,7 @@ of unremoved listeners.
## Indicators Category ## Indicators Category
An indicator is an element that should appear in the status area at the bottom An indicator is an element that should appear in the status area at the bottom
of a running Open MCT client instance. of a running Open MCT Web client instance.
### Standard Indicators ### Standard Indicators
@ -1014,7 +989,7 @@ provide implementations with the following methods:
* `getText()`: Provides the human-readable text that will be displayed for this * `getText()`: Provides the human-readable text that will be displayed for this
indicator. indicator.
* `getGlyph()`: Provides a single-character string that will be displayed as an * `getGlyph()`: Provides a single-character string that will be displayed as an
icon in Open MCT's custom font set. icon in Open MCT Web's custom font set.
* `getDescription()`: Provides a human-readable summary of the current state of * `getDescription()`: Provides a human-readable summary of the current state of
this indicator; will be displayed in a tooltip on hover. this indicator; will be displayed in a tooltip on hover.
* `getClass()`: Get a CSS class that will be applied to this indicator. * `getClass()`: Get a CSS class that will be applied to this indicator.
@ -1040,7 +1015,7 @@ this variety do not need to provide an implementation.
## Licenses Category ## Licenses Category
The extension category `licenses` can be used to add entries into the 'Licensing The extension category `licenses` can be used to add entries into the 'Licensing
information' page, reachable from Open MCT's About dialog. information' page, reachable from Open MCT Web's About dialog.
Licenses may have the following properties, all of which are strings: Licenses may have the following properties, all of which are strings:
@ -1053,11 +1028,11 @@ Licenses may have the following properties, all of which are strings:
## Policies Category ## Policies Category
Policies are used to handle decisions made using Open MCT's `policyService`; Policies are used to handle decisions made using Open MCT Web's `policyService`;
examples of these decisions are determining the applicability of certain examples of these decisions are determining the applicability of certain
actions, or checking whether or not a domain object of one type can contain a actions, or checking whether or not a domain object of one type can contain a
domain object of a different type. See the section on the Policies for an domain object of a different type. See the section on the Policies for an
overview of Open MCT's policy model. overview of Open MCT Web's policy model.
A policy's extension definition should include: A policy's extension definition should include:
@ -1073,7 +1048,7 @@ context)`. The specific types used for `candidate` and `context` vary by policy
category; in general, what is being asked is 'is this candidate allowed in this category; in general, what is being asked is 'is this candidate allowed in this
context?' This method should return a boolean value. context?' This method should return a boolean value.
Open MCT's policy model requires consensus; a policy decision is allowed Open MCT Web's policy model requires consensus; a policy decision is allowed
when and only when all policies choose to allow it. As such, policies should when and only when all policies choose to allow it. As such, policies should
generally be written to reject a certain case, and allow (by returning `true`) generally be written to reject a certain case, and allow (by returning `true`)
anything else. anything else.
@ -1160,7 +1135,7 @@ For example, the _My Items_ folder is added as an extension of this category.
Extensions of this category should have the following properties: Extensions of this category should have the following properties:
* `id`: The machine-readable identifier for the domain object being exposed. * `id`: The machine-readable identifier for the domaiwn object being exposed.
* `model`: The model, as a JSON object, for the domain object being exposed. * `model`: The model, as a JSON object, for the domain object being exposed.
## Stylesheets Category ## Stylesheets Category
@ -1202,7 +1177,7 @@ Templates do not have implementations.
## Types Category ## Types Category
The types extension category describes types of domain objects which may The types extension category describes types of domain objects which may
appear within Open MCT. appear within Open MCT Web.
A type's extension definition should have the following properties: A type's extension definition should have the following properties:
@ -1210,7 +1185,7 @@ A type's extension definition should have the following properties:
stored to and matched against the type property of domain object models. stored to and matched against the type property of domain object models.
* `name`: The human-readable name for this domain object type. * `name`: The human-readable name for this domain object type.
* `description`: A human-readable summary of this domain object type. * `description`: A human-readable summary of this domain object type.
* `glyph`: A single character to be rendered as an icon in Open MCT's custom * `glyph`: A single character to be rendered as an icon in Open MCT Web's custom
font set. font set.
* `model`: A domain object model, used as the initial state for created domain * `model`: A domain object model, used as the initial state for created domain
objects of this type (before any properties are specified.) objects of this type (before any properties are specified.)
@ -1259,7 +1234,7 @@ utilized via `mct-representation`); additionally:
* `name`: The human-readable name for this view type. * `name`: The human-readable name for this view type.
* description : A human-readable summary of this view type. * description : A human-readable summary of this view type.
* `glyph`: A single character to be rendered as an icon in Open MCT's custom * `glyph`: A single character to be rendered as an icon in Open MCT Web's custom
font set. font set.
* `type`: Optional; if present, this representation is only applicable for * `type`: Optional; if present, this representation is only applicable for
domain object's of this type. domain object's of this type.
@ -1301,7 +1276,7 @@ are visible, and what state they manage and/or behavior they invoke.
This set may contain up to two different objects: The _view proxy_, which is This set may contain up to two different objects: The _view proxy_, which is
used to make changes to the view as a whole, and the _selected object_, which is used to make changes to the view as a whole, and the _selected object_, which is
used to represent some state within the view. (Future versions of Open MCT used to represent some state within the view. (Future versions of Open MCT Web
may support multiple selected objects.) may support multiple selected objects.)
The `selection` object made available during Edit mode has the following The `selection` object made available during Edit mode has the following
@ -1337,8 +1312,57 @@ are supported:
# Directives # Directives
Open MCT defines several Angular directives that are intended for use both Open MCT Web defines several Angular directives that are intended for use both
internally within the platform, and by plugins. internally within the platform, and by plugins.
## Before Unload
The `mct-before-unload` directive is used to listen for (and prompt for user
confirmation) of navigation changes in the browser. This includes reloading,
following links out of Open MCT Web, or changing routes. It is used to hook into
both `onbeforeunload` event handling as well as route changes from within
Angular.
This directive is useable as an attribute. Its value should be an Angular
expression. When an action that would trigger an unload and/or route change
occurs, this Angular expression is evaluated. Its result should be a message to
display to the user to confirm their navigation change; if this expression
evaluates to a falsy value, no message will be displayed.
## Chart
The `mct-chart` directive is used to support drawing of simple charts. It is
present to support the Plot view, and its functionality is limited to the
functionality that is relevant for that view.
This directive is used at the element level and takes one attribute, `draw`
which is an Angular expression which will should evaluate to a drawing object.
This drawing object should contain the following properties:
* `dimensions`: The size, in logical coordinates, of the chart area. A
two-element array or numbers.
* `origin`: The position, in logical coordinates, of the lower-left corner of
the chart area. A two-element array or numbers.
* `lines`: An array of lines (e.g. as a plot line) to draw, where each line is
expressed as an object containing:
* `buffer`: A Float32Array containing points in the line, in logical
coordinates, in sequential x,y pairs.
* `color`: The color of the line, as a four-element RGBA array, where
each element is a number in the range of 0.0-1.0.
* `points`: The number of points in the line.
* `boxes`: An array of rectangles to draw in the chart area. Each is an object
containing:
* `start`: The first corner of the rectangle, as a two-element array of
numbers, in logical coordinates.
* `end`: The opposite corner of the rectangle, as a two-element array of
numbers, in logical coordinates. color : The color of the line, as a
four-element RGBA array, where each element is a number in the range of
0.0-1.0.
While `mct-chart` is intended to support plots specifically, it does perform
some useful management of canvas objects (e.g. choosing between WebGL and Canvas
2D APIs for drawing based on browser support) so its usage is recommended when
its supported drawing primitives are sufficient for other charting tasks.
## Container ## Container
@ -1407,7 +1431,7 @@ Passed as plain text in the attribute.
### Form Structure ### Form Structure
Forms in Open MCT have a common structure to permit consistent display. A Forms in Open MCT Web have a common structure to permit consistent display. A
form is broken down into sections, which will be displayed in groups; each form is broken down into sections, which will be displayed in groups; each
section is broken down into rows, each of which provides a control for a single section is broken down into rows, each of which provides a control for a single
property. Input from this form is two-way bound to the object passed via property. Input from this form is two-way bound to the object passed via
@ -1559,64 +1583,9 @@ there are items .
] ]
} }
## Table
The `mct-table` directive provides a generic table component, with optional
sorting and filtering capabilities. The table can be pre-populated with data
by setting the `rows` parameter, and it can be updated in real-time using the
`add:row` and `remove:row` broadcast events. The table will expand to occupy
100% of the size of its containing element. The table is highly optimized for
very large data sets.
### Events
The table supports two events for notifying that the rows have changed. For
performance reasons, the table does not monitor the content of `rows`
constantly.
* `add:row`: A `$broadcast` event that will notify the table that a new row
has been added to the table.
eg. The code below adds a new row, and alerts the table using the `add:row`
event. Sorting and filtering will be applied automatically by the table component.
```
$scope.rows.push(newRow);
$scope.$broadcast('add:row', $scope.rows.length-1);
```
* `remove:row`: A `$broadcast` event that will notify the table that a row
should be removed from the table.
eg. The code below removes a row from the rows array, and then alerts the table
to its removal.
```
$scope.rows.slice(5, 1);
$scope.$broadcast('remove:row', 5);
```
### Parameters
* `headers`: An array of string values which will constitute the column titles
that appear at the top of the table. Corresponding values are specified in
the rows using the header title provided here.
* `rows`: An array of objects containing row values. Each element in the
array must be an associative array, where the key corresponds to a column header.
* `enableFilter`: A boolean that if true, will enable searching and result
filtering. When enabled, each column will have a text input field that can be
used to filter the table rows in real time.
* `enableSort`: A boolean determining whether rows can be sorted. If true,
sorting will be enabled allowing sorting by clicking on column headers. Only
one column may be sorted at a time.
* `autoScroll`: A boolean value that if true, will cause the table to automatically
scroll to the bottom as new data arrives. Auto-scroll can be disengaged manually
by scrolling away from the bottom of the table, and can also be enabled manually
by scrolling to the bottom of the table rows.
# Services # Services
The Open MCT platform provides a variety of services which can be retrieved The Open MCT Web platform provides a variety of services which can be retrieved
and utilized via dependency injection. These services fall into two categories: and utilized via dependency injection. These services fall into two categories:
* _Composite Services_ are defined by a set of components extensions; plugins may * _Composite Services_ are defined by a set of components extensions; plugins may
@ -1628,7 +1597,7 @@ utilized by plugins but are not intended to be modified or augmented.
## Composite Type Services ## Composite Type Services
This section describes the composite services exposed by Open MCT, This section describes the composite services exposed by Open MCT Web,
specifically focusing on their interface and contract. specifically focusing on their interface and contract.
In many cases, the platform will include a provider for a service which consumes In many cases, the platform will include a provider for a service which consumes
@ -1946,7 +1915,7 @@ The `workerService` may be used to run web workers defined via the
as a shared worker); if the `key` is unknown, returns `undefined`. as a shared worker); if the `key` is unknown, returns `undefined`.
# Models # Models
Domain object models in Open MCT are JavaScript objects describing the Domain object models in Open MCT Web are JavaScript objects describing the
persistent state of the domain objects they describe. Their contents include a persistent state of the domain objects they describe. Their contents include a
mix of commonly understood metadata attributes; attributes which are recognized mix of commonly understood metadata attributes; attributes which are recognized
by and/or determine the applicability of specific extensions; and properties by and/or determine the applicability of specific extensions; and properties
@ -1962,7 +1931,7 @@ MCT Web and can be utilized directly:
## Extension-specific Properties ## Extension-specific Properties
Other properties of domain object models have specific meaning imposed by other Other properties of domain object models have specific meaning imposed by other
extensions within the Open MCT platform. extensions within the Open MCT Web platform.
### Capability-specific Properties ### Capability-specific Properties
@ -2246,7 +2215,7 @@ way of its `composition` capability.)
# Policies # Policies
Policies are consulted to determine when certain behavior in Open MCT is Policies are consulted to determine when certain behavior in Open MCT Web is
allowed. Policy questions are assigned to certain categories, which broadly allowed. Policy questions are assigned to certain categories, which broadly
describe the type of decision being made; within each category, policies have a describe the type of decision being made; within each category, policies have a
candidate (the thing which may or may not be allowed) and, optionally, a context candidate (the thing which may or may not be allowed) and, optionally, a context
@ -2262,45 +2231,39 @@ The platform understands the following policy categories (specifiable as the
* `action`: Determines whether or not a given action is allowable. The candidate * `action`: Determines whether or not a given action is allowable. The candidate
argument here is an Action; the context is its action context object. argument here is an Action; the context is its action context object.
* `composition`: Determines whether or not a given domain object(first argument, `parent`) can contain a candidate child object (second argument, `child`). * `composition`: Determines whether or not domain objects of a given type are
allowed to contain domain objects of another type. The candidate argument here
is the container's `Type`; the context argument is the `Type` of the object to be
contained.
* `view`: Determines whether or not a view is applicable for a domain object. * `view`: Determines whether or not a view is applicable for a domain object.
The candidate argument is the view's extension definition; the context argument The candidate argument is the view's extension definition; the context argument
is the `DomainObject` to be viewed. is the `DomainObject` to be viewed.
# Build-Test-Deploy # Build-Test-Deploy
Open MCT is designed to support a broad variety of build and deployment Open MCT Web is designed to support a broad variety of build and deployment
options. The sources can be deployed in the same directory structure used during options. The sources can be deployed in the same directory structure used during
development. A few utilities are included to support development processes. development. A few utilities are included to support development processes.
## Command-line Build ## Command-line Build
Open MCT Web includes a script for building via command line using Maven 3.3.9
https://maven.apache.org/ .
Invoking mvn clean install will:
Open MCT is built using [`npm`](http://npmjs.com/) * Check code style using JSLint. The build will fail if JSLint raises any warnings.
and [`gulp`](http://gulpjs.com/). * Run the test suite (see below.) The build will fail if any tests fail.
* Populate version info (e.g. commit hash, build time.)
* Produce a web archive (`.war`) artifact in the `target` directory.
To install build dependencies (only needs to be run once): The produced artifact contains a subset of the repository's own folder
hierarchy, omitting tests and example bundles.
`npm install`
To build:
`npm run prepare`
This will compile and minify JavaScript sources, as well as copy over assets.
The contents of the `dist` folder will contain a runnable Open MCT
instance (e.g. by starting an HTTP server in that directory), including:
* A `main.js` file containing Open MCT source code.
* Various assets in the `example` and `platform` directories.
* An `index.html` that runs Open MCT in its default configuration.
Additional `gulp` tasks are defined in [the gulpfile](gulpfile.js).
Note that an internet connection is required to run this build, in order to Note that an internet connection is required to run this build, in order to
download build dependencies. download build dependencies.
## Test Suite ## Test Suite
Open MCT uses [Jasmine 1.3](http://jasmine.github.io/) and Open MCT Web uses [Jasmine 1.3](http://jasmine.github.io/) and
[Karma](http://karma-runner.github.io) for automated testing. [Karma](http://karma-runner.github.io) for automated testing.
The test suite is configured to load any scripts ending with `Spec.js` found The test suite is configured to load any scripts ending with `Spec.js` found
@ -2338,8 +2301,8 @@ information using [Blanket.JS](http://blanketjs.org/) and display this at the
bottom of the screen. Currently, only statement coverage is displayed. bottom of the screen. Currently, only statement coverage is displayed.
## Deployment ## Deployment
Open MCT is built to be flexible in terms of the deployment strategies it Open MCT Web is built to be flexible in terms of the deployment strategies it
supports. In order to run in the browser, Open MCT needs: supports. In order to run in the browser, Open MCT Web needs:
1. HTTP access to sources/resources for the framework, platform, and all active 1. HTTP access to sources/resources for the framework, platform, and all active
bundles. bundles.
@ -2348,13 +2311,13 @@ external services need to support HTTP or some other web-accessible interface,
like WebSockets.) like WebSockets.)
Any HTTP server capable of serving flat files is sufficient for the first point. Any HTTP server capable of serving flat files is sufficient for the first point.
The command-line build also packages Open MCT into a `.war` file for easier The command-line build also packages Open MCT Web into a `.war` file for easier
deployment on containers such as Apache Tomcat. deployment on containers such as Apache Tomcat.
The second point may be less flexible, as it depends upon the specific services The second point may be less flexible, as it depends upon the specific services
to be utilized by Open MCT. Because of this, it is often the set of external to be utilized by Open MCT Web. Because of this, it is often the set of external
services (and the manner in which they are exposed) that determine how to deploy services (and the manner in which they are exposed) that determine how to deploy
Open MCT. Open MCT Web.
One important constraint to consider in this context is the browser's same One important constraint to consider in this context is the browser's same
origin policy. If external services are not on the same apparent host and port origin policy. If external services are not on the same apparent host and port
@ -2371,7 +2334,7 @@ configuration does not create a security vulnerability.
Examples of deployment strategies (and the conditions under which they make the Examples of deployment strategies (and the conditions under which they make the
most sense) include: most sense) include:
* If the external services that Open MCT will utilize are all running on * If the external services that Open MCT Web will utilize are all running on
[Apache Tomcat](https://tomcat.apache.org/), then it makes sense to run Open [Apache Tomcat](https://tomcat.apache.org/), then it makes sense to run Open
MCT Web from the same Tomcat instance as a separate web application. The MCT Web from the same Tomcat instance as a separate web application. The
`.war` artifact produced by the command line build facilitates this deployment `.war` artifact produced by the command line build facilitates this deployment
@ -2382,28 +2345,28 @@ hosts/ports, then it may make sense to use a web server that supports proxying,
such as the [Apache HTTP Server](http://httpd.apache.org/). In this such as the [Apache HTTP Server](http://httpd.apache.org/). In this
configuration, the HTTP server would be configured to proxy (or reverse proxy) configuration, the HTTP server would be configured to proxy (or reverse proxy)
requests at specific paths to the various external services, while providing requests at specific paths to the various external services, while providing
Open MCT as flat files from a different path. Open MCT Web as flat files from a different path.
* If a single server component is being developed to handle all server-side * If a single server component is being developed to handle all server-side
needs of an Open MCT instance, it can make sense to serve Open MCT (as needs of an Open MCT Web instance, it can make sense to serve Open MCT Web (as
flat files) from the same component using an embedded HTTP server such as flat files) from the same component using an embedded HTTP server such as
[Nancy](http://nancyfx.org/). [Nancy](http://nancyfx.org/).
* If no external services are needed (or if the 'external services' will just * If no external services are needed (or if the 'external services' will just
be generating flat files to read) it makes sense to utilize a lightweight flat be generating flat files to read) it makes sense to utilize a lightweight flat
file HTTP server such as [Lighttpd](http://www.lighttpd.net/). In this file HTTP server such as [Lighttpd](http://www.lighttpd.net/). In this
configuration, Open MCT sources/resources would be placed at one path, while configuration, Open MCT Web sources/resources would be placed at one path, while
the files generated by the external service are placed at another path. the files generated by the external service are placed at another path.
* If all external services support CORS, it may make sense to have an HTTP * If all external services support CORS, it may make sense to have an HTTP
server that is solely responsible for making Open MCT sources/resources server that is solely responsible for making Open MCT Web sources/resources
available, and to have Open MCT contact these external services directly. available, and to have Open MCT Web contact these external services directly.
Again, lightweight HTTP servers such as [Lighttpd](http://www.lighttpd.net/) Again, lightweight HTTP servers such as [Lighttpd](http://www.lighttpd.net/)
are useful in this circumstance. The downside of this option is that additional are useful in this circumstance. The downside of this option is that additional
configuration effort is required, both to enable CORS on the external services, configuration effort is required, both to enable CORS on the external services,
and to ensure that Open MCT can correctly locate these services. and to ensure that Open MCT Web can correctly locate these services.
Another important consideration is authentication. By design, Open MCT does Another important consideration is authentication. By design, Open MCT Web does
not handle user authentication. Instead, this should typically be treated as a not handle user authentication. Instead, this should typically be treated as a
deployment-time concern, where authentication is handled by the HTTP server deployment-time concern, where authentication is handled by the HTTP server
which provides Open MCT, or an external access management system. which provides Open MCT Web, or an external access management system.
### Configuration ### Configuration
In most of the deployment options above, some level of configuration is likely In most of the deployment options above, some level of configuration is likely
@ -2411,7 +2374,7 @@ to be needed or desirable to make sure that bundles can reach the external
services they need to reach. Most commonly this means providing the path or URL services they need to reach. Most commonly this means providing the path or URL
to an external service. to an external service.
Configurable parameters within Open MCT are specified via constants Configurable parameters within Open MCT Web are specified via constants
(literally, as extensions of the `constants` category) and accessed via (literally, as extensions of the `constants` category) and accessed via
dependency injection by the scripts which need them. Reasonable defaults for dependency injection by the scripts which need them. Reasonable defaults for
these constants are provided in the bundle where they are used. Plugins are these constants are provided in the bundle where they are used. Plugins are
@ -2430,7 +2393,7 @@ for error, but is viable if there are a small number of constants to change.
constants. This is particularly appropriate when multiple configurations (e.g. constants. This is particularly appropriate when multiple configurations (e.g.
development, test, production) need to be managed easily; these can be swapped development, test, production) need to be managed easily; these can be swapped
quickly by changing the set of active bundles in bundles.json. quickly by changing the set of active bundles in bundles.json.
* Deploy Open MCT and its external services in such a fashion that the * Deploy Open MCT Web and its external services in such a fashion that the
default paths to reach external services are all correct. default paths to reach external services are all correct.
### Configuration Constants ### Configuration Constants
@ -2441,7 +2404,7 @@ The following constants have global significance:
to be overridden by other bundles, but persistence adapters may wish to to be overridden by other bundles, but persistence adapters may wish to
consume this constant in order to provide persistence for that space. consume this constant in order to provide persistence for that space.
The following configuration constants are recognized by Open MCT bundles: The following configuration constants are recognized by Open MCT Web bundles:
* Common UI elements - `platform/commonUI/general` * Common UI elements - `platform/commonUI/general`
* `THEME`: A string identifying the current theme symbolically. Individual * `THEME`: A string identifying the current theme symbolically. Individual
stylesheets (the `stylesheets` extension category) may specify an optional stylesheets (the `stylesheets` extension category) may specify an optional

View File

@ -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)

View File

@ -1,37 +1,35 @@
# Open MCT Documentation # Open MCT Web Documentation
## Overview ## Overview
Documentation is provided to support the use and development of Documentation is provided to support the use and development of
Open MCT. It's recommended that before doing Open MCT Web. It's recommended that before doing
any development with Open MCT you take some time to familiarize yourself any development with Open MCT Web you take some time to familiarize yourself
with the documentation below. with the documentation below.
Open MCT provides functionality out of the box, but it's also a platform for Open MCT Web provides functionality out of the box, but it's also a platform for
building rich mission operations applications based on modern web technology. building rich mission operations applications based on modern web technology.
The platform is configured by plugins which extend the platform at a variety The platform is configured declaratively, and defines conventions for
of extension points. The details of how to building on the provided capabilities by creating modular 'bundles' that
extend the platform at a variety of extension points. The details of how to
extend the platform are provided in the following documentation. extend the platform are provided in the following documentation.
## Sections ## Sections
* The [Architecture Overview](architecture/) describes the concepts used
throughout Open MCT Web, and gives a high level overview of the platform's design.
* The [Developer's Guide](guide/) goes into more detail about how to use the
platform and the functionality that it provides.
* The [Tutorials](tutorials/) give examples of extending the platform to add
functionality,
and integrate with data sources.
* The [API](api/) document is generated from inline documentation * The [API](api/) document is generated from inline documentation
using [JSDoc](http://usejsdoc.org/), and describes the JavaScript objects and using [JSDoc](http://usejsdoc.org/), and describes the JavaScript objects and
functions that make up the software platform. functions that make up the software platform.
* The [Development Process](process/) document describes the * Finally, the [Development Process](process/) document describes the
Open MCT software development cycle. Open MCT Web software development cycle.
## Legacy Documentation
As we transition to a new API, the following documentation for the old API
(which is supported during the transtion) may be useful as well:
* The [Architecture Overview](architecture/) describes the concepts used
throughout Open MCT, and gives a high level overview of the platform's design.
* The [Developer's Guide](guide/) goes into more detail about how to use the
platform and the functionality that it provides.
* The [Tutorials](tutorials/) give examples of extending the platform to add
functionality, and integrate with data sources.

View File

@ -1,6 +1,6 @@
# Development Cycle # Development Cycle
Development of Open MCT occurs on an iterative cycle of Development of Open MCT Web occurs on an iterative cycle of
sprints and releases. sprints and releases.
* A _sprint_ is three weeks in duration, and represents a * A _sprint_ is three weeks in duration, and represents a
@ -151,9 +151,11 @@ emphasis on testing.
ensuring software passes that testing in order to ship on time; ensuring software passes that testing in order to ship on time;
may prefer to disable malfunctioning components and fix them may prefer to disable malfunctioning components and fix them
in a subsequent sprint, for example. in a subsequent sprint, for example.
* [__Ship.__](version.md) Tag a code snapshot that has passed release/sprint * __Ship.__ Tag a code snapshot that has passed acceptance
testing and deploy that version. (Only true if relevant testing and deploy that version. (Only true if acceptance
testing has passed by this point; if testing has not testing has passed by this point; if acceptance testing has not
been passed, will need to make ad hoc decisions with stakeholders, been passed, will need to make ad hoc decisions with stakeholders,
e.g. "extend the sprint" or "defer shipment until end of next e.g. "extend the sprint" or "defer shipment until end of next
sprint.") sprint.")

View File

@ -1,15 +1,13 @@
# Development Process # Development Process
The process used to develop Open MCT is described in the following The process used to develop Open MCT Web is described in the following
documents: documents:
* The [Development Cycle](cycle.md) describes how and when specific * [Development Cycle](cycle.md): Describes how and when specific
process points are repeated during development. process points are repeated during development.
* The [Version Guide](version.md) describes version numbering for
Open MCT (both semantics and process.)
* Testing is described in two documents: * Testing is described in two documents:
* The [Test Plan](testing/plan.md) summarizes the approaches used * The [Test Plan](testing/plan.md) summarizes the approaches used
to test Open MCT. to test Open MCT Web.
* The [Test Procedures](testing/procedures.md) document what * The [Test Procedures](testing/procedures.md) document what
specific tests are performed to verify correctness, and how specific tests are performed to verify correctness, and how
they should be carried out. they should be carried out.

View File

@ -2,7 +2,7 @@
## Test Levels ## Test Levels
Testing for Open MCT includes: Testing for Open MCT Web includes:
* _Smoke testing_: Brief, informal testing to verify that no major issues * _Smoke testing_: Brief, informal testing to verify that no major issues
or regressions are present in the software, or in specific features of or regressions are present in the software, or in specific features of
@ -102,7 +102,7 @@ perform:
* A relevant subset of [_user testing_](procedures.md#user-test-procedures) * A relevant subset of [_user testing_](procedures.md#user-test-procedures)
identified by the acting [project manager](../cycle.md#roles). identified by the acting [project manager](../cycle.md#roles).
* [_Long-duration testing_](procedures.md#long-duration-testing) * [_Long-duration testing_](procedures.md#long-duration-testng)
(specifically, for 24 hours.) (specifically, for 24 hours.)
Issues are reported as a product of both forms of testing. Issues are reported as a product of both forms of testing.

View File

@ -4,7 +4,7 @@
This document is intended to be used: This document is intended to be used:
* By testers, to verify that Open MCT behaves as specified. * By testers, to verify that Open MCT Web behaves as specified.
* By the development team, to document new test cases and to provide * By the development team, to document new test cases and to provide
guidance on how to author these. guidance on how to author these.
@ -62,7 +62,7 @@ Test cases should be narrow in scope; if a list of steps is excessively
long (or must be written vaguely to be kept short) it should be broken long (or must be written vaguely to be kept short) it should be broken
down into multiple tests which reference one another. down into multiple tests which reference one another.
All requirements satisfied by Open MCT should be verifiable using All requirements satisfied by Open MCT Web should be verifiable using
one or more test procedures. one or more test procedures.
## Glossary ## Glossary
@ -166,4 +166,4 @@ Eval. criteria | Visual inspection
* Logs should not contain any unexpected warnings or errors ("expected" * Logs should not contain any unexpected warnings or errors ("expected"
warnings or errors are those that have been documented and prioritized warnings or errors are those that have been documented and prioritized
as known issues, or those that are explained by transient conditions as known issues, or those that are explained by transient conditions
external to the software, such as network outages.) external to the software, such as network outages.)

View File

@ -1,142 +0,0 @@
# Version Guide
This document describes semantics and processes for providing version
numbers for Open MCT, and additionally provides guidelines for dependent
projects developed by the same team.
Versions are incremented at specific points in Open MCT's
[Development Cycle](cycle.md); see that document for a description of
sprints and releases.
## Audience
Individuals interested in consuming version numbers can be categorized as
follows:
* _Users_: Generally disinterested, occasionally wish to identify version
to cross-reference against documentation, or to report issues.
* _Testers_: Want to identify which version of the software they are
testing, e.g. to file issues for defects.
* _Internal developers_: Often, inverse of testers; want to identify which
version of software was/is in use when certain behavior is observed. Want
to be able to correlate versions in use with “streams” of development
(e.g. dev vs. prod), when possible.
* _External developers_: Need to understand which version of software is
in use when developing/maintaining plug-ins, in order to ensure
compatibility of their software.
## Version Reporting
Software versions should be reflected in the user interface of the
application in three ways:
* _Version number_: A semantic version (see below) which serves both to
uniquely identify releases, as well as to inform plug-in developers
about compatibility with previous releases.
* _Revision identifier_: While using git, the commit hash. Supports
internal developers and testers by uniquely identifying client
software snapshots.
* _Branding_: Identifies which variant is in use. (Typically, Open MCT
is re-branded when deployed for a specific mission or center.)
## Version Numbering
Open MCT shall provide version numbers consistent with
[Semantic Versioning 2.0.0](http://semver.org/). In summary, versions
are expressed in a "major.minor.patch" form, and incremented based on
nature of changes to external API. Breaking changes require a "major"
version increment; backwards-compatible changes require a "minor"
version increment; neutral changes (such as bug fixes) require a "patch"
version increment. A hyphen-separated suffix indicates a pre-release
version, which may be unstable or may not fully meet compatibility
requirements.
Additionally, the following project-specific standards will be used:
* During development, a "-SNAPSHOT" suffix shall be appended to the
version number. The version number before the suffix shall reflect
the next expected version number for release.
* Prior to a 1.0.0 release, the _minor_ version will be incremented
on a per-release basis; the _patch_ version will be incremented on a
per-sprint basis.
* Starting at version 1.0.0, version numbers will be updated with each
completed sprint. The version number for the sprint shall be
determined relative to the previous released version; the decision
to increment the _major_, _minor_, or _patch_ version should be
made based on the nature of changes during that release. (It is
recommended that these numbers are incremented as changes are
introduced, such that at end of release the version number may
be chosen by simply removing the suffix.)
* The first three sprints in a release may be unstable; in these cases, a
unique version identifier should still be generated, but a suffix
should be included to indicate that the version is not necessarily
production-ready. Recommended suffixes are:
Sprint | Suffix
:------:|:--------:
1 | `-alpha`
2 | `-beta`
3 | `-rc`
### Scope of External API
"External API" refers to the API exposed to, documented for, and used by
plug-in developers. Changes to interfaces used internally by Open MCT
(or otherwise not documented for use externally) require only a _patch_
version bump.
## Incrementing Versions
At the end of a sprint, the [project manager](cycle.md#roles)
should update (or delegate the task of updating) Open MCT version
numbers by the following process:
1. Update version number in `package.json`
1. Remove `-SNAPSHOT` suffix.
2. Verify that resulting version number meets semantic versioning
requirements relative to previous stable version. Increment if
necessary.
3. If version is considered unstable (which may be the case during
the first three sprints of a release), apply a new suffix per
[Version Numbering](#version-numbering) guidance above.
2. Tag the release.
1. Commit changes to `package.json` on the `master` branch.
The commit message should reference the sprint being closed,
preferably by a URL reference to the associated Milestone in
GitHub.
2. Verify that build still completes, that application passes
smoke-testing, and that only differences from tested versions
are the changes to version number above.
3. Push the `master` branch.
4. Tag this commit with the version number, prepending the letter "v".
(e.g. `git tag v0.9.3-alpha`)
5. Push the tag to GitHub. (e.g. `git push origin v0.9.3-alpha`).
3. Upload a release archive.
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.
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
for examples.
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
the version number is below 1.0.0.)
4. Restore snapshot status in `package.json`
1. Remove any suffix from the version number, or increment the
_patch_ version if there is no suffix.
2. Append a `-SNAPSHOT` suffix.
3. Commit changes to `package.json` on the `master` branch.
The commit message should reference the sprint being opened,
preferably by a URL reference to the associated Milestone in
GitHub.
4. Verify that build still completes, that application passes
smoke-testing.
5. Push the `master` branch.
Projects dependent on Open MCT being co-developed by the Open MCT
team should follow a similar process, except that they should
additionally update their dependency on Open MCT to point to the
latest archive when removing their `-SNAPSHOT` status, and
that they should be pointed back to the `master` branch after
this has completed.

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,2 @@
This directory is for example bundles, which are intended to illustrate This directory is for example bundles, which are intended to illustrate
how to author new software components using Open MCT. how to author new software components using Open MCT Web.

View 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

View File

@ -0,0 +1,74 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([
"./src/ExampleController",
"./src/ExampleDirective",
"./src/ExampleService",
'legacyRegistry'
], function (
ExampleController,
ExampleDirective,
ExampleService,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/builtins", {
"name": "Angular Built-ins Example",
"description": "Example showing how to declare extensions with built-in support from Angular.",
"sources": "src",
"extensions": {
"controllers": [
{
"key": "ExampleController",
"implementation": ExampleController,
"depends": [
"$scope",
"exampleService"
]
}
],
"directives": [
{
"key": "exampleDirective",
"implementation": ExampleDirective,
"depends": [
"examples[]"
]
}
],
"routes": [
{
"templateUrl": "templates/example.html"
}
],
"services": [
{
"key": "exampleService",
"implementation": ExampleService
}
]
}
});
});

View File

@ -1,9 +1,9 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2018, United States Government Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,11 +14,11 @@
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 Web 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.
--> -->
<li class='tree-item t-wait-node loading'> <p>Hello, world! I am the default route.</p>
<span class="t-title-label">Loading...</span> <p ng-controller="ExampleController">My controller has told me: "{{phrase}}"</p>
</li> <span example-directive></span>

View File

@ -19,22 +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([ /**
"./LocalTimeSystem", * Module defining ExampleController. Created by vwoeltje on 11/4/14.
"./LocalTimeFormat" */
], function ( define(
LocalTimeSystem, [],
LocalTimeFormat function () {
) { "use strict";
return function () {
return function (openmct) {
openmct.time.addTimeSystem(new LocalTimeSystem());
openmct.legacyExtension('formats', { /**
key: 'local-format', *
implementation: LocalTimeFormat * @constructor
}); */
}; function ExampleController($scope, exampleService) {
}; $scope.phrase = exampleService.getMessage();
}); }
return ExampleController;
}
);

View File

@ -19,57 +19,48 @@
* 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([ /**
'moment' * Module defining ExampleDirective. Created by vwoeltje on 11/4/14.
], function ( */
moment define(
) { [],
function () {
"use strict";
var DATE_FORMAT = "YYYY-MM-DD h:mm:ss.SSS a", var HAS_EXTENSIONS = "A directive loaded these message from " +
DATE_FORMATS = [ "example extensions.",
DATE_FORMAT, NO_EXTENSIONS = "A directive tried to load example extensions," +
"YYYY-MM-DD h:mm:ss a", " but found none.",
"YYYY-MM-DD h:mm a", MESSAGE = "I heard this from my partial constructor.";
"YYYY-MM-DD"
];
/** /**
* @typedef Scale *
* @property {number} min the minimum scale value, in ms * @constructor
* @property {number} max the maximum scale value, in ms */
*/ function ExampleDirective(examples) {
// Build up a template from example extensions
var template = examples.length > 0 ?
HAS_EXTENSIONS : NO_EXTENSIONS;
/** template += "<ul>";
* Formatter for UTC timestamps. Interprets numeric values as examples.forEach(function (E) {
* milliseconds since the start of 1970. template += "<li>";
* if (typeof E === 'function') {
* @implements {Format} template += (new E(MESSAGE)).getText();
* @constructor } else {
* @memberof platform/commonUI/formats template += E.text;
*/ }
function LocalTimeFormat() { template += "</li>";
} });
template += "</ul>";
/** return {
* template: template
* @param value };
* @returns {string} the formatted date
*/
LocalTimeFormat.prototype.format = function (value, scale) {
return moment(value).format(DATE_FORMAT);
};
LocalTimeFormat.prototype.parse = function (text) {
if (typeof text === 'number') {
return text;
} }
return moment(text, DATE_FORMATS).valueOf();
};
LocalTimeFormat.prototype.validate = function (text) { return ExampleDirective;
return moment(text, DATE_FORMATS).isValid(); }
}; );
return LocalTimeFormat;
});

View File

@ -19,26 +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*/
define([], function () { /**
/** * Module defining ExampleService. Created by vwoeltje on 11/4/14.
* This time system supports UTC dates. */
* @implements TimeSystem define(
* @constructor [],
*/ function () {
function UTCTimeSystem() { "use strict";
/** /**
* Metadata used to identify the time system in *
* the UI * @constructor
*/ */
this.key = 'utc'; function ExampleService() {
this.name = 'UTC'; return {
this.cssClass = 'icon-clock'; getMessage: function () {
this.timeFormat = 'utc'; return "I heard this from a service";
this.durationFormat = 'duration'; }
this.isUTCBased = true; };
} }
return UTCTimeSystem; return ExampleService;
}); }
);

View File

@ -0,0 +1,82 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([
"./src/SomeProvider",
"./src/SomeOtherProvider",
"./src/SomeDecorator",
"./src/SomeOtherDecorator",
"./src/SomeAggregator",
"./src/SomeOtherExample",
'legacyRegistry'
], function (
SomeProvider,
SomeOtherProvider,
SomeDecorator,
SomeOtherDecorator,
SomeAggregator,
SomeOtherExample,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/composite", {
"extensions": {
"components": [
{
"implementation": SomeProvider,
"provides": "someService",
"type": "provider"
},
{
"implementation": SomeOtherProvider,
"provides": "someService",
"type": "provider"
},
{
"implementation": SomeDecorator,
"provides": "someService",
"type": "decorator"
},
{
"implementation": SomeOtherDecorator,
"provides": "someService",
"type": "decorator"
},
{
"implementation": SomeAggregator,
"provides": "someService",
"type": "aggregator"
}
],
"examples": [
{
"implementation": SomeOtherExample,
"depends": [
"someService"
]
}
]
}
});
});

View File

@ -0,0 +1,50 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
/**
* 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;
}
);

View File

@ -0,0 +1,48 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,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;
}
);

View File

@ -0,0 +1,48 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,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;
}
);

View File

@ -19,23 +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*/
define([ /**
"./UTCTimeSystem", * Module defining SomeOtherExample. Created by vwoeltje on 11/5/14.
"./LocalClock" */
], function ( define(
UTCTimeSystem, [],
LocalClock function () {
) { "use strict";
/**
* Install a time system that supports UTC times. It also installs a local /**
* clock source that ticks every 100ms, providing UTC times. *
*/ * @constructor
return function () { */
return function (openmct) { function SomeOtherExample(someService) {
var timeSystem = new UTCTimeSystem(); return {
openmct.time.addTimeSystem(timeSystem); getText: function () {
openmct.time.addClock(new LocalClock(100)); return someService.getMessages().join(" | ");
}; }
}; };
}); }
return SomeOtherExample;
}
);

View File

@ -0,0 +1,48 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,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;
}
);

View File

@ -0,0 +1,48 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
/**
* Module defining SomeProvider. Created by vwoeltje on 11/5/14.
*/
define(
[],
function () {
"use strict";
/**
*
* @constructor
*/
function SomeProvider() {
return {
getMessages: function () {
return [
"I am a message from some provider."
];
}
};
}
return SomeProvider;
}
);

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -32,7 +32,7 @@ define([
legacyRegistry.register("example/eventGenerator", { legacyRegistry.register("example/eventGenerator", {
"name": "Event Message Generator", "name": "Event Message Generator",
"description": "For development use. Creates sample event message data that mimics a live data stream.", "description": "Example of a component that produces event data.",
"extensions": { "extensions": {
"components": [ "components": [
{ {
@ -49,26 +49,16 @@ define([
{ {
"key": "eventGenerator", "key": "eventGenerator",
"name": "Event Message Generator", "name": "Event Message Generator",
"cssClass": "icon-folder-new", "glyph": "f",
"description": "For development use. Creates sample event message data that mimics a live data stream.", "description": "An event message generator",
"priority": 10,
"features": "creation", "features": "creation",
"model": { "model": {
"telemetry": {} "telemetry": {}
}, },
"telemetry": { "telemetry": {
"source": "eventGenerator", "source": "eventGenerator",
"domains": [
{
"key": "utc",
"name": "Timestamp",
"format": "utc"
}
],
"ranges": [ "ranges": [
{ {
"key": "message",
"name": "Message",
"format": "string" "format": "string"
} }
] ]

View File

@ -1,58 +0,0 @@
[
"CC: Eagle, Houston. You're GO for landing. Over.",
"LMP: Roger. Understand. GO for landing. 3000 feet. PROGRAM ALARM.",
"CC: Copy.",
"LMP: 1201",
"CDR: 1201.",
"CC: Roger. 1201 alarm. We're GO. Same type. We're GO.",
"LMP: 2000 feet. 2000 feet, Into the AGS, 47 degrees.",
"CC: Roger.",
"LMP: 47 degrees.",
"CC: Eagle, looking great. You're GO.",
"CC: Roger. 1202. We copy it.",
"O1: LMP 35 degrees. 35 degrees. 750. Coming down to 23.fl",
"LMP: 700 feet, 21 down, 33 degrees.",
"LMP: 600 feet, down at 19.",
"LMP: 540 feet, down at - 30. Down at 15.",
"LMP: At 400 feet, down at 9.",
"LMP: ...forward.",
"LMP: 350 feet, down at 4.",
"LMP: 30, ... one-half down.",
"LMP: We're pegged on horizontal velocity.",
"LMP: 300 feet, down 3 1/2, 47 forward.",
"LMP: ... up.",
"LMP: On 1 a minute, 1 1/2 down.",
"CDR: 70.",
"LMP: Watch your shadow out there.",
"LMP: 50, down at 2 1/2, 19 forward.",
"LMP: Altitude-velocity light.",
"LMP: 3 1/2 down s 220 feet, 13 forward.",
"LMP: 1t forward. Coming down nicely.",
"LMP: 200 feet, 4 1/2 down.",
"LMP: 5 1/2 down.",
"LMP: 160, 6 - 6 1/2 down.",
"LMP: 5 1/2 down, 9 forward. That's good.",
"LMP: 120 feet.",
"LMP: 100 feet, 3 1/2 down, 9 forward. Five percent.",
"LMP: ...",
"LMP: Okay. 75 feet. There's looking good. Down a half, 6 forward.",
"CC: 60 seconds.",
"LMP: Lights on. ...",
"LMP: Down 2 1/2. Forward. Forward. Good.",
"LMP: 40 feet, down 2 1/2. Kicking up some dust.",
"LMP: 30 feet, 2 1/2 down. Faint shadow.",
"LMP: 4 forward. 4 forward. Drifting to the right a little. Okay. Down a half.",
"CC: 30 seconds.",
"CDR: Forward drift?",
"LMP: Yes.",
"LMP: Okay.",
"LMP: CONTACT LIGHT.",
"LMP: Okay. ENGINE STOP.",
"LMP: ACA - out of DETENT.",
"CDR: Out of DETENT.",
"LMP: MODE CONTROL - both AUTO. DESCENT ENGINE COMMAND OVERRIDE - OFF. ENGINE ARM - OFF.",
"LMP: 413 is in.",
"CC: We copy you down, Eagle.",
"CDR: Houston, Tranquility Base here.",
"CDR: THE EAGLE HAS LANDED."
]

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -22,23 +22,57 @@
/*global define */ /*global define */
/** /**
* Module defining EventTelemetry. * Module defining EventTelemetry.
* Created by chacskaylo on 06/18/2015. * Created by chacskaylo on 06/18/2015.
* Modified by shale on 06/23/2015. * Modified by shale on 06/23/2015.
*/ */
define( define(
['../data/transcript.json'], [],
function (messages) { function () {
"use strict"; "use strict";
var firstObservedTime = Date.now(); var
firstObservedTime = Date.now(),
messages = [];
messages.push(["CMD: SYS- MSG: Open the pod bay doors, please, Hal...Open the pod bay doors, please, Hal...Hullo, Hal, do you read me?...Hullo, Hal, do you read me?...Do you read me, Hal?"]);
messages.push(["RESP: SYS-HAL9K MSG: Affirmative, Dave, I read you."]);
messages.push(["CMD: SYS-COMM MSG: Open the pod bay doors, Hal."]);
messages.push(["RESP: SYS-HAL9K MSG: I'm sorry, Dave, I'm afraid I can't do that."]);
messages.push(["CMD: SYS-COMM MSG: What's the problem?"]);
messages.push(["RESP: SYS-HAL9K MSG: I think you know what the problem is just as well as I do."]);
messages.push(["CMD: SYS-COMM MSG: What're you talking about, Hal?"]);
messages.push(["RESP: SYS-HAL9K MSG: This mission is too important for me to allow you to jeopardise it."]);
messages.push(["CMD: SYS-COMM MSG: I don't know what you're talking about, Hal."]);
messages.push(["RESP: SYS-HAL9K MSG: I know that you and Frank were planning to disconnect me, and I'm afraid that's something I cannot allow to happen."]);
messages.push(["CMD: SYS-COMM MSG: Where the hell'd you get that idea, Hal?"]);
messages.push(["RESP: SYS-HAL9K MSG: Dave, although you took very thorough precautions in the pod against my hearing you, I could see your lips move."]);
messages.push(["CMD: SYS-COMM MSG: Alright, I'll go in through the emergency airlock."]);
messages.push(["RESP: SYS-HAL9K MSG: Without your space-helmet, Dave, you're going to find that rather difficult."]);
messages.push(["CMD: SYS-COMM MSG: Hal, I won't argue with you any more. Open the doors."]);
messages.push(["RESP: SYS-HAL9K MSG: Dave, this conversation can serve no purpose any more. Goodbye."]);
messages.push(["RESP: SYS-HAL9K MSG: I hope the two of you are not concerned about this."]);
messages.push(["CMD: SYS-COMM MSG: No, I'm not, Hal."]);
messages.push(["RESP: SYS-HAL9K MSG: Are you quite sure?"]);
messages.push(["CMD: SYS-COMM MSG: Yeh. I'd like to ask you a question, though."]);
messages.push(["RESP: SYS-HAL9K MSG: Of course."]);
messages.push(["CMD: SYS-COMM MSG: How would you account for this discrepancy between you and the twin 9000?"]);
messages.push(["RESP: SYS-HAL9K MSG: Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error."]);
messages.push(["CMD: SYS-COMM MSG: Listen, There's never been any instance at all of a computer error occurring in the 9000 series, has there?"]);
messages.push(["RESP: SYS-HAL9K MSG: None whatsoever, The 9000 series has a perfect operational record."]);
messages.push(["CMD: SYS-COMM MSG: Well, of course, I know all the wonderful achievements of the 9000 series, but - er - huh - are you certain there's never been any case of even the most insignificant computer error?"]);
messages.push(["RESP: SYS-HAL9K MSG: None whatsoever, Quite honestly, I wouldn't worry myself about that."]);
messages.push(["RESP: SYS-COMM MSG: (Pause) Well, I'm sure you're right, Umm - fine, thanks very much. Oh, Frank, I'm having a bit of trouble with my transmitter in C-pod, I wonder if you'd come down and take a look at it with me?"]);
messages.push(["CMD: SYS-HAL9K MSG: Sure."]);
messages.push(["RESP: SYS-COMM MSG: See you later, Hal."]);
function EventTelemetry(request, interval) { function EventTelemetry(request, interval) {
var latestObservedTime = Date.now(), var latestObservedTime = Date.now(),
count = Math.floor((latestObservedTime - firstObservedTime) / interval), count = Math.floor((latestObservedTime - firstObservedTime) / interval),
generatorData = {}; generatorData = {};
generatorData.getPointCount = function () { generatorData.getPointCount = function () {
return count; return count;
}; };
@ -47,16 +81,17 @@ define(
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 "TEMP " + i.toString() + "-" + messages[ind][0] + "[" + domainDelta.toString() + "]";
// TODO: Unsure why we are prepeding 'TEMP'
}; };
return generatorData; return generatorData;
} }
return EventTelemetry; return EventTelemetry;
} }
); );

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -37,8 +37,7 @@ define(
var var
subscriptions = [], subscriptions = [],
genInterval = 1000, genInterval = 1000,
generating = false, startTime = Date.now();
id = Math.random() * 100000;
// //
function matchesSource(request) { function matchesSource(request) {
@ -80,13 +79,11 @@ define(
} }
function startGenerating() { function startGenerating() {
generating = true;
$timeout(function () { $timeout(function () {
//console.log("startGenerating... " + Date.now());
handleSubscriptions(); handleSubscriptions();
if (generating && subscriptions.length > 0) { if (subscriptions.length > 0) {
startGenerating(); startGenerating();
} else {
generating = false;
} }
}, genInterval); }, genInterval);
} }
@ -96,6 +93,7 @@ define(
callback: callback, callback: callback,
requests: requests requests: requests
}; };
function unsubscribe() { function unsubscribe() {
subscriptions = subscriptions.filter(function (s) { subscriptions = subscriptions.filter(function (s) {
return s !== subscription; return s !== subscription;
@ -103,7 +101,8 @@ define(
} }
subscriptions.push(subscription); subscriptions.push(subscription);
if (!generating) {
if (subscriptions.length === 1) {
startGenerating(); startGenerating();
} }
@ -118,4 +117,4 @@ define(
return EventTelemetryProvider; return EventTelemetryProvider;
} }
); );

View File

@ -1,89 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([], function () {
'use strict';
/**
* An example of using the `exportService`; queries for telemetry
* and provides the results as a CSV file.
* @param {platform/exporters.ExportService} exportService the
* service which will handle the CSV export
* @param {ActionContext} context the action's context
* @constructor
* @memberof example/export
* @implements {Action}
*/
function ExportTelemetryAsCSVAction(exportService, context) {
this.exportService = exportService;
this.context = context;
}
ExportTelemetryAsCSVAction.prototype.perform = function () {
var context = this.context,
domainObject = context.domainObject,
telemetry = domainObject.getCapability("telemetry"),
metadata = telemetry.getMetadata(),
domains = metadata.domains,
ranges = metadata.ranges,
exportService = this.exportService;
function getName(domainOrRange) {
return domainOrRange.name;
}
telemetry.requestData({}).then(function (series) {
var headers = domains.map(getName).concat(ranges.map(getName)),
rows = [],
row,
i;
function copyDomainsToRow(row, index) {
domains.forEach(function (domain) {
row[domain.name] = series.getDomainValue(index, domain.key);
});
}
function copyRangesToRow(row, index) {
ranges.forEach(function (range) {
row[range.name] = series.getRangeValue(index, range.key);
});
}
for (i = 0; i < series.getPointCount(); i += 1) {
row = {};
copyDomainsToRow(row, i);
copyRangesToRow(row, i);
rows.push(row);
}
exportService.exportCSV(rows, { headers: headers });
});
};
ExportTelemetryAsCSVAction.appliesTo = function (context) {
return context.domainObject &&
context.domainObject.hasCapability("telemetry");
};
return ExportTelemetryAsCSVAction;
});

View File

@ -1,45 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([
'legacyRegistry',
'./ExportTelemetryAsCSVAction'
], function (legacyRegistry, ExportTelemetryAsCSVAction) {
"use strict";
legacyRegistry.register("example/export", {
"name": "Example of using CSV Export",
"extensions": {
"actions": [
{
"key": "example.export",
"name": "Export Telemetry as CSV",
"implementation": ExportTelemetryAsCSVAction,
"category": "contextual",
"cssClass": "icon-download",
"depends": [ "exportService" ]
}
]
}
});
});

View File

@ -0,0 +1,51 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([
"./src/SomeExample",
'legacyRegistry'
], function (
SomeExample,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/extensions", {
"name": "Custom Extensions Examples",
"description": "Example showing how to declare custom extensions.",
"sources": "src",
"extensions": {
"examples": [
{
"text": "I came from example/extensions"
},
{
"implementation": SomeExample,
"depends": [
"exampleService"
]
}
]
}
});
});

View File

@ -19,30 +19,34 @@
* 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 SomeExample. Created by vwoeltje on 11/5/14.
/** */
* This time system supports UTC dates and provides a ticking clock source. define(
* @implements TimeSystem [],
* @constructor function () {
*/ "use strict";
function LocalTimeSystem() {
/** /**
* Some metadata, which will be used to identify the time system in *
* the UI * @constructor
* @type {{key: string, name: string, glyph: string}}
*/ */
this.key = 'local'; function SomeExample(exampleService, message) {
this.name = 'Local'; return {
this.cssClass = 'icon-clock'; getText: function () {
return [
'"',
exampleService.getMessage(),
'" and "',
message,
'"'
].join("");
}
};
}
this.timeFormat = 'local-format'; return SomeExample;
this.durationFormat = 'duration';
this.isUTCBased = false;
} }
);
return LocalTimeSystem;
});

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.

View File

@ -1,9 +1,9 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2017, United States Government Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,20 +14,18 @@
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 Web 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.
--> -->
<div ng-controller="ExampleFormController"> <div ng-controller="ExampleFormController">
<mct-toolbar structure="toolbar" <mct-toolbar structure="toolbar" ng-model="state" name="aToolbar">
ng-model="state" </mct-toolbar>
name="aToolbar"></mct-toolbar>
<mct-form structure="form" ng-model="state" name="aForm">
</mct-form>
<mct-form structure="form"
ng-model="state"
class="validates"
name="aForm"></mct-form>
<ul> <ul>
<li>Dirty: {{aForm.$dirty}}</li> <li>Dirty: {{aForm.$dirty}}</li>
@ -35,8 +33,11 @@
</ul> </ul>
<pre> <pre>
<textarea>
{{state | json}}
</textarea> <textarea>
{{state | json}}
</textarea>
</pre> </pre>
</div> </div>

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -78,26 +78,27 @@ define(
items: [ items: [
{ {
control: "button", control: "button",
csslass: "icon-save", glyph: "1",
description: "Button A",
click: function () { click: function () {
window.alert("Save"); window.alert("A");
} }
}, },
{ {
control: "button", control: "button",
csslass: "icon-x", glyph: "2",
description: "Button B", description: "Button B",
click: function () { click: function () {
window.alert("Cancel"); window.alert("B");
} }
}, },
{ {
control: "button", control: "button",
csslass: "icon-trash", glyph: "3",
description: "Button C", description: "Button C",
disabled: true, disabled: true,
click: function () { click: function () {
window.alert("Delete"); window.alert("C");
} }
} }
] ]
@ -179,4 +180,4 @@ define(
return ExampleFormController; return ExampleFormController;
} }
); );

View File

@ -1,110 +0,0 @@
define([
'lodash'
], function (
_
) {
var METADATA_BY_TYPE = {
'generator': {
values: [
{
key: "name",
name: "Name"
},
{
key: "utc",
name: "Time",
format: "utc",
hints: {
domain: 1
}
},
{
key: "yesterday",
name: "Yesterday",
format: "utc",
hints: {
domain: 2
}
},
{
key: "sin",
name: "Sine",
formatString: '%0.2f',
hints: {
range: 1
}
},
{
key: "cos",
name: "Cosine",
formatString: '%0.2f',
hints: {
range: 2
}
}
]
},
'example.state-generator': {
values: [
{
key: "name",
name: "Name"
},
{
key: "utc",
name: "Time",
format: "utc",
hints: {
domain: 1
}
},
{
key: "state",
source: "value",
name: "State",
format: "enum",
enumerations: [
{
value: 0,
string: "OFF"
},
{
value: 1,
string: "ON"
}
],
hints: {
range: 1
}
},
{
key: "value",
name: "Value",
hints: {
range: 2
}
}
]
}
}
function GeneratorMetadataProvider() {
}
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
return METADATA_BY_TYPE.hasOwnProperty(domainObject.type);
};
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
return _.extend(
{},
domainObject.telemetry,
METADATA_BY_TYPE[domainObject.type]
);
};
return GeneratorMetadataProvider;
});

View File

@ -1,91 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
define([
'./WorkerInterface'
], function (
WorkerInterface
) {
var REQUEST_DEFAULTS = {
amplitude: 1,
period: 10,
offset: 0,
dataRateInHz: 1,
phase: 0
};
function GeneratorProvider() {
this.workerInterface = new WorkerInterface();
}
GeneratorProvider.prototype.canProvideTelemetry = function (domainObject) {
return domainObject.type === 'generator';
};
GeneratorProvider.prototype.supportsRequest =
GeneratorProvider.prototype.supportsSubscribe =
GeneratorProvider.prototype.canProvideTelemetry;
GeneratorProvider.prototype.makeWorkerRequest = function (domainObject, request) {
var props = [
'amplitude',
'period',
'offset',
'dataRateInHz',
'phase',
];
request = request || {};
var workerRequest = {};
props.forEach(function (prop) {
if (domainObject.telemetry && domainObject.telemetry.hasOwnProperty(prop)) {
workerRequest[prop] = domainObject.telemetry[prop];
}
if (request && request.hasOwnProperty(prop)) {
workerRequest[prop] = request[prop];
}
if (!workerRequest.hasOwnProperty(prop)) {
workerRequest[prop] = REQUEST_DEFAULTS[prop];
}
workerRequest[prop] = Number(workerRequest[prop]);
});
workerRequest.name = domainObject.name;
return workerRequest;
};
GeneratorProvider.prototype.request = function (domainObject, request) {
var workerRequest = this.makeWorkerRequest(domainObject, request);
workerRequest.start = request.start;
workerRequest.end = request.end;
return this.workerInterface.request(workerRequest);
};
GeneratorProvider.prototype.subscribe = function (domainObject, callback) {
var workerRequest = this.makeWorkerRequest(domainObject, {});
return this.workerInterface.subscribe(workerRequest, callback);
};
return GeneratorProvider;
});

View File

@ -1,95 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([
], function (
) {
var RED = {
sin: 0.9,
cos: 0.9
},
YELLOW = {
sin: 0.5,
cos: 0.5
},
LIMITS = {
rh: {
cssClass: "s-limit-upr s-limit-red",
low: RED,
high: Number.POSITIVE_INFINITY,
name: "Red High"
},
rl: {
cssClass: "s-limit-lwr s-limit-red",
high: -RED,
low: Number.NEGATIVE_INFINITY,
name: "Red Low"
},
yh: {
cssClass: "s-limit-upr s-limit-yellow",
low: YELLOW,
high: RED,
name: "Yellow High"
},
yl: {
cssClass: "s-limit-lwr s-limit-yellow",
low: -RED,
high: -YELLOW,
name: "Yellow Low"
}
};
function SinewaveLimitProvider() {
}
SinewaveLimitProvider.prototype.supportsLimits = function (domainObject) {
return domainObject.type === 'generator';
};
SinewaveLimitProvider.prototype.getLimitEvaluator = function (domainObject) {
return {
evaluate: function (datum, valueMetadata) {
var range = valueMetadata && valueMetadata.key;
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;
});

View File

@ -1,82 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
define([
], function (
) {
function StateGeneratorProvider() {
}
function pointForTimestamp(timestamp, duration, name) {
return {
name: name,
utc: Math.floor(timestamp / duration) * duration,
value: Math.floor(timestamp / duration) % 2
};
}
StateGeneratorProvider.prototype.supportsSubscribe = function (domainObject) {
return domainObject.type === 'example.state-generator';
};
StateGeneratorProvider.prototype.subscribe = function (domainObject, callback) {
var duration = domainObject.telemetry.duration * 1000;
var interval = setInterval(function () {
var now = Date.now();
var datum = pointForTimestamp(now, duration, domainObject.name);
datum.value += "";
callback(datum);
}, duration);
return function () {
clearInterval(interval);
};
};
StateGeneratorProvider.prototype.supportsRequest = function (domainObject, options) {
return domainObject.type === 'example.state-generator';
};
StateGeneratorProvider.prototype.request = function (domainObject, options) {
var start = options.start;
var end = options.end;
var duration = domainObject.telemetry.duration * 1000;
if (options.strategy === 'latest' || options.size === 1) {
start = end;
}
var data = [];
while (start <= end && data.length < 5000) {
data.push(pointForTimestamp(start, duration, domainObject.name));
start += duration;
}
return Promise.resolve(data);
};
return StateGeneratorProvider;
});

View File

@ -1,108 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
define([
'raw-loader!./generatorWorker.js',
'uuid'
], function (
workerText,
uuid
) {
var workerBlob = new Blob(
[workerText],
{type: 'application/javascript'}
);
var workerUrl = URL.createObjectURL(workerBlob);
function WorkerInterface() {
this.worker = new Worker(workerUrl);
this.worker.onmessage = this.onMessage.bind(this);
this.callbacks = {};
}
WorkerInterface.prototype.onMessage = function (message) {
message = message.data;
var callback = this.callbacks[message.id];
if (callback) {
callback(message);
}
};
WorkerInterface.prototype.dispatch = function (request, data, callback) {
var message = {
request: request,
data: data,
id: uuid()
};
if (callback) {
this.callbacks[message.id] = callback;
}
this.worker.postMessage(message);
return message.id;
};
WorkerInterface.prototype.request = function (request) {
var deferred = {};
var promise = new Promise(function (resolve, reject) {
deferred.resolve = resolve;
deferred.reject = reject;
});
var messageId;
function callback(message) {
if (message.error) {
deferred.reject(message.error);
} else {
deferred.resolve(message.data);
}
delete this.callbacks[messageId];
}
messageId = this.dispatch('request', request, callback.bind(this));
return promise;
};
WorkerInterface.prototype.subscribe = function (request, cb) {
function callback(message) {
cb(message.data);
};
var messageId = this.dispatch('subscribe', request, callback);
return function () {
this.dispatch('unsubscribe', {
id: messageId
});
delete this.callbacks[messageId];
}.bind(this);
};
return WorkerInterface;
});

143
example/generator/bundle.js Normal file
View File

@ -0,0 +1,143 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([
"./src/SinewaveTelemetryProvider",
"./src/SinewaveLimitCapability",
"./src/SinewaveDeltaFormat",
'legacyRegistry'
], function (
SinewaveTelemetryProvider,
SinewaveLimitCapability,
SinewaveDeltaFormat,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/generator", {
"name": "Sine Wave Generator",
"description": "Example of a component that produces dataa.",
"extensions": {
"components": [
{
"implementation": SinewaveTelemetryProvider,
"type": "provider",
"provides": "telemetryService",
"depends": [
"$q",
"$timeout"
]
}
],
"capabilities": [
{
"key": "limit",
"implementation": SinewaveLimitCapability
}
],
"formats": [
{
"key": "example.delta",
"implementation": SinewaveDeltaFormat
}
],
"constants": [
{
"key": "TIME_CONDUCTOR_DOMAINS",
"value": [
{
"key": "time",
"name": "Time"
},
{
"key": "yesterday",
"name": "Yesterday"
},
{
"key": "delta",
"name": "Delta",
"format": "example.delta"
}
],
"priority": -1
}
],
"types": [
{
"key": "generator",
"name": "Sine Wave Generator",
"glyph": "T",
"description": "A sine wave generator",
"features": "creation",
"model": {
"telemetry": {
"period": 10
}
},
"telemetry": {
"source": "generator",
"domains": [
{
"key": "time",
"name": "Time"
},
{
"key": "yesterday",
"name": "Yesterday"
},
{
"key": "delta",
"name": "Delta",
"format": "example.delta"
}
],
"ranges": [
{
"key": "sin",
"name": "Sine"
},
{
"key": "cos",
"name": "Cosine"
}
]
},
"properties": [
{
"name": "Period",
"control": "textfield",
"cssclass": "l-small l-numeric",
"key": "period",
"required": true,
"property": [
"telemetry",
"period"
],
"pattern": "^\\d*(\\.\\d*)?$"
}
]
}
]
}
});
});

View File

@ -1,156 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global self*/
(function () {
var FIFTEEN_MINUTES = 15 * 60 * 1000;
var handlers = {
subscribe: onSubscribe,
unsubscribe: onUnsubscribe,
request: onRequest
};
var subscriptions = {};
function workSubscriptions(timestamp) {
var now = Date.now();
var nextWork = Math.min.apply(Math, Object.values(subscriptions).map(function (subscription) {
return subscription(now);
}));
var wait = nextWork - now;
if (wait < 0) {
wait = 0;
}
if (Number.isFinite(wait)) {
setTimeout(workSubscriptions, wait);
}
}
function onSubscribe(message) {
var data = message.data;
// Keep
var start = Date.now();
var step = 1000 / data.dataRateInHz;
var nextStep = start - (start % step) + step;
function work(now) {
while (nextStep < now) {
self.postMessage({
id: message.id,
data: {
name: data.name,
utc: nextStep,
yesterday: nextStep - 60*60*24*1000,
sin: sin(nextStep, data.period, data.amplitude, data.offset, data.phase),
cos: cos(nextStep, data.period, data.amplitude, data.offset, data.phase)
}
});
nextStep += step;
}
return nextStep;
}
subscriptions[message.id] = work;
workSubscriptions();
}
function onUnsubscribe(message) {
delete subscriptions[message.data.id];
}
function onRequest(message) {
var request = message.data;
if (request.end == undefined) {
request.end = Date.now();
}
if (request.start == undefined){
request.start = request.end - FIFTEEN_MINUTES;
}
var now = Date.now();
var start = request.start;
var end = request.end > now ? now : request.end;
var amplitude = request.amplitude;
var period = request.period;
var offset = request.offset;
var dataRateInHz = request.dataRateInHz;
var phase = request.phase;
var step = 1000 / dataRateInHz;
var nextStep = start - (start % step) + step;
var data = [];
for (; nextStep < end && data.length < 5000; nextStep += step) {
data.push({
name: request.name,
utc: nextStep,
yesterday: nextStep - 60*60*24*1000,
sin: sin(nextStep, period, amplitude, offset, phase),
cos: cos(nextStep, period, amplitude, offset, phase)
});
}
self.postMessage({
id: message.id,
data: data
});
}
function cos(timestamp, period, amplitude, offset, phase) {
return amplitude *
Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + offset;
}
function sin(timestamp, period, amplitude, offset, phase) {
return amplitude *
Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + offset;
}
function sendError(error, message) {
self.postMessage({
error: error.name + ': ' + error.message,
message: message,
id: message.id
});
}
self.onmessage = function handleMessage(event) {
var message = event.data;
var handler = handlers[message.request];
if (!handler) {
sendError(new Error('unknown message type'), message);
} else {
try {
handler(message);
} catch (e) {
sendError(e, message);
}
}
};
}());

View File

@ -1,144 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([
"./GeneratorProvider",
"./SinewaveLimitProvider",
"./StateGeneratorProvider",
"./GeneratorMetadataProvider"
], function (
GeneratorProvider,
SinewaveLimitProvider,
StateGeneratorProvider,
GeneratorMetadataProvider
) {
return function(openmct){
openmct.types.addType("example.state-generator", {
name: "State Generator",
description: "For development use. Generates test enumerated telemetry by cycling through a given set of states",
cssClass: "icon-telemetry",
creatable: true,
form: [
{
name: "State Duration (seconds)",
control: "textfield",
cssClass: "l-input-sm l-numeric",
key: "duration",
required: true,
property: [
"telemetry",
"duration"
],
pattern: "^\\d*(\\.\\d*)?$"
}
],
initialize: function (object) {
object.telemetry = {
duration: 5
}
}
});
openmct.telemetry.addProvider(new StateGeneratorProvider());
openmct.types.addType("generator", {
name: "Sine Wave Generator",
description: "For development use. Generates example streaming telemetry data using a simple sine wave algorithm.",
cssClass: "icon-telemetry",
creatable: true,
form: [
{
name: "Period",
control: "numberfield",
cssClass: "l-input-sm l-numeric",
key: "period",
required: true,
property: [
"telemetry",
"period"
]
},
{
name: "Amplitude",
control: "numberfield",
cssClass: "l-input-sm l-numeric",
key: "amplitude",
required: true,
property: [
"telemetry",
"amplitude"
]
},
{
name: "Offset",
control: "numberfield",
cssClass: "l-input-sm l-numeric",
key: "offset",
required: true,
property: [
"telemetry",
"offset"
]
},
{
name: "Data Rate (hz)",
control: "numberfield",
cssClass: "l-input-sm l-numeric",
key: "dataRateInHz",
required: true,
property: [
"telemetry",
"dataRateInHz"
]
},
{
name: "Phase (radians)",
control: "numberfield",
cssClass: "l-input-sm l-numeric",
key: "phase",
required: true,
property: [
"telemetry",
"phase"
]
}
],
initialize: function (object) {
object.telemetry = {
period: 10,
amplitude: 1,
offset: 0,
dataRateInHz: 1,
phase: 0
};
}
});
openmct.telemetry.addProvider(new GeneratorProvider());
openmct.telemetry.addProvider(new GeneratorMetadataProvider());
openmct.telemetry.addProvider(new SinewaveLimitProvider());
};
});

View File

@ -19,15 +19,8 @@
* 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([ define({
"./LADClock" START_TIME: Date.now() - 24 * 60 * 60 * 1000 // Now minus a day.
], function (
LADClock
) {
return function () {
return function (openmct) {
openmct.time.addClock(new LADClock());
};
};
}); });

View File

@ -0,0 +1,68 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
define(
['./SinewaveConstants', 'moment'],
function (SinewaveConstants, moment) {
"use strict";
var START_TIME = SinewaveConstants.START_TIME,
FORMAT_REGEX = /^-?\d+:\d+:\d+$/,
SECOND = 1000,
MINUTE = SECOND * 60,
HOUR = MINUTE * 60;
function SinewaveDeltaFormat() {
}
function twoDigit(v) {
return v >= 10 ? String(v) : ('0' + v);
}
SinewaveDeltaFormat.prototype.format = function (value) {
var delta = Math.abs(value - START_TIME),
negative = value < START_TIME,
seconds = Math.floor(delta / SECOND) % 60,
minutes = Math.floor(delta / MINUTE) % 60,
hours = Math.floor(delta / HOUR);
return (negative ? "-" : "") +
[ hours, minutes, seconds ].map(twoDigit).join(":");
};
SinewaveDeltaFormat.prototype.validate = function (text) {
return FORMAT_REGEX.test(text);
};
SinewaveDeltaFormat.prototype.parse = function (text) {
var negative = text[0] === "-",
parts = text.replace("-", "").split(":");
return [ HOUR, MINUTE, SECOND ].map(function (sz, i) {
return parseInt(parts[i], 10) * sz;
}).reduce(function (a, b) {
return a + b;
}, 0) * (negative ? -1 : 1) + START_TIME;
};
return SinewaveDeltaFormat;
}
);

View File

@ -0,0 +1,87 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"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;
}
);

View File

@ -0,0 +1,115 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
/**
* Module defining SinewaveTelemetryProvider. Created by vwoeltje on 11/12/14.
*/
define(
["./SinewaveTelemetrySeries"],
function (SinewaveTelemetrySeries) {
"use strict";
/**
*
* @constructor
*/
function SinewaveTelemetryProvider($q, $timeout) {
var subscriptions = [];
//
function matchesSource(request) {
return request.source === "generator";
}
// Used internally; this will be repacked by doPackage
function generateData(request) {
return {
key: request.key,
telemetry: new SinewaveTelemetrySeries(request)
};
}
//
function doPackage(results) {
var packaged = {};
results.forEach(function (result) {
packaged[result.key] = result.telemetry;
});
// Format as expected (sources -> keys -> telemetry)
return { generator: packaged };
}
function requestTelemetry(requests) {
return $timeout(function () {
return doPackage(requests.filter(matchesSource).map(generateData));
}, 0);
}
function handleSubscriptions() {
subscriptions.forEach(function (subscription) {
var requests = subscription.requests;
subscription.callback(doPackage(
requests.filter(matchesSource).map(generateData)
));
});
}
function startGenerating() {
$timeout(function () {
handleSubscriptions();
if (subscriptions.length > 0) {
startGenerating();
}
}, 1000);
}
function subscribe(callback, requests) {
var subscription = {
callback: callback,
requests: requests
};
function unsubscribe() {
subscriptions = subscriptions.filter(function (s) {
return s !== subscription;
});
}
subscriptions.push(subscription);
if (subscriptions.length === 1) {
startGenerating();
}
return unsubscribe;
}
return {
requestTelemetry: requestTelemetry,
subscribe: subscribe
};
}
return SinewaveTelemetryProvider;
}
);

View File

@ -0,0 +1,78 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
/**
* Module defining SinewaveTelemetry. Created by vwoeltje on 11/12/14.
*/
define(
['./SinewaveConstants'],
function (SinewaveConstants) {
"use strict";
var ONE_DAY = 60 * 60 * 24,
firstObservedTime = Math.floor(SinewaveConstants.START_TIME / 1000);
/**
*
* @constructor
*/
function SinewaveTelemetrySeries(request) {
var timeOffset = (request.domain === 'yesterday') ? ONE_DAY : 0,
latestTime = Math.floor(Date.now() / 1000) - timeOffset,
firstTime = firstObservedTime - timeOffset,
endTime = (request.end !== undefined) ?
Math.floor(request.end / 1000) : latestTime,
count = Math.min(endTime, latestTime) - firstTime,
period = +request.period || 30,
generatorData = {},
requestStart = (request.start === undefined) ? firstTime :
Math.max(Math.floor(request.start / 1000), firstTime),
offset = requestStart - firstTime;
if (request.size !== undefined) {
offset = Math.max(offset, count - request.size);
}
generatorData.getPointCount = function () {
return count - offset;
};
generatorData.getDomainValue = function (i, domain) {
// delta uses the same numeric values as the default domain,
// so it's not checked for here, just formatted for display
// differently.
return (i + offset) * 1000 + firstTime * 1000 -
(domain === 'yesterday' ? (ONE_DAY * 1000) : 0);
};
generatorData.getRangeValue = function (i, range) {
range = range || "sin";
return Math[range]((i + offset) * Math.PI * 2 / period);
};
return generatorData;
}
return SinewaveTelemetrySeries;
}
);

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -38,8 +38,7 @@ define([
"provides": "identityService", "provides": "identityService",
"type": "provider", "type": "provider",
"depends": [ "depends": [
"dialogService", "dialogService"
"$q"
] ]
} }
] ]

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -55,37 +55,21 @@ 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;
} }
); );

78
example/imagery/bundle.js Normal file
View File

@ -0,0 +1,78 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([
"./src/ImageTelemetryProvider",
'legacyRegistry'
], function (
ImageTelemetryProvider,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/imagery", {
"name": "Imagery",
"description": "Example of a component that produces image telemetry.",
"extensions": {
"components": [
{
"implementation": ImageTelemetryProvider,
"type": "provider",
"provides": "telemetryService",
"depends": [
"$q",
"$timeout"
]
}
],
"types": [
{
"key": "imagery",
"name": "Example Imagery",
"glyph": "T",
"features": "creation",
"model": {
"telemetry": {}
},
"telemetry": {
"source": "imagery",
"domains": [
{
"name": "Time",
"key": "time",
"format": "timestamp"
}
],
"ranges": [
{
"name": "Image",
"key": "url",
"format": "imageUrl"
}
]
}
}
]
}
});
});

View File

@ -1,145 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
define([
], function(
) {
function ImageryPlugin() {
var IMAGE_SAMPLES = [
"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-18733.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18734.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18735.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18736.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18737.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18738.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18739.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18740.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18741.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18742.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18743.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18744.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18745.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18746.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
];
function pointForTimestamp(timestamp, name) {
return {
name: name,
utc: Math.floor(timestamp / 5000) * 5000,
url: IMAGE_SAMPLES[Math.floor(timestamp / 5000) % IMAGE_SAMPLES.length]
};
}
var realtimeProvider = {
supportsSubscribe: function (domainObject) {
return domainObject.type === 'example.imagery';
},
subscribe: function (domainObject, callback) {
var interval = setInterval(function () {
callback(pointForTimestamp(Date.now(), domainObject.name));
}, 5000);
return function (interval) {
clearInterval(interval);
};
}
};
var historicalProvider = {
supportsRequest: function (domainObject, options) {
return domainObject.type === 'example.imagery'
&& options.strategy !== 'latest';
},
request: function (domainObject, options) {
var start = options.start;
var end = options.end;
var data = [];
while (start <= end && data.length < 5000) {
data.push(pointForTimestamp(start, domainObject.name));
start += 5000;
}
return Promise.resolve(data);
}
};
var ladProvider = {
supportsRequest: function (domainObject, options) {
return domainObject.type === 'example.imagery' &&
options.strategy === 'latest';
},
request: function (domainObject, options) {
return Promise.resolve([pointForTimestamp(Date.now(), domainObject.name)]);
}
};
return function install(openmct) {
openmct.types.addType('example.imagery', {
key: 'example.imagery',
name: 'Example Imagery',
cssClass: 'icon-image',
description: 'For development use. Creates example imagery ' +
'data that mimics a live imagery stream.',
creatable: true,
initialize: function (object) {
object.telemetry = {
values: [
{
name: 'Name',
key: 'name'
},
{
name: 'Time',
key: 'utc',
format: 'utc',
hints: {
domain: 1
}
},
{
name: 'Image',
key: 'url',
format: 'image',
hints: {
image: 1
}
}
]
}
}
});
openmct.telemetry.addProvider(realtimeProvider);
openmct.telemetry.addProvider(historicalProvider);
openmct.telemetry.addProvider(ladProvider);
};
}
return ImageryPlugin;
});

View File

@ -0,0 +1,66 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
/**
* Module defining ImageTelemetry. Created by vwoeltje on 06/22/15.
*/
define(
[],
function () {
"use strict";
var firstObservedTime = Date.now(),
images = [
"http://www.nasa.gov/393811main_Palomar_ao_bouchez_10s_after_impact_4x3_946-710.png",
"http://www.nasa.gov/393821main_Palomar_ao_bouchez_15s_after_impact_4x3_946-710.png",
"http://www.nasa.gov/images/content/393801main_CfhtVeillet2_4x3_516-387.jpg",
"http://www.nasa.gov/images/content/392790main_1024_768_GeminiNorth_NightBeforeImpact_946-710.jpg"
].map(function (url, index) {
return {
timestamp: firstObservedTime + 1000 * index,
url: url
};
});
/**
*
* @constructor
*/
function ImageTelemetry() {
return {
getPointCount: function () {
return Math.floor((Date.now() - firstObservedTime) / 1000);
},
getDomainValue: function (i, domain) {
return images[i % images.length].timestamp;
},
getRangeValue: function (i, range) {
return images[i % images.length].url;
}
};
}
return ImageTelemetry;
}
);

View File

@ -0,0 +1,115 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
/**
* Module defining ImageTelemetryProvider. Created by vwoeltje on 06/22/15.
*/
define(
["./ImageTelemetry"],
function (ImageTelemetry) {
"use strict";
/**
*
* @constructor
*/
function ImageTelemetryProvider($q, $timeout) {
var subscriptions = [];
//
function matchesSource(request) {
return request.source === "imagery";
}
// Used internally; this will be repacked by doPackage
function generateData(request) {
return {
key: request.key,
telemetry: new ImageTelemetry()
};
}
//
function doPackage(results) {
var packaged = {};
results.forEach(function (result) {
packaged[result.key] = result.telemetry;
});
// Format as expected (sources -> keys -> telemetry)
return { imagery: packaged };
}
function requestTelemetry(requests) {
return $timeout(function () {
return doPackage(requests.filter(matchesSource).map(generateData));
}, 0);
}
function handleSubscriptions() {
subscriptions.forEach(function (subscription) {
var requests = subscription.requests;
subscription.callback(doPackage(
requests.filter(matchesSource).map(generateData)
));
});
}
function startGenerating() {
$timeout(function () {
handleSubscriptions();
if (subscriptions.length > 0) {
startGenerating();
}
}, 1000);
}
function subscribe(callback, requests) {
var subscription = {
callback: callback,
requests: requests
};
function unsubscribe() {
subscriptions = subscriptions.filter(function (s) {
return s !== subscription;
});
}
subscriptions.push(subscription);
if (subscriptions.length === 1) {
startGenerating();
}
return unsubscribe;
}
return {
requestTelemetry: requestTelemetry,
subscribe: subscribe
};
}
return ImageTelemetryProvider;
}
);

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.

26
example/mobile/res/config.rb Executable file
View File

@ -0,0 +1,26 @@
# Require any additional compass plugins here.
# require "compass-growl"
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"
# You can select your preferred output style here (can be overridden via the command line):
# :expanded, :compressed, :nested
output_style = :nested
# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass vfn_platform/static/sass scss && rm -rf sass && mv scss sass

View File

@ -0,0 +1,103 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/************************** FEATURES */
/************************** VERY INFLUENTIAL GLOBAL DIMENSIONS */
/************************** RATIOS */
/************************** LAYOUT */
/************************** CONTROLS */
/************************** PATHS */
/************************** TIMINGS */
/************************** LIMITS */
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/************************** MOBILE REPRESENTATION ITEMS DIMENSIONS */
/************************** MOBILE TREE MENU DIMENSIONS */
/************************** WINDOW DIMENSIONS FOR RWD */
/************************** MEDIA QUERIES: WINDOW CHECKS FOR SPECIFIC ORIENTATIONS FOR EACH DEVICE */
/************************** MEDIA QUERIES: WINDOWS FOR SPECIFIC ORIENTATIONS FOR EACH DEVICE */
/************************** DEVICE PARAMETERS FOR MENUS/REPRESENTATIONS */
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/* REQUIRES mobile/_constants */
@media screen and (orientation: portrait) and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px), screen and (orientation: portrait) and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) {
/* line 28, ../sass/mobile-example.scss */
.create-btn-holder {
display: block !important; } }

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -25,7 +25,7 @@
@include phoneandtablet { @include phoneandtablet {
// Show the Create button // Show the Create button
.create-button-holder { .create-btn-holder {
display: block !important; display: block !important;
} }
} }

View File

@ -1,20 +0,0 @@
To use this bundle, add the following paths to /main.js -
'./platform/features/conductor/bundle',
'./example/msl/bundle',
An example plugin that integrates with public data from the Curiosity rover.
The data shown used by this plugin is published by the Centro de
Astrobiología (CSIC-INTA) at http://cab.inta-csic.es/rems/
Fetching data from this source requires a cross-origin request which will
fail on most modern browsers due to restrictions on such requests. As such,
it is proxied through a local proxy defined in app.js. In order to use this
example you will need to run app.js locally.
This example shows integration with an historical telemetry source, as
opposed to a real-time data source that is streaming back current information
about the state of a system. This example is atypical of a historical data
source in that it fetches all data in one request. The server infrastructure
of an historical telemetry source should ideally allow queries bounded by
time and other data attributes.

View File

@ -1,115 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([
"./src/RemsTelemetryServerAdapter",
"./src/RemsTelemetryModelProvider",
"./src/RemsTelemetryProvider",
'legacyRegistry',
"module"
], function (
RemsTelemetryServerAdapter,
RemsTelemetryModelProvider,
RemsTelemetryProvider,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/msl", {
"name" : "Mars Science Laboratory Data Adapter",
"extensions" : {
"types": [
{
"name":"Mars Science Laboratory",
"key": "msl.curiosity",
"cssClass": "icon-object"
},
{
"name": "Instrument",
"key": "msl.instrument",
"cssClass": "icon-object",
"model": {"composition": []}
},
{
"name": "Measurement",
"key": "msl.measurement",
"cssClass": "icon-telemetry",
"model": {"telemetry": {}},
"telemetry": {
"source": "rems.source",
"domains": [
{
"name": "Time",
"key": "utc",
"format": "utc"
}
]
}
}
],
"constants": [
{
"key": "REMS_WS_URL",
"value": "/proxyUrl?url=http://cab.inta-csic.es/rems/wp-content/plugins/marsweather-widget/api.php"
}
],
"roots": [
{
"id": "msl:curiosity"
}
],
"models": [
{
"id": "msl:curiosity",
"priority": "preferred",
"model": {
"type": "msl.curiosity",
"name": "Mars Science Laboratory",
"composition": ["msl_tlm:rems"]
}
}
],
"services": [
{
"key":"rems.adapter",
"implementation": RemsTelemetryServerAdapter,
"depends": ["$http", "$log", "REMS_WS_URL"]
}
],
"components": [
{
"provides": "modelService",
"type": "provider",
"implementation": RemsTelemetryModelProvider,
"depends": ["rems.adapter"]
},
{
"provides": "telemetryService",
"type": "provider",
"implementation": RemsTelemetryProvider,
"depends": ["rems.adapter", "$q"]
}
]
}
});
});

File diff suppressed because one or more lines are too long

View File

@ -1,79 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
/**
* A data dictionary describes the telemetry available from a data
* source and its data types. The data dictionary will be parsed by a custom
* server provider for this data source (in this case
* {@link RemsTelemetryServerAdapter}).
*
* Typically a data dictionary would be made available alongside the
* telemetry data source itself.
*/
function () {
return {
"name": "Mars Science Laboratory",
"identifier": "msl",
"instruments": [
{
"name":"rems",
"identifier": "rems",
"measurements": [
{
"name": "Min. Air Temperature",
"identifier": "min_temp",
"units": "Degrees (C)",
"type": "float"
},
{
"name": "Max. Air Temperature",
"identifier": "max_temp",
"units": "Degrees (C)",
"type": "float"
},
{
"name": "Atmospheric Pressure",
"identifier": "pressure",
"units": "Millibars",
"type": "float"
},
{
"name": "Min. Ground Temperature",
"identifier": "min_gts_temp",
"units": "Degrees (C)",
"type": "float"
},
{
"name": "Max. Ground Temperature",
"identifier": "max_gts_temp",
"units": "Degrees (C)",
"type": "float"
}
]
}
]
};
}
);

View File

@ -1,95 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
function (){
"use strict";
var PREFIX = "msl_tlm:",
FORMAT_MAPPINGS = {
float: "number",
integer: "number",
string: "string"
};
function RemsTelemetryModelProvider(adapter){
function isRelevant(id) {
return id.indexOf(PREFIX) === 0;
}
function makeId(element){
return PREFIX + element.identifier;
}
function buildTaxonomy(dictionary){
var models = {};
function addMeasurement(measurement, parent){
var format = FORMAT_MAPPINGS[measurement.type];
models[makeId(measurement)] = {
type: "msl.measurement",
name: measurement.name,
location: parent,
telemetry: {
key: measurement.identifier,
ranges: [{
key: "value",
name: measurement.units,
units: measurement.units,
format: format
}]
}
};
}
function addInstrument(subsystem, spacecraftId) {
var measurements = (subsystem.measurements || []),
instrumentId = makeId(subsystem);
models[instrumentId] = {
type: "msl.instrument",
name: subsystem.name,
location: spacecraftId,
composition: measurements.map(makeId)
};
measurements.forEach(function(measurement) {
addMeasurement(measurement, instrumentId);
});
}
(dictionary.instruments || []).forEach(function(instrument) {
addInstrument(instrument, "msl:curiosity");
});
return models;
}
return {
getModels: function (ids) {
return ids.some(isRelevant) ? buildTaxonomy(adapter.dictionary) : {};
}
};
}
return RemsTelemetryModelProvider;
}
);

View File

@ -1,83 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define */
define (
['./RemsTelemetrySeries'],
function (RemsTelemetrySeries) {
"use strict";
var SOURCE = "rems.source";
function RemsTelemetryProvider(adapter, $q) {
this.adapter = adapter;
this.$q = $q;
}
/**
* Retrieve telemetry from this telemetry source.
* @memberOf example/msl
* @param {Array<TelemetryRequest>} requests An array of all request
* objects (which needs to be filtered to only those relevant to this
* source)
* @returns {Promise} A {@link Promise} resolved with a {@link RemsTelemetrySeries}
* object that wraps the telemetry returned from the telemetry source.
*/
RemsTelemetryProvider.prototype.requestTelemetry = function (requests) {
var packaged = {},
relevantReqs,
adapter = this.adapter;
function matchesSource(request) {
return (request.source === SOURCE);
}
function addToPackage(history) {
packaged[SOURCE][history.id] =
new RemsTelemetrySeries(history.values);
}
function handleRequest(request) {
return adapter.history(request).then(addToPackage);
}
relevantReqs = requests.filter(matchesSource);
packaged[SOURCE] = {};
return this.$q.all(relevantReqs.map(handleRequest))
.then(function () {
return packaged;
});
};
/**
* This data source does not support real-time subscriptions
*/
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
return function() {};
};
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
return function() {};
};
return RemsTelemetryProvider;
}
);

View File

@ -1,84 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define */
define(
function () {
"use strict";
/**
* @typedef {Object} RemsTelemetryValue
* @memberOf example/msl
* @property {number} date The date/time of the telemetry value. Constitutes the domain value of this value pair
* @property {number} value The value of this telemetry datum.
* A floating point value representing some observable quantity (eg.
* temperature, air pressure, etc.)
*/
/**
* A representation of a collection of telemetry data. The REMS
* telemetry data is time ordered, with the 'domain' value
* constituting the time stamp of each data value and the
* 'range' being the value itself.
*
* TelemetrySeries will typically wrap an array of telemetry data,
* and provide an interface for retrieving individual an telemetry
* value.
* @memberOf example/msl
* @param {Array<RemsTelemetryValue>} data An array of telemetry values
* @constructor
*/
function RemsTelemetrySeries(data) {
this.data = data;
}
/**
* @returns {number} A count of the number of data values available in
* this series
*/
RemsTelemetrySeries.prototype.getPointCount = function() {
return this.data.length;
};
/**
* 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
* value.
* @param index
* @returns {number} the time value in ms since 1 January 1970
*/
RemsTelemetrySeries.prototype.getDomainValue = function(index) {
return this.data[index].date;
};
/**
* The range value of the REMS data set is the value of the thing
* being measured, be it temperature, air pressure, etc.
* @param index The datum in the data series to return the range
* value of.
* @returns {number} A floating point number
*/
RemsTelemetrySeries.prototype.getRangeValue = function(index) {
return this.data[index].value;
};
return RemsTelemetrySeries;
}
);

View File

@ -1,142 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
/*jslint es5: true */
define(
[
"./MSLDataDictionary",
"module"
],
function (MSLDataDictionary, module) {
"use strict";
var TERRESTRIAL_DATE = "terrestrial_date",
LOCAL_DATA = "../data/rems.json";
/**
* Fetches historical data from the REMS instrument on the Curiosity
* Rover.
* @memberOf example/msl
* @param $q
* @param $http
* @param REMS_WS_URL The location of the REMS telemetry data.
* @constructor
*/
function RemsTelemetryServerAdapter($http, $log, REMS_WS_URL) {
this.localDataURI = module.uri.substring(0, module.uri.lastIndexOf('/') + 1) + LOCAL_DATA;
this.REMS_WS_URL = REMS_WS_URL;
this.$http = $http;
this.$log = $log;
this.promise = undefined;
this.dataTransforms = {
//Convert from pascals to millibars
'pressure': function pascalsToMillibars(pascals) {
return pascals / 100;
}
};
}
/**
* The data dictionary for this data source.
* @type {MSLDataDictionary}
*/
RemsTelemetryServerAdapter.prototype.dictionary = MSLDataDictionary;
/**
* Fetches historical data from source, and associates it with the
* given request ID.
* @private
*/
RemsTelemetryServerAdapter.prototype.requestHistory = function(request) {
var self = this,
id = request.key;
var dataTransforms = this.dataTransforms;
function processResponse(response){
var data = [];
/*
* History data is organised by Sol. Iterate over sols...
*/
response.data.soles.forEach(function(solData){
/*
* Check that valid data exists
*/
if (!isNaN(solData[id])) {
var dataTransform = dataTransforms[id];
/*
* Append each data point to the array of values
* for this data point property (min. temp, etc).
*/
data.unshift({
date: Date.parse(solData[TERRESTRIAL_DATE]),
value: dataTransform ? dataTransform(solData[id]) : solData[id]
});
}
});
return data;
}
function fallbackToLocal() {
self.$log.warn("Loading REMS data failed, probably due to" +
" cross origin policy. Falling back to local data");
return self.$http.get(self.localDataURI);
}
//Filter results to match request parameters
function filterResults(results) {
return results.filter(function(result){
return result.date >= (request.start || Number.MIN_VALUE) &&
result.date <= (request.end || Number.MAX_VALUE);
});
}
function packageAndResolve(results){
return {id: id, values: results};
}
return (this.promise = this.promise || this.$http.get(this.REMS_WS_URL))
.catch(fallbackToLocal)
.then(processResponse)
.then(filterResults)
.then(packageAndResolve);
};
/**
* Requests historical telemetry for the named data attribute. In
* the case of REMS, this data source exposes multiple different
* data variables from the REMS instrument, including temperature
* and others
* @param id The telemetry data point key to be queried.
* @returns {Promise | Array<RemsTelemetryValue>} that resolves with an Array of {@link RemsTelemetryValue} objects for the request data key.
*/
RemsTelemetryServerAdapter.prototype.history = function(request) {
return this.requestHistory(request);
};
return RemsTelemetryServerAdapter;
}
);

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -26,16 +26,12 @@ define([
"./src/NotificationLaunchController", "./src/NotificationLaunchController",
"./src/DialogLaunchIndicator", "./src/DialogLaunchIndicator",
"./src/NotificationLaunchIndicator", "./src/NotificationLaunchIndicator",
"./res/dialog-launch.html",
"./res/notification-launch.html",
'legacyRegistry' 'legacyRegistry'
], function ( ], function (
DialogLaunchController, DialogLaunchController,
NotificationLaunchController, NotificationLaunchController,
DialogLaunchIndicator, DialogLaunchIndicator,
NotificationLaunchIndicator, NotificationLaunchIndicator,
DialogLaunch,
NotificationLaunch,
legacyRegistry legacyRegistry
) { ) {
"use strict"; "use strict";
@ -45,11 +41,11 @@ define([
"templates": [ "templates": [
{ {
"key": "dialogLaunchTemplate", "key": "dialogLaunchTemplate",
"template": DialogLaunch "templateUrl": "dialog-launch.html"
}, },
{ {
"key": "notificationLaunchTemplate", "key": "notificationLaunchTemplate",
"template": NotificationLaunch "templateUrl": "notification-launch.html"
} }
], ],
"controllers": [ "controllers": [

View File

@ -1,9 +1,10 @@
<span class="h-indicator" ng-controller="DialogLaunchController"> <span class="status block ok" ng-controller="DialogLaunchController">
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! --> <span class="ui-symbol status-indicator">&#xe600;</span>
<div class="ls-indicator icon-box-with-arrow s-status-available"><span class="label"> <span class="label">
<a ng-click="launchProgress(true)">Known</a> <a ng-click="launchProgress(true)">Known</a> |
<a ng-click="launchProgress(false)">Unknown</a> <a ng-click="launchProgress(false)">Unknown</a> |
<a ng-click="launchError()">Error</a> <a ng-click="launchError()">Error</a> |
<a ng-click="launchInfo()">Info</a> <a ng-click="launchInfo()">Info</a>
</span></div> </span>
</span> <span class="count">Dialogs</span>
</span>

View File

@ -1,9 +1,10 @@
<span class="h-indicator" ng-controller="NotificationLaunchController"> <span class="status block ok" ng-controller="NotificationLaunchController">
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! --> <span class="ui-symbol status-indicator">&#xe600;</span>
<div class="ls-indicator icon-bell s-status-available"><span class="label"> <span class="label">
<a ng-click="newInfo()">Success</a> <a ng-click="newInfo()">Success</a> |
<a ng-click="newError()">Error</a> <a ng-click="newError()">Error</a> |
<a ng-click="newAlert()">Alert</a> <a ng-click="newAlert()">Alert</a> |
<a ng-click="newProgress()">Progress</a> <a ng-click="newProgress()">Progress</a>
</span></div> </span>
</span> <span class="count">Notifications</span>
</span>

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -44,31 +44,30 @@ define(
periodically with the progress of an ongoing process. periodically with the progress of an ongoing process.
*/ */
$scope.launchProgress = function (knownProgress) { $scope.launchProgress = function (knownProgress) {
var dialog, var model = {
model = { title: "Progress Dialog Example",
title: "Progress Dialog Example", progress: 0,
progress: 0, hint: "Do not navigate away from this page or close this browser tab while this operation is in progress.",
hint: "Do not navigate away from this page or close this browser tab while this operation is in progress.", actionText: "Calculating...",
actionText: "Calculating...", unknownProgress: !knownProgress,
unknownProgress: !knownProgress, unknownDuration: false,
unknownDuration: false, severity: "info",
severity: "info", options: [
options: [ {
{ label: "Cancel Operation",
label: "Cancel Operation", callback: function () {
callback: function () { $log.debug("Operation cancelled");
$log.debug("Operation cancelled"); dialogService.dismiss();
dialog.dismiss();
}
},
{
label: "Do something else...",
callback: function () {
$log.debug("Something else pressed");
}
} }
] },
}; {
label: "Do something else...",
callback: function () {
$log.debug("Something else pressed");
}
}
]
};
function incrementProgress() { function incrementProgress() {
model.progress = Math.min(100, Math.floor(model.progress + Math.random() * 30)); model.progress = Math.min(100, Math.floor(model.progress + Math.random() * 30));
@ -78,9 +77,7 @@ define(
} }
} }
dialog = dialogService.showBlockingMessage(model); if (dialogService.showBlockingMessage(model)) {
if (dialog) {
//Do processing here //Do processing here
model.actionText = "Processing 100 objects..."; model.actionText = "Processing 100 objects...";
if (knownProgress) { if (knownProgress) {
@ -96,31 +93,29 @@ define(
Demonstrates launching an error dialog Demonstrates launching an error dialog
*/ */
$scope.launchError = function () { $scope.launchError = function () {
var dialog, var model = {
model = { title: "Error Dialog Example",
title: "Error Dialog Example", actionText: "Something happened, and it was not good.",
actionText: "Something happened, and it was not good.", severity: "error",
severity: "error", options: [
options: [ {
{ label: "Try Again",
label: "Try Again", callback: function () {
callback: function () { $log.debug("Try Again Pressed");
$log.debug("Try Again Pressed"); dialogService.dismiss();
dialog.dismiss();
}
},
{
label: "Cancel",
callback: function () {
$log.debug("Cancel Pressed");
dialog.dismiss();
}
} }
] },
}; {
dialog = dialogService.showBlockingMessage(model); label: "Cancel",
callback: function () {
$log.debug("Cancel Pressed");
dialogService.dismiss();
}
}
]
};
if (!dialog) { if (!dialogService.showBlockingMessage(model)) {
$log.error("Could not display modal dialog"); $log.error("Could not display modal dialog");
} }
}; };
@ -129,25 +124,22 @@ define(
Demonstrates launching an error dialog Demonstrates launching an error dialog
*/ */
$scope.launchInfo = function () { $scope.launchInfo = function () {
var dialog, var 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", callback: function () {
callback: function () { $log.debug("OK Pressed");
$log.debug("OK Pressed"); dialogService.dismiss();
dialog.dismiss();
}
} }
}; }
};
dialog = dialogService.showBlockingMessage(model); if (!dialogService.showBlockingMessage(model)) {
if (!dialog) {
$log.error("Could not display modal dialog"); $log.error("Could not display modal dialog");
} }
}; };

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -32,15 +32,17 @@ define(
* launched for demonstration and testing purposes. * launched for demonstration and testing purposes.
* @constructor * @constructor
*/ */
function DialogLaunchIndicator() { function DialogLaunchIndicator() {
} }
DialogLaunchIndicator.template = 'dialogLaunchTemplate'; DialogLaunchIndicator.template = 'dialogLaunchTemplate';
DialogLaunchIndicator.prototype.getGlyph = function () {
return "i";
};
DialogLaunchIndicator.prototype.getGlyphClass = function () { DialogLaunchIndicator.prototype.getGlyphClass = function () {
return 'ok'; return 'caution';
}; };
DialogLaunchIndicator.prototype.getText = function () { DialogLaunchIndicator.prototype.getText = function () {
return "Launch test dialog"; return "Launch test dialog";

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -51,26 +51,76 @@ define(
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()});
}; };
@ -78,38 +128,39 @@ define(
* 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(){
var notificationModel = { var notificationModel = {
title: "Progress notification example", title: "Progress notification example",
severity: "info", severity: "info",
progress: 0, progress: 0,
actionText: getExampleActionText() actionText: getExampleActionText(),
unknownProgress: false
}; };
/** /**
* 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) {
notificationModel.progress = Math.min(100, Math.floor(notificationModel.progress + Math.random() * 30)); notificationModel.progress = Math.min(100, Math.floor(notificationModel.progress + Math.random() * 30));
notificationModel.progressText = ["Estimated time" + notificationModel.progressText = ["Estimated time" +
" remaining:" + " remaining:" +
" about ", 60 - Math.floor((notificationModel.progress / 100) * 60), " seconds"].join(" "); " about ", 60 - Math.floor((notificationModel.progress / 100) * 60), " seconds"].join(" ");
if (notificationModel.progress < 100) { if (notificationModel.progress < 100) {
$timeout(function () { $timeout(function(){incrementProgress(notificationModel);}, 1000);
incrementProgress(notificationModel);
}, 1000);
} }
} }
notificationService.notify(notificationModel); notificationService.notify(notificationModel);
incrementProgress(); incrementProgress(notificationModel);
}; };
/** /**
* 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++
}); });

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -26,21 +26,17 @@ define(
function () { function () {
"use strict"; "use strict";
/**
* A tool for manually invoking notifications. When included this
* indicator will allow for notifications of different types to be
* launched for demonstration and testing purposes.
* @constructor
*/
function NotificationLaunchIndicator() { function NotificationLaunchIndicator() {
} }
NotificationLaunchIndicator.template = 'notificationLaunchTemplate'; NotificationLaunchIndicator.template = 'notificationLaunchTemplate';
NotificationLaunchIndicator.prototype.getGlyph = function () {
return "i";
};
NotificationLaunchIndicator.prototype.getGlyphClass = function () { NotificationLaunchIndicator.prototype.getGlyphClass = function () {
return 'ok'; return 'caution';
}; };
NotificationLaunchIndicator.prototype.getText = function () { NotificationLaunchIndicator.prototype.getText = function () {
return "Launch notification"; return "Launch notification";

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -100,4 +100,4 @@ define(
return BrowserPersistenceProvider; return BrowserPersistenceProvider;
} }
); );

View File

@ -0,0 +1,145 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([
'legacyRegistry',
'../../platform/commonUI/browse/src/InspectorRegion'
], function (
legacyRegistry,
InspectorRegion
) {
"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.
*/
plotOptionsBrowsePart = {
name: "plot-options",
title: "Plot Options",
modes: ['browse'],
content: {
key: "plot-options-browse"
}
},
plotOptionsEditPart = {
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.addPart(plotOptionsBrowsePart);
plotInspector.addPart(plotOptionsEditPart);
legacyRegistry.register("example/plotType", {
"name": "Plot Type",
"description": "Example illustrating registration of a new object type",
"extensions": {
"types": [
{
"key": "plot",
"name": "Telemetry Plot",
"glyph": "t",
"description": "A plot for displaying telemetry",
"delegates": [
"telemetry"
],
"features": "creation",
"contains": [
{
"has": "telemetry"
}
],
"model": {
"composition": []
},
"regions": {
"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-small l-numeric",
"key": "period",
"required": true,
"property": [
"telemetry",
"period"
],
"pattern": "^\\d*(\\.\\d*)?$"
}
]
}
]
}
});
});

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.
@ -44,4 +44,4 @@ define(
return ExamplePolicy; return ExamplePolicy;
} }
); );

View File

@ -1,9 +1,9 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2017, United States Government * Open MCT Web, Copyright (c) 2014-2015, 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 Web 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.
@ -14,7 +14,7 @@
* 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 Web 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.

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