mirror of
https://github.com/nasa/openmct.git
synced 2025-06-29 04:03:03 +00:00
Compare commits
145 Commits
code-walkt
...
esm
Author | SHA1 | Date | |
---|---|---|---|
84c473cea8 | |||
b677d3b90e | |||
59a4d05a0b | |||
f663a6a5b1 | |||
01d02642e8 | |||
1f588a2a6e | |||
e18c7562ae | |||
08b1c4ae74 | |||
2488072d6b | |||
82ea23e20c | |||
a0b02c9684 | |||
bba29b083f | |||
7c4258d720 | |||
95d30f75ac | |||
db3cfd33af | |||
85fe838c04 | |||
6bdea20f9a | |||
159563ce5c | |||
0d88bc8531 | |||
8acbcadd5d | |||
e20c7a17d6 | |||
035a1be57d | |||
09b49f31ab | |||
e1e2cf9be8 | |||
84e82d3bda | |||
7b53cad2c5 | |||
420edb75f8 | |||
749e84611e | |||
8eba3a81f3 | |||
63fabe576c | |||
11c96796c0 | |||
5caa5e1a50 | |||
b9b0cfe0ef | |||
bee0527acb | |||
ed3c2f6a56 | |||
b1c97e51e5 | |||
16786a64c1 | |||
e3ad2c98ca | |||
0a0d3b20c2 | |||
02c2fb5655 | |||
0b02b083c3 | |||
25b3431131 | |||
c8723da098 | |||
933ce7aa3c | |||
8ef3869325 | |||
53f5fdabe5 | |||
d10561fc7f | |||
566469e691 | |||
6d4a324fca | |||
b8fabb7e73 | |||
1680c3cc1b | |||
61dd85c704 | |||
980777691a | |||
a50c1704e5 | |||
98080784a3 | |||
bf7b672957 | |||
5dadf6f6fc | |||
555db60bf7 | |||
1972ca9ea7 | |||
1e11bbc2ad | |||
c4a87ae5d7 | |||
4e325fb165 | |||
e59e4efdf0 | |||
f17fda53a0 | |||
f2dbe6d816 | |||
510d3bd333 | |||
a908eb1d65 | |||
c0bda64927 | |||
d0c5731287 | |||
5eaf222f88 | |||
0249ab4df5 | |||
4f8cba160d | |||
c269e089da | |||
4873f40614 | |||
10bb9173ec | |||
ea8c9c7cc8 | |||
4c9c084eec | |||
b64ee10812 | |||
ee1ecf43db | |||
4d8db8eb7c | |||
1b13965200 | |||
38db8f7fe5 | |||
4ba8f893a6 | |||
c4b9be18f1 | |||
eabdf6cd04 | |||
e56c673005 | |||
dad9f12a5c | |||
aa5edb0b83 | |||
b315803180 | |||
b27317631b | |||
953a9daafb | |||
63f9cd449f | |||
54220f547b | |||
93d967c2b3 | |||
1226459c6f | |||
d7c9c9cb98 | |||
2131ef2397 | |||
48c22369a1 | |||
6506077f4d | |||
b1b4266ff3 | |||
42b0148f93 | |||
9461ad8edd | |||
40055ba955 | |||
9cb85ad176 | |||
f2b2953a5d | |||
62de310686 | |||
4b9ff67e49 | |||
d5e32ec494 | |||
38880ba3d1 | |||
a99ce7733c | |||
9f48764210 | |||
a1aaa0dd41 | |||
bee15e98c8 | |||
092bbe547d | |||
6cbe05317c | |||
3b92fcdf6c | |||
6dde54bd25 | |||
359e7377ac | |||
9f4190f781 | |||
f3fc991a74 | |||
2564e75fc9 | |||
f42fe78acf | |||
fe928a1386 | |||
b329ed6ed5 | |||
9b7a0d7e4c | |||
5c15e53abb | |||
f58b3881f2 | |||
071a13b219 | |||
ca66898e51 | |||
94c7b2343a | |||
c397c336ab | |||
eea23f2caf | |||
6665641c02 | |||
c3ebf52dd2 | |||
f8f2e7da9b | |||
240f58b2d0 | |||
7d3baee7b5 | |||
1f5cb7ca42 | |||
4a7ebe326c | |||
10da314a4a | |||
b3ceccd7fb | |||
1bde4c9a0c | |||
4b85360446 | |||
41b860a547 | |||
254b3db966 |
@ -1,36 +1,193 @@
|
|||||||
version: 2
|
version: 2.1
|
||||||
jobs:
|
executors:
|
||||||
build:
|
pw-focal-development:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:13-browsers
|
- image: mcr.microsoft.com/playwright:focal
|
||||||
environment:
|
environment:
|
||||||
CHROME_BIN: "/usr/bin/google-chrome"
|
NODE_ENV: development # Needed to ensure 'dist' folder created and devDependencies installed
|
||||||
|
parameters:
|
||||||
|
BUST_CACHE:
|
||||||
|
description: "Set this with the CircleCI UI Trigger Workflow button (boolean = true) to bust the cache!"
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
commands:
|
||||||
|
build_and_install:
|
||||||
|
description: "All steps used to build and install. Will not work on node10"
|
||||||
|
parameters:
|
||||||
|
node-version:
|
||||||
|
type: string
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- restore_cache_cmd:
|
||||||
name: Update npm
|
node-version: << parameters.node-version >>
|
||||||
command: 'sudo npm install -g npm@latest'
|
- node/install:
|
||||||
|
install-npm: true
|
||||||
|
node-version: lts/fermium
|
||||||
|
- run: npm install
|
||||||
|
restore_cache_cmd:
|
||||||
|
description: "Custom command for restoring cache with the ability to bust cache. When BUST_CACHE is set to true, jobs will not restore cache"
|
||||||
|
parameters:
|
||||||
|
node-version:
|
||||||
|
type: string
|
||||||
|
steps:
|
||||||
|
- when:
|
||||||
|
condition:
|
||||||
|
equal: [false, << pipeline.parameters.BUST_CACHE >> ]
|
||||||
|
steps:
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: dependency-cache-{{ checksum "package.json" }}
|
key: deps-{{ .Branch }}--<< parameters.node-version >>--{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
- run:
|
save_cache_cmd:
|
||||||
name: Installing dependencies (npm install)
|
description: "Custom command for saving cache."
|
||||||
command: npm install
|
parameters:
|
||||||
|
node-version:
|
||||||
|
type: string
|
||||||
|
steps:
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: dependency-cache-{{ checksum "package.json" }}
|
key: deps-{{ .Branch }}--<< parameters.node-version >>--{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
paths:
|
paths:
|
||||||
|
- ~/.npm
|
||||||
- node_modules
|
- node_modules
|
||||||
- run:
|
generate_and_store_version_and_filesystem_artifacts:
|
||||||
name: npm run test:coverage
|
description: "Track important packages and files"
|
||||||
command: npm run test:coverage
|
steps:
|
||||||
- run:
|
- run: |
|
||||||
name: npm run lint
|
mkdir /tmp/artifacts
|
||||||
command: npm run lint
|
printenv NODE_ENV >> /tmp/artifacts/NODE_ENV.txt
|
||||||
|
npm -v >> /tmp/artifacts/npm-version.txt
|
||||||
|
node -v >> /tmp/artifacts/node-version.txt
|
||||||
|
ls -latR >> /tmp/artifacts/dir.txt
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: dist
|
path: /tmp/artifacts/
|
||||||
prefix: dist
|
upload_code_covio:
|
||||||
|
description: "Command to upload code coverage reports to codecov.io"
|
||||||
|
steps:
|
||||||
|
- run: curl -Os https://uploader.codecov.io/latest/linux/codecov;chmod +x codecov;./codecov
|
||||||
|
orbs:
|
||||||
|
node: circleci/node@4.9.0
|
||||||
|
browser-tools: circleci/browser-tools@1.2.3
|
||||||
|
jobs:
|
||||||
|
npm-audit:
|
||||||
|
parameters:
|
||||||
|
node-version:
|
||||||
|
type: string
|
||||||
|
executor: pw-focal-development
|
||||||
|
steps:
|
||||||
|
- build_and_install:
|
||||||
|
node-version: <<parameters.node-version>>
|
||||||
|
- run: npm audit --audit-level=low
|
||||||
|
- generate_and_store_version_and_filesystem_artifacts
|
||||||
|
node10-lint:
|
||||||
|
executor: pw-focal-development
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- node/install:
|
||||||
|
install-npm: false #Cannot install latest npm version with node10.
|
||||||
|
node-version: lts/dubnium
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run lint
|
||||||
|
- generate_and_store_version_and_filesystem_artifacts
|
||||||
|
unit-test:
|
||||||
|
parameters:
|
||||||
|
node-version:
|
||||||
|
type: string
|
||||||
|
browser:
|
||||||
|
type: string
|
||||||
|
executor: pw-focal-development
|
||||||
|
steps:
|
||||||
|
- build_and_install:
|
||||||
|
node-version: <<parameters.node-version>>
|
||||||
|
- when:
|
||||||
|
condition:
|
||||||
|
equal: [ "FirefoxESR", <<parameters.browser>> ]
|
||||||
|
steps:
|
||||||
|
- browser-tools/install-firefox:
|
||||||
|
version: "91.4.0esr" #https://archive.mozilla.org/pub/firefox/releases/
|
||||||
|
- when:
|
||||||
|
condition:
|
||||||
|
equal: [ "FirefoxHeadless", <<parameters.browser>> ]
|
||||||
|
steps:
|
||||||
|
- browser-tools/install-firefox
|
||||||
|
- when:
|
||||||
|
condition:
|
||||||
|
equal: [ "ChromeHeadless", <<parameters.browser>> ]
|
||||||
|
steps:
|
||||||
|
- browser-tools/install-chrome:
|
||||||
|
replace-existing: false
|
||||||
|
- run: npm run test:coverage -- --browsers=<<parameters.browser>>
|
||||||
|
- save_cache_cmd:
|
||||||
|
node-version: <<parameters.node-version>>
|
||||||
|
- store_test_results:
|
||||||
|
path: dist/reports/tests/
|
||||||
|
- store_artifacts:
|
||||||
|
path: dist/reports/
|
||||||
|
- generate_and_store_version_and_filesystem_artifacts
|
||||||
|
e2e-test:
|
||||||
|
parameters:
|
||||||
|
node-version:
|
||||||
|
type: string
|
||||||
|
suite:
|
||||||
|
type: string
|
||||||
|
executor: pw-focal-development
|
||||||
|
steps:
|
||||||
|
- build_and_install:
|
||||||
|
node-version: <<parameters.node-version>>
|
||||||
|
- run: npx playwright install
|
||||||
|
- run: npm run test:e2e:<<parameters.suite>>
|
||||||
|
- store_test_results:
|
||||||
|
path: test-results/results.xml
|
||||||
|
- store_artifacts:
|
||||||
|
path: test-results
|
||||||
|
- generate_and_store_version_and_filesystem_artifacts
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
overall-circleci-commit-status: #These jobs run on every commit
|
||||||
test:
|
|
||||||
jobs:
|
jobs:
|
||||||
- build
|
- node10-lint
|
||||||
|
- unit-test:
|
||||||
|
name: node12-chrome
|
||||||
|
node-version: lts/erbium
|
||||||
|
browser: ChromeHeadless
|
||||||
|
- unit-test:
|
||||||
|
name: node14-chrome
|
||||||
|
node-version: lts/fermium
|
||||||
|
browser: ChromeHeadless
|
||||||
|
post-steps:
|
||||||
|
- upload_code_covio
|
||||||
|
- e2e-test:
|
||||||
|
name: e2e-smoke
|
||||||
|
node-version: lts/fermium
|
||||||
|
suite: ci
|
||||||
|
the-nightly: #These jobs do not run on PRs, but against master at night
|
||||||
|
jobs:
|
||||||
|
- unit-test:
|
||||||
|
name: node10-chrome-nightly
|
||||||
|
node-version: lts/dubnium
|
||||||
|
browser: ChromeHeadless
|
||||||
|
- unit-test:
|
||||||
|
name: node12-firefoxESR-nightly
|
||||||
|
node-version: lts/erbium
|
||||||
|
browser: FirefoxESR
|
||||||
|
- unit-test:
|
||||||
|
name: node12-chrome-nightly
|
||||||
|
node-version: lts/erbium
|
||||||
|
browser: ChromeHeadless
|
||||||
|
- unit-test:
|
||||||
|
name: node14-firefox-nightly
|
||||||
|
node-version: lts/fermium
|
||||||
|
browser: FirefoxHeadless
|
||||||
|
- unit-test:
|
||||||
|
name: node14-chrome-nightly
|
||||||
|
node-version: lts/fermium
|
||||||
|
browser: ChromeHeadless
|
||||||
|
- npm-audit:
|
||||||
|
node-version: lts/fermium
|
||||||
|
- e2e-test:
|
||||||
|
name: e2e-full-nightly
|
||||||
|
node-version: lts/fermium
|
||||||
|
suite: full
|
||||||
|
triggers:
|
||||||
|
- schedule:
|
||||||
|
cron: "0 0 * * *"
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
11
.github/ISSUE_TEMPLATE/bug_report.md
vendored
11
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,11 +1,12 @@
|
|||||||
<!--- This is for filing bugs. If you have a general question, please -->
|
|
||||||
<!--- visit https://github.com/nasa/openmct/discussions -->
|
|
||||||
|
|
||||||
---
|
---
|
||||||
name: Bug Report
|
name: Bug report
|
||||||
about: File a Bug !
|
about: File a Bug !
|
||||||
|
title: ''
|
||||||
|
labels: type:bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--- Focus on user impact in the title. Use the Summary Field to -->
|
<!--- Focus on user impact in the title. Use the Summary Field to -->
|
||||||
<!--- describe the problem technically. -->
|
<!--- describe the problem technically. -->
|
||||||
|
|
||||||
@ -35,7 +36,7 @@ about: File a Bug !
|
|||||||
|
|
||||||
#### Environment
|
#### Environment
|
||||||
* Open MCT Version: <!--- date of build, version, or SHA -->
|
* Open MCT Version: <!--- date of build, version, or SHA -->
|
||||||
* Deployment Type: <!--- npm dev? VIPER Dev? openmct-yams? -->
|
* Deployment Type: <!--- npm dev? VIPER Dev? openmct-yamcs? -->
|
||||||
* OS:
|
* OS:
|
||||||
* Browser:
|
* Browser:
|
||||||
|
|
||||||
|
6
.github/ISSUE_TEMPLATE/config.yml
vendored
6
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1 +1,5 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: true
|
||||||
|
contact_links:
|
||||||
|
- name: Discussions
|
||||||
|
url: https://github.com/nasa/openmct/discussions
|
||||||
|
about: Have a question about the project?
|
||||||
|
20
.github/ISSUE_TEMPLATE/enhancement-request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/enhancement-request.md
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Enhancement request
|
||||||
|
about: Suggest an enhancement or new improvement for this project
|
||||||
|
title: ''
|
||||||
|
labels: type:enhancement
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
23
.github/ISSUE_TEMPLATE/feature_request.md
vendored
23
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,23 +0,0 @@
|
|||||||
<!--- This is for filing enhancements or features. If you have a general -->
|
|
||||||
<!--- question, please visit https://github.com/nasa/openmct/discussions -->
|
|
||||||
|
|
||||||
---
|
|
||||||
name: Feature Request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Thank you for suggesting an idea to make Open MCT better.
|
|
||||||
|
|
||||||
Please fill in as much of the template below as you're able.
|
|
||||||
-->
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
<!-- Please describe the problem you are trying to solve. -->
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
<!--- Please describe the desired behavior. -->
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
<!--- Please describe alternative solutions or features you have considered. -->
|
|
11
.github/ISSUE_TEMPLATE/maintenance-type.md
vendored
Normal file
11
.github/ISSUE_TEMPLATE/maintenance-type.md
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
name: Maintenance
|
||||||
|
about: Add, update or remove documentation, tests, or dependencies.
|
||||||
|
title: ''
|
||||||
|
labels: type:maintenance
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### Summary
|
||||||
|
<!--- Generally describe the purpose of the change. -->
|
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
* [ ] Have you followed the guidelines in our [Contributing document](https://github.com/nasa/openmct/blob/master/CONTRIBUTING.md)?
|
* [ ] Have you followed the guidelines in our [Contributing document](https://github.com/nasa/openmct/blob/master/CONTRIBUTING.md)?
|
||||||
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/nasa/openmct/pulls) for the same update/change?
|
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/nasa/openmct/pulls) for the same update/change?
|
||||||
|
* [ ] Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.
|
||||||
|
|
||||||
### Author Checklist
|
### Author Checklist
|
||||||
|
|
||||||
|
26
.github/dependabot.yml
vendored
Normal file
26
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "npm"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
open-pull-requests-limit: 4
|
||||||
|
labels:
|
||||||
|
- "type:maintenance"
|
||||||
|
- "dependencies"
|
||||||
|
- "pr:e2e"
|
||||||
|
allow:
|
||||||
|
- dependency-name: "eslint*"
|
||||||
|
- dependency-name: "karma*"
|
||||||
|
- dependency-name: "jasmine*"
|
||||||
|
- dependency-name: "playwright*"
|
||||||
|
- dependency-name: "percy*"
|
||||||
|
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
labels:
|
||||||
|
- "type:maintenance"
|
||||||
|
- "dependencies"
|
43
.github/workflows/codeql-analysis.yml
vendored
Normal file
43
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*Spec.js'
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/*.txt'
|
||||||
|
- '**/*.yml'
|
||||||
|
- '**/*.yaml'
|
||||||
|
- '**/*.spec.js'
|
||||||
|
- '**/*.config.js'
|
||||||
|
schedule:
|
||||||
|
- cron: '28 21 * * 3'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: javascript
|
||||||
|
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
53
.github/workflows/e2e-pr.yml
vendored
Normal file
53
.github/workflows/e2e-pr.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
name: "e2e-pr"
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
types: [ labeled ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
e2e-full:
|
||||||
|
if: ${{ github.event.label.name == 'pr:e2e' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Trigger Success
|
||||||
|
uses: actions/github-script@v5
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
github.rest.issues.createComment({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
body: 'Started e2e Run. Follow along: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
||||||
|
})
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run test:e2e:full
|
||||||
|
- name: Archive test results
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
path: test-results
|
||||||
|
- name: Test success
|
||||||
|
if: ${{ success() }}
|
||||||
|
uses: actions/github-script@v5
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
github.rest.issues.createComment({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
body: 'Success ✅ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
||||||
|
})
|
||||||
|
- name: Test failure
|
||||||
|
if: ${{ failure() }}
|
||||||
|
uses: actions/github-script@v5
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
github.rest.issues.createComment({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
body: 'Failure ❌ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
||||||
|
})
|
23
.github/workflows/e2e-visual.yml
vendored
Normal file
23
.github/workflows/e2e-visual.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: "e2e-visual"
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
schedule:
|
||||||
|
- cron: '28 21 * * 1-5'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
e2e-visual:
|
||||||
|
if: ${{ github.event.label.name == 'pr:visual' }} || ${{ github.event.workflow_dispatch }} || ${{ github.event.schedule }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
- run: npm install
|
||||||
|
- name: Run the e2e visual tests
|
||||||
|
run: npm run test:e2e:visual
|
||||||
|
env:
|
||||||
|
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
21
.github/workflows/e2e.yml
vendored
Normal file
21
.github/workflows/e2e.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: "e2e"
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: 'Which branch do you want to test?' # Limited to branch for now
|
||||||
|
required: false
|
||||||
|
default: 'master'
|
||||||
|
jobs:
|
||||||
|
e2e:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.version }}
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
- run: npm install
|
||||||
|
- name: Run the e2e tests
|
||||||
|
run: npm run test:e2e:ci
|
4
.github/workflows/lighthouse.yml
vendored
4
.github/workflows/lighthouse.yml
vendored
@ -13,6 +13,8 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.version }}
|
ref: ${{ github.event.inputs.version }}
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
- run: npm install && npm install -g @lhci/cli #Don't want to include this in our deps
|
- run: npm install && npm install -g @lhci/cli #Don't want to include this in our deps
|
||||||
- run: lhci autorun
|
- run: lhci autorun
|
33
.github/workflows/npm-prerelease.yml
vendored
Normal file
33
.github/workflows/npm-prerelease.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# This workflow will run tests using node and then publish a package to npmjs when a prerelease is created
|
||||||
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
||||||
|
|
||||||
|
name: npm_prerelease
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [prereleased]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 14
|
||||||
|
- run: npm install
|
||||||
|
- run: npm test
|
||||||
|
|
||||||
|
publish-npm-prerelease:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 14
|
||||||
|
registry-url: https://registry.npmjs.org/
|
||||||
|
- run: npm install
|
||||||
|
- run: npm publish --access public --tag unstable
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -43,4 +43,11 @@ report.*.json
|
|||||||
# Lighthouse reports
|
# Lighthouse reports
|
||||||
.lighthouseci
|
.lighthouseci
|
||||||
|
|
||||||
|
# e2e test artifacts
|
||||||
|
test-results
|
||||||
|
allure-results
|
||||||
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
|
||||||
|
#codecov artifacts
|
||||||
|
codecov
|
||||||
|
@ -33,3 +33,12 @@ protractor/logs
|
|||||||
|
|
||||||
# npm-debug log
|
# npm-debug log
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
|
# Infra and tests
|
||||||
|
.circleci
|
||||||
|
.github
|
||||||
|
e2e
|
||||||
|
codecov.yml
|
||||||
|
lighthouserc.yml
|
||||||
|
*.Spec.js
|
||||||
|
karma.conf.js
|
||||||
|
4
API.md
4
API.md
@ -481,6 +481,8 @@ In this case, the `domain` is the currently selected time-system, and the start
|
|||||||
|
|
||||||
A telemetry provider's `request` method should return a promise for an array of telemetry datums. These datums must be sorted by `domain` in ascending order.
|
A telemetry provider's `request` method should return a promise for an array of telemetry datums. These datums must be sorted by `domain` in ascending order.
|
||||||
|
|
||||||
|
The telemetry provider's `request` method will also return an object `signal` with an `aborted` property with a value `true` if the request has been aborted by user navigation. This can be used to trigger actions when a request has been aborted.
|
||||||
|
|
||||||
#### Request Strategies **draft**
|
#### Request Strategies **draft**
|
||||||
|
|
||||||
To improve performance views may request a certain strategy for data reduction. These are intended to improve visualization performance by reducing the amount of data needed to be sent to the client. These strategies will be indicated by additional parameters in the request options. You may choose to handle them or ignore them.
|
To improve performance views may request a certain strategy for data reduction. These are intended to improve visualization performance by reducing the amount of data needed to be sent to the client. These strategies will be indicated by additional parameters in the request options. You may choose to handle them or ignore them.
|
||||||
@ -996,7 +998,7 @@ reveal additional information when the mouse cursor is hovered over it.
|
|||||||
A common use case for indicators is to convey the state of some external system such as a
|
A common use case for indicators is to convey the state of some external system such as a
|
||||||
persistence backend or HTTP server. So long as this system is accessible via HTTP request,
|
persistence backend or HTTP server. So long as this system is accessible via HTTP request,
|
||||||
Open MCT provides a general purpose indicator to show whether the server is available and
|
Open MCT provides a general purpose indicator to show whether the server is available and
|
||||||
returing a 2xx status code. The URL Status Indicator is made available as a default plugin. See
|
returning a 2xx status code. The URL Status Indicator is made available as a default plugin. See
|
||||||
the [documentation](./src/plugins/URLIndicatorPlugin) for details on how to install and configure the
|
the [documentation](./src/plugins/URLIndicatorPlugin) for details on how to install and configure the
|
||||||
URL Status Indicator.
|
URL Status Indicator.
|
||||||
|
|
||||||
|
@ -317,6 +317,7 @@ checklist).
|
|||||||
### Reviewer Checklist
|
### Reviewer Checklist
|
||||||
|
|
||||||
* [ ] Changes appear to address issue?
|
* [ ] Changes appear to address issue?
|
||||||
|
* [ ] Changes appear not to be breaking changes?
|
||||||
* [ ] Appropriate unit tests included?
|
* [ ] Appropriate unit tests included?
|
||||||
* [ ] Code style and in-line documentation are appropriate?
|
* [ ] Code style and in-line documentation are appropriate?
|
||||||
* [ ] Commit messages meet standards?
|
* [ ] Commit messages meet standards?
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Open MCT [](http://www.apache.org/licenses/LICENSE-2.0) [](https://lgtm.com/projects/g/nasa/openmct/context:javascript)
|
# Open MCT [](http://www.apache.org/licenses/LICENSE-2.0) [](https://lgtm.com/projects/g/nasa/openmct/context:javascript) [](https://codecov.io/gh/nasa/openmct) [](https://percy.io/b2e34b17/openmct)
|
||||||
|
|
||||||
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 (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.
|
||||||
|
|
||||||
@ -85,6 +85,8 @@ 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
|
||||||
`dist/reports/tests/`. Code coverage information is written to `dist/reports/coverage`.
|
`dist/reports/tests/`. Code coverage information is written to `dist/reports/coverage`.
|
||||||
|
|
||||||
|
Code Coverage Reports are available from [codecov.io](https://app.codecov.io/gh/nasa/openmct/)
|
||||||
|
|
||||||
# Glossary
|
# Glossary
|
||||||
|
|
||||||
Certain terms are used throughout Open MCT with consistent meanings
|
Certain terms are used throughout Open MCT with consistent meanings
|
||||||
|
31
SECURITY.md
Normal file
31
SECURITY.md
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
### Reporting a Vulnerability
|
||||||
|
|
||||||
|
For general defects, please for a [Bug Report](https://github.com/nasa/openmct/issues/new/choose)
|
||||||
|
|
||||||
|
To report a vulnerability for Open MCT please send a detailed report to [arc-dl-openmct](mailto:arc-dl-openmct@mail.nasa.gov).
|
||||||
|
|
||||||
|
See our [top-level security policy](https://github.com/nasa/openmct/security/policy) for additional information.
|
||||||
|
|
||||||
|
### CodeQL and LGTM
|
||||||
|
|
||||||
|
The [CodeQL GitHub Actions workflow](https://github.com/nasa/openmct/blob/master/.github/workflows/codeql-analysis.yml) is available to the public. To review the results, fork the repository and run the CodeQL workflow.
|
||||||
|
|
||||||
|
CodeQL is run for every pull-request in GitHub Actions.
|
||||||
|
|
||||||
|
The project is also monitored by [LGTM](https://lgtm.com/projects/g/nasa/openmct/) and is available to public.
|
||||||
|
|
||||||
|
### ESLint
|
||||||
|
|
||||||
|
Static analysis is run for every push on the master branch and every pull request on all branches in Github Actions.
|
||||||
|
|
||||||
|
For more information about ESLint, visit https://eslint.org/.
|
||||||
|
|
||||||
|
### General Support
|
||||||
|
|
||||||
|
For additional support, please open a [Github Discussion](https://github.com/nasa/openmct/discussions).
|
||||||
|
|
||||||
|
If you wish to report a cybersecurity incident or concern, please contact the NASA Security Operations Center either by phone at 1-877-627-2732 or via email address soc@nasa.gov.
|
31
codecov.yml
Normal file
31
codecov.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
codecov:
|
||||||
|
require_ci_to_pass: false #This setting will update the bot regardless of whether or not tests pass
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
informational: true
|
||||||
|
patch:
|
||||||
|
default:
|
||||||
|
informational: true
|
||||||
|
precision: 2
|
||||||
|
round: down
|
||||||
|
range: "66...100"
|
||||||
|
|
||||||
|
ignore:
|
||||||
|
- "**/*Spec.js"
|
||||||
|
- "e2e"
|
||||||
|
|
||||||
|
parsers:
|
||||||
|
gcov:
|
||||||
|
branch_detection:
|
||||||
|
conditional: true
|
||||||
|
loop: true
|
||||||
|
method: false
|
||||||
|
macro: false
|
||||||
|
|
||||||
|
comment:
|
||||||
|
layout: "reach,diff,flags,files,footer"
|
||||||
|
behavior: default
|
||||||
|
require_changes: false
|
@ -423,7 +423,7 @@ which can help with this, however.
|
|||||||
instead of separate approaches for static and substitutable
|
instead of separate approaches for static and substitutable
|
||||||
dependencies.
|
dependencies.
|
||||||
* Removes need to understand Angular's DI mechanism.
|
* Removes need to understand Angular's DI mechanism.
|
||||||
* Improves useability of documentation (`typeService` is an
|
* Improves usability of documentation (`typeService` is an
|
||||||
instance of `CompositeService` and implements `TypeService`
|
instance of `CompositeService` and implements `TypeService`
|
||||||
so you can easily traverse links in the JSDoc.)
|
so you can easily traverse links in the JSDoc.)
|
||||||
* Can be used more easily from Web Workers, allowing services
|
* Can be used more easily from Web Workers, allowing services
|
||||||
@ -1124,7 +1124,7 @@ app.config(['actionRegistryProvider', function (arp) {
|
|||||||
### Detriments
|
### Detriments
|
||||||
|
|
||||||
* Slightly increases dependency on Angular; other dependency injectors
|
* Slightly increases dependency on Angular; other dependency injectors
|
||||||
may not offer comparable ways to specificy dependencies non-globally.
|
may not offer comparable ways to specify dependencies non-globally.
|
||||||
* Not clear (or will take effort to make clear) which dependencies are
|
* Not clear (or will take effort to make clear) which dependencies are
|
||||||
available for which extensions. Could be mitigated by standardizing
|
available for which extensions. Could be mitigated by standardizing
|
||||||
descriptions of context across actions and views, but that may offer
|
descriptions of context across actions and views, but that may offer
|
||||||
@ -1250,7 +1250,7 @@ take. Should not be default behavior.
|
|||||||
|
|
||||||
Proposal | Consensus
|
Proposal | Consensus
|
||||||
------|------
|
------|------
|
||||||
Imperitive component registries | [:+1:](https://github.com/nasa/openmctweb/issues/462)
|
Imperative component registries | [:+1:](https://github.com/nasa/openmctweb/issues/462)
|
||||||
Get rid of "extension category" concept. | [:+1:](https://github.com/nasa/openmctweb/issues/462)
|
Get rid of "extension category" concept. | [:+1:](https://github.com/nasa/openmctweb/issues/462)
|
||||||
Reduce number and depth of extension points | :+1:
|
Reduce number and depth of extension points | :+1:
|
||||||
Composite services should not be the default | [:question:](https://github.com/nasa/openmctweb/issues/463)
|
Composite services should not be the default | [:question:](https://github.com/nasa/openmctweb/issues/463)
|
||||||
|
@ -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)
|
- [Imperative component registries](#imperative-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)
|
||||||
@ -145,7 +145,7 @@ Then, if we're using imperative methods for extending the application we can use
|
|||||||
<script>
|
<script>
|
||||||
// can configure from object
|
// can configure from object
|
||||||
var myApp = new OpenMCTWeb({
|
var myApp = new OpenMCTWeb({
|
||||||
persitence: {
|
persistence: {
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
type: 'elastic',
|
type: 'elastic',
|
||||||
|
@ -425,14 +425,14 @@ tests, as well as a file named `suite.json` describing which files to test.
|
|||||||
Should have the same folder structure as the `src` directory; see the section on
|
Should have the same folder structure as the `src` directory; see the section on
|
||||||
automated testing for more information.
|
automated testing for more information.
|
||||||
|
|
||||||
For example, the directory structure for bundle `platform/commonUI/about` looks
|
For example, the directory structure for bundle `platform/commonUI/dialog` looks
|
||||||
like:
|
like:
|
||||||
|
|
||||||
Platform
|
Platform
|
||||||
|
|
|
|
||||||
|-commonUI
|
|-commonUI
|
||||||
|
|
|
|
||||||
+-about
|
+-dialog
|
||||||
|
|
|
|
||||||
|-res
|
|-res
|
||||||
|
|
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
## Legacy Documentation
|
## Legacy Documentation
|
||||||
|
|
||||||
As we transition to a new API, the following documentation for the old API
|
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:
|
(which is supported during the transition) may be useful as well:
|
||||||
|
|
||||||
* The [Architecture Overview](architecture/) describes the concepts used
|
* The [Architecture Overview](architecture/) describes the concepts used
|
||||||
throughout Open MCT, and gives a high level overview of the platform's design.
|
throughout Open MCT, and gives a high level overview of the platform's design.
|
||||||
|
4
e2e/.eslintrc.js
Normal file
4
e2e/.eslintrc.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/* eslint-disable no-undef */
|
||||||
|
module.exports = {
|
||||||
|
"extends": ["plugin:playwright/playwright-test"]
|
||||||
|
};
|
32
e2e/playwright-ci.config.js
Normal file
32
e2e/playwright-ci.config.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/* eslint-disable no-undef */
|
||||||
|
// playwright.config.js
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
||||||
|
const config = {
|
||||||
|
retries: 2,
|
||||||
|
testDir: 'tests',
|
||||||
|
timeout: 90 * 1000,
|
||||||
|
webServer: {
|
||||||
|
command: 'npm run start',
|
||||||
|
port: 8080,
|
||||||
|
timeout: 200 * 1000,
|
||||||
|
reuseExistingServer: !process.env.CI
|
||||||
|
},
|
||||||
|
use: {
|
||||||
|
browserName: "chromium",
|
||||||
|
baseURL: 'http://localhost:8080/',
|
||||||
|
headless: true,
|
||||||
|
ignoreHTTPSErrors: true,
|
||||||
|
screenshot: 'on',
|
||||||
|
trace: 'on',
|
||||||
|
video: 'on'
|
||||||
|
},
|
||||||
|
reporter: [
|
||||||
|
['list'],
|
||||||
|
['junit', { outputFile: 'test-results/results.xml' }],
|
||||||
|
['allure-playwright']
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = config;
|
31
e2e/playwright-local.config.js
Normal file
31
e2e/playwright-local.config.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* eslint-disable no-undef */
|
||||||
|
// playwright.config.js
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
||||||
|
const config = {
|
||||||
|
retries: 0,
|
||||||
|
testDir: 'tests',
|
||||||
|
timeout: 30 * 1000,
|
||||||
|
webServer: {
|
||||||
|
command: 'npm run start',
|
||||||
|
port: 8080,
|
||||||
|
timeout: 120 * 1000,
|
||||||
|
reuseExistingServer: !process.env.CI
|
||||||
|
},
|
||||||
|
use: {
|
||||||
|
browserName: "chromium",
|
||||||
|
baseURL: 'http://localhost:8080/',
|
||||||
|
headless: false,
|
||||||
|
ignoreHTTPSErrors: true,
|
||||||
|
screenshot: 'on',
|
||||||
|
trace: 'on',
|
||||||
|
video: 'on'
|
||||||
|
},
|
||||||
|
reporter: [
|
||||||
|
['list'],
|
||||||
|
['allure-playwright']
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = config;
|
32
e2e/playwright-visual.config.js
Normal file
32
e2e/playwright-visual.config.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/* eslint-disable no-undef */
|
||||||
|
// playwright.config.js
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
||||||
|
const config = {
|
||||||
|
retries: 0,
|
||||||
|
testDir: 'tests',
|
||||||
|
timeout: 90 * 1000,
|
||||||
|
webServer: {
|
||||||
|
command: 'npm run start',
|
||||||
|
port: 8080,
|
||||||
|
timeout: 200 * 1000,
|
||||||
|
reuseExistingServer: !process.env.CI
|
||||||
|
},
|
||||||
|
use: {
|
||||||
|
browserName: "chromium",
|
||||||
|
baseURL: 'http://localhost:8080/',
|
||||||
|
headless: true,
|
||||||
|
ignoreHTTPSErrors: true,
|
||||||
|
screenshot: 'on',
|
||||||
|
trace: 'off',
|
||||||
|
video: 'on'
|
||||||
|
},
|
||||||
|
reporter: [
|
||||||
|
['list'],
|
||||||
|
['junit', { outputFile: 'test-results/results.xml' }],
|
||||||
|
['allure-playwright']
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = config;
|
@ -20,35 +20,30 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*
|
||||||
[
|
This test suite is dedicated to tests which can quickly verify that any openmct installation is
|
||||||
"../../src/capabilities/TransactionalPersistenceCapability",
|
operable and that any type of testing can proceed.
|
||||||
"../../src/capabilities/TransactionCapabilityDecorator"
|
|
||||||
],
|
|
||||||
function (TransactionalPersistenceCapability, TransactionCapabilityDecorator) {
|
|
||||||
|
|
||||||
describe("The transaction capability decorator", function () {
|
Ideally, smoke tests should make zero assumptions about how and where they are run. This makes them
|
||||||
var mockQ,
|
more resilient to change and therefor a better indicator of failure. Smoke tests will also run quickly
|
||||||
mockTransactionService,
|
as they cover a very "thin surface" of functionality.
|
||||||
mockCapabilityService,
|
|
||||||
provider;
|
|
||||||
|
|
||||||
beforeEach(function () {
|
When deciding between authoring new smoke tests or functional tests, ask yourself "would I feel
|
||||||
mockQ = {};
|
comfortable running this test during a live mission?" Avoid creating or deleting Domain Objects.
|
||||||
mockTransactionService = {};
|
Make no assumptions about the order that elements appear in the DOM.
|
||||||
mockCapabilityService = jasmine.createSpyObj("capabilityService", ["getCapabilities"]);
|
*/
|
||||||
mockCapabilityService.getCapabilities.and.returnValue({
|
|
||||||
persistence: function () {}
|
|
||||||
});
|
|
||||||
|
|
||||||
provider = new TransactionCapabilityDecorator(mockQ, mockTransactionService, mockCapabilityService);
|
const { test, expect } = require('@playwright/test');
|
||||||
|
|
||||||
});
|
test('Verify that the create button appears and that the Folder Domain Object is available for selection', async ({ page }) => {
|
||||||
it("decorates the persistence capability", function () {
|
|
||||||
var capabilities = provider.getCapabilities();
|
|
||||||
expect(capabilities.persistence({}) instanceof TransactionalPersistenceCapability).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
//Go to baseURL
|
||||||
}
|
await page.goto('/', { waitUntil: 'networkidle' });
|
||||||
);
|
|
||||||
|
//Click the Create button
|
||||||
|
await page.click('button:has-text("Create")');
|
||||||
|
|
||||||
|
// Verify that Create Folder appears in the dropdown
|
||||||
|
const locator = page.locator(':nth-match(:text("Folder"), 2)');
|
||||||
|
await expect(locator).toBeEnabled();
|
||||||
|
});
|
73
e2e/tests/visual/default.spec.js
Normal file
73
e2e/tests/visual/default.spec.js
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Collection of Visual Tests set to run in a default context. These should only use functional
|
||||||
|
expect statements to verify assumptions about the state in a test and not for functional
|
||||||
|
verification of correctness.
|
||||||
|
Note: Larger testsuite sizes are OK due to the setup time associated with these tests. Visual
|
||||||
|
tests are not supposed to "fail" on assertions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { test, expect } = require('@playwright/test');
|
||||||
|
const percySnapshot = require('@percy/playwright');
|
||||||
|
const path = require('path');
|
||||||
|
const sinon = require('sinon');
|
||||||
|
|
||||||
|
const VISUAL_GRACE_PERIOD = 5 * 1000; //Lets the application "simmer" before the snapshot is taken
|
||||||
|
|
||||||
|
// Snippet from https://github.com/microsoft/playwright/issues/6347#issuecomment-965887758
|
||||||
|
// Will replace with cy.clock() equivalent
|
||||||
|
test.beforeEach(async ({ context }) => {
|
||||||
|
await context.addInitScript({
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
path: path.join(__dirname, '../../..', './node_modules/sinon/pkg/sinon.js')
|
||||||
|
});
|
||||||
|
await context.addInitScript(() => {
|
||||||
|
window.__clock = sinon.useFakeTimers(); //Set browser clock to UNIX Epoch
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Visual - Root and About', async ({ page }) => {
|
||||||
|
// Go to baseURL
|
||||||
|
await page.goto('/', { waitUntil: 'networkidle' });
|
||||||
|
|
||||||
|
// Verify that Create button is actionable
|
||||||
|
const createButtonLocator = page.locator('button:has-text("Create")');
|
||||||
|
await expect(createButtonLocator).toBeEnabled();
|
||||||
|
|
||||||
|
// Take a snapshot of the Dashboard
|
||||||
|
await page.waitForTimeout(VISUAL_GRACE_PERIOD);
|
||||||
|
await percySnapshot(page, 'Root');
|
||||||
|
|
||||||
|
// Click About button
|
||||||
|
await page.click('.l-shell__app-logo');
|
||||||
|
|
||||||
|
// Modify the Build information in 'about' to be consistent run-over-run
|
||||||
|
const versionInformationLocator = page.locator('ul.t-info.l-info.s-info');
|
||||||
|
await expect(versionInformationLocator).toBeEnabled();
|
||||||
|
await versionInformationLocator.evaluate(node => node.innerHTML = '<li>Version: visual-snapshot</li> <li>Build Date: Mon Nov 15 2021 08:07:51 GMT-0800 (Pacific Standard Time)</li> <li>Revision: 93049cdbc6c047697ca204893db9603b864b8c9f</li> <li>Branch: master</li>');
|
||||||
|
|
||||||
|
// Take a snapshot of the About modal
|
||||||
|
await page.waitForTimeout(VISUAL_GRACE_PERIOD);
|
||||||
|
await percySnapshot(page, 'About');
|
||||||
|
});
|
@ -20,14 +20,33 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./src/EventTelemetryProvider"
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
], function (
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
EventTelemetryProvider
|
* Administration. All rights reserved.
|
||||||
) {
|
*
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
import EventTelemetryProvider from './src/EventTelemetryProvider';
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/eventGenerator",
|
name: "example/eventGenerator",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Event Message Generator",
|
"name": "Event Message Generator",
|
||||||
@ -76,5 +95,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -25,14 +25,40 @@
|
|||||||
* 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(
|
/*****************************************************************************
|
||||||
['../data/transcript.json'],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function (messages) {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
var firstObservedTime = Date.now();
|
/**
|
||||||
|
* Module defining EventTelemetry.
|
||||||
|
* Created by chacskaylo on 06/18/2015.
|
||||||
|
* Modified by shale on 06/23/2015.
|
||||||
|
*/
|
||||||
|
import messages from '../data/transcript.json';
|
||||||
|
|
||||||
function EventTelemetry(request, interval) {
|
"use strict";
|
||||||
|
|
||||||
|
var firstObservedTime = Date.now();
|
||||||
|
|
||||||
|
function EventTelemetry(request, interval) {
|
||||||
|
|
||||||
var latestObservedTime = Date.now(),
|
var latestObservedTime = Date.now(),
|
||||||
count = Math.floor((latestObservedTime - firstObservedTime) / interval),
|
count = Math.floor((latestObservedTime - firstObservedTime) / interval),
|
||||||
@ -55,8 +81,6 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
return generatorData;
|
return generatorData;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EventTelemetry;
|
export default EventTelemetry;
|
||||||
}
|
|
||||||
);
|
|
@ -23,16 +23,40 @@
|
|||||||
/**
|
/**
|
||||||
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
|
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
|
||||||
*/
|
*/
|
||||||
define(
|
/*****************************************************************************
|
||||||
["./EventTelemetry"],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function (EventTelemetry) {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
|
||||||
|
*/
|
||||||
|
import EventTelemetry from './EventTelemetry';
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EventTelemetryProvider($q, $timeout) {
|
function EventTelemetryProvider($q, $timeout) {
|
||||||
var subscriptions = [],
|
var subscriptions = [],
|
||||||
genInterval = 1000,
|
genInterval = 1000,
|
||||||
generating = false;
|
generating = false;
|
||||||
@ -111,8 +135,6 @@ define(
|
|||||||
requestTelemetry: requestTelemetry,
|
requestTelemetry: requestTelemetry,
|
||||||
subscribe: subscribe
|
subscribe: subscribe
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return EventTelemetryProvider;
|
export default EventTelemetryProvider;
|
||||||
}
|
|
||||||
);
|
|
@ -20,10 +20,31 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
/*****************************************************************************
|
||||||
'use strict';
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
* An example of using the `exportService`; queries for telemetry
|
* An example of using the `exportService`; queries for telemetry
|
||||||
* and provides the results as a CSV file.
|
* and provides the results as a CSV file.
|
||||||
* @param {platform/exporters.ExportService} exportService the
|
* @param {platform/exporters.ExportService} exportService the
|
||||||
@ -33,12 +54,12 @@ define([], function () {
|
|||||||
* @memberof example/export
|
* @memberof example/export
|
||||||
* @implements {Action}
|
* @implements {Action}
|
||||||
*/
|
*/
|
||||||
function ExportTelemetryAsCSVAction(exportService, context) {
|
function ExportTelemetryAsCSVAction(exportService, context) {
|
||||||
this.exportService = exportService;
|
this.exportService = exportService;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportTelemetryAsCSVAction.prototype.perform = function () {
|
ExportTelemetryAsCSVAction.prototype.perform = function () {
|
||||||
var context = this.context,
|
var context = this.context,
|
||||||
domainObject = context.domainObject,
|
domainObject = context.domainObject,
|
||||||
telemetry = domainObject.getCapability("telemetry"),
|
telemetry = domainObject.getCapability("telemetry"),
|
||||||
@ -78,12 +99,11 @@ define([], function () {
|
|||||||
|
|
||||||
exportService.exportCSV(rows, { headers: headers });
|
exportService.exportCSV(rows, { headers: headers });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
ExportTelemetryAsCSVAction.appliesTo = function (context) {
|
ExportTelemetryAsCSVAction.appliesTo = function (context) {
|
||||||
return context.domainObject
|
return context.domainObject
|
||||||
&& context.domainObject.hasCapability("telemetry");
|
&& context.domainObject.hasCapability("telemetry");
|
||||||
};
|
};
|
||||||
|
|
||||||
return ExportTelemetryAsCSVAction;
|
export default ExportTelemetryAsCSVAction;
|
||||||
});
|
|
@ -20,12 +20,33 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
'./ExportTelemetryAsCSVAction'
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
], function (ExportTelemetryAsCSVAction) {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
import ExportTelemetryAsCSVAction from './ExportTelemetryAsCSVAction';
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/export",
|
name: "example/export",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Example of using CSV Export",
|
"name": "Example of using CSV Export",
|
||||||
@ -42,5 +63,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -20,14 +20,33 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./src/ExampleFormController"
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
], function (
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
ExampleFormController
|
* Administration. All rights reserved.
|
||||||
) {
|
*
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
import ExampleFormController from './src/ExampleFormController';
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/forms",
|
name: "example/forms",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Declarative Forms example",
|
"name": "Declarative Forms example",
|
||||||
@ -49,5 +68,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -20,12 +20,31 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
function ExampleFormController($scope) {
|
"use strict";
|
||||||
|
|
||||||
|
function ExampleFormController($scope) {
|
||||||
$scope.state = {
|
$scope.state = {
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -198,8 +217,6 @@ define(
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return ExampleFormController;
|
export default ExampleFormController;
|
||||||
}
|
|
||||||
);
|
|
@ -1,10 +1,6 @@
|
|||||||
define([
|
import _ from 'lodash';
|
||||||
'lodash'
|
|
||||||
], function (
|
|
||||||
_
|
|
||||||
) {
|
|
||||||
|
|
||||||
var METADATA_BY_TYPE = {
|
var METADATA_BY_TYPE = {
|
||||||
'generator': {
|
'generator': {
|
||||||
values: [
|
values: [
|
||||||
{
|
{
|
||||||
@ -28,6 +24,15 @@ define([
|
|||||||
domain: 2
|
domain: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "cos",
|
||||||
|
name: "Cosine",
|
||||||
|
unit: "deg",
|
||||||
|
formatString: '%0.2f',
|
||||||
|
hints: {
|
||||||
|
domain: 3
|
||||||
|
}
|
||||||
|
},
|
||||||
// Need to enable "LocalTimeSystem" plugin to make use of this
|
// Need to enable "LocalTimeSystem" plugin to make use of this
|
||||||
// {
|
// {
|
||||||
// key: "local",
|
// key: "local",
|
||||||
@ -110,24 +115,22 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function GeneratorMetadataProvider() {
|
function GeneratorMetadataProvider() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
||||||
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type);
|
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type);
|
||||||
};
|
};
|
||||||
|
|
||||||
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
||||||
return Object.assign(
|
return Object.assign(
|
||||||
{},
|
{},
|
||||||
domainObject.telemetry,
|
domainObject.telemetry,
|
||||||
METADATA_BY_TYPE[domainObject.type]
|
METADATA_BY_TYPE[domainObject.type]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return GeneratorMetadataProvider;
|
export default GeneratorMetadataProvider;
|
||||||
|
|
||||||
});
|
|
||||||
|
@ -20,34 +20,52 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
'./WorkerInterface'
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
], function (
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
WorkerInterface
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
var REQUEST_DEFAULTS = {
|
import WorkerInterface from './WorkerInterface';
|
||||||
|
|
||||||
|
var REQUEST_DEFAULTS = {
|
||||||
amplitude: 1,
|
amplitude: 1,
|
||||||
period: 10,
|
period: 10,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
dataRateInHz: 1,
|
dataRateInHz: 1,
|
||||||
randomness: 0,
|
randomness: 0,
|
||||||
phase: 0
|
phase: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
function GeneratorProvider() {
|
function GeneratorProvider() {
|
||||||
this.workerInterface = new WorkerInterface();
|
this.workerInterface = new WorkerInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
GeneratorProvider.prototype.canProvideTelemetry = function (domainObject) {
|
GeneratorProvider.prototype.canProvideTelemetry = function (domainObject) {
|
||||||
return domainObject.type === 'generator';
|
return domainObject.type === 'generator';
|
||||||
};
|
};
|
||||||
|
|
||||||
GeneratorProvider.prototype.supportsRequest =
|
GeneratorProvider.prototype.supportsRequest =
|
||||||
GeneratorProvider.prototype.supportsSubscribe =
|
GeneratorProvider.prototype.supportsSubscribe =
|
||||||
GeneratorProvider.prototype.canProvideTelemetry;
|
GeneratorProvider.prototype.canProvideTelemetry;
|
||||||
|
|
||||||
GeneratorProvider.prototype.makeWorkerRequest = function (domainObject, request) {
|
GeneratorProvider.prototype.makeWorkerRequest = function (domainObject, request) {
|
||||||
var props = [
|
var props = [
|
||||||
'amplitude',
|
'amplitude',
|
||||||
'period',
|
'period',
|
||||||
@ -80,21 +98,20 @@ define([
|
|||||||
workerRequest.name = domainObject.name;
|
workerRequest.name = domainObject.name;
|
||||||
|
|
||||||
return workerRequest;
|
return workerRequest;
|
||||||
};
|
};
|
||||||
|
|
||||||
GeneratorProvider.prototype.request = function (domainObject, request) {
|
GeneratorProvider.prototype.request = function (domainObject, request) {
|
||||||
var workerRequest = this.makeWorkerRequest(domainObject, request);
|
var workerRequest = this.makeWorkerRequest(domainObject, request);
|
||||||
workerRequest.start = request.start;
|
workerRequest.start = request.start;
|
||||||
workerRequest.end = request.end;
|
workerRequest.end = request.end;
|
||||||
|
|
||||||
return this.workerInterface.request(workerRequest);
|
return this.workerInterface.request(workerRequest);
|
||||||
};
|
};
|
||||||
|
|
||||||
GeneratorProvider.prototype.subscribe = function (domainObject, callback) {
|
GeneratorProvider.prototype.subscribe = function (domainObject, callback) {
|
||||||
var workerRequest = this.makeWorkerRequest(domainObject, {});
|
var workerRequest = this.makeWorkerRequest(domainObject, {});
|
||||||
|
|
||||||
return this.workerInterface.subscribe(workerRequest, callback);
|
return this.workerInterface.subscribe(workerRequest, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
return GeneratorProvider;
|
export default GeneratorProvider;
|
||||||
});
|
|
@ -20,13 +20,29 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
], function (
|
var PURPLE = {
|
||||||
|
|
||||||
) {
|
|
||||||
|
|
||||||
var PURPLE = {
|
|
||||||
sin: 2.2,
|
sin: 2.2,
|
||||||
cos: 2.2
|
cos: 2.2
|
||||||
},
|
},
|
||||||
@ -73,15 +89,15 @@ define([
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function SinewaveLimitProvider() {
|
function SinewaveLimitProvider() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SinewaveLimitProvider.prototype.supportsLimits = function (domainObject) {
|
SinewaveLimitProvider.prototype.supportsLimits = function (domainObject) {
|
||||||
return domainObject.type === 'generator';
|
return domainObject.type === 'generator';
|
||||||
};
|
};
|
||||||
|
|
||||||
SinewaveLimitProvider.prototype.getLimitEvaluator = function (domainObject) {
|
SinewaveLimitProvider.prototype.getLimitEvaluator = function (domainObject) {
|
||||||
return {
|
return {
|
||||||
evaluate: function (datum, valueMetadata) {
|
evaluate: function (datum, valueMetadata) {
|
||||||
var range = valueMetadata && valueMetadata.key;
|
var range = valueMetadata && valueMetadata.key;
|
||||||
@ -103,9 +119,9 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
SinewaveLimitProvider.prototype.getLimits = function (domainObject) {
|
SinewaveLimitProvider.prototype.getLimits = function (domainObject) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
limits: function () {
|
limits: function () {
|
||||||
@ -168,7 +184,6 @@ define([
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
return SinewaveLimitProvider;
|
export default SinewaveLimitProvider;
|
||||||
});
|
|
@ -20,29 +20,45 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
], function (
|
function StateGeneratorProvider() {
|
||||||
|
|
||||||
) {
|
}
|
||||||
|
|
||||||
function StateGeneratorProvider() {
|
function pointForTimestamp(timestamp, duration, name) {
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function pointForTimestamp(timestamp, duration, name) {
|
|
||||||
return {
|
return {
|
||||||
name: name,
|
name: name,
|
||||||
utc: Math.floor(timestamp / duration) * duration,
|
utc: Math.floor(timestamp / duration) * duration,
|
||||||
value: Math.floor(timestamp / duration) % 2
|
value: Math.floor(timestamp / duration) % 2
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
StateGeneratorProvider.prototype.supportsSubscribe = function (domainObject) {
|
StateGeneratorProvider.prototype.supportsSubscribe = function (domainObject) {
|
||||||
return domainObject.type === 'example.state-generator';
|
return domainObject.type === 'example.state-generator';
|
||||||
};
|
};
|
||||||
|
|
||||||
StateGeneratorProvider.prototype.subscribe = function (domainObject, callback) {
|
StateGeneratorProvider.prototype.subscribe = function (domainObject, callback) {
|
||||||
var duration = domainObject.telemetry.duration * 1000;
|
var duration = domainObject.telemetry.duration * 1000;
|
||||||
|
|
||||||
var interval = setInterval(function () {
|
var interval = setInterval(function () {
|
||||||
@ -55,15 +71,15 @@ define([
|
|||||||
return function () {
|
return function () {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
StateGeneratorProvider.prototype.supportsRequest = function (domainObject, options) {
|
StateGeneratorProvider.prototype.supportsRequest = function (domainObject, options) {
|
||||||
return domainObject.type === 'example.state-generator';
|
return domainObject.type === 'example.state-generator';
|
||||||
};
|
};
|
||||||
|
|
||||||
StateGeneratorProvider.prototype.request = function (domainObject, options) {
|
StateGeneratorProvider.prototype.request = function (domainObject, options) {
|
||||||
var start = options.start;
|
var start = options.start;
|
||||||
var end = options.end;
|
var end = Math.min(Date.now(), options.end); // no future values
|
||||||
var duration = domainObject.telemetry.duration * 1000;
|
var duration = domainObject.telemetry.duration * 1000;
|
||||||
if (options.strategy === 'latest' || options.size === 1) {
|
if (options.strategy === 'latest' || options.size === 1) {
|
||||||
start = end;
|
start = end;
|
||||||
@ -76,8 +92,6 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Promise.resolve(data);
|
return Promise.resolve(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
return StateGeneratorProvider;
|
export default StateGeneratorProvider;
|
||||||
|
|
||||||
});
|
|
@ -20,35 +20,53 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
'raw-loader!./generatorWorker.js',
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
'uuid'
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
], function (
|
* Administration. All rights reserved.
|
||||||
workerText,
|
*
|
||||||
uuid
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
var workerBlob = new Blob(
|
import workerText from 'raw-loader!./generatorWorker.js';
|
||||||
|
|
||||||
|
import uuid from 'uuid';
|
||||||
|
|
||||||
|
var workerBlob = new Blob(
|
||||||
[workerText],
|
[workerText],
|
||||||
{type: 'application/javascript'}
|
{type: 'application/javascript'}
|
||||||
);
|
);
|
||||||
var workerUrl = URL.createObjectURL(workerBlob);
|
var workerUrl = URL.createObjectURL(workerBlob);
|
||||||
|
|
||||||
function WorkerInterface() {
|
function WorkerInterface() {
|
||||||
this.worker = new Worker(workerUrl);
|
this.worker = new Worker(workerUrl);
|
||||||
this.worker.onmessage = this.onMessage.bind(this);
|
this.worker.onmessage = this.onMessage.bind(this);
|
||||||
this.callbacks = {};
|
this.callbacks = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
WorkerInterface.prototype.onMessage = function (message) {
|
WorkerInterface.prototype.onMessage = function (message) {
|
||||||
message = message.data;
|
message = message.data;
|
||||||
var callback = this.callbacks[message.id];
|
var callback = this.callbacks[message.id];
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback(message);
|
callback(message);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkerInterface.prototype.dispatch = function (request, data, callback) {
|
WorkerInterface.prototype.dispatch = function (request, data, callback) {
|
||||||
var message = {
|
var message = {
|
||||||
request: request,
|
request: request,
|
||||||
data: data,
|
data: data,
|
||||||
@ -62,9 +80,9 @@ define([
|
|||||||
this.worker.postMessage(message);
|
this.worker.postMessage(message);
|
||||||
|
|
||||||
return message.id;
|
return message.id;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkerInterface.prototype.request = function (request) {
|
WorkerInterface.prototype.request = function (request) {
|
||||||
var deferred = {};
|
var deferred = {};
|
||||||
var promise = new Promise(function (resolve, reject) {
|
var promise = new Promise(function (resolve, reject) {
|
||||||
deferred.resolve = resolve;
|
deferred.resolve = resolve;
|
||||||
@ -87,9 +105,9 @@ define([
|
|||||||
messageId = this.dispatch('request', request, callback.bind(this));
|
messageId = this.dispatch('request', request, callback.bind(this));
|
||||||
|
|
||||||
return promise;
|
return promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkerInterface.prototype.subscribe = function (request, cb) {
|
WorkerInterface.prototype.subscribe = function (request, cb) {
|
||||||
function callback(message) {
|
function callback(message) {
|
||||||
cb(message.data);
|
cb(message.data);
|
||||||
}
|
}
|
||||||
@ -102,7 +120,6 @@ define([
|
|||||||
});
|
});
|
||||||
delete this.callbacks[messageId];
|
delete this.callbacks[messageId];
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
return WorkerInterface;
|
export default WorkerInterface;
|
||||||
});
|
|
@ -20,6 +20,28 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
var FIFTEEN_MINUTES = 15 * 60 * 1000;
|
var FIFTEEN_MINUTES = 15 * 60 * 1000;
|
||||||
@ -54,8 +76,21 @@
|
|||||||
var start = Date.now();
|
var start = Date.now();
|
||||||
var step = 1000 / data.dataRateInHz;
|
var step = 1000 / data.dataRateInHz;
|
||||||
var nextStep = start - (start % step) + step;
|
var nextStep = start - (start % step) + step;
|
||||||
|
let work;
|
||||||
|
if (data.spectra) {
|
||||||
|
work = function (now) {
|
||||||
|
while (nextStep < now) {
|
||||||
|
const messageCopy = Object.create(message);
|
||||||
|
message.data.start = nextStep - (60 * 1000);
|
||||||
|
message.data.end = nextStep;
|
||||||
|
onRequest(messageCopy);
|
||||||
|
nextStep += step;
|
||||||
|
}
|
||||||
|
|
||||||
function work(now) {
|
return nextStep;
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
work = function (now) {
|
||||||
while (nextStep < now) {
|
while (nextStep < now) {
|
||||||
self.postMessage({
|
self.postMessage({
|
||||||
id: message.id,
|
id: message.id,
|
||||||
@ -64,6 +99,7 @@
|
|||||||
utc: nextStep,
|
utc: nextStep,
|
||||||
yesterday: nextStep - 60 * 60 * 24 * 1000,
|
yesterday: nextStep - 60 * 60 * 24 * 1000,
|
||||||
sin: sin(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness),
|
sin: sin(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness),
|
||||||
|
wavelength: wavelength(start, nextStep),
|
||||||
cos: cos(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness)
|
cos: cos(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -71,6 +107,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return nextStep;
|
return nextStep;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
subscriptions[message.id] = work;
|
subscriptions[message.id] = work;
|
||||||
@ -111,13 +148,21 @@
|
|||||||
utc: nextStep,
|
utc: nextStep,
|
||||||
yesterday: nextStep - 60 * 60 * 24 * 1000,
|
yesterday: nextStep - 60 * 60 * 24 * 1000,
|
||||||
sin: sin(nextStep, period, amplitude, offset, phase, randomness),
|
sin: sin(nextStep, period, amplitude, offset, phase, randomness),
|
||||||
|
wavelength: wavelength(start, nextStep),
|
||||||
cos: cos(nextStep, period, amplitude, offset, phase, randomness)
|
cos: cos(nextStep, period, amplitude, offset, phase, randomness)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.postMessage({
|
self.postMessage({
|
||||||
id: message.id,
|
id: message.id,
|
||||||
data: data
|
data: request.spectra ? {
|
||||||
|
wavelength: data.map((item) => {
|
||||||
|
return item.wavelength;
|
||||||
|
}),
|
||||||
|
cos: data.map((item) => {
|
||||||
|
return item.cos;
|
||||||
|
})
|
||||||
|
} : data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,6 +176,10 @@
|
|||||||
* Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
* Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function wavelength(start, nextStep) {
|
||||||
|
return (nextStep - start) / 10;
|
||||||
|
}
|
||||||
|
|
||||||
function sendError(error, message) {
|
function sendError(error, message) {
|
||||||
self.postMessage({
|
self.postMessage({
|
||||||
error: error.name + ': ' + error.message,
|
error: error.name + ': ' + error.message,
|
||||||
|
@ -20,19 +20,35 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./GeneratorProvider",
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
"./SinewaveLimitProvider",
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"./StateGeneratorProvider",
|
* Administration. All rights reserved.
|
||||||
"./GeneratorMetadataProvider"
|
*
|
||||||
], function (
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
GeneratorProvider,
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
SinewaveLimitProvider,
|
* You may obtain a copy of the License at
|
||||||
StateGeneratorProvider,
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
GeneratorMetadataProvider
|
*
|
||||||
) {
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return function (openmct) {
|
import GeneratorProvider from './GeneratorProvider';
|
||||||
|
|
||||||
|
import SinewaveLimitProvider from './SinewaveLimitProvider';
|
||||||
|
import StateGeneratorProvider from './StateGeneratorProvider';
|
||||||
|
import GeneratorMetadataProvider from './GeneratorMetadataProvider';
|
||||||
|
|
||||||
|
export default function (openmct) {
|
||||||
|
|
||||||
openmct.types.addType("example.state-generator", {
|
openmct.types.addType("example.state-generator", {
|
||||||
name: "State Generator",
|
name: "State Generator",
|
||||||
@ -149,6 +165,4 @@ define([
|
|||||||
openmct.telemetry.addProvider(new GeneratorProvider());
|
openmct.telemetry.addProvider(new GeneratorProvider());
|
||||||
openmct.telemetry.addProvider(new GeneratorMetadataProvider());
|
openmct.telemetry.addProvider(new GeneratorMetadataProvider());
|
||||||
openmct.telemetry.addProvider(new SinewaveLimitProvider());
|
openmct.telemetry.addProvider(new SinewaveLimitProvider());
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
|
@ -20,14 +20,33 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./src/ExampleIdentityService"
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
], function (
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
ExampleIdentityService
|
* Administration. All rights reserved.
|
||||||
) {
|
*
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
import ExampleIdentityService from './src/ExampleIdentityService';
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/identity",
|
name: "example/identity",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -44,5 +63,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -20,11 +20,9 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
"use strict";
|
||||||
function () {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var DEFAULT_IDENTITY = {
|
var DEFAULT_IDENTITY = {
|
||||||
key: "user",
|
key: "user",
|
||||||
name: "Example User"
|
name: "Example User"
|
||||||
},
|
},
|
||||||
@ -48,7 +46,7 @@ define(
|
|||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example implementation of an identity service. This prompts the
|
* Example implementation of an identity service. This prompts the
|
||||||
* user to enter a name and user ID; in a more realistic
|
* user to enter a name and user ID; in a more realistic
|
||||||
* implementation, this would be read from a server, possibly
|
* implementation, this would be read from a server, possibly
|
||||||
@ -58,37 +56,35 @@ define(
|
|||||||
* @implements {IdentityService}
|
* @implements {IdentityService}
|
||||||
* @memberof platform/identity
|
* @memberof platform/identity
|
||||||
*/
|
*/
|
||||||
function ExampleIdentityProvider(dialogService, $q) {
|
function ExampleIdentityProvider(dialogService, $q) {
|
||||||
this.dialogService = dialogService;
|
this.dialogService = dialogService;
|
||||||
this.$q = $q;
|
this.$q = $q;
|
||||||
|
|
||||||
this.returnUser = this.returnUser.bind(this);
|
this.returnUser = this.returnUser.bind(this);
|
||||||
this.returnUndefined = this.returnUndefined.bind(this);
|
this.returnUndefined = this.returnUndefined.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExampleIdentityProvider.prototype.getUser = function () {
|
ExampleIdentityProvider.prototype.getUser = function () {
|
||||||
if (this.user) {
|
if (this.user) {
|
||||||
return this.$q.when(this.user);
|
return this.$q.when(this.user);
|
||||||
} else {
|
} else {
|
||||||
return this.dialogService.getUserInput(DIALOG_STRUCTURE, DEFAULT_IDENTITY)
|
return this.dialogService.getUserInput(DIALOG_STRUCTURE, DEFAULT_IDENTITY)
|
||||||
.then(this.returnUser, this.returnUndefined);
|
.then(this.returnUser, this.returnUndefined);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ExampleIdentityProvider.prototype.returnUser = function (user) {
|
ExampleIdentityProvider.prototype.returnUser = function (user) {
|
||||||
return this.user = user;
|
return this.user = user;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ExampleIdentityProvider.prototype.returnUndefined = function () {
|
ExampleIdentityProvider.prototype.returnUndefined = function () {
|
||||||
return undefined;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
return ExampleIdentityProvider;
|
export default ExampleIdentityProvider;
|
||||||
}
|
|
||||||
);
|
|
@ -20,14 +20,29 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
], function (
|
const DEFAULT_IMAGE_SAMPLES = [
|
||||||
|
|
||||||
) {
|
|
||||||
function ImageryPlugin() {
|
|
||||||
|
|
||||||
const IMAGE_SAMPLES = [
|
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg",
|
||||||
@ -46,67 +61,15 @@ define([
|
|||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18746.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18746.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
|
||||||
];
|
];
|
||||||
const IMAGE_DELAY = 20000;
|
const DEFAULT_IMAGE_LOAD_DELAY_IN_MILISECONDS = 20000;
|
||||||
|
const MIN_IMAGE_LOAD_DELAY_IN_MILISECONDS = 5000;
|
||||||
|
|
||||||
function pointForTimestamp(timestamp, name) {
|
let openmctInstance;
|
||||||
const url = IMAGE_SAMPLES[Math.floor(timestamp / IMAGE_DELAY) % IMAGE_SAMPLES.length];
|
|
||||||
const urlItems = url.split('/');
|
|
||||||
const imageDownloadName = `example.imagery.${urlItems[urlItems.length - 1]}`;
|
|
||||||
|
|
||||||
return {
|
|
||||||
name,
|
|
||||||
utc: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
|
||||||
local: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
|
||||||
url,
|
|
||||||
imageDownloadName
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
var realtimeProvider = {
|
|
||||||
supportsSubscribe: function (domainObject) {
|
|
||||||
return domainObject.type === 'example.imagery';
|
|
||||||
},
|
|
||||||
subscribe: function (domainObject, callback) {
|
|
||||||
var interval = setInterval(function () {
|
|
||||||
callback(pointForTimestamp(Date.now(), domainObject.name));
|
|
||||||
}, IMAGE_DELAY);
|
|
||||||
|
|
||||||
return function () {
|
|
||||||
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 = Math.min(options.end, Date.now());
|
|
||||||
var data = [];
|
|
||||||
while (start <= end && data.length < IMAGE_DELAY) {
|
|
||||||
data.push(pointForTimestamp(start, domainObject.name));
|
|
||||||
start += IMAGE_DELAY;
|
|
||||||
}
|
|
||||||
|
|
||||||
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)]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
export default function () {
|
||||||
return function install(openmct) {
|
return function install(openmct) {
|
||||||
|
openmctInstance = openmct;
|
||||||
openmct.types.addType('example.imagery', {
|
openmct.types.addType('example.imagery', {
|
||||||
key: 'example.imagery',
|
key: 'example.imagery',
|
||||||
name: 'Example Imagery',
|
name: 'Example Imagery',
|
||||||
@ -114,7 +77,13 @@ define([
|
|||||||
description: 'For development use. Creates example imagery '
|
description: 'For development use. Creates example imagery '
|
||||||
+ 'data that mimics a live imagery stream.',
|
+ 'data that mimics a live imagery stream.',
|
||||||
creatable: true,
|
creatable: true,
|
||||||
initialize: function (object) {
|
initialize: (object) => {
|
||||||
|
object.configuration = {
|
||||||
|
imageLocation: '',
|
||||||
|
imageLoadDelayInMilliSeconds: DEFAULT_IMAGE_LOAD_DELAY_IN_MILISECONDS,
|
||||||
|
imageSamples: []
|
||||||
|
};
|
||||||
|
|
||||||
object.telemetry = {
|
object.telemetry = {
|
||||||
values: [
|
values: [
|
||||||
{
|
{
|
||||||
@ -155,14 +124,137 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
form: [
|
||||||
|
{
|
||||||
|
key: 'imageLocation',
|
||||||
|
name: 'Images url list (comma separated)',
|
||||||
|
control: 'textarea',
|
||||||
|
cssClass: 'l-inline',
|
||||||
|
property: [
|
||||||
|
"configuration",
|
||||||
|
"imageLocation"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'imageLoadDelayInMilliSeconds',
|
||||||
|
name: 'Image load delay (milliseconds)',
|
||||||
|
control: 'numberfield',
|
||||||
|
required: true,
|
||||||
|
cssClass: 'l-inline',
|
||||||
|
property: [
|
||||||
|
"configuration",
|
||||||
|
"imageLoadDelayInMilliSeconds"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
openmct.telemetry.addProvider(realtimeProvider);
|
openmct.telemetry.addProvider(getRealtimeProvider());
|
||||||
openmct.telemetry.addProvider(historicalProvider);
|
openmct.telemetry.addProvider(getHistoricalProvider());
|
||||||
openmct.telemetry.addProvider(ladProvider);
|
openmct.telemetry.addProvider(getLadProvider());
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCompassValues(min, max) {
|
||||||
|
return min + Math.random() * (max - min);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getImageSamples(configuration) {
|
||||||
|
let imageSamples = DEFAULT_IMAGE_SAMPLES;
|
||||||
|
|
||||||
|
if (configuration.imageLocation && configuration.imageLocation.length) {
|
||||||
|
imageSamples = getImageUrlListFromConfig(configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ImageryPlugin;
|
return imageSamples;
|
||||||
});
|
}
|
||||||
|
|
||||||
|
function getImageUrlListFromConfig(configuration) {
|
||||||
|
return configuration.imageLocation.split(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getImageLoadDelay(domainObject) {
|
||||||
|
const imageLoadDelay = domainObject.configuration.imageLoadDelayInMilliSeconds;
|
||||||
|
if (!imageLoadDelay) {
|
||||||
|
openmctInstance.objects.mutate(domainObject, 'configuration.imageLoadDelayInMilliSeconds', DEFAULT_IMAGE_LOAD_DELAY_IN_MILISECONDS);
|
||||||
|
|
||||||
|
return DEFAULT_IMAGE_LOAD_DELAY_IN_MILISECONDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (imageLoadDelay < MIN_IMAGE_LOAD_DELAY_IN_MILISECONDS) {
|
||||||
|
openmctInstance.objects.mutate(domainObject, 'configuration.imageLoadDelayInMilliSeconds', MIN_IMAGE_LOAD_DELAY_IN_MILISECONDS);
|
||||||
|
|
||||||
|
return MIN_IMAGE_LOAD_DELAY_IN_MILISECONDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
return imageLoadDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRealtimeProvider() {
|
||||||
|
return {
|
||||||
|
supportsSubscribe: domainObject => domainObject.type === 'example.imagery',
|
||||||
|
subscribe: (domainObject, callback) => {
|
||||||
|
const delay = getImageLoadDelay(domainObject);
|
||||||
|
const interval = setInterval(() => {
|
||||||
|
callback(pointForTimestamp(Date.now(), domainObject.name, getImageSamples(domainObject.configuration), delay));
|
||||||
|
}, delay);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
clearInterval(interval);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHistoricalProvider() {
|
||||||
|
return {
|
||||||
|
supportsRequest: (domainObject, options) => {
|
||||||
|
return domainObject.type === 'example.imagery'
|
||||||
|
&& options.strategy !== 'latest';
|
||||||
|
},
|
||||||
|
request: (domainObject, options) => {
|
||||||
|
const delay = getImageLoadDelay(domainObject);
|
||||||
|
let start = options.start;
|
||||||
|
const end = Math.min(options.end, Date.now());
|
||||||
|
const data = [];
|
||||||
|
while (start <= end && data.length < delay) {
|
||||||
|
data.push(pointForTimestamp(start, domainObject.name, getImageSamples(domainObject.configuration), delay));
|
||||||
|
start += delay;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Promise.resolve(data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLadProvider() {
|
||||||
|
return {
|
||||||
|
supportsRequest: (domainObject, options) => {
|
||||||
|
return domainObject.type === 'example.imagery'
|
||||||
|
&& options.strategy === 'latest';
|
||||||
|
},
|
||||||
|
request: (domainObject, options) => {
|
||||||
|
const delay = getImageLoadDelay(domainObject);
|
||||||
|
|
||||||
|
return Promise.resolve([pointForTimestamp(Date.now(), domainObject.name, delay)]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function pointForTimestamp(timestamp, name, imageSamples, delay) {
|
||||||
|
const url = imageSamples[Math.floor(timestamp / delay) % imageSamples.length];
|
||||||
|
const urlItems = url.split('/');
|
||||||
|
const imageDownloadName = `example.imagery.${urlItems[urlItems.length - 1]}`;
|
||||||
|
|
||||||
|
return {
|
||||||
|
name,
|
||||||
|
utc: Math.floor(timestamp / delay) * delay,
|
||||||
|
local: Math.floor(timestamp / delay) * delay,
|
||||||
|
url,
|
||||||
|
sunOrientation: getCompassValues(0, 360),
|
||||||
|
cameraPan: getCompassValues(0, 360),
|
||||||
|
heading: getCompassValues(0, 360),
|
||||||
|
imageDownloadName
|
||||||
|
};
|
||||||
|
}
|
@ -20,10 +20,31 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
/*****************************************************************************
|
||||||
"use strict";
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/mobile",
|
name: "example/mobile",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Mobile",
|
"name": "Mobile",
|
||||||
@ -37,5 +58,4 @@ define([], function () {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -20,18 +20,35 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./src/RemsTelemetryServerAdapter",
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
"./src/RemsTelemetryModelProvider",
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"./src/RemsTelemetryProvider"
|
* Administration. All rights reserved.
|
||||||
], function (
|
*
|
||||||
RemsTelemetryServerAdapter,
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
RemsTelemetryModelProvider,
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
RemsTelemetryProvider
|
* You may obtain a copy of the License at
|
||||||
) {
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
"use strict";
|
*
|
||||||
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
import RemsTelemetryServerAdapter from './src/RemsTelemetryServerAdapter';
|
||||||
|
|
||||||
|
import RemsTelemetryModelProvider from './src/RemsTelemetryModelProvider';
|
||||||
|
import RemsTelemetryProvider from './src/RemsTelemetryProvider';
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/msl",
|
name: "example/msl",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Mars Science Laboratory Data Adapter",
|
"name": "Mars Science Laboratory Data Adapter",
|
||||||
@ -110,6 +127,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
|
@ -20,19 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
export default {
|
||||||
[],
|
|
||||||
/**
|
|
||||||
* 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",
|
"name": "Mars Science Laboratory",
|
||||||
"identifier": "msl",
|
"identifier": "msl",
|
||||||
"instruments": [
|
"instruments": [
|
||||||
@ -73,6 +61,4 @@ define(
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
|
||||||
);
|
|
@ -20,18 +20,16 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
"use strict";
|
||||||
function () {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var PREFIX = "msl_tlm:",
|
var PREFIX = "msl_tlm:",
|
||||||
FORMAT_MAPPINGS = {
|
FORMAT_MAPPINGS = {
|
||||||
float: "number",
|
float: "number",
|
||||||
integer: "number",
|
integer: "number",
|
||||||
string: "string"
|
string: "string"
|
||||||
};
|
};
|
||||||
|
|
||||||
function RemsTelemetryModelProvider(adapter) {
|
function RemsTelemetryModelProvider(adapter) {
|
||||||
|
|
||||||
function isRelevant(id) {
|
function isRelevant(id) {
|
||||||
return id.indexOf(PREFIX) === 0;
|
return id.indexOf(PREFIX) === 0;
|
||||||
@ -89,8 +87,6 @@ define(
|
|||||||
return ids.some(isRelevant) ? buildTaxonomy(adapter.dictionary) : {};
|
return ids.some(isRelevant) ? buildTaxonomy(adapter.dictionary) : {};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return RemsTelemetryModelProvider;
|
export default RemsTelemetryModelProvider;
|
||||||
}
|
|
||||||
);
|
|
@ -19,19 +19,39 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
define (
|
/*****************************************************************************
|
||||||
['./RemsTelemetrySeries'],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function (RemsTelemetrySeries) {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
import RemsTelemetrySeries from './RemsTelemetrySeries';
|
||||||
|
|
||||||
var SOURCE = "rems.source";
|
"use strict";
|
||||||
|
|
||||||
function RemsTelemetryProvider(adapter, $q) {
|
var SOURCE = "rems.source";
|
||||||
|
|
||||||
|
function RemsTelemetryProvider(adapter, $q) {
|
||||||
this.adapter = adapter;
|
this.adapter = adapter;
|
||||||
this.$q = $q;
|
this.$q = $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve telemetry from this telemetry source.
|
* Retrieve telemetry from this telemetry source.
|
||||||
* @memberOf example/msl
|
* @memberOf example/msl
|
||||||
* @param {Array<TelemetryRequest>} requests An array of all request
|
* @param {Array<TelemetryRequest>} requests An array of all request
|
||||||
@ -40,7 +60,7 @@ define (
|
|||||||
* @returns {Promise} A {@link Promise} resolved with a {@link RemsTelemetrySeries}
|
* @returns {Promise} A {@link Promise} resolved with a {@link RemsTelemetrySeries}
|
||||||
* object that wraps the telemetry returned from the telemetry source.
|
* object that wraps the telemetry returned from the telemetry source.
|
||||||
*/
|
*/
|
||||||
RemsTelemetryProvider.prototype.requestTelemetry = function (requests) {
|
RemsTelemetryProvider.prototype.requestTelemetry = function (requests) {
|
||||||
var packaged = {},
|
var packaged = {},
|
||||||
relevantReqs,
|
relevantReqs,
|
||||||
adapter = this.adapter;
|
adapter = this.adapter;
|
||||||
@ -65,19 +85,17 @@ define (
|
|||||||
.then(function () {
|
.then(function () {
|
||||||
return packaged;
|
return packaged;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This data source does not support real-time subscriptions
|
* This data source does not support real-time subscriptions
|
||||||
*/
|
*/
|
||||||
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
|
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
|
||||||
return function () {};
|
return function () {};
|
||||||
};
|
};
|
||||||
|
|
||||||
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
|
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
|
||||||
return function () {};
|
return function () {};
|
||||||
};
|
};
|
||||||
|
|
||||||
return RemsTelemetryProvider;
|
export default RemsTelemetryProvider;
|
||||||
}
|
|
||||||
);
|
|
@ -19,11 +19,9 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
define(
|
"use strict";
|
||||||
function () {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} RemsTelemetryValue
|
* @typedef {Object} RemsTelemetryValue
|
||||||
* @memberOf example/msl
|
* @memberOf example/msl
|
||||||
* @property {number} date The date/time of the telemetry value. Constitutes the domain value of this value pair
|
* @property {number} date The date/time of the telemetry value. Constitutes the domain value of this value pair
|
||||||
@ -32,7 +30,7 @@ define(
|
|||||||
* temperature, air pressure, etc.)
|
* temperature, air pressure, etc.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A representation of a collection of telemetry data. The REMS
|
* A representation of a collection of telemetry data. The REMS
|
||||||
* telemetry data is time ordered, with the 'domain' value
|
* telemetry data is time ordered, with the 'domain' value
|
||||||
* constituting the time stamp of each data value and the
|
* constituting the time stamp of each data value and the
|
||||||
@ -45,40 +43,38 @@ define(
|
|||||||
* @param {Array<RemsTelemetryValue>} data An array of telemetry values
|
* @param {Array<RemsTelemetryValue>} data An array of telemetry values
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function RemsTelemetrySeries(data) {
|
function RemsTelemetrySeries(data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {number} A count of the number of data values available in
|
* @returns {number} A count of the number of data values available in
|
||||||
* this series
|
* this series
|
||||||
*/
|
*/
|
||||||
RemsTelemetrySeries.prototype.getPointCount = function () {
|
RemsTelemetrySeries.prototype.getPointCount = function () {
|
||||||
return this.data.length;
|
return this.data.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The domain value at the given index. The Rems telemetry data is
|
* The domain value at the given index. The Rems telemetry data is
|
||||||
* time ordered, so the domain value is the time stamp of each data
|
* time ordered, so the domain value is the time stamp of each data
|
||||||
* value.
|
* value.
|
||||||
* @param index
|
* @param index
|
||||||
* @returns {number} the time value in ms since 1 January 1970
|
* @returns {number} the time value in ms since 1 January 1970
|
||||||
*/
|
*/
|
||||||
RemsTelemetrySeries.prototype.getDomainValue = function (index) {
|
RemsTelemetrySeries.prototype.getDomainValue = function (index) {
|
||||||
return this.data[index].date;
|
return this.data[index].date;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The range value of the REMS data set is the value of the thing
|
* The range value of the REMS data set is the value of the thing
|
||||||
* being measured, be it temperature, air pressure, etc.
|
* being measured, be it temperature, air pressure, etc.
|
||||||
* @param index The datum in the data series to return the range
|
* @param index The datum in the data series to return the range
|
||||||
* value of.
|
* value of.
|
||||||
* @returns {number} A floating point number
|
* @returns {number} A floating point number
|
||||||
*/
|
*/
|
||||||
RemsTelemetrySeries.prototype.getRangeValue = function (index) {
|
RemsTelemetrySeries.prototype.getRangeValue = function (index) {
|
||||||
return this.data[index].value;
|
return this.data[index].value;
|
||||||
};
|
};
|
||||||
|
|
||||||
return RemsTelemetrySeries;
|
export default RemsTelemetrySeries;
|
||||||
}
|
|
||||||
);
|
|
@ -21,18 +21,38 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*jslint es5: true */
|
/*jslint es5: true */
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
"./MSLDataDictionary",
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"module"
|
* Administration. All rights reserved.
|
||||||
],
|
*
|
||||||
function (MSLDataDictionary, module) {
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
"use strict";
|
* "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.
|
||||||
|
*****************************************************************************/
|
||||||
|
/*jslint es5: true */
|
||||||
|
|
||||||
var TERRESTRIAL_DATE = "terrestrial_date",
|
import MSLDataDictionary from './MSLDataDictionary';
|
||||||
|
|
||||||
|
import module from 'module';
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var TERRESTRIAL_DATE = "terrestrial_date",
|
||||||
LOCAL_DATA = "../data/rems.json";
|
LOCAL_DATA = "../data/rems.json";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches historical data from the REMS instrument on the Curiosity
|
* Fetches historical data from the REMS instrument on the Curiosity
|
||||||
* Rover.
|
* Rover.
|
||||||
* @memberOf example/msl
|
* @memberOf example/msl
|
||||||
@ -41,7 +61,7 @@ define(
|
|||||||
* @param REMS_WS_URL The location of the REMS telemetry data.
|
* @param REMS_WS_URL The location of the REMS telemetry data.
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function RemsTelemetryServerAdapter($http, $log, REMS_WS_URL) {
|
function RemsTelemetryServerAdapter($http, $log, REMS_WS_URL) {
|
||||||
this.localDataURI = module.uri.substring(0, module.uri.lastIndexOf('/') + 1) + LOCAL_DATA;
|
this.localDataURI = module.uri.substring(0, module.uri.lastIndexOf('/') + 1) + LOCAL_DATA;
|
||||||
this.REMS_WS_URL = REMS_WS_URL;
|
this.REMS_WS_URL = REMS_WS_URL;
|
||||||
this.$http = $http;
|
this.$http = $http;
|
||||||
@ -54,20 +74,20 @@ define(
|
|||||||
return pascals / 100;
|
return pascals / 100;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The data dictionary for this data source.
|
* The data dictionary for this data source.
|
||||||
* @type {MSLDataDictionary}
|
* @type {MSLDataDictionary}
|
||||||
*/
|
*/
|
||||||
RemsTelemetryServerAdapter.prototype.dictionary = MSLDataDictionary;
|
RemsTelemetryServerAdapter.prototype.dictionary = MSLDataDictionary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches historical data from source, and associates it with the
|
* Fetches historical data from source, and associates it with the
|
||||||
* given request ID.
|
* given request ID.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
RemsTelemetryServerAdapter.prototype.requestHistory = function (request) {
|
RemsTelemetryServerAdapter.prototype.requestHistory = function (request) {
|
||||||
var self = this,
|
var self = this,
|
||||||
id = request.key;
|
id = request.key;
|
||||||
|
|
||||||
@ -125,9 +145,9 @@ define(
|
|||||||
.then(processResponse)
|
.then(processResponse)
|
||||||
.then(filterResults)
|
.then(filterResults)
|
||||||
.then(packageAndResolve);
|
.then(packageAndResolve);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests historical telemetry for the named data attribute. In
|
* Requests historical telemetry for the named data attribute. In
|
||||||
* the case of REMS, this data source exposes multiple different
|
* the case of REMS, this data source exposes multiple different
|
||||||
* data variables from the REMS instrument, including temperature
|
* data variables from the REMS instrument, including temperature
|
||||||
@ -135,11 +155,8 @@ define(
|
|||||||
* @param id The telemetry data point key to be queried.
|
* @param id The telemetry data point key to be queried.
|
||||||
* @returns {Promise | Array<RemsTelemetryValue>} that resolves with an Array of {@link RemsTelemetryValue} objects for the request data key.
|
* @returns {Promise | Array<RemsTelemetryValue>} that resolves with an Array of {@link RemsTelemetryValue} objects for the request data key.
|
||||||
*/
|
*/
|
||||||
RemsTelemetryServerAdapter.prototype.history = function (request) {
|
RemsTelemetryServerAdapter.prototype.history = function (request) {
|
||||||
return this.requestHistory(request);
|
return this.requestHistory(request);
|
||||||
};
|
};
|
||||||
|
|
||||||
return RemsTelemetryServerAdapter;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
export default RemsTelemetryServerAdapter;
|
@ -20,24 +20,38 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./src/DialogLaunchController",
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
"./src/NotificationLaunchController",
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"./src/DialogLaunchIndicator",
|
* Administration. All rights reserved.
|
||||||
"./src/NotificationLaunchIndicator",
|
*
|
||||||
"./res/dialog-launch.html",
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
"./res/notification-launch.html"
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
], function (
|
* You may obtain a copy of the License at
|
||||||
DialogLaunchController,
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
NotificationLaunchController,
|
*
|
||||||
DialogLaunchIndicator,
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
NotificationLaunchIndicator,
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
DialogLaunch,
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
NotificationLaunch
|
* License for the specific language governing permissions and limitations
|
||||||
) {
|
* under the License.
|
||||||
"use strict";
|
*
|
||||||
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
import DialogLaunchController from './src/DialogLaunchController';
|
||||||
|
|
||||||
|
import NotificationLaunchController from './src/NotificationLaunchController';
|
||||||
|
import DialogLaunchIndicator from './src/DialogLaunchIndicator';
|
||||||
|
import NotificationLaunchIndicator from './src/NotificationLaunchIndicator';
|
||||||
|
import DialogLaunch from './res/dialog-launch.html';
|
||||||
|
import NotificationLaunch from './res/notification-launch.html';
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/notifications",
|
name: "example/notifications",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -86,5 +100,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -20,12 +20,31 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
* A controller for the dialog launch view. This view allows manual
|
* A controller for the dialog launch view. This view allows manual
|
||||||
* launching of dialogs for demonstration and testing purposes. It
|
* launching of dialogs for demonstration and testing purposes. It
|
||||||
* also demonstrates the use of the DialogService.
|
* also demonstrates the use of the DialogService.
|
||||||
@ -36,7 +55,7 @@ define(
|
|||||||
* @param notificationService
|
* @param notificationService
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function DialogLaunchController($scope, $timeout, $log, dialogService, notificationService) {
|
function DialogLaunchController($scope, $timeout, $log, dialogService, notificationService) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Demonstrates launching a progress dialog and updating it
|
Demonstrates launching a progress dialog and updating it
|
||||||
@ -150,8 +169,6 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return DialogLaunchController;
|
export default DialogLaunchController;
|
||||||
}
|
|
||||||
);
|
|
@ -20,36 +20,53 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
* A tool for manually invoking dialogs. When included this
|
* A tool for manually invoking dialogs. When included this
|
||||||
* indicator will allow for dialogs of different types to be
|
* indicator will allow for dialogs of different types to be
|
||||||
* 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.getGlyphClass = function () {
|
DialogLaunchIndicator.prototype.getGlyphClass = function () {
|
||||||
return 'ok';
|
return 'ok';
|
||||||
};
|
};
|
||||||
|
|
||||||
DialogLaunchIndicator.prototype.getText = function () {
|
DialogLaunchIndicator.prototype.getText = function () {
|
||||||
return "Launch test dialog";
|
return "Launch test dialog";
|
||||||
};
|
};
|
||||||
|
|
||||||
DialogLaunchIndicator.prototype.getDescription = function () {
|
DialogLaunchIndicator.prototype.getDescription = function () {
|
||||||
return "Launch test dialog";
|
return "Launch test dialog";
|
||||||
};
|
};
|
||||||
|
|
||||||
return DialogLaunchIndicator;
|
export default DialogLaunchIndicator;
|
||||||
}
|
|
||||||
);
|
|
@ -20,12 +20,31 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
* Allows launching of notification messages for the purposes of
|
* Allows launching of notification messages for the purposes of
|
||||||
* demonstration and testing. Also demonstrates use of
|
* demonstration and testing. Also demonstrates use of
|
||||||
* the NotificationService. Notifications are non-blocking messages that
|
* the NotificationService. Notifications are non-blocking messages that
|
||||||
@ -38,7 +57,7 @@ define(
|
|||||||
* @param notificationService
|
* @param notificationService
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function NotificationLaunchController($scope, $timeout, $log, notificationService) {
|
function NotificationLaunchController($scope, $timeout, $log, notificationService) {
|
||||||
var messageCounter = 1;
|
var messageCounter = 1;
|
||||||
|
|
||||||
function getExampleActionText() {
|
function getExampleActionText() {
|
||||||
@ -119,8 +138,6 @@ define(
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NotificationLaunchController;
|
export default NotificationLaunchController;
|
||||||
}
|
|
||||||
);
|
|
@ -20,36 +20,53 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
* A tool for manually invoking notifications. When included this
|
* A tool for manually invoking notifications. When included this
|
||||||
* indicator will allow for notifications of different types to be
|
* indicator will allow for notifications of different types to be
|
||||||
* launched for demonstration and testing purposes.
|
* launched for demonstration and testing purposes.
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function NotificationLaunchIndicator() {
|
function NotificationLaunchIndicator() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NotificationLaunchIndicator.template = 'notificationLaunchTemplate';
|
NotificationLaunchIndicator.template = 'notificationLaunchTemplate';
|
||||||
|
|
||||||
NotificationLaunchIndicator.prototype.getGlyphClass = function () {
|
NotificationLaunchIndicator.prototype.getGlyphClass = function () {
|
||||||
return 'ok';
|
return 'ok';
|
||||||
};
|
};
|
||||||
|
|
||||||
NotificationLaunchIndicator.prototype.getText = function () {
|
NotificationLaunchIndicator.prototype.getText = function () {
|
||||||
return "Launch notification";
|
return "Launch notification";
|
||||||
};
|
};
|
||||||
|
|
||||||
NotificationLaunchIndicator.prototype.getDescription = function () {
|
NotificationLaunchIndicator.prototype.getDescription = function () {
|
||||||
return "Launch notification";
|
return "Launch notification";
|
||||||
};
|
};
|
||||||
|
|
||||||
return NotificationLaunchIndicator;
|
export default NotificationLaunchIndicator;
|
||||||
}
|
|
||||||
);
|
|
@ -20,14 +20,33 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./src/BrowserPersistenceProvider"
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
], function (
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
BrowserPersistenceProvider
|
* Administration. All rights reserved.
|
||||||
) {
|
*
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
import BrowserPersistenceProvider from './src/BrowserPersistenceProvider';
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/persistence",
|
name: "example/persistence",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -50,5 +69,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -24,12 +24,35 @@
|
|||||||
* Stubbed implementation of a persistence provider,
|
* Stubbed implementation of a persistence provider,
|
||||||
* to permit objects to be created, saved, etc.
|
* to permit objects to be created, saved, etc.
|
||||||
*/
|
*/
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
'use strict';
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
function BrowserPersistenceProvider($q, SPACE) {
|
/**
|
||||||
|
* Stubbed implementation of a persistence provider,
|
||||||
|
* to permit objects to be created, saved, etc.
|
||||||
|
*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function BrowserPersistenceProvider($q, SPACE) {
|
||||||
var spaces = SPACE ? [SPACE] : [],
|
var spaces = SPACE ? [SPACE] : [],
|
||||||
caches = {},
|
caches = {},
|
||||||
promises = {
|
promises = {
|
||||||
@ -95,8 +118,6 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return BrowserPersistenceProvider;
|
export default BrowserPersistenceProvider;
|
||||||
}
|
|
||||||
);
|
|
@ -20,14 +20,33 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./src/ExamplePolicy"
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
], function (
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
ExamplePolicy
|
* Administration. All rights reserved.
|
||||||
) {
|
*
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
import ExamplePolicy from './src/ExamplePolicy';
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/policy",
|
name: "example/policy",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Example Policy",
|
"name": "Example Policy",
|
||||||
@ -41,5 +60,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -20,12 +20,31 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
function ExamplePolicy() {
|
"use strict";
|
||||||
|
|
||||||
|
function ExamplePolicy() {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Disallow the Remove action on objects whose name contains
|
* Disallow the Remove action on objects whose name contains
|
||||||
@ -40,8 +59,6 @@ define(
|
|||||||
return metadata.key !== 'remove' || name.indexOf('foo') < 0;
|
return metadata.key !== 'remove' || name.indexOf('foo') < 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return ExamplePolicy;
|
export default ExamplePolicy;
|
||||||
}
|
|
||||||
);
|
|
@ -20,16 +20,34 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./src/WatchIndicator",
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
"./src/DigestIndicator"
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
], function (
|
* Administration. All rights reserved.
|
||||||
WatchIndicator,
|
*
|
||||||
DigestIndicator
|
* 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.
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
import WatchIndicator from './src/WatchIndicator';
|
||||||
|
|
||||||
|
import DigestIndicator from './src/DigestIndicator';
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/profiling",
|
name: "example/profiling",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -51,5 +69,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -20,19 +20,38 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
* Displays the number of digests that have occurred since the
|
* Displays the number of digests that have occurred since the
|
||||||
* indicator was first instantiated.
|
* indicator was first instantiated.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param $interval Angular's $interval
|
* @param $interval Angular's $interval
|
||||||
* @implements {Indicator}
|
* @implements {Indicator}
|
||||||
*/
|
*/
|
||||||
function DigestIndicator($interval, $rootScope) {
|
function DigestIndicator($interval, $rootScope) {
|
||||||
var digests = 0,
|
var digests = 0,
|
||||||
displayed = 0,
|
displayed = 0,
|
||||||
start = Date.now();
|
start = Date.now();
|
||||||
@ -74,9 +93,6 @@ define(
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return DigestIndicator;
|
export default DigestIndicator;
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
@ -20,17 +20,36 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
* Updates a count of currently-active Angular watches.
|
* Updates a count of currently-active Angular watches.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param $interval Angular's $interval
|
* @param $interval Angular's $interval
|
||||||
*/
|
*/
|
||||||
function WatchIndicator($interval, $rootScope) {
|
function WatchIndicator($interval, $rootScope) {
|
||||||
var watches = 0;
|
var watches = 0;
|
||||||
|
|
||||||
function count(scope) {
|
function count(scope) {
|
||||||
@ -78,9 +97,6 @@ define(
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return WatchIndicator;
|
export default WatchIndicator;
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
@ -20,14 +20,33 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./src/ScratchPersistenceProvider"
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
], function (
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
ScratchPersistenceProvider
|
* Administration. All rights reserved.
|
||||||
) {
|
*
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
return {
|
import ScratchPersistenceProvider from './src/ScratchPersistenceProvider';
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "example/scratchpad",
|
name: "example/scratchpad",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -59,5 +78,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -20,12 +20,31 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
'use strict';
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
* The ScratchPersistenceProvider keeps JSON documents in memory
|
* The ScratchPersistenceProvider keeps JSON documents in memory
|
||||||
* and provides a persistence interface, but changes are lost on reload.
|
* and provides a persistence interface, but changes are lost on reload.
|
||||||
* @memberof example/scratchpad
|
* @memberof example/scratchpad
|
||||||
@ -33,47 +52,45 @@ define(
|
|||||||
* @implements {PersistenceService}
|
* @implements {PersistenceService}
|
||||||
* @param q Angular's $q, for promises
|
* @param q Angular's $q, for promises
|
||||||
*/
|
*/
|
||||||
function ScratchPersistenceProvider($q) {
|
function ScratchPersistenceProvider($q) {
|
||||||
this.$q = $q;
|
this.$q = $q;
|
||||||
this.table = {};
|
this.table = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
ScratchPersistenceProvider.prototype.listSpaces = function () {
|
ScratchPersistenceProvider.prototype.listSpaces = function () {
|
||||||
return this.$q.when(['scratch']);
|
return this.$q.when(['scratch']);
|
||||||
};
|
};
|
||||||
|
|
||||||
ScratchPersistenceProvider.prototype.listObjects = function (space) {
|
ScratchPersistenceProvider.prototype.listObjects = function (space) {
|
||||||
return this.$q.when(
|
return this.$q.when(
|
||||||
space === 'scratch' ? Object.keys(this.table) : []
|
space === 'scratch' ? Object.keys(this.table) : []
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
ScratchPersistenceProvider.prototype.createObject = function (space, key, value) {
|
ScratchPersistenceProvider.prototype.createObject = function (space, key, value) {
|
||||||
if (space === 'scratch') {
|
if (space === 'scratch') {
|
||||||
this.table[key] = JSON.stringify(value);
|
this.table[key] = JSON.stringify(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$q.when(space === 'scratch');
|
return this.$q.when(space === 'scratch');
|
||||||
};
|
};
|
||||||
|
|
||||||
ScratchPersistenceProvider.prototype.readObject = function (space, key) {
|
ScratchPersistenceProvider.prototype.readObject = function (space, key) {
|
||||||
return this.$q.when(
|
return this.$q.when(
|
||||||
(space === 'scratch' && this.table[key])
|
(space === 'scratch' && this.table[key])
|
||||||
? JSON.parse(this.table[key]) : undefined
|
? JSON.parse(this.table[key]) : undefined
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
ScratchPersistenceProvider.prototype.deleteObject = function (space, key, value) {
|
ScratchPersistenceProvider.prototype.deleteObject = function (space, key, value) {
|
||||||
if (space === 'scratch') {
|
if (space === 'scratch') {
|
||||||
delete this.table[key];
|
delete this.table[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$q.when(space === 'scratch');
|
return this.$q.when(space === 'scratch');
|
||||||
};
|
};
|
||||||
|
|
||||||
ScratchPersistenceProvider.prototype.updateObject =
|
ScratchPersistenceProvider.prototype.updateObject =
|
||||||
ScratchPersistenceProvider.prototype.createObject;
|
ScratchPersistenceProvider.prototype.createObject;
|
||||||
|
|
||||||
return ScratchPersistenceProvider;
|
export default ScratchPersistenceProvider;
|
||||||
}
|
|
||||||
);
|
|
@ -1,4 +1,4 @@
|
|||||||
import Vue from 'Vue';
|
import Vue from 'vue';
|
||||||
import HelloWorld from './HelloWorld.vue';
|
import HelloWorld from './HelloWorld.vue';
|
||||||
|
|
||||||
function SimpleVuePlugin() {
|
function SimpleVuePlugin() {
|
||||||
|
@ -1,27 +1,15 @@
|
|||||||
define([
|
import ExampleStyleGuideModelProvider from './src/ExampleStyleGuideModelProvider';
|
||||||
"./src/ExampleStyleGuideModelProvider",
|
import MCTExample from './src/MCTExample';
|
||||||
"./src/MCTExample",
|
import introTemplate from './res/templates/intro.html';
|
||||||
"./res/templates/intro.html",
|
import standardsTemplate from './res/templates/standards.html';
|
||||||
"./res/templates/standards.html",
|
import colorsTemplate from './res/templates/colors.html';
|
||||||
"./res/templates/colors.html",
|
import statusTemplate from './res/templates/status.html';
|
||||||
"./res/templates/status.html",
|
import glyphsTemplate from './res/templates/glyphs.html';
|
||||||
"./res/templates/glyphs.html",
|
import controlsTemplate from './res/templates/controls.html';
|
||||||
"./res/templates/controls.html",
|
import inputTemplate from './res/templates/input.html';
|
||||||
"./res/templates/input.html",
|
import menusTemplate from './res/templates/menus.html';
|
||||||
"./res/templates/menus.html"
|
|
||||||
], function (
|
export default {
|
||||||
ExampleStyleGuideModelProvider,
|
|
||||||
MCTExample,
|
|
||||||
introTemplate,
|
|
||||||
standardsTemplate,
|
|
||||||
colorsTemplate,
|
|
||||||
statusTemplate,
|
|
||||||
glyphsTemplate,
|
|
||||||
controlsTemplate,
|
|
||||||
inputTemplate,
|
|
||||||
menusTemplate
|
|
||||||
) {
|
|
||||||
return {
|
|
||||||
name: "example/styleguide",
|
name: "example/styleguide",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Open MCT Style Guide",
|
"name": "Open MCT Style Guide",
|
||||||
@ -184,5 +172,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
@ -152,7 +152,7 @@
|
|||||||
<h2>How to Use Glyphs</h2>
|
<h2>How to Use Glyphs</h2>
|
||||||
<div class="cols cols1-1">
|
<div class="cols cols1-1">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<p>The easiest way to use a glyph is to include its CSS class in an element. The CSS adds a psuedo <code>:before</code> HTML element to whatever element it's attached to that makes proper use of the symbols font.</p>
|
<p>The easiest way to use a glyph is to include its CSS class in an element. The CSS adds a pseudo <code>:before</code> HTML element to whatever element it's attached to that makes proper use of the symbols font.</p>
|
||||||
<p>Alternately, you can use the <code>.ui-symbol</code> class in an object that contains encoded HTML entities. This method is only recommended if you cannot use the aforementioned CSS class approach.</p>
|
<p>Alternately, you can use the <code>.ui-symbol</code> class in an object that contains encoded HTML entities. This method is only recommended if you cannot use the aforementioned CSS class approach.</p>
|
||||||
</div>
|
</div>
|
||||||
<mct-example><a class="s-button icon-gear" title="Settings"></a>
|
<mct-example><a class="s-button icon-gear" title="Settings"></a>
|
||||||
|
@ -20,12 +20,31 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2016, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"use strict";
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
function ExampleStyleGuideModelProvider($q) {
|
"use strict";
|
||||||
|
|
||||||
|
function ExampleStyleGuideModelProvider($q) {
|
||||||
var pages = {};
|
var pages = {};
|
||||||
|
|
||||||
// Add pages
|
// Add pages
|
||||||
@ -75,8 +94,6 @@ define(
|
|||||||
return $q.when(pages);
|
return $q.when(pages);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return ExampleStyleGuideModelProvider;
|
export default ExampleStyleGuideModelProvider;
|
||||||
}
|
|
||||||
);
|
|
@ -1,10 +1,6 @@
|
|||||||
define([
|
import MCTExampleTemplate from '../res/templates/mct-example.html';
|
||||||
'../res/templates/mct-example.html'
|
|
||||||
], function (
|
|
||||||
MCTExampleTemplate
|
|
||||||
) {
|
|
||||||
|
|
||||||
function MCTExample() {
|
function MCTExample() {
|
||||||
function link($scope, $element, $attrs, controller, $transclude) {
|
function link($scope, $element, $attrs, controller, $transclude) {
|
||||||
var codeEl = $element.find('pre');
|
var codeEl = $element.find('pre');
|
||||||
var exampleEl = $element.find('div');
|
var exampleEl = $element.find('div');
|
||||||
@ -24,7 +20,6 @@ define([
|
|||||||
link: link,
|
link: link,
|
||||||
replace: true
|
replace: true
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return MCTExample;
|
export default MCTExample;
|
||||||
});
|
|
||||||
|
@ -82,12 +82,14 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
openmct.install(openmct.plugins.LocalStorage());
|
openmct.install(openmct.plugins.LocalStorage());
|
||||||
|
|
||||||
openmct.install(openmct.plugins.Espresso());
|
openmct.install(openmct.plugins.Espresso());
|
||||||
openmct.install(openmct.plugins.MyItems());
|
openmct.install(openmct.plugins.MyItems());
|
||||||
openmct.install(openmct.plugins.Generator());
|
openmct.install(openmct.plugins.Generator());
|
||||||
openmct.install(openmct.plugins.ExampleImagery());
|
openmct.install(openmct.plugins.ExampleImagery());
|
||||||
openmct.install(openmct.plugins.PlanLayout());
|
openmct.install(openmct.plugins.PlanLayout());
|
||||||
openmct.install(openmct.plugins.Timeline());
|
openmct.install(openmct.plugins.Timeline());
|
||||||
|
openmct.install(openmct.plugins.Hyperlink());
|
||||||
openmct.install(openmct.plugins.UTCTimeSystem());
|
openmct.install(openmct.plugins.UTCTimeSystem());
|
||||||
openmct.install(openmct.plugins.AutoflowView({
|
openmct.install(openmct.plugins.AutoflowView({
|
||||||
type: "telemetry.panel"
|
type: "telemetry.panel"
|
||||||
@ -194,6 +196,8 @@
|
|||||||
['table', 'telemetry.plot.overlay', 'telemetry.plot.stacked'],
|
['table', 'telemetry.plot.overlay', 'telemetry.plot.stacked'],
|
||||||
{indicator: true}
|
{indicator: true}
|
||||||
));
|
));
|
||||||
|
openmct.install(openmct.plugins.Clock({ enableClockIndicator: true }));
|
||||||
|
openmct.install(openmct.plugins.Timer());
|
||||||
openmct.start();
|
openmct.start();
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
@ -23,9 +23,9 @@
|
|||||||
/*global module,process*/
|
/*global module,process*/
|
||||||
|
|
||||||
const devMode = process.env.NODE_ENV !== 'production';
|
const devMode = process.env.NODE_ENV !== 'production';
|
||||||
const browsers = [process.env.NODE_ENV === 'debug' ? 'ChromeDebugging' : 'FirefoxHeadless'];
|
const browsers = [process.env.NODE_ENV === 'debug' ? 'ChromeDebugging' : 'ChromeHeadless'];
|
||||||
const coverageEnabled = process.env.COVERAGE === 'true';
|
const coverageEnabled = process.env.COVERAGE === 'true';
|
||||||
const reporters = ['progress', 'html'];
|
const reporters = ['spec', 'junit'];
|
||||||
|
|
||||||
if (coverageEnabled) {
|
if (coverageEnabled) {
|
||||||
reporters.push('coverage-istanbul');
|
reporters.push('coverage-istanbul');
|
||||||
@ -52,14 +52,23 @@ module.exports = (config) => {
|
|||||||
basePath: '',
|
basePath: '',
|
||||||
frameworks: ['jasmine'],
|
frameworks: ['jasmine'],
|
||||||
files: [
|
files: [
|
||||||
'indexTest.js'
|
'indexTest.js',
|
||||||
|
{
|
||||||
|
pattern: 'dist/couchDBChangesFeed.js*',
|
||||||
|
included: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: 'dist/inMemorySearchWorker.js*',
|
||||||
|
included: false
|
||||||
|
}
|
||||||
],
|
],
|
||||||
port: 9876,
|
port: 9876,
|
||||||
reporters: reporters,
|
reporters: reporters,
|
||||||
browsers: browsers,
|
browsers: browsers,
|
||||||
client: {
|
client: {
|
||||||
jasmine: {
|
jasmine: {
|
||||||
random: false
|
random: false,
|
||||||
|
timeoutInterval: 5000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
customLaunchers: {
|
customLaunchers: {
|
||||||
@ -67,30 +76,47 @@ module.exports = (config) => {
|
|||||||
base: 'Chrome',
|
base: 'Chrome',
|
||||||
flags: ['--remote-debugging-port=9222'],
|
flags: ['--remote-debugging-port=9222'],
|
||||||
debug: true
|
debug: true
|
||||||
|
},
|
||||||
|
FirefoxESR: {
|
||||||
|
base: 'FirefoxHeadless',
|
||||||
|
name: 'FirefoxESR'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colors: true,
|
colors: true,
|
||||||
logLevel: config.LOG_INFO,
|
logLevel: config.LOG_INFO,
|
||||||
autoWatch: true,
|
autoWatch: true,
|
||||||
// HTML test reporting.
|
// HTML test reporting.
|
||||||
htmlReporter: {
|
// htmlReporter: {
|
||||||
|
// outputDir: "dist/reports/tests",
|
||||||
|
// preserveDescribeNesting: true,
|
||||||
|
// foldAll: false
|
||||||
|
// },
|
||||||
|
junitReporter: {
|
||||||
outputDir: "dist/reports/tests",
|
outputDir: "dist/reports/tests",
|
||||||
preserveDescribeNesting: true,
|
outputFile: "test-results.xml",
|
||||||
foldAll: false
|
useBrowserName: false
|
||||||
},
|
},
|
||||||
browserConsoleLogOptions: { level: "error", format: "%b %T: %m", terminal: true },
|
|
||||||
coverageIstanbulReporter: {
|
coverageIstanbulReporter: {
|
||||||
fixWebpackSourcePaths: true,
|
fixWebpackSourcePaths: true,
|
||||||
dir: process.env.CIRCLE_ARTIFACTS ?
|
dir: process.env.CIRCLE_ARTIFACTS
|
||||||
process.env.CIRCLE_ARTIFACTS + '/coverage' :
|
? process.env.CIRCLE_ARTIFACTS + '/coverage'
|
||||||
"dist/reports/coverage",
|
: "dist/reports/coverage",
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
reports: ['lcovonly', 'text-summary'],
|
||||||
thresholds: {
|
thresholds: {
|
||||||
global: {
|
global: {
|
||||||
lines: 66
|
lines: 66
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
specReporter: {
|
||||||
|
maxLogLines: 5,
|
||||||
|
suppressErrorSummary: false,
|
||||||
|
suppressFailed: false,
|
||||||
|
suppressPassed: false,
|
||||||
|
suppressSkipped: true,
|
||||||
|
showSpecTiming: true,
|
||||||
|
failFast: false
|
||||||
|
},
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'indexTest.js': ['webpack', 'sourcemap']
|
'indexTest.js': ['webpack', 'sourcemap']
|
||||||
},
|
},
|
||||||
|
48
package.json
48
package.json
@ -1,9 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "openmct",
|
"name": "openmct",
|
||||||
"version": "1.7.4",
|
"version": "1.8.1",
|
||||||
"description": "The Open MCT core platform",
|
"description": "The Open MCT core platform",
|
||||||
"dependencies": {},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@braintree/sanitize-url": "^5.0.2",
|
||||||
|
"@percy/cli": "^1.0.0-beta.70",
|
||||||
|
"@percy/playwright": "^1.0.1",
|
||||||
|
"@playwright/test": "^1.16.3",
|
||||||
|
"5to6-codemod": "^1.8.0",
|
||||||
|
"allure-playwright": "^2.0.0-beta.14",
|
||||||
"angular": ">=1.8.0",
|
"angular": ">=1.8.0",
|
||||||
"angular-route": "1.4.14",
|
"angular-route": "1.4.14",
|
||||||
"babel-eslint": "10.0.3",
|
"babel-eslint": "10.0.3",
|
||||||
@ -12,17 +17,11 @@
|
|||||||
"copy-webpack-plugin": "^4.5.2",
|
"copy-webpack-plugin": "^4.5.2",
|
||||||
"cross-env": "^6.0.3",
|
"cross-env": "^6.0.3",
|
||||||
"css-loader": "^1.0.0",
|
"css-loader": "^1.0.0",
|
||||||
"d3-array": "1.2.x",
|
|
||||||
"d3-axis": "1.0.x",
|
"d3-axis": "1.0.x",
|
||||||
"d3-collection": "1.0.x",
|
|
||||||
"d3-color": "1.0.x",
|
|
||||||
"d3-format": "1.2.x",
|
|
||||||
"d3-interpolate": "1.1.x",
|
|
||||||
"d3-scale": "1.0.x",
|
"d3-scale": "1.0.x",
|
||||||
"d3-selection": "1.3.x",
|
"d3-selection": "1.3.x",
|
||||||
"d3-time": "1.0.x",
|
|
||||||
"d3-time-format": "2.1.x",
|
|
||||||
"eslint": "7.0.0",
|
"eslint": "7.0.0",
|
||||||
|
"eslint-plugin-playwright": "0.6.0",
|
||||||
"eslint-plugin-vue": "^7.5.0",
|
"eslint-plugin-vue": "^7.5.0",
|
||||||
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
|
||||||
"eventemitter3": "^1.2.0",
|
"eventemitter3": "^1.2.0",
|
||||||
@ -34,20 +33,22 @@
|
|||||||
"git-rev-sync": "^1.4.0",
|
"git-rev-sync": "^1.4.0",
|
||||||
"glob": ">= 3.0.0",
|
"glob": ">= 3.0.0",
|
||||||
"html-loader": "^0.5.5",
|
"html-loader": "^0.5.5",
|
||||||
"html2canvas": "^1.0.0-alpha.12",
|
"html2canvas": "^1.0.0-rc.7",
|
||||||
"imports-loader": "^0.8.0",
|
"imports-loader": "^0.8.0",
|
||||||
"istanbul-instrumenter-loader": "^3.0.1",
|
"istanbul-instrumenter-loader": "^3.0.1",
|
||||||
"jasmine-core": "^3.1.0",
|
"jasmine-core": "^3.7.1",
|
||||||
|
"jscodeshift": "^0.13.0",
|
||||||
"jsdoc": "^3.3.2",
|
"jsdoc": "^3.3.2",
|
||||||
"karma": "5.1.1",
|
"karma": "6.3.9",
|
||||||
"karma-chrome-launcher": "3.1.0",
|
"karma-chrome-launcher": "3.1.0",
|
||||||
"karma-cli": "2.0.0",
|
"karma-cli": "2.0.0",
|
||||||
"karma-coverage": "2.0.3",
|
"karma-coverage": "2.1.0",
|
||||||
"karma-coverage-istanbul-reporter": "3.0.3",
|
"karma-coverage-istanbul-reporter": "3.0.3",
|
||||||
"karma-firefox-launcher": "1.3.0",
|
"karma-firefox-launcher": "2.1.2",
|
||||||
"karma-html-reporter": "0.2.7",
|
"karma-jasmine": "4.0.1",
|
||||||
"karma-jasmine": "3.3.1",
|
"karma-junit-reporter": "2.0.1",
|
||||||
"karma-sourcemap-loader": "0.3.7",
|
"karma-sourcemap-loader": "0.3.8",
|
||||||
|
"karma-spec-reporter": "0.0.32",
|
||||||
"karma-webpack": "4.0.2",
|
"karma-webpack": "4.0.2",
|
||||||
"location-bar": "^3.0.1",
|
"location-bar": "^3.0.1",
|
||||||
"lodash": "^4.17.12",
|
"lodash": "^4.17.12",
|
||||||
@ -61,14 +62,19 @@
|
|||||||
"node-bourbon": "^4.2.3",
|
"node-bourbon": "^4.2.3",
|
||||||
"node-sass": "^4.14.1",
|
"node-sass": "^4.14.1",
|
||||||
"painterro": "^1.2.56",
|
"painterro": "^1.2.56",
|
||||||
|
"playwright": "^1.16.3",
|
||||||
|
"plotly.js-basic-dist": "^2.5.0",
|
||||||
|
"plotly.js-gl2d-dist": "^2.5.0",
|
||||||
"printj": "^1.2.1",
|
"printj": "^1.2.1",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"request": "^2.69.0",
|
"request": "^2.69.0",
|
||||||
|
"sinon": "^12.0.1",
|
||||||
"split": "^1.0.0",
|
"split": "^1.0.0",
|
||||||
"style-loader": "^1.0.1",
|
"style-loader": "^1.0.1",
|
||||||
"uuid": "^3.3.3",
|
"uuid": "^3.3.3",
|
||||||
"v8-compile-cache": "^1.1.0",
|
"v8-compile-cache": "^1.1.0",
|
||||||
"vue": "2.5.6",
|
"vue": "2.5.6",
|
||||||
|
"vue-eslint-parser": "7.11.0",
|
||||||
"vue-loader": "^15.2.6",
|
"vue-loader": "^15.2.6",
|
||||||
"vue-template-compiler": "2.5.6",
|
"vue-template-compiler": "2.5.6",
|
||||||
"webpack": "^4.16.2",
|
"webpack": "^4.16.2",
|
||||||
@ -89,6 +95,11 @@
|
|||||||
"test": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" karma start --single-run",
|
"test": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" karma start --single-run",
|
||||||
"test:debug": "cross-env NODE_ENV=debug karma start --no-single-run",
|
"test:debug": "cross-env NODE_ENV=debug karma start --no-single-run",
|
||||||
"test:coverage": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" COVERAGE=true karma start --single-run",
|
"test:coverage": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" COVERAGE=true karma start --single-run",
|
||||||
|
"test:coverage:firefox": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" karma start --single-run --browsers=FirefoxHeadless",
|
||||||
|
"test:e2e:ci": "npx playwright test --config=e2e/playwright-ci.config.js smoke",
|
||||||
|
"test:e2e:local": "npx playwright test --config=e2e/playwright-local.config.js",
|
||||||
|
"test:e2e:visual": "percy exec -- npx playwright test --config=e2e/playwright-visual.config.js default",
|
||||||
|
"test:e2e:full": "npx playwright test --config=e2e/playwright-ci.config.js",
|
||||||
"test:watch": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" karma start --no-single-run",
|
"test:watch": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" karma start --no-single-run",
|
||||||
"verify": "concurrently 'npm:test' 'npm:lint'",
|
"verify": "concurrently 'npm:test' 'npm:lint'",
|
||||||
"jsdoc": "jsdoc -c jsdoc.json -R API.md -r -d dist/docs/api",
|
"jsdoc": "jsdoc -c jsdoc.json -R API.md -r -d dist/docs/api",
|
||||||
@ -100,6 +111,9 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nasa/openmct.git"
|
"url": "https://github.com/nasa/openmct.git"
|
||||||
},
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.12.2 <16.0.0"
|
||||||
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"private": true
|
"private": true
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
The "about" bundle provides the default lower-right application logo,
|
|
||||||
as well as the dialog it launches when clicked.
|
|
||||||
|
|
||||||
# Extensions
|
|
||||||
|
|
||||||
The About dialog contains several line items to display different
|
|
||||||
version properties (e.g. when built, et cetera.) Plug-ins may wish
|
|
||||||
to introduce additional line items here, in particular if the
|
|
||||||
platform is used to build a separately-branded piece of software.
|
|
||||||
|
|
||||||
This bundle introduces the `versions` extension category to support this.
|
|
||||||
An extension of this category is implementation-less (all information
|
|
||||||
is contained within its declaration) and should include the following
|
|
||||||
fields:
|
|
||||||
|
|
||||||
* `name`: The name to display for this version line-item; this may
|
|
||||||
be the name of the software, or something else such as "Built".
|
|
||||||
* `value`: The value to display corresponding to this line-item;
|
|
||||||
this is typically a version number, revision identifier, or
|
|
||||||
human-readable date.
|
|
||||||
* `description`: Optional; a longer-form description of this line
|
|
||||||
item, to display in a tooltip.
|
|
||||||
|
|
||||||
Ordering of these line items is handled by extension priority; see framework
|
|
||||||
documentation (`platform/framework/README.md`) for information on how
|
|
||||||
this ordering is handled.
|
|
@ -1,181 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define([
|
|
||||||
"./res/templates/about-dialog.html",
|
|
||||||
"./src/LogoController",
|
|
||||||
"./src/AboutController",
|
|
||||||
"./src/LicenseController",
|
|
||||||
"./res/templates/app-logo.html",
|
|
||||||
"./res/templates/about-logo.html",
|
|
||||||
"./res/templates/overlay-about.html",
|
|
||||||
"./res/templates/license-apache.html",
|
|
||||||
"./res/templates/license-mit.html",
|
|
||||||
"./res/templates/licenses.html",
|
|
||||||
"./res/templates/licenses-export-md.html"
|
|
||||||
], function (
|
|
||||||
aboutDialogTemplate,
|
|
||||||
LogoController,
|
|
||||||
AboutController,
|
|
||||||
LicenseController,
|
|
||||||
appLogoTemplate,
|
|
||||||
aboutLogoTemplate,
|
|
||||||
overlayAboutTemplate,
|
|
||||||
licenseApacheTemplate,
|
|
||||||
licenseMitTemplate,
|
|
||||||
licensesTemplate,
|
|
||||||
licensesExportMdTemplate
|
|
||||||
) {
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: "platform/commonUI/about",
|
|
||||||
definition: {
|
|
||||||
"name": "About Open MCT",
|
|
||||||
"extensions": {
|
|
||||||
"templates": [
|
|
||||||
{
|
|
||||||
"key": "app-logo",
|
|
||||||
"priority": "optional",
|
|
||||||
"template": appLogoTemplate
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "about-logo",
|
|
||||||
"priority": "preferred",
|
|
||||||
"template": aboutLogoTemplate
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "about-dialog",
|
|
||||||
"template": aboutDialogTemplate
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "overlay-about",
|
|
||||||
"template": overlayAboutTemplate
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "license-apache",
|
|
||||||
"template": licenseApacheTemplate
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "license-mit",
|
|
||||||
"template": licenseMitTemplate
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"controllers": [
|
|
||||||
{
|
|
||||||
"key": "LogoController",
|
|
||||||
"depends": [
|
|
||||||
"overlayService"
|
|
||||||
],
|
|
||||||
"implementation": LogoController
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "AboutController",
|
|
||||||
"depends": [
|
|
||||||
"versions[]",
|
|
||||||
"$window"
|
|
||||||
],
|
|
||||||
"implementation": AboutController
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "LicenseController",
|
|
||||||
"depends": [
|
|
||||||
"licenses[]"
|
|
||||||
],
|
|
||||||
"implementation": LicenseController
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"licenses": [
|
|
||||||
{
|
|
||||||
"name": "Json.NET",
|
|
||||||
"version": "6.0.8",
|
|
||||||
"author": "Newtonsoft",
|
|
||||||
"description": "JSON serialization/deserialization",
|
|
||||||
"website": "http://www.newtonsoft.com/json",
|
|
||||||
"copyright": "Copyright (c) 2007 James Newton-King",
|
|
||||||
"license": "license-mit",
|
|
||||||
"link": "https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Nancy",
|
|
||||||
"version": "0.23.2",
|
|
||||||
"author": "Andreas Håkansson, Steven Robbins and contributors",
|
|
||||||
"description": "Embedded web server",
|
|
||||||
"website": "http://nancyfx.org/",
|
|
||||||
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
|
|
||||||
"license": "license-mit",
|
|
||||||
"link": "http://www.opensource.org/licenses/mit-license.php"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Nancy.Hosting.Self",
|
|
||||||
"version": "0.23.2",
|
|
||||||
"author": "Andreas Håkansson, Steven Robbins and contributors",
|
|
||||||
"description": "Embedded web server",
|
|
||||||
"website": "http://nancyfx.org/",
|
|
||||||
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
|
|
||||||
"license": "license-mit",
|
|
||||||
"link": "http://www.opensource.org/licenses/mit-license.php"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "SuperSocket",
|
|
||||||
"version": "0.9.0.2",
|
|
||||||
"author": " Kerry Jiang",
|
|
||||||
"description": "Supports SuperWebSocket",
|
|
||||||
"website": "https://supersocket.codeplex.com/",
|
|
||||||
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
|
|
||||||
"license": "license-apache",
|
|
||||||
"link": "https://supersocket.codeplex.com/license"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "SuperWebSocket",
|
|
||||||
"version": "0.9.0.2",
|
|
||||||
"author": " Kerry Jiang",
|
|
||||||
"description": "WebSocket implementation for client-server communication",
|
|
||||||
"website": "https://superwebsocket.codeplex.com/",
|
|
||||||
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
|
|
||||||
"license": "license-apache",
|
|
||||||
"link": "https://superwebsocket.codeplex.com/license"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "log4net",
|
|
||||||
"version": "2.0.3",
|
|
||||||
"author": "Apache Software Foundation",
|
|
||||||
"description": "Logging",
|
|
||||||
"website": "http://logging.apache.org/log4net/",
|
|
||||||
"copyright": "Copyright © 2004-2015 Apache Software Foundation.",
|
|
||||||
"license": "license-apache",
|
|
||||||
"link": "http://logging.apache.org/log4net/license.html"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"routes": [
|
|
||||||
{
|
|
||||||
"when": "/licenses",
|
|
||||||
"template": licensesTemplate
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"when": "/licenses-md",
|
|
||||||
"template": licensesExportMdTemplate
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
@ -1,41 +0,0 @@
|
|||||||
<!--
|
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
Administration. All rights reserved.
|
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
"License"); you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
License for the specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
|
|
||||||
Open MCT includes source code licensed under additional open source
|
|
||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
this source code distribution or the Licensing information page available
|
|
||||||
at runtime from the About dialog for additional information.
|
|
||||||
-->
|
|
||||||
<div class="abs t-about l-about t-about-openmctweb s-about" ng-controller = "AboutController as about">
|
|
||||||
<div class="l-splash s-splash"></div>
|
|
||||||
<div class="s-text l-content">
|
|
||||||
<h1 class="l-title s-title">Open MCT</h1>
|
|
||||||
<div class="l-description s-description">
|
|
||||||
<p>Open MCT, Copyright © 2014-2021, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.</p>
|
|
||||||
<p>Open MCT is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>.</p>
|
|
||||||
<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>
|
|
||||||
<p>Open MCT includes source code licensed under additional open source licenses. See the Open Source Licenses file included with this distribution or <a ng-click="about.openLicenses()">click here for licensing information</a>.</p>
|
|
||||||
</div>
|
|
||||||
<h2>Version Information</h2>
|
|
||||||
<ul class="t-info l-info s-info" ng-repeat = "version in about.versions()">
|
|
||||||
<li title="{{version.description}}">
|
|
||||||
<span class="info version-name">{{version.name}}</span>
|
|
||||||
<span class="info version-value">{{version.value}}</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
<!--
|
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
Administration. All rights reserved.
|
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
"License"); you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
License for the specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
|
|
||||||
Open MCT includes source code licensed under additional open source
|
|
||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
this source code distribution or the Licensing information page available
|
|
||||||
at runtime from the About dialog for additional information.
|
|
||||||
-->
|
|
||||||
<span ng-controller="LogoController as logo">
|
|
||||||
<mct-include ng-click="logo.showAboutDialog()" key="'app-logo'">
|
|
||||||
</mct-include>
|
|
||||||
</span>
|
|
@ -1,24 +0,0 @@
|
|||||||
<!--
|
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
Administration. All rights reserved.
|
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
"License"); you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
License for the specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
|
|
||||||
Open MCT includes source code licensed under additional open source
|
|
||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
this source code distribution or the Licensing information page available
|
|
||||||
at runtime from the About dialog for additional information.
|
|
||||||
-->
|
|
||||||
<span ng-controller = "AboutController as about">
|
|
||||||
<div class='app-logo logo-openmctweb abs' title="Version {{about.versions()[0].value}}"></div>
|
|
||||||
</span>
|
|
@ -1,199 +0,0 @@
|
|||||||
<!--
|
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
Administration. All rights reserved.
|
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
"License"); you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
License for the specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
|
|
||||||
Open MCT includes source code licensed under additional open source
|
|
||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
this source code distribution or the Licensing information page available
|
|
||||||
at runtime from the About dialog for additional information.
|
|
||||||
-->
|
|
||||||
<!-- From http://www.apache.org/licenses/LICENSE-2.0 -->
|
|
||||||
<br>
|
|
||||||
<p>Version 2.0, January 2004</p>
|
|
||||||
<p><a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a></p>
|
|
||||||
<h3>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</h3>
|
|
||||||
<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
|
|
||||||
<p>"License" shall mean the terms and conditions for use, reproduction, and
|
|
||||||
distribution as defined by Sections 1 through 9 of this document.</p>
|
|
||||||
<p>"Licensor" shall mean the copyright owner or entity authorized by the
|
|
||||||
copyright owner that is granting the License.</p>
|
|
||||||
<p>"Legal Entity" shall mean the union of the acting entity and all other
|
|
||||||
entities that control, are controlled by, or are under common control with
|
|
||||||
that entity. For the purposes of this definition, "control" means (i) the
|
|
||||||
power, direct or indirect, to cause the direction or management of such
|
|
||||||
entity, whether by contract or otherwise, or (ii) ownership of fifty
|
|
||||||
percent (50%) or more of the outstanding shares, or (iii) beneficial
|
|
||||||
ownership of such entity.</p>
|
|
||||||
<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
||||||
permissions granted by this License.</p>
|
|
||||||
<p>"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation source,
|
|
||||||
and configuration files.</p>
|
|
||||||
<p>"Object" form shall mean any form resulting from mechanical transformation
|
|
||||||
or translation of a Source form, including but not limited to compiled
|
|
||||||
object code, generated documentation, and conversions to other media types.</p>
|
|
||||||
<p>"Work" shall mean the work of authorship, whether in Source or Object form,
|
|
||||||
made available under the License, as indicated by a copyright notice that
|
|
||||||
is included in or attached to the work (an example is provided in the
|
|
||||||
Appendix below).</p>
|
|
||||||
<p>"Derivative Works" shall mean any work, whether in Source or Object form,
|
|
||||||
that is based on (or derived from) the Work and for which the editorial
|
|
||||||
revisions, annotations, elaborations, or other modifications represent, as
|
|
||||||
a whole, an original work of authorship. For the purposes of this License,
|
|
||||||
Derivative Works shall not include works that remain separable from, or
|
|
||||||
merely link (or bind by name) to the interfaces of, the Work and Derivative
|
|
||||||
Works thereof.</p>
|
|
||||||
<p>"Contribution" shall mean any work of authorship, including the original
|
|
||||||
version of the Work and any modifications or additions to that Work or
|
|
||||||
Derivative Works thereof, that is intentionally submitted to Licensor for
|
|
||||||
inclusion in the Work by the copyright owner or by an individual or Legal
|
|
||||||
Entity authorized to submit on behalf of the copyright owner. For the
|
|
||||||
purposes of this definition, "submitted" means any form of electronic,
|
|
||||||
verbal, or written communication sent to the Licensor or its
|
|
||||||
representatives, including but not limited to communication on electronic
|
|
||||||
mailing lists, source code control systems, and issue tracking systems that
|
|
||||||
are managed by, or on behalf of, the Licensor for the purpose of discussing
|
|
||||||
and improving the Work, but excluding communication that is conspicuously
|
|
||||||
marked or otherwise designated in writing by the copyright owner as "Not a
|
|
||||||
Contribution."</p>
|
|
||||||
<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
|
|
||||||
behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.</p>
|
|
||||||
<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
|
|
||||||
terms and conditions of this License, each Contributor hereby grants to You
|
|
||||||
a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of, publicly
|
|
||||||
display, publicly perform, sublicense, and distribute the Work and such
|
|
||||||
Derivative Works in Source or Object form.</p>
|
|
||||||
<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
|
|
||||||
and conditions of this License, each Contributor hereby grants to You a
|
|
||||||
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made, use,
|
|
||||||
offer to sell, sell, import, and otherwise transfer the Work, where such
|
|
||||||
license applies only to those patent claims licensable by such Contributor
|
|
||||||
that are necessarily infringed by their Contribution(s) alone or by
|
|
||||||
combination of their Contribution(s) with the Work to which such
|
|
||||||
Contribution(s) was submitted. If You institute patent litigation against
|
|
||||||
any entity (including a cross-claim or counterclaim in a lawsuit) alleging
|
|
||||||
that the Work or a Contribution incorporated within the Work constitutes
|
|
||||||
direct or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate as of the
|
|
||||||
date such litigation is filed.</p>
|
|
||||||
<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
|
|
||||||
distribute copies of the Work or Derivative Works thereof in any medium,
|
|
||||||
with or without modifications, and in Source or Object form, provided that
|
|
||||||
You meet the following conditions:</p>
|
|
||||||
<ol style="list-style: lower-latin;">
|
|
||||||
<li>You must give any other recipients of the Work or Derivative Works a
|
|
||||||
copy of this License; and</li>
|
|
||||||
|
|
||||||
<li>You must cause any modified files to carry prominent notices stating
|
|
||||||
that You changed the files; and</li>
|
|
||||||
|
|
||||||
<li>You must retain, in the Source form of any Derivative Works that You
|
|
||||||
distribute, all copyright, patent, trademark, and attribution notices from
|
|
||||||
the Source form of the Work, excluding those notices that do not pertain to
|
|
||||||
any part of the Derivative Works; and</li>
|
|
||||||
|
|
||||||
<li>If the Work includes a "NOTICE" text file as part of its distribution,
|
|
||||||
then any Derivative Works that You distribute must include a readable copy
|
|
||||||
of the attribution notices contained within such NOTICE file, excluding
|
|
||||||
those notices that do not pertain to any part of the Derivative Works, in
|
|
||||||
at least one of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or documentation,
|
|
||||||
if provided along with the Derivative Works; or, within a display generated
|
|
||||||
by the Derivative Works, if and wherever such third-party notices normally
|
|
||||||
appear. The contents of the NOTICE file are for informational purposes only
|
|
||||||
and do not modify the License. You may add Your own attribution notices
|
|
||||||
within Derivative Works that You distribute, alongside or as an addendum to
|
|
||||||
the NOTICE text from the Work, provided that such additional attribution
|
|
||||||
notices cannot be construed as modifying the License.
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
You may add Your own copyright statement to Your modifications and may
|
|
||||||
provide additional or different license terms and conditions for use,
|
|
||||||
reproduction, or distribution of Your modifications, or for any such
|
|
||||||
Derivative Works as a whole, provided Your use, reproduction, and
|
|
||||||
distribution of the Work otherwise complies with the conditions stated in
|
|
||||||
this License.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
|
|
||||||
explicitly state otherwise, any Contribution intentionally submitted for
|
|
||||||
inclusion in the Work by You to the Licensor shall be under the terms and
|
|
||||||
conditions of this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify the
|
|
||||||
terms of any separate license agreement you may have executed with Licensor
|
|
||||||
regarding such Contributions.</p>
|
|
||||||
<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
|
|
||||||
permission to use the trade names, trademarks, service marks, or product
|
|
||||||
names of the Licensor, except as required for reasonable and customary use
|
|
||||||
in describing the origin of the Work and reproducing the content of the
|
|
||||||
NOTICE file.</p>
|
|
||||||
<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
|
|
||||||
applicable law or agreed to in writing, Licensor provides the Work (and
|
|
||||||
each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
|
|
||||||
without limitation, any warranties or conditions of TITLE,
|
|
||||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
|
|
||||||
are solely responsible for determining the appropriateness of using or
|
|
||||||
redistributing the Work and assume any risks associated with Your exercise
|
|
||||||
of permissions under this License.</p>
|
|
||||||
<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
|
|
||||||
under no legal theory, whether in tort (including negligence), contract, or
|
|
||||||
otherwise, unless required by applicable law (such as deliberate and
|
|
||||||
grossly negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a result
|
|
||||||
of this License or out of the use or inability to use the Work (including
|
|
||||||
but not limited to damages for loss of goodwill, work stoppage, computer
|
|
||||||
failure or malfunction, or any and all other commercial damages or losses),
|
|
||||||
even if such Contributor has been advised of the possibility of such
|
|
||||||
damages.</p>
|
|
||||||
<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
|
|
||||||
While redistributing the Work or Derivative Works thereof, You may choose
|
|
||||||
to offer, and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this License.
|
|
||||||
However, in accepting such obligations, You may act only on Your own behalf
|
|
||||||
and on Your sole responsibility, not on behalf of any other Contributor,
|
|
||||||
and only if You agree to indemnify, defend, and hold each Contributor
|
|
||||||
harmless for any liability incurred by, or claims asserted against, such
|
|
||||||
Contributor by reason of your accepting any such warranty or additional
|
|
||||||
liability.</p>
|
|
||||||
<h3>END OF TERMS AND CONDITIONS</h3>
|
|
||||||
<h3 id="apply">APPENDIX: How to apply the Apache License to your work</h3>
|
|
||||||
<p>To apply the Apache License to your work, attach the following boilerplate
|
|
||||||
notice, with the fields enclosed by brackets "[]" replaced with your own
|
|
||||||
identifying information. (Don't include the brackets!) The text should be
|
|
||||||
enclosed in the appropriate comment syntax for the file format. We also
|
|
||||||
recommend that a file or class name and description of purpose be included
|
|
||||||
on the same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.</p>
|
|
||||||
<div class="codehilite"><pre>Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
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.
|
|
||||||
</pre></div>
|
|
@ -1,24 +0,0 @@
|
|||||||
<!--
|
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
Administration. All rights reserved.
|
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
"License"); you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
License for the specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
|
|
||||||
Open MCT includes source code licensed under additional open source
|
|
||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
this source code distribution or the Licensing information page available
|
|
||||||
at runtime from the About dialog for additional information.
|
|
||||||
-->
|
|
||||||
<p>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:</p>
|
|
||||||
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
|
|
||||||
<p>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.</p>
|
|
@ -1,42 +0,0 @@
|
|||||||
<!--
|
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
Administration. All rights reserved.
|
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
"License"); you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
License for the specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
|
|
||||||
Open MCT includes source code licensed under additional open source
|
|
||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
this source code distribution or the Licensing information page available
|
|
||||||
at runtime from the About dialog for additional information.
|
|
||||||
-->
|
|
||||||
<div ng-controller="LicenseController as lc" class="abs l-about l-standalone s-text s-md-export">
|
|
||||||
<h1># Open MCT Licenses</h1>
|
|
||||||
<h2>## Apache License</h2>
|
|
||||||
<mct-include key="'license-apache'"></mct-include>
|
|
||||||
|
|
||||||
<h2>## Software Components Licenses</h2>
|
|
||||||
<p>This software includes components released under the following licenses:</p>
|
|
||||||
<div class="l-license-software" ng-repeat="license in lc.licenses()">
|
|
||||||
<p>### {{license.name}}</p>
|
|
||||||
<p>#### Info</p>
|
|
||||||
<p>* Link: {{license.website}}</p>
|
|
||||||
<p>* Version: {{license.version}}</p>
|
|
||||||
<p>* Author<span ng-show="license.author.indexOf(',') > 0">s</span>: {{license.author}}</p>
|
|
||||||
<p>* Description: {{license.description}}</p>
|
|
||||||
<p>#### License</p>
|
|
||||||
<p ng-show="license.copyright.length > 0">{{license.copyright}}</p>
|
|
||||||
<mct-include key="license.license"></mct-include>
|
|
||||||
<p> </p>
|
|
||||||
<p>---</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,44 +0,0 @@
|
|||||||
<!--
|
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
Administration. All rights reserved.
|
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
"License"); you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
License for the specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
|
|
||||||
Open MCT includes source code licensed under additional open source
|
|
||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
this source code distribution or the Licensing information page available
|
|
||||||
at runtime from the About dialog for additional information.
|
|
||||||
-->
|
|
||||||
<div ng-controller="LicenseController as lc" class="abs l-standalone s-text l-about l-licenses s-about s-licenses">
|
|
||||||
<h1>OpenMCT Web Licenses</h1>
|
|
||||||
<h2>Apache License</h2>
|
|
||||||
<mct-include key="'license-apache'"></mct-include>
|
|
||||||
|
|
||||||
<h2>Software Components Licenses</h2>
|
|
||||||
<p>This software includes components released under the following licenses:</p>
|
|
||||||
<div class="l-licenses-software">
|
|
||||||
<div class="l-license-software" ng-repeat="license in lc.licenses()">
|
|
||||||
<h3><a target="_blank" ng-href="{{license.website}}">{{license.name}}</a></h3>
|
|
||||||
<p>
|
|
||||||
<em>Version</em> {{license.version}}
|
|
||||||
<em> | Author<span ng-show="license.author.indexOf(',') > 0">s</span></em> {{license.author}}
|
|
||||||
<em> | Description</em> {{license.description}}
|
|
||||||
</p>
|
|
||||||
<em>License</em>
|
|
||||||
<div class="s-license-text">
|
|
||||||
<p ng-show="license.copyright.length > 0">{{license.copyright}}</p>
|
|
||||||
<mct-include key="license.license"></mct-include>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,25 +0,0 @@
|
|||||||
<!--
|
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
Administration. All rights reserved.
|
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
"License"); you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
License for the specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
|
|
||||||
Open MCT includes source code licensed under additional open source
|
|
||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
this source code distribution or the Licensing information page available
|
|
||||||
at runtime from the About dialog for additional information.
|
|
||||||
-->
|
|
||||||
<mct-container key="overlay">
|
|
||||||
<mct-include key="'about-dialog'">
|
|
||||||
</mct-include>
|
|
||||||
</mct-container>
|
|
@ -1,66 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implements Open MCT's About dialog.
|
|
||||||
* @namespace platform/commonUI/about
|
|
||||||
*/
|
|
||||||
define(
|
|
||||||
[],
|
|
||||||
function () {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The AboutController provides information to populate the
|
|
||||||
* About dialog.
|
|
||||||
* @memberof platform/commonUI/about
|
|
||||||
* @constructor
|
|
||||||
* @param {object[]} versions an array of version extensions;
|
|
||||||
* injected from `versions[]`
|
|
||||||
* @param $window Angular-injected window object
|
|
||||||
*/
|
|
||||||
function AboutController(versions, $window) {
|
|
||||||
this.versionDefinitions = versions;
|
|
||||||
this.$window = $window;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get version info. This is given as an array of
|
|
||||||
* objects, where each object is intended to appear
|
|
||||||
* as a line-item in the version information listing.
|
|
||||||
* @returns {object[]} version information
|
|
||||||
*/
|
|
||||||
AboutController.prototype.versions = function () {
|
|
||||||
return this.versionDefinitions;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Open a new window (or tab, depending on browser
|
|
||||||
* configuration) containing open source licenses.
|
|
||||||
*/
|
|
||||||
AboutController.prototype.openLicenses = function () {
|
|
||||||
// Open a new browser window at the licenses route
|
|
||||||
this.$window.open("#/licenses");
|
|
||||||
};
|
|
||||||
|
|
||||||
return AboutController;
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,49 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
[],
|
|
||||||
function () {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The LogoController provides functionality to the application
|
|
||||||
* logo in the bottom-right of the user interface.
|
|
||||||
* @memberof platform/commonUI/about
|
|
||||||
* @constructor
|
|
||||||
* @param {OverlayService} overlayService the overlay service
|
|
||||||
*/
|
|
||||||
function LogoController(overlayService) {
|
|
||||||
this.overlayService = overlayService;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display the About dialog.
|
|
||||||
* @memberof LogoController#
|
|
||||||
* @memberof platform/commonUI/about.LogoController#
|
|
||||||
*/
|
|
||||||
LogoController.prototype.showAboutDialog = function () {
|
|
||||||
this.overlayService.createOverlay("overlay-about");
|
|
||||||
};
|
|
||||||
|
|
||||||
return LogoController;
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,62 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
['../src/AboutController'],
|
|
||||||
function (AboutController) {
|
|
||||||
|
|
||||||
describe("The About controller", function () {
|
|
||||||
let testVersions;
|
|
||||||
let mockWindow;
|
|
||||||
let controller;
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
testVersions = [
|
|
||||||
{
|
|
||||||
name: "Some name",
|
|
||||||
value: "1.2.3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Some other name",
|
|
||||||
value: "3.2.1"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
mockWindow = jasmine.createSpyObj("$window", ["open"]);
|
|
||||||
controller = new AboutController(testVersions, mockWindow);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("exposes version information", function () {
|
|
||||||
// This will be injected, so it should just give back
|
|
||||||
// what it got in.
|
|
||||||
expect(controller.versions()).toEqual(testVersions);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("opens license information in a window", function () {
|
|
||||||
//Verify precondition
|
|
||||||
expect(mockWindow.open).not.toHaveBeenCalled();
|
|
||||||
controller.openLicenses();
|
|
||||||
expect(mockWindow.open).toHaveBeenCalledWith("#/licenses");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,49 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
['../src/LicenseController'],
|
|
||||||
function (LicenseController) {
|
|
||||||
|
|
||||||
describe("The License controller", function () {
|
|
||||||
var testLicenses,
|
|
||||||
controller;
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
testLicenses = [
|
|
||||||
{ name: "A" },
|
|
||||||
{ name: "B" },
|
|
||||||
{ name: "C" }
|
|
||||||
];
|
|
||||||
controller = new LicenseController(testLicenses);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("exposes license information", function () {
|
|
||||||
// LicenseController is just there to pass licenses[]
|
|
||||||
// extensions down to the template.
|
|
||||||
expect(controller.licenses()).toEqual(testLicenses);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,51 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
['../src/LogoController'],
|
|
||||||
function (LogoController) {
|
|
||||||
|
|
||||||
describe("The About controller", function () {
|
|
||||||
var mockOverlayService,
|
|
||||||
controller;
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
mockOverlayService = jasmine.createSpyObj(
|
|
||||||
"overlayService",
|
|
||||||
["createOverlay"]
|
|
||||||
);
|
|
||||||
controller = new LogoController(mockOverlayService);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("shows the about dialog", function () {
|
|
||||||
//Verify precondition
|
|
||||||
expect(mockOverlayService.createOverlay)
|
|
||||||
.not.toHaveBeenCalled();
|
|
||||||
controller.showAboutDialog();
|
|
||||||
expect(mockOverlayService.createOverlay)
|
|
||||||
.toHaveBeenCalledWith("overlay-about");
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
@ -20,33 +20,42 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
/*****************************************************************************
|
||||||
"./src/navigation/NavigationService",
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
"./src/navigation/NavigateAction",
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
"./src/navigation/OrphanNavigationHandler",
|
* Administration. All rights reserved.
|
||||||
"./res/templates/browse.html",
|
*
|
||||||
"./res/templates/browse-object.html",
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
"./res/templates/browse/object-header.html",
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
"./res/templates/browse/object-header-frame.html",
|
* You may obtain a copy of the License at
|
||||||
"./res/templates/menu-arrow.html",
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
"./res/templates/back-arrow.html",
|
*
|
||||||
"./res/templates/browse/object-properties.html",
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
"./res/templates/browse/inspector-region.html"
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
], function (
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
NavigationService,
|
* License for the specific language governing permissions and limitations
|
||||||
NavigateAction,
|
* under the License.
|
||||||
OrphanNavigationHandler,
|
*
|
||||||
browseTemplate,
|
* Open MCT includes source code licensed under additional open source
|
||||||
browseObjectTemplate,
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
objectHeaderTemplate,
|
* this source code distribution or the Licensing information page available
|
||||||
objectHeaderFrameTemplate,
|
* at runtime from the About dialog for additional information.
|
||||||
menuArrowTemplate,
|
*****************************************************************************/
|
||||||
backArrowTemplate,
|
|
||||||
objectPropertiesTemplate,
|
|
||||||
inspectorRegionTemplate
|
|
||||||
) {
|
|
||||||
|
|
||||||
return {
|
import NavigationService from './src/navigation/NavigationService';
|
||||||
|
|
||||||
|
import NavigateAction from './src/navigation/NavigateAction';
|
||||||
|
import OrphanNavigationHandler from './src/navigation/OrphanNavigationHandler';
|
||||||
|
import browseTemplate from './res/templates/browse.html';
|
||||||
|
import browseObjectTemplate from './res/templates/browse-object.html';
|
||||||
|
import objectHeaderTemplate from './res/templates/browse/object-header.html';
|
||||||
|
import objectHeaderFrameTemplate from './res/templates/browse/object-header-frame.html';
|
||||||
|
import menuArrowTemplate from './res/templates/menu-arrow.html';
|
||||||
|
import backArrowTemplate from './res/templates/back-arrow.html';
|
||||||
|
import objectPropertiesTemplate from './res/templates/browse/object-properties.html';
|
||||||
|
import inspectorRegionTemplate from './res/templates/browse/inspector-region.html';
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "platform/commonUI/browse",
|
name: "platform/commonUI/browse",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -154,5 +163,4 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
@ -20,32 +20,50 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
/*****************************************************************************
|
||||||
[
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
'../../regions/src/Region'
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
],
|
* Administration. All rights reserved.
|
||||||
function (Region) {
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
import Region from '../../regions/src/Region';
|
||||||
|
|
||||||
|
/**
|
||||||
* Defines the a default Inspector region. Captured in a class to
|
* Defines the a default Inspector region. Captured in a class to
|
||||||
* allow for modular extension and customization of regions based on
|
* allow for modular extension and customization of regions based on
|
||||||
* the typical case.
|
* the typical case.
|
||||||
* @memberOf platform/commonUI/regions
|
* @memberOf platform/commonUI/regions
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function InspectorRegion() {
|
function InspectorRegion() {
|
||||||
Region.call(this, {'name': 'Inspector'});
|
Region.call(this, {'name': 'Inspector'});
|
||||||
|
|
||||||
this.buildRegion();
|
this.buildRegion();
|
||||||
}
|
}
|
||||||
|
|
||||||
InspectorRegion.prototype = Object.create(Region.prototype);
|
InspectorRegion.prototype = Object.create(Region.prototype);
|
||||||
InspectorRegion.prototype.constructor = Region;
|
InspectorRegion.prototype.constructor = Region;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
InspectorRegion.prototype.buildRegion = function () {
|
InspectorRegion.prototype.buildRegion = function () {
|
||||||
var metadataRegion = {
|
var metadataRegion = {
|
||||||
name: 'metadata',
|
name: 'metadata',
|
||||||
title: 'Metadata Region',
|
title: 'Metadata Region',
|
||||||
@ -60,8 +78,6 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.addRegion(new Region(metadataRegion), 0);
|
this.addRegion(new Region(metadataRegion), 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
return InspectorRegion;
|
export default InspectorRegion;
|
||||||
}
|
|
||||||
);
|
|
@ -23,27 +23,42 @@
|
|||||||
/**
|
/**
|
||||||
* Module defining NavigateAction. Created by vwoeltje on 11/10/14.
|
* Module defining NavigateAction. Created by vwoeltje on 11/10/14.
|
||||||
*/
|
*/
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The navigate action navigates to a specific domain object.
|
* Module defining NavigateAction. Created by vwoeltje on 11/10/14.
|
||||||
* @memberof platform/commonUI/browse
|
|
||||||
* @constructor
|
|
||||||
* @implements {Action}
|
|
||||||
*/
|
*/
|
||||||
function NavigateAction(navigationService, context) {
|
function NavigateAction(navigationService, context) {
|
||||||
this.domainObject = context.domainObject;
|
this.domainObject = context.domainObject;
|
||||||
this.navigationService = navigationService;
|
this.navigationService = navigationService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Navigate to the object described in the context.
|
* Navigate to the object described in the context.
|
||||||
* @returns {Promise} a promise that is resolved once the
|
* @returns {Promise} a promise that is resolved once the
|
||||||
* navigation has been updated
|
* navigation has been updated
|
||||||
*/
|
*/
|
||||||
NavigateAction.prototype.perform = function () {
|
NavigateAction.prototype.perform = function () {
|
||||||
if (this.navigationService.shouldNavigate()) {
|
if (this.navigationService.shouldNavigate()) {
|
||||||
this.navigationService.setNavigation(this.domainObject, true);
|
this.navigationService.setNavigation(this.domainObject, true);
|
||||||
|
|
||||||
@ -51,19 +66,17 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Promise.reject('Navigation Prevented by User');
|
return Promise.reject('Navigation Prevented by User');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Navigate as an action is only applicable when a domain object
|
* Navigate as an action is only applicable when a domain object
|
||||||
* is described in the action context.
|
* is described in the action context.
|
||||||
* @param {ActionContext} context the context in which the action
|
* @param {ActionContext} context the context in which the action
|
||||||
* will be performed
|
* will be performed
|
||||||
* @returns {boolean} true if applicable
|
* @returns {boolean} true if applicable
|
||||||
*/
|
*/
|
||||||
NavigateAction.appliesTo = function (context) {
|
NavigateAction.appliesTo = function (context) {
|
||||||
return context.domainObject !== undefined;
|
return context.domainObject !== undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
return NavigateAction;
|
export default NavigateAction;
|
||||||
}
|
|
||||||
);
|
|
@ -23,18 +23,32 @@
|
|||||||
/**
|
/**
|
||||||
* Module defining NavigationService. Created by vwoeltje on 11/10/14.
|
* Module defining NavigationService. Created by vwoeltje on 11/10/14.
|
||||||
*/
|
*/
|
||||||
define(
|
/*****************************************************************************
|
||||||
[],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function () {
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
/**
|
|
||||||
* The navigation service maintains the application's current
|
|
||||||
* navigation state, and allows listening for changes thereto.
|
|
||||||
*
|
*
|
||||||
* @memberof platform/commonUI/browse
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
* @constructor
|
* "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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module defining NavigationService. Created by vwoeltje on 11/10/14.
|
||||||
*/
|
*/
|
||||||
function NavigationService($window) {
|
function NavigationService($window) {
|
||||||
this.navigated = undefined;
|
this.navigated = undefined;
|
||||||
this.callbacks = [];
|
this.callbacks = [];
|
||||||
this.checks = [];
|
this.checks = [];
|
||||||
@ -42,18 +56,18 @@ define(
|
|||||||
|
|
||||||
this.oldUnload = $window.onbeforeunload;
|
this.oldUnload = $window.onbeforeunload;
|
||||||
$window.onbeforeunload = this.onBeforeUnload.bind(this);
|
$window.onbeforeunload = this.onBeforeUnload.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current navigation state.
|
* Get the current navigation state.
|
||||||
*
|
*
|
||||||
* @returns {DomainObject} the object that is navigated-to
|
* @returns {DomainObject} the object that is navigated-to
|
||||||
*/
|
*/
|
||||||
NavigationService.prototype.getNavigation = function () {
|
NavigationService.prototype.getNavigation = function () {
|
||||||
return this.navigated;
|
return this.navigated;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Navigate to a specified object. If navigation checks exist and
|
* Navigate to a specified object. If navigation checks exist and
|
||||||
* return reasons to prevent navigation, it will prompt the user before
|
* return reasons to prevent navigation, it will prompt the user before
|
||||||
* continuing. Trying to navigate to the currently navigated object will
|
* continuing. Trying to navigate to the currently navigated object will
|
||||||
@ -64,9 +78,9 @@ define(
|
|||||||
*
|
*
|
||||||
* @param {DomainObject} domainObject the domain object to navigate to
|
* @param {DomainObject} domainObject the domain object to navigate to
|
||||||
* @param {Boolean} force if true, force navigation to occur.
|
* @param {Boolean} force if true, force navigation to occur.
|
||||||
* @returns {Boolean} true if navigation occured, otherwise false.
|
* @returns {Boolean} true if navigation occurred, otherwise false.
|
||||||
*/
|
*/
|
||||||
NavigationService.prototype.setNavigation = function (domainObject, force) {
|
NavigationService.prototype.setNavigation = function (domainObject, force) {
|
||||||
if (force) {
|
if (force) {
|
||||||
this.doNavigation(domainObject);
|
this.doNavigation(domainObject);
|
||||||
|
|
||||||
@ -85,9 +99,9 @@ define(
|
|||||||
this.doNavigation(domainObject);
|
this.doNavigation(domainObject);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listen for changes in navigation. The passed callback will
|
* Listen for changes in navigation. The passed callback will
|
||||||
* be invoked with the new domain object of navigation when
|
* be invoked with the new domain object of navigation when
|
||||||
* this changes.
|
* this changes.
|
||||||
@ -95,24 +109,24 @@ define(
|
|||||||
* @param {function} callback the callback to invoke when
|
* @param {function} callback the callback to invoke when
|
||||||
* navigation state changes
|
* navigation state changes
|
||||||
*/
|
*/
|
||||||
NavigationService.prototype.addListener = function (callback) {
|
NavigationService.prototype.addListener = function (callback) {
|
||||||
this.callbacks.push(callback);
|
this.callbacks.push(callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop listening for changes in navigation state.
|
* Stop listening for changes in navigation state.
|
||||||
*
|
*
|
||||||
* @param {function} callback the callback which should
|
* @param {function} callback the callback which should
|
||||||
* no longer be invoked when navigation state
|
* no longer be invoked when navigation state
|
||||||
* changes
|
* changes
|
||||||
*/
|
*/
|
||||||
NavigationService.prototype.removeListener = function (callback) {
|
NavigationService.prototype.removeListener = function (callback) {
|
||||||
this.callbacks = this.callbacks.filter(function (cb) {
|
this.callbacks = this.callbacks.filter(function (cb) {
|
||||||
return cb !== callback;
|
return cb !== callback;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if navigation should proceed. May prompt a user for input
|
* Check if navigation should proceed. May prompt a user for input
|
||||||
* if any checkFns return messages. Returns true if the user wishes to
|
* if any checkFns return messages. Returns true if the user wishes to
|
||||||
* navigate, otherwise false. If using this prior to calling
|
* navigate, otherwise false. If using this prior to calling
|
||||||
@ -121,13 +135,13 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {Boolean} true if the user wishes to navigate, otherwise false.
|
* @returns {Boolean} true if the user wishes to navigate, otherwise false.
|
||||||
*/
|
*/
|
||||||
NavigationService.prototype.shouldNavigate = function () {
|
NavigationService.prototype.shouldNavigate = function () {
|
||||||
var doNotNavigate = this.shouldWarnBeforeNavigate();
|
var doNotNavigate = this.shouldWarnBeforeNavigate();
|
||||||
|
|
||||||
return !doNotNavigate || this.$window.confirm(doNotNavigate);
|
return !doNotNavigate || this.$window.confirm(doNotNavigate);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a check function to be called before any navigation occurs.
|
* Register a check function to be called before any navigation occurs.
|
||||||
* Check functions should return a human readable "message" if
|
* Check functions should return a human readable "message" if
|
||||||
* there are any reasons to prevent navigation. Otherwise, they should
|
* there are any reasons to prevent navigation. Otherwise, they should
|
||||||
@ -137,7 +151,7 @@ define(
|
|||||||
* @param {Function} checkFn a function to call before navigation occurs.
|
* @param {Function} checkFn a function to call before navigation occurs.
|
||||||
* @returns {Function} removeCheck call to remove check
|
* @returns {Function} removeCheck call to remove check
|
||||||
*/
|
*/
|
||||||
NavigationService.prototype.checkBeforeNavigation = function (checkFn) {
|
NavigationService.prototype.checkBeforeNavigation = function (checkFn) {
|
||||||
this.checks.push(checkFn);
|
this.checks.push(checkFn);
|
||||||
|
|
||||||
return function removeCheck() {
|
return function removeCheck() {
|
||||||
@ -145,27 +159,27 @@ define(
|
|||||||
return checkFn !== fn;
|
return checkFn !== fn;
|
||||||
});
|
});
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private method to actually perform navigation.
|
* Private method to actually perform navigation.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
NavigationService.prototype.doNavigation = function (value) {
|
NavigationService.prototype.doNavigation = function (value) {
|
||||||
this.navigated = value;
|
this.navigated = value;
|
||||||
this.callbacks.forEach(function (callback) {
|
this.callbacks.forEach(function (callback) {
|
||||||
callback(value);
|
callback(value);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns either a false value, or a string that should be displayed
|
* Returns either a false value, or a string that should be displayed
|
||||||
* to the user before navigation is allowed.
|
* to the user before navigation is allowed.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
NavigationService.prototype.shouldWarnBeforeNavigate = function () {
|
NavigationService.prototype.shouldWarnBeforeNavigate = function () {
|
||||||
var reasons = [];
|
var reasons = [];
|
||||||
this.checks.forEach(function (checkFn) {
|
this.checks.forEach(function (checkFn) {
|
||||||
var reason = checkFn();
|
var reason = checkFn();
|
||||||
@ -179,15 +193,15 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listener for window on before unload event-- will warn before
|
* Listener for window on before unload event-- will warn before
|
||||||
* navigation is allowed.
|
* navigation is allowed.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
NavigationService.prototype.onBeforeUnload = function () {
|
NavigationService.prototype.onBeforeUnload = function () {
|
||||||
var shouldWarnBeforeNavigate = this.shouldWarnBeforeNavigate();
|
var shouldWarnBeforeNavigate = this.shouldWarnBeforeNavigate();
|
||||||
if (shouldWarnBeforeNavigate) {
|
if (shouldWarnBeforeNavigate) {
|
||||||
return shouldWarnBeforeNavigate;
|
return shouldWarnBeforeNavigate;
|
||||||
@ -196,8 +210,6 @@ define(
|
|||||||
if (this.oldUnload) {
|
if (this.oldUnload) {
|
||||||
return this.oldUnload.apply(undefined, [].slice.apply(arguments));
|
return this.oldUnload.apply(undefined, [].slice.apply(arguments));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return NavigationService;
|
export default NavigationService;
|
||||||
}
|
|
||||||
);
|
|
@ -20,22 +20,29 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
/**
|
function OrphanNavigationHandler(throttle, topic, navigationService) {
|
||||||
* Navigates away from orphan objects whenever they are detected.
|
|
||||||
*
|
|
||||||
* An orphan object is an object whose apparent parent does not
|
|
||||||
* actually contain it. This may occur in certain circumstances, such
|
|
||||||
* as when persistence succeeds for a newly-created object but fails
|
|
||||||
* for its parent.
|
|
||||||
*
|
|
||||||
* @param throttle the `throttle` service
|
|
||||||
* @param topic the `topic` service
|
|
||||||
* @param navigationService the `navigationService`
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
function OrphanNavigationHandler(throttle, topic, navigationService) {
|
|
||||||
var throttledCheckNavigation;
|
var throttledCheckNavigation;
|
||||||
|
|
||||||
function getParent(domainObject) {
|
function getParent(domainObject) {
|
||||||
@ -70,7 +77,6 @@ define([], function () {
|
|||||||
|
|
||||||
navigationService.addListener(throttledCheckNavigation);
|
navigationService.addListener(throttledCheckNavigation);
|
||||||
topic('mutation').listen(throttledCheckNavigation);
|
topic('mutation').listen(throttledCheckNavigation);
|
||||||
}
|
}
|
||||||
|
|
||||||
return OrphanNavigationHandler;
|
export default OrphanNavigationHandler;
|
||||||
});
|
|
@ -23,11 +23,34 @@
|
|||||||
/**
|
/**
|
||||||
* MCTIncudeSpec. Created by vwoeltje on 11/6/14.
|
* MCTIncudeSpec. Created by vwoeltje on 11/6/14.
|
||||||
*/
|
*/
|
||||||
define(
|
/*****************************************************************************
|
||||||
["../src/InspectorRegion"],
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
function (InspectorRegion) {
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
describe("The inspector region", function () {
|
/**
|
||||||
|
* MCTIncudeSpec. Created by vwoeltje on 11/6/14.
|
||||||
|
*/
|
||||||
|
import InspectorRegion from '../src/InspectorRegion';
|
||||||
|
|
||||||
|
describe("The inspector region", function () {
|
||||||
var inspectorRegion;
|
var inspectorRegion;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
@ -38,6 +61,4 @@ define(
|
|||||||
expect(inspectorRegion.regions.length).toBe(1);
|
expect(inspectorRegion.regions.length).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
);
|
|
@ -23,13 +23,34 @@
|
|||||||
/**
|
/**
|
||||||
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
|
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
|
||||||
*/
|
*/
|
||||||
define([
|
/*****************************************************************************
|
||||||
"../../src/navigation/NavigateAction"
|
* Open MCT, Copyright (c) 2014-2021, United States Government
|
||||||
], function (
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
NavigateAction
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
describe("The navigate action", function () {
|
/**
|
||||||
|
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
|
||||||
|
*/
|
||||||
|
import NavigateAction from '../../src/navigation/NavigateAction';
|
||||||
|
|
||||||
|
describe("The navigate action", function () {
|
||||||
var mockNavigationService,
|
var mockNavigationService,
|
||||||
mockDomainObject,
|
mockDomainObject,
|
||||||
action;
|
action;
|
||||||
@ -81,5 +102,4 @@ define([
|
|||||||
})).toBeTruthy();
|
})).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
});
|
});
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user