mirror of
https://github.com/nasa/openmct.git
synced 2025-06-25 10:44:21 +00:00
Compare commits
313 Commits
refresh-op
...
version-1.
Author | SHA1 | Date | |
---|---|---|---|
0a4ff80f96 | |||
77b720d00d | |||
ba982671b2 | |||
5df7d92d64 | |||
a8228406de | |||
2401473012 | |||
e502fb88fa | |||
37a52cb011 | |||
04fb4e8a82 | |||
5646a252f7 | |||
0e6ce7f58b | |||
8cd6a4c6a3 | |||
02fc162197 | |||
84d21a3695 | |||
1a6369c2b9 | |||
463c44679d | |||
c1f3ea4e61 | |||
142b767470 | |||
184b716b53 | |||
e53399495b | |||
d27f73579b | |||
1ae8199e89 | |||
2deb4e8474 | |||
7f10681424 | |||
c756adad6f | |||
f3d593bc1e | |||
b637307de6 | |||
b6e0208e71 | |||
631876cab3 | |||
a192d46c2b | |||
6923f17645 | |||
87a45de05b | |||
ab76451360 | |||
a91179091f | |||
5f7e34ce6c | |||
db33f0538a | |||
257a8e2e2d | |||
baa8078d23 | |||
ee60013f45 | |||
505796d9f0 | |||
56120ba1bb | |||
225b235059 | |||
de614ff606 | |||
7879752f47 | |||
08b2940eb6 | |||
67749dd2bb | |||
56c203d9ca | |||
54ce86eff3 | |||
9713ca74c7 | |||
81ed9169f1 | |||
e60462c221 | |||
09c4e610af | |||
4a576321e3 | |||
24c5dc03de | |||
d8291ddc17 | |||
1b75d828d8 | |||
966e583978 | |||
e52f60fdf0 | |||
b4c44c6d49 | |||
0f6215da9d | |||
7d0b323dab | |||
14114781fc | |||
97694fa29c | |||
9f6bfa2351 | |||
b842cbc83d | |||
0da5409092 | |||
888afd88b8 | |||
35692ae4b9 | |||
18b2a270c9 | |||
6f2d8e6ce3 | |||
91d1681698 | |||
efd97de743 | |||
c4cd725c9a | |||
23e5efbb19 | |||
4e995c10da | |||
b5cf157c40 | |||
ac082e9f58 | |||
9f7799b44f | |||
cdf9c50b8a | |||
7c4e9cef87 | |||
ffb3b302c7 | |||
278f48f65c | |||
4801dc4f32 | |||
9e8f845fbe | |||
b4d1cdaae8 | |||
f9d3af2724 | |||
ac6ed5dd01 | |||
6e0c1cc674 | |||
33c37ebf19 | |||
c33c29b6f3 | |||
37debefadc | |||
891fe0a36b | |||
4b6de59b03 | |||
6a5b902365 | |||
270f07ebd5 | |||
52500f6097 | |||
2fa8a8d61d | |||
69a6cd20af | |||
28eb268af1 | |||
045bb443cb | |||
c6ca912f2b | |||
78c7484d54 | |||
4d560086dd | |||
ef965ebdfd | |||
0b4a843617 | |||
7e7141a5a0 | |||
b3fd6c9b85 | |||
deb0511b43 | |||
e32f465f7a | |||
abc458cef4 | |||
2198a4780b | |||
b76d4b76cb | |||
9ebb013f22 | |||
5a4cba0226 | |||
f03bfdebb4 | |||
7c1550ced7 | |||
a09da30768 | |||
66bb938fc4 | |||
0d478d5dfc | |||
2a9b431c50 | |||
756e7e5372 | |||
573a63d359 | |||
3f2ad2be0c | |||
fd3be63805 | |||
ad8ed419de | |||
8b4f07c2e0 | |||
e667b22b3c | |||
9198effafe | |||
7d51d9c1eb | |||
de6eceb98b | |||
72f7ec1481 | |||
13ff0c368d | |||
9124f4f566 | |||
5e21f98309 | |||
26069dac79 | |||
b7d2402434 | |||
d9baa94970 | |||
afeb89a51a | |||
07992f0b2a | |||
a5c4508578 | |||
a4fab3ce8a | |||
97d80f57cc | |||
41138a1731 | |||
a54a2f8f84 | |||
5bbe710552 | |||
f2d34d7c33 | |||
8fa1770885 | |||
7221dc1ac6 | |||
25bb9939d6 | |||
e7e12504f2 | |||
68eb5e6286 | |||
63bf856d89 | |||
e3dcd51f8d | |||
cb63f4eca1 | |||
3f60c3c0f1 | |||
16bb22e834 | |||
d2b9a7754f | |||
70125afa9d | |||
551364ad8c | |||
7f7518bb9d | |||
b1467548da | |||
baa7c0bc58 | |||
73b81e38e7 | |||
8b088b7a2c | |||
894da25461 | |||
8c8a14af7b | |||
3735a85c69 | |||
79c4dc9272 | |||
d7c266d70f | |||
87d63806b9 | |||
f0e7f8cfc0 | |||
db597e1e93 | |||
98db273f5d | |||
8a6f944655 | |||
bacad24811 | |||
8cc58946cf | |||
3338bc1000 | |||
80c20b3d05 | |||
0d9558b891 | |||
c29c3c386f | |||
e1d0c22071 | |||
7dee6344b0 | |||
731ab89561 | |||
9ceb3c5b1e | |||
6bd0246db6 | |||
bee3a9eedf | |||
e515d19acd | |||
dd13efe065 | |||
99aa5c7b7b | |||
b5dfbe268c | |||
a9b9107cc3 | |||
cfda4e4214 | |||
0a657de4b2 | |||
8153edb9cb | |||
22ca339fb9 | |||
7f8764560b | |||
4411bb0a2d | |||
4ecd264d93 | |||
16677c99c9 | |||
6ab468086a | |||
9d2991ee10 | |||
dadb6120c2 | |||
d9a94db59d | |||
6dd8d448df | |||
ef2db1edaf | |||
3748927e87 | |||
7e4aac028b | |||
8e54b8a819 | |||
9e5eddec9b | |||
c46e4c5dad | |||
f0dc928230 | |||
6f674930d9 | |||
8675fc3fa6 | |||
25434342f3 | |||
8044dfe726 | |||
cd6c7fdc5e | |||
7ff85dc396 | |||
fb4877924a | |||
4b13cbdb33 | |||
51c9328dfd | |||
31ac67b393 | |||
0399766ccd | |||
18ab034147 | |||
8a4bc2a463 | |||
771fb9c044 | |||
055cf2b118 | |||
e9cf337aac | |||
04a18248c7 | |||
d462db60de | |||
67ebcf4749 | |||
38dbf2ccab | |||
e9968e3649 | |||
d9fafd2956 | |||
b5aba7ce8f | |||
0db5648e10 | |||
83325da738 | |||
4d1b2f3456 | |||
6137700c82 | |||
91a1b3f31d | |||
357b25a76b | |||
bab53ad9bd | |||
d0d4579f13 | |||
02b537580c | |||
7073b0717f | |||
d6bb1b2a12 | |||
c256696790 | |||
d5480e7524 | |||
ab463e93fe | |||
8962b0c88b | |||
8363c65312 | |||
04598b6cf1 | |||
3876151a4b | |||
43628ad9d6 | |||
67bea86bc8 | |||
4eb4cbfffc | |||
eda01abcbc | |||
2fa29124bf | |||
694b8f4666 | |||
33faeafa98 | |||
a40ff07353 | |||
41dc9c794d | |||
f1faf3965d | |||
da2ecbbcad | |||
32c892fe98 | |||
bbb271a678 | |||
fec1438806 | |||
28f19ec310 | |||
f934454c25 | |||
eb49ffae02 | |||
5751012872 | |||
aa041e04cf | |||
24e7ea143a | |||
79d5d9c4d0 | |||
b5bfdc4418 | |||
59730c60ec | |||
4a87a5d847 | |||
421c09ec2c | |||
0679b246b8 | |||
83f9c6c528 | |||
a5f3ba6259 | |||
a70facf0c8 | |||
447fe94325 | |||
8e2b666766 | |||
dcbfbdbb89 | |||
4c76bf34ab | |||
81b7a9d3e0 | |||
dc573c479c | |||
23303c910e | |||
3282934cf6 | |||
c157fab081 | |||
7c07b66cc9 | |||
7a906ccf5c | |||
ff7debfb81 | |||
92ba103f45 | |||
2c2d8d6b56 | |||
cfadb9f4fd | |||
396817b2d1 | |||
96eb6d6b74 | |||
cb5d47f66f | |||
ea90d02d66 | |||
95f73d8eb8 | |||
a37c686993 | |||
f12166097c | |||
d103a22fa0 | |||
04a60cfcbb | |||
8d723960f4 | |||
6d3cd2c699 | |||
87bf94fe0a | |||
af93823b6f | |||
4a39ddf425 | |||
83c273b976 | |||
7dd81beb03 | |||
1842d3923c |
@ -2,7 +2,7 @@ version: 2
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:8-browsers
|
- image: circleci/node:13-browsers
|
||||||
environment:
|
environment:
|
||||||
CHROME_BIN: "/usr/bin/google-chrome"
|
CHROME_BIN: "/usr/bin/google-chrome"
|
||||||
steps:
|
steps:
|
||||||
@ -20,8 +20,8 @@ jobs:
|
|||||||
paths:
|
paths:
|
||||||
- node_modules
|
- node_modules
|
||||||
- run:
|
- run:
|
||||||
name: npm run test
|
name: npm run test:coverage
|
||||||
command: npm run test
|
command: npm run test:coverage
|
||||||
- run:
|
- run:
|
||||||
name: npm run lint
|
name: npm run lint
|
||||||
command: npm run lint
|
command: npm run lint
|
||||||
|
155
.eslintrc.js
155
.eslintrc.js
@ -1,3 +1,4 @@
|
|||||||
|
const LEGACY_FILES = ["platform/**", "example/**"];
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true,
|
"browser": true,
|
||||||
@ -10,7 +11,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:vue/recommended"
|
"plugin:vue/recommended",
|
||||||
|
"plugin:you-dont-need-lodash-underscore/compatible"
|
||||||
],
|
],
|
||||||
"parser": "vue-eslint-parser",
|
"parser": "vue-eslint-parser",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
@ -22,6 +24,9 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"you-dont-need-lodash-underscore/omit": "off",
|
||||||
|
"you-dont-need-lodash-underscore/throttle": "off",
|
||||||
|
"you-dont-need-lodash-underscore/flatten": "off",
|
||||||
"no-bitwise": "error",
|
"no-bitwise": "error",
|
||||||
"curly": "error",
|
"curly": "error",
|
||||||
"eqeqeq": "error",
|
"eqeqeq": "error",
|
||||||
@ -66,6 +71,141 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
"dot-notation": "error",
|
"dot-notation": "error",
|
||||||
"indent": ["error", 4],
|
"indent": ["error", 4],
|
||||||
|
|
||||||
|
// https://eslint.org/docs/rules/no-case-declarations
|
||||||
|
"no-case-declarations": "error",
|
||||||
|
// https://eslint.org/docs/rules/max-classes-per-file
|
||||||
|
"max-classes-per-file": ["error", 1],
|
||||||
|
// https://eslint.org/docs/rules/no-eq-null
|
||||||
|
"no-eq-null": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-eval
|
||||||
|
"no-eval": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-floating-decimal
|
||||||
|
"no-floating-decimal": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-implicit-globals
|
||||||
|
"no-implicit-globals": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-implied-eval
|
||||||
|
"no-implied-eval": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-lone-blocks
|
||||||
|
"no-lone-blocks": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-loop-func
|
||||||
|
"no-loop-func": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-new-func
|
||||||
|
"no-new-func": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-new-wrappers
|
||||||
|
"no-new-wrappers": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-octal-escape
|
||||||
|
"no-octal-escape": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-proto
|
||||||
|
"no-proto": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-return-await
|
||||||
|
"no-return-await": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-script-url
|
||||||
|
"no-script-url": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-self-compare
|
||||||
|
"no-self-compare": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-sequences
|
||||||
|
"no-sequences": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-unmodified-loop-condition
|
||||||
|
"no-unmodified-loop-condition": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-useless-call
|
||||||
|
"no-useless-call": "error",
|
||||||
|
// https://eslint.org/docs/rules/wrap-iife
|
||||||
|
"wrap-iife": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-nested-ternary
|
||||||
|
"no-nested-ternary": "error",
|
||||||
|
// https://eslint.org/docs/rules/switch-colon-spacing
|
||||||
|
"switch-colon-spacing": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-useless-computed-key
|
||||||
|
"no-useless-computed-key": "error",
|
||||||
|
// https://eslint.org/docs/rules/rest-spread-spacing
|
||||||
|
"rest-spread-spacing": ["error"],
|
||||||
|
// https://eslint.org/docs/rules/no-var
|
||||||
|
"no-var": "error",
|
||||||
|
// https://eslint.org/docs/rules/one-var
|
||||||
|
"one-var": ["error", "never"],
|
||||||
|
// https://eslint.org/docs/rules/default-case-last
|
||||||
|
"default-case-last": "error",
|
||||||
|
// https://eslint.org/docs/rules/default-param-last
|
||||||
|
"default-param-last": "error",
|
||||||
|
// https://eslint.org/docs/rules/grouped-accessor-pairs
|
||||||
|
"grouped-accessor-pairs": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-constructor-return
|
||||||
|
"no-constructor-return": "error",
|
||||||
|
// https://eslint.org/docs/rules/array-callback-return
|
||||||
|
"array-callback-return": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-invalid-this
|
||||||
|
"no-invalid-this": "error", // Believe this one actually surfaces some bugs
|
||||||
|
// https://eslint.org/docs/rules/func-style
|
||||||
|
"func-style": ["error", "declaration"],
|
||||||
|
// https://eslint.org/docs/rules/no-unused-expressions
|
||||||
|
"no-unused-expressions": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-useless-concat
|
||||||
|
"no-useless-concat": "error",
|
||||||
|
// https://eslint.org/docs/rules/radix
|
||||||
|
"radix": "error",
|
||||||
|
// https://eslint.org/docs/rules/require-await
|
||||||
|
"require-await": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-alert
|
||||||
|
"no-alert": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-useless-constructor
|
||||||
|
"no-useless-constructor": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-duplicate-imports
|
||||||
|
"no-duplicate-imports": "error",
|
||||||
|
|
||||||
|
// https://eslint.org/docs/rules/no-implicit-coercion
|
||||||
|
"no-implicit-coercion": "error",
|
||||||
|
//https://eslint.org/docs/rules/no-unneeded-ternary
|
||||||
|
"no-unneeded-ternary": "error",
|
||||||
|
// https://eslint.org/docs/rules/semi
|
||||||
|
"semi": ["error", "always"],
|
||||||
|
// https://eslint.org/docs/rules/no-multi-spaces
|
||||||
|
"no-multi-spaces": "error",
|
||||||
|
// https://eslint.org/docs/rules/key-spacing
|
||||||
|
"key-spacing": ["error", {
|
||||||
|
"afterColon": true
|
||||||
|
}],
|
||||||
|
// https://eslint.org/docs/rules/keyword-spacing
|
||||||
|
"keyword-spacing": ["error", {
|
||||||
|
"before": true,
|
||||||
|
"after": true
|
||||||
|
}],
|
||||||
|
// https://eslint.org/docs/rules/comma-spacing
|
||||||
|
// Also requires one line code fix
|
||||||
|
"comma-spacing": ["error", {
|
||||||
|
"after": true
|
||||||
|
}],
|
||||||
|
//https://eslint.org/docs/rules/no-whitespace-before-property
|
||||||
|
"no-whitespace-before-property": "error",
|
||||||
|
// https://eslint.org/docs/rules/object-curly-newline
|
||||||
|
"object-curly-newline": ["error", {"consistent": true, "multiline": true}],
|
||||||
|
// https://eslint.org/docs/rules/object-property-newline
|
||||||
|
"object-property-newline": "error",
|
||||||
|
// https://eslint.org/docs/rules/brace-style
|
||||||
|
"brace-style": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-multiple-empty-lines
|
||||||
|
"no-multiple-empty-lines": ["error", {"max": 1}],
|
||||||
|
// https://eslint.org/docs/rules/operator-linebreak
|
||||||
|
"operator-linebreak": ["error", "before", {"overrides": {"=": "after"}}],
|
||||||
|
// https://eslint.org/docs/rules/padding-line-between-statements
|
||||||
|
"padding-line-between-statements":["error", {
|
||||||
|
"blankLine": "always",
|
||||||
|
"prev": "multiline-block-like",
|
||||||
|
"next": "*"
|
||||||
|
}, {
|
||||||
|
"blankLine": "always",
|
||||||
|
"prev": "*",
|
||||||
|
"next": "return"
|
||||||
|
}],
|
||||||
|
// https://eslint.org/docs/rules/space-infix-ops
|
||||||
|
"space-infix-ops": "error",
|
||||||
|
// https://eslint.org/docs/rules/space-unary-ops
|
||||||
|
"space-unary-ops": ["error", {"words": true, "nonwords": false}],
|
||||||
|
// https://eslint.org/docs/rules/arrow-spacing
|
||||||
|
"arrow-spacing": "error",
|
||||||
|
// https://eslint.org/docs/rules/semi-spacing
|
||||||
|
"semi-spacing": ["error", {"before": false, "after": true}],
|
||||||
|
|
||||||
"vue/html-indent": [
|
"vue/html-indent": [
|
||||||
"error",
|
"error",
|
||||||
4,
|
4,
|
||||||
@ -96,21 +236,24 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
"vue/multiline-html-element-content-newline": "off",
|
"vue/multiline-html-element-content-newline": "off",
|
||||||
"vue/singleline-html-element-content-newline": "off"
|
"vue/singleline-html-element-content-newline": "off",
|
||||||
|
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["*Spec.js"],
|
"files": LEGACY_FILES,
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-unused-vars": [
|
"no-unused-vars": [
|
||||||
"warn",
|
"warn",
|
||||||
{
|
{
|
||||||
"vars": "all",
|
"vars": "all",
|
||||||
"args": "none",
|
"args": "none",
|
||||||
"varsIgnorePattern": "controller",
|
"varsIgnorePattern": "controller"
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"no-nested-ternary": "off",
|
||||||
|
"no-var": "off",
|
||||||
|
"one-var": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -37,4 +37,7 @@ protractor/logs
|
|||||||
# npm-debug log
|
# npm-debug log
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
|
# karma reports
|
||||||
|
report.*.json
|
||||||
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
4
API.md
4
API.md
@ -427,8 +427,8 @@ Each telemetry value description has an object defining hints. Keys in this thi
|
|||||||
|
|
||||||
Known hints:
|
Known hints:
|
||||||
|
|
||||||
* `domain`: Indicates that the value represents the "input" of a datum. Values with a `domain` hint will be used for the x-axis of a plot, and tables will render columns for these values first.
|
* `domain`: Values with a `domain` hint will be used for the x-axis of a plot, and tables will render columns for these values first.
|
||||||
* `range`: Indicates that the value is the "output" of a datum. Values with a `range` hint will be used as the y-axis on a plot, and tables will render columns for these values after the `domain` values.
|
* `range`: Values with a `range` hint will be used as the y-axis on a plot, and tables will render columns for these values after the `domain` values.
|
||||||
* `image`: Indicates that the value may be interpreted as the URL to an image file, in which case appropriate views will be made available.
|
* `image`: Indicates that the value may be interpreted as the URL to an image file, in which case appropriate views will be made available.
|
||||||
|
|
||||||
##### The Time Conductor and Telemetry
|
##### The Time Conductor and Telemetry
|
||||||
|
200
CONTRIBUTING.md
200
CONTRIBUTING.md
@ -103,7 +103,7 @@ the name chosen could not be mistaken for a topic or master branch.
|
|||||||
### Merging
|
### Merging
|
||||||
|
|
||||||
When development is complete on an issue, the first step toward merging it
|
When development is complete on an issue, the first step toward merging it
|
||||||
back into the master branch is to file a Pull Request. The contributions
|
back into the master branch is to file a Pull Request (PR). The contributions
|
||||||
should meet code, test, and commit message standards as described below,
|
should meet code, test, and commit message standards as described below,
|
||||||
and the pull request should include a completed author checklist, also
|
and the pull request should include a completed author checklist, also
|
||||||
as described below. Pull requests may be assigned to specific team
|
as described below. Pull requests may be assigned to specific team
|
||||||
@ -114,6 +114,15 @@ request. When the reviewer is satisfied, they should add a comment to
|
|||||||
the pull request containing the reviewer checklist (from below) and complete
|
the pull request containing the reviewer checklist (from below) and complete
|
||||||
the merge back to the master branch.
|
the merge back to the master branch.
|
||||||
|
|
||||||
|
Additionally:
|
||||||
|
* Every pull request must link to the issue that it addresses. Eg. “Addresses #1234” or “Closes #1234”. This is the responsibility of the pull request’s __author__. If no issue exists, create one.
|
||||||
|
* Every __author__ must include testing instructions. These instructions should identify the areas of code affected, and some minimal test steps. If addressing a bug, reproduction steps should be included, if they were not included in the original issue. If reproduction steps were included on the original issue, and are sufficient, refer to them.
|
||||||
|
* A pull request that closes an issue should say so in the description. Including the text “Closes #1234” will cause the linked issue to be automatically closed when the pull request is merged. This is the responsibility of the pull request’s __author__.
|
||||||
|
* When a pull request is merged, and the corresponding issue closed, the __reviewer__ must add the tag “unverified” to the original issue. This will indicate that although the issue is closed, it has not been tested yet.
|
||||||
|
* Every PR must have two reviewers assigned, though only one approval is necessary for merge.
|
||||||
|
* Changes to API require approval by a senior developer.
|
||||||
|
* When creating a PR, it is the author's responsibility to apply any priority label from the issue to the PR as well. This helps with prioritization.
|
||||||
|
|
||||||
## Standards
|
## Standards
|
||||||
|
|
||||||
Contributions to Open MCT are expected to meet the following standards.
|
Contributions to Open MCT are expected to meet the following standards.
|
||||||
@ -122,97 +131,104 @@ changes.
|
|||||||
|
|
||||||
### Code Standards
|
### Code Standards
|
||||||
|
|
||||||
JavaScript sources in Open MCT must satisfy JSLint under its default
|
JavaScript sources in Open MCT must satisfy the ESLint rules defined in
|
||||||
settings. This is verified by the command line build.
|
this repository. This is verified by the command line build.
|
||||||
|
|
||||||
#### Code Guidelines
|
#### Code Guidelines
|
||||||
|
|
||||||
JavaScript sources in Open MCT should:
|
The following guidelines are provided for anyone contributing source code to the Open MCT project:
|
||||||
|
|
||||||
* Use four spaces for indentation. Tabs should not be used.
|
|
||||||
* Include JSDoc for any exposed API (e.g. public methods, constructors).
|
|
||||||
* Include non-JSDoc comments as-needed for explaining private variables,
|
|
||||||
methods, or algorithms when they are non-obvious.
|
|
||||||
* Define one public class per script, expressed as a constructor function
|
|
||||||
returned from an AMD-style module.
|
|
||||||
* Follow “Java-like” naming conventions. These includes:
|
|
||||||
* Classes should use camel case, first letter capitalized
|
|
||||||
(e.g. SomeClassName).
|
|
||||||
* Methods, variables, fields, and function names should use camel case,
|
|
||||||
first letter lower-case (e.g. someVariableName).
|
|
||||||
* Constants (variables or fields which are meant to be declared and
|
|
||||||
initialized statically, and never changed) should use only capital
|
|
||||||
letters, with underscores between words (e.g. SOME_CONSTANT).
|
|
||||||
* File names should be the name of the exported class, plus a .js extension
|
|
||||||
(e.g. SomeClassName.js).
|
|
||||||
* Avoid anonymous functions, except when functions are short (a few lines)
|
|
||||||
and/or their inclusion makes sense within the flow of the code
|
|
||||||
(e.g. as arguments to a forEach call).
|
|
||||||
* Avoid deep nesting (especially of functions), except where necessary
|
|
||||||
(e.g. due to closure scope).
|
|
||||||
* End with a single new-line character.
|
|
||||||
* Expose public methods by declaring them on the class's prototype.
|
|
||||||
* Within a given function's scope, do not mix declarations and imperative
|
|
||||||
code, and present these in the following order:
|
|
||||||
* First, variable declarations and initialization.
|
|
||||||
* Second, function declarations.
|
|
||||||
* Third, imperative statements.
|
|
||||||
* Finally, the returned value.
|
|
||||||
|
|
||||||
|
1. Write clean code. Here’s a good summary - https://github.com/ryanmcdermott/clean-code-javascript.
|
||||||
|
1. Include JSDoc for any exposed API (e.g. public methods, classes).
|
||||||
|
1. Include non-JSDoc comments as-needed for explaining private variables,
|
||||||
|
methods, or algorithms when they are non-obvious. Otherwise code
|
||||||
|
should be self-documenting.
|
||||||
|
1. Classes and Vue components should use camel case, first letter capitalized
|
||||||
|
(e.g. SomeClassName).
|
||||||
|
1. Methods, variables, fields, events, and function names should use camelCase,
|
||||||
|
first letter lower-case (e.g. someVariableName).
|
||||||
|
1. Source files that export functions should use camelCase, first letter lower-case (eg. testTools.js)
|
||||||
|
1. Constants (variables or fields which are meant to be declared and
|
||||||
|
initialized statically, and never changed) should use only capital
|
||||||
|
letters, with underscores between words (e.g. SOME_CONSTANT). They should always be declared as `const`s
|
||||||
|
1. File names should be the name of the exported class, plus a .js extension
|
||||||
|
(e.g. SomeClassName.js).
|
||||||
|
1. Avoid anonymous functions, except when functions are short (one or two lines)
|
||||||
|
and their inclusion makes sense within the flow of the code
|
||||||
|
(e.g. as arguments to a forEach call). Anonymous functions should always be arrow functions.
|
||||||
|
1. Named functions are preferred over functions assigned to variables.
|
||||||
|
eg.
|
||||||
|
```JavaScript
|
||||||
|
function renameObject(object, newName) {
|
||||||
|
Object.name = newName;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
is preferable to
|
||||||
|
```JavaScript
|
||||||
|
const rename = (object, newName) => {
|
||||||
|
Object.name = newName;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
1. Avoid deep nesting (especially of functions), except where necessary
|
||||||
|
(e.g. due to closure scope).
|
||||||
|
1. End with a single new-line character.
|
||||||
|
1. Always use ES6 `Class`es and inheritence rather than the pre-ES6 prototypal
|
||||||
|
pattern.
|
||||||
|
1. Within a given function's scope, do not mix declarations and imperative
|
||||||
|
code, and present these in the following order:
|
||||||
|
* First, variable declarations and initialization.
|
||||||
|
* Secondly, imperative statements.
|
||||||
|
* Finally, the returned value. A single return statement at the end of the function should be used, except where an early return would improve code clarity.
|
||||||
|
1. Avoid the use of "magic" values.
|
||||||
|
eg.
|
||||||
|
```JavaScript
|
||||||
|
Const UNAUTHORIZED = 401
|
||||||
|
if (responseCode === UNAUTHORIZED)
|
||||||
|
```
|
||||||
|
is preferable to
|
||||||
|
```JavaScript
|
||||||
|
if (responseCode === 401)
|
||||||
|
```
|
||||||
|
1. Use the ternary operator only for simple cases such as variable assignment. Nested ternaries should be avoided in all cases.
|
||||||
|
1. Test specs should reside alongside the source code they test, not in a separate directory.
|
||||||
|
1. Organize code by feature, not by type.
|
||||||
|
eg.
|
||||||
|
```
|
||||||
|
- telemetryTable
|
||||||
|
- row
|
||||||
|
TableRow.js
|
||||||
|
TableRowCollection.js
|
||||||
|
TableRow.vue
|
||||||
|
- column
|
||||||
|
TableColumn.js
|
||||||
|
TableColumn.vue
|
||||||
|
plugin.js
|
||||||
|
pluginSpec.js
|
||||||
|
```
|
||||||
|
is preferable to
|
||||||
|
```
|
||||||
|
- telemetryTable
|
||||||
|
- components
|
||||||
|
TableRow.vue
|
||||||
|
TableColumn.vue
|
||||||
|
- collections
|
||||||
|
TableRowCollection.js
|
||||||
|
TableColumn.js
|
||||||
|
TableRow.js
|
||||||
|
plugin.js
|
||||||
|
pluginSpec.js
|
||||||
|
```
|
||||||
Deviations from Open MCT code style guidelines require two-party agreement,
|
Deviations from Open MCT code style guidelines require two-party agreement,
|
||||||
typically from the author of the change and its reviewer.
|
typically from the author of the change and its reviewer.
|
||||||
|
|
||||||
#### Code Example
|
|
||||||
|
|
||||||
```js
|
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bundles should declare themselves as namespaces in whichever source
|
|
||||||
* file is most like the "main point of entry" to the bundle.
|
|
||||||
* @namespace some/bundle
|
|
||||||
*/
|
|
||||||
define(
|
|
||||||
['./OtherClass'],
|
|
||||||
function (OtherClass) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A summary of how to use this class goes here.
|
|
||||||
*
|
|
||||||
* @constructor
|
|
||||||
* @memberof some/bundle
|
|
||||||
*/
|
|
||||||
function ExampleClass() {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Methods which are not intended for external use should
|
|
||||||
// not have JSDoc (or should be marked @private)
|
|
||||||
ExampleClass.prototype.privateMethod = function () {
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A summary of this method goes here.
|
|
||||||
* @param {number} n a parameter
|
|
||||||
* @returns {number} a return value
|
|
||||||
*/
|
|
||||||
ExampleClass.prototype.publicMethod = function (n) {
|
|
||||||
return n * 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ExampleClass;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
```
|
|
||||||
|
|
||||||
### Test Standards
|
### Test Standards
|
||||||
|
|
||||||
Automated testing shall occur whenever changes are merged into the main
|
Automated testing shall occur whenever changes are merged into the main
|
||||||
development branch and must be confirmed alongside any pull request.
|
development branch and must be confirmed alongside any pull request.
|
||||||
|
|
||||||
Automated tests are typically unit tests which exercise individual software
|
Automated tests are tests which exercise plugins, API, and utility classes.
|
||||||
components. Tests are subject to code review along with the actual
|
Tests are subject to code review along with the actual implementation, to
|
||||||
implementation, to ensure that tests are applicable and useful.
|
ensure that tests are applicable and useful.
|
||||||
|
|
||||||
Examples of useful tests:
|
Examples of useful tests:
|
||||||
* Tests which replicate bugs (or their root causes) to verify their
|
* Tests which replicate bugs (or their root causes) to verify their
|
||||||
@ -222,8 +238,26 @@ Examples of useful tests:
|
|||||||
* Tests which verify expected interactions with other components in the
|
* Tests which verify expected interactions with other components in the
|
||||||
system.
|
system.
|
||||||
|
|
||||||
During automated testing, code coverage metrics will be reported. Line
|
#### Guidelines
|
||||||
coverage must remain at or above 80%.
|
* 100% statement coverage is achievable and desirable.
|
||||||
|
* Do blackbox testing. Test external behaviors, not internal details. Write tests that describe what your plugin is supposed to do. How it does this doesn't matter, so don't test it.
|
||||||
|
* Unit test specs for plugins should be defined at the plugin level. Start with one test spec per plugin named pluginSpec.js, and as this test spec grows too big, break it up into multiple test specs that logically group related tests.
|
||||||
|
* Unit tests for API or for utility functions and classes may be defined at a per-source file level.
|
||||||
|
* Wherever possible only use and mock public API, builtin functions, and UI in your test specs. Do not directly invoke any private functions. ie. only call or mock functions and objects exposed by openmct.* (eg. openmct.telemetry, openmct.objectView, etc.), and builtin browser functions (fetch, requestAnimationFrame, setTimeout, etc.).
|
||||||
|
* Where builtin functions have been mocked, be sure to clear them between tests.
|
||||||
|
* Test at an appropriate level of isolation. Eg.
|
||||||
|
* If you’re testing a view, you do not need to test the whole application UI, you can just fetch the view provider using the public API and render the view into an element that you have created.
|
||||||
|
* You do not need to test that the view switcher works, there should be separate tests for that.
|
||||||
|
* You do not need to test that telemetry providers work, you can mock openmct.telemetry.request() to feed test data to the view.
|
||||||
|
* Use your best judgement when deciding on appropriate scope.
|
||||||
|
* Automated tests for plugins should start by actually installing the plugin being tested, and then test that installing the plugin adds the desired features and behavior to Open MCT, observing the above rules.
|
||||||
|
* All variables used in a test spec, including any instances of the Open MCT API should be declared inside of an appropriate block scope (not at the root level of the source file), and should be initialized in the relevant beforeEach block. `beforeEach` is preferable to `beforeAll` to avoid leaking of state between tests.
|
||||||
|
* A `afterEach` or `afterAll` should be used to do any clean up necessary to prevent leakage of state between test specs. This can happen when functions on `window` are wrapped, or when the URL is changed. [A convenience function](https://github.com/nasa/openmct/blob/master/src/utils/testing.js#L59) is provided for resetting the URL and clearing builtin spies between tests.
|
||||||
|
* If writing unit tests for legacy Angular code be sure to follow [best practices in order to avoid memory leaks](https://www.thecodecampus.de/blog/avoid-memory-leaks-angularjs-unit-tests/).
|
||||||
|
|
||||||
|
#### Examples
|
||||||
|
* [Example of an automated test spec for an object view plugin](https://github.com/nasa/openmct/blob/master/src/plugins/telemetryTable/pluginSpec.js)
|
||||||
|
* [Example of an automated test spec for API](https://github.com/nasa/openmct/blob/master/src/api/time/TimeAPISpec.js)
|
||||||
|
|
||||||
### Commit Message Standards
|
### Commit Message Standards
|
||||||
|
|
||||||
@ -292,6 +326,7 @@ checklist).
|
|||||||
2. Unit tests included and/or updated with changes?
|
2. Unit tests included and/or updated with changes?
|
||||||
3. Command line build passes?
|
3. Command line build passes?
|
||||||
4. Changes have been smoke-tested?
|
4. Changes have been smoke-tested?
|
||||||
|
5. Testing instructions included?
|
||||||
|
|
||||||
### Reviewer Checklist
|
### Reviewer Checklist
|
||||||
|
|
||||||
@ -299,3 +334,4 @@ checklist).
|
|||||||
2. Appropriate unit tests included?
|
2. Appropriate unit tests included?
|
||||||
3. Code style and in-line documentation are appropriate?
|
3. Code style and in-line documentation are appropriate?
|
||||||
4. Commit messages meet standards?
|
4. Commit messages meet standards?
|
||||||
|
5. Has associated issue been labelled `unverified`? (only applicable if this PR closes the issue)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Open MCT License
|
# Open MCT License
|
||||||
|
|
||||||
Open MCT, Copyright (c) 2014-2019, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.
|
Open MCT, Copyright (c) 2014-2020, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
Open MCT 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.
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#* Open MCT, Copyright (c) 2014-2017, United States Government
|
#* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
#* as represented by the Administrator of the National Aeronautics and Space
|
#* as represented by the Administrator of the National Aeronautics and Space
|
||||||
#* Administration. All rights reserved.
|
#* Administration. All rights reserved.
|
||||||
#*
|
#*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -125,3 +125,22 @@ A release is not closed until both categories have been performed on
|
|||||||
the latest snapshot of the software, _and_ no issues labelled as
|
the latest snapshot of the software, _and_ no issues labelled as
|
||||||
["blocker" or "critical"](https://github.com/nasa/openmctweb/blob/master/CONTRIBUTING.md#issue-reporting)
|
["blocker" or "critical"](https://github.com/nasa/openmctweb/blob/master/CONTRIBUTING.md#issue-reporting)
|
||||||
remain open.
|
remain open.
|
||||||
|
|
||||||
|
### Testathons
|
||||||
|
Testathons can be used as a means of performing per-sprint and per-release testing.
|
||||||
|
|
||||||
|
#### Timing
|
||||||
|
For per-sprint testing, a testathon is typically performed at the beginning of the third week of a sprint, and again later that week to verify any fixes. For per-release testing, a testathon is typically performed prior to any formal testing processes that are applicable to that release.
|
||||||
|
|
||||||
|
#### Process
|
||||||
|
|
||||||
|
1. Prior to the scheduled testathon, a list will be compiled of all issues that are closed and unverified.
|
||||||
|
2. For each issue, testers should review the associated PR for testing instructions. See the contributing guide for instructions on [pull requests](https://github.com/nasa/openmct/blob/master/CONTRIBUTING.md#merging).
|
||||||
|
3. As each issue is verified via testing, any team members testing it should leave a comment on that issue indicating that it has been verified fixed.
|
||||||
|
4. If a bug is found that relates to an issue being tested, notes should be included on the associated issue, and the issue should be reopened. Bug notes should include reproduction steps.
|
||||||
|
5. For any bugs that are not obviously related to any of the issues under test, a new issue should be created with details about the bug, including reproduction steps. If unsure about whether a bug relates to an issue being tested, just create a new issue.
|
||||||
|
6. At the end of the testathon, triage will take place, where all tested issues will be reviewed.
|
||||||
|
7. If verified fixed, an issue will remain closed, and will have the “unverified” label removed.
|
||||||
|
8. For any bugs found, a severity will be assigned.
|
||||||
|
9. A second testathon will be scheduled for later in the week that will aim to address all issues identified as blockers, as well as any other issues scoped by the team during triage.
|
||||||
|
10. Any issues that were not tested will remain "unverified" and will be picked up in the next testathon.
|
||||||
|
@ -92,47 +92,59 @@ should update (or delegate the task of updating) Open MCT version
|
|||||||
numbers by the following process:
|
numbers by the following process:
|
||||||
|
|
||||||
1. Update version number in `package.json`
|
1. Update version number in `package.json`
|
||||||
1. Remove `-SNAPSHOT` suffix.
|
1. Create a new branch off the `master` branch.
|
||||||
2. Verify that resulting version number meets semantic versioning
|
2. Remove `-SNAPSHOT` suffix from the version in `package.json`.
|
||||||
requirements relative to previous stable version. Increment if
|
3. Verify that resulting version number meets semantic versioning
|
||||||
necessary.
|
requirements relative to previous stable version. Increment the
|
||||||
3. If version is considered unstable (which may be the case during
|
version number if necessary.
|
||||||
|
4. If version is considered unstable (which may be the case during
|
||||||
the first three sprints of a release), apply a new suffix per
|
the first three sprints of a release), apply a new suffix per
|
||||||
[Version Numbering](#version-numbering) guidance above.
|
[Version Numbering](#version-numbering) guidance above.
|
||||||
2. Tag the release.
|
2. Tag the release.
|
||||||
1. Commit changes to `package.json` on the `master` branch.
|
1. Commit changes to `package.json` on the new branch created in
|
||||||
|
the previous step.
|
||||||
The commit message should reference the sprint being closed,
|
The commit message should reference the sprint being closed,
|
||||||
preferably by a URL reference to the associated Milestone in
|
preferably by a URL reference to the associated Milestone in
|
||||||
GitHub.
|
GitHub.
|
||||||
2. Verify that build still completes, that application passes
|
2. Verify that build still completes, that application passes
|
||||||
smoke-testing, and that only differences from tested versions
|
smoke-testing, and that only differences from tested versions
|
||||||
are the changes to version number above.
|
are the changes to version number above.
|
||||||
3. Push the `master` branch.
|
3. Push the new branch.
|
||||||
4. Tag this commit with the version number, prepending the letter "v".
|
4. Tag this commit with the version number, prepending the letter "v".
|
||||||
(e.g. `git tag v0.9.3-alpha`)
|
(e.g. `git tag v0.9.3-alpha`)
|
||||||
5. Push the tag to GitHub. (e.g. `git push origin v0.9.3-alpha`).
|
5. Push the tag to GitHub. (e.g. `git push origin v0.9.3-alpha`).
|
||||||
3. Upload a release archive.
|
3. Upload a release archive.
|
||||||
1. Run `npm pack` to generate the archive.
|
1. Use the [GitHub release interface](https://github.com/nasa/openmct/releases)
|
||||||
2. Use the [GitHub release interface](https://github.com/nasa/openmct/releases)
|
|
||||||
to draft a new release.
|
to draft a new release.
|
||||||
3. Choose the existing tag for the new version (created and pushed above.)
|
2. Choose the existing tag for the new version (created and pushed above.)
|
||||||
Enter the tag name as the release name as well; see existing releases
|
Enter the tag name as the release name as well; see existing releases
|
||||||
for examples.
|
for examples. (e.g. `Open MCT v0.9.3-alpha`)
|
||||||
4. Attach the release archive.
|
3. Designate the release as a "pre-release" as appropriate (for instance,
|
||||||
5. Designate the release as a "pre-release" as appropriate (for instance,
|
|
||||||
when the version number has been suffixed as unstable, or when
|
when the version number has been suffixed as unstable, or when
|
||||||
the version number is below 1.0.0.)
|
the version number is below 1.0.0.)
|
||||||
4. Restore snapshot status in `package.json`
|
4. Add release notes including any breaking changes, enhancements,
|
||||||
1. Remove any suffix from the version number, or increment the
|
bug fixes with solutions in brief.
|
||||||
_patch_ version if there is no suffix.
|
5. Publish the release.
|
||||||
2. Append a `-SNAPSHOT` suffix.
|
4. Publish the release to npm
|
||||||
3. Commit changes to `package.json` on the `master` branch.
|
1. Login to npm
|
||||||
|
2. Checkout the tag created in the previous step.
|
||||||
|
3. In `package.json` change package to be public (private: false)
|
||||||
|
4. Test the package before publishing by doing `npm publish --dry-run`
|
||||||
|
if necessary.
|
||||||
|
5. Publish the package to the npmjs registry (e.g. `npm publish --access public`)
|
||||||
|
6. Confirm the package has been published (e.g. `https://www.npmjs.com/package/openmct`)
|
||||||
|
5. Update snapshot status in `package.json`
|
||||||
|
1. Create a new branch off the `master` branch.
|
||||||
|
2. Remove any suffix from the version number,
|
||||||
|
or increment the _patch_ version if there is no suffix.
|
||||||
|
3. Append a `-SNAPSHOT` suffix.
|
||||||
|
4. Commit changes to `package.json` on the `master` branch.
|
||||||
The commit message should reference the sprint being opened,
|
The commit message should reference the sprint being opened,
|
||||||
preferably by a URL reference to the associated Milestone in
|
preferably by a URL reference to the associated Milestone in
|
||||||
GitHub.
|
GitHub.
|
||||||
4. Verify that build still completes, that application passes
|
5. Verify that build still completes, that application passes
|
||||||
smoke-testing.
|
smoke-testing.
|
||||||
5. Push the `master` branch.
|
6. Create a PR to be merged into the `master` branch.
|
||||||
|
|
||||||
Projects dependent on Open MCT being co-developed by the Open MCT
|
Projects dependent on Open MCT being co-developed by the Open MCT
|
||||||
team should follow a similar process, except that they should
|
team should follow a similar process, except that they should
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/EventTelemetryProvider"
|
"./src/EventTelemetryProvider"
|
||||||
@ -29,7 +28,7 @@ define([
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/eventGenerator",
|
name: "example/eventGenerator",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Event Message Generator",
|
"name": "Event Message Generator",
|
||||||
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining EventTelemetry.
|
* Module defining EventTelemetry.
|
||||||
@ -44,13 +43,14 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
generatorData.getDomainValue = function (i, domain) {
|
generatorData.getDomainValue = function (i, domain) {
|
||||||
return i * interval +
|
return i * interval
|
||||||
(domain !== 'delta' ? firstObservedTime : 0);
|
+ (domain !== 'delta' ? firstObservedTime : 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
generatorData.getRangeValue = function (i, range) {
|
generatorData.getRangeValue = function (i, range) {
|
||||||
var domainDelta = this.getDomainValue(i) - firstObservedTime,
|
var domainDelta = this.getDomainValue(i) - firstObservedTime,
|
||||||
ind = i % messages.length;
|
ind = i % messages.length;
|
||||||
|
|
||||||
return messages[ind] + " - [" + domainDelta.toString() + "]";
|
return messages[ind] + " - [" + domainDelta.toString() + "]";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,Promise*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
|
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
|
||||||
@ -57,6 +56,7 @@ define(
|
|||||||
results.forEach(function (result) {
|
results.forEach(function (result) {
|
||||||
packaged[result.key] = result.telemetry;
|
packaged[result.key] = result.telemetry;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Format as expected (sources -> keys -> telemetry)
|
// Format as expected (sources -> keys -> telemetry)
|
||||||
return { eventGenerator: packaged };
|
return { eventGenerator: packaged };
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([], function () {
|
define([], function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -76,13 +75,14 @@ define([], function () {
|
|||||||
copyRangesToRow(row, i);
|
copyRangesToRow(row, i);
|
||||||
rows.push(row);
|
rows.push(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
exportService.exportCSV(rows, { headers: headers });
|
exportService.exportCSV(rows, { headers: headers });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
ExportTelemetryAsCSVAction.appliesTo = function (context) {
|
ExportTelemetryAsCSVAction.appliesTo = function (context) {
|
||||||
return context.domainObject &&
|
return context.domainObject
|
||||||
context.domainObject.hasCapability("telemetry");
|
&& context.domainObject.hasCapability("telemetry");
|
||||||
};
|
};
|
||||||
|
|
||||||
return ExportTelemetryAsCSVAction;
|
return ExportTelemetryAsCSVAction;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'./ExportTelemetryAsCSVAction'
|
'./ExportTelemetryAsCSVAction'
|
||||||
@ -27,7 +26,7 @@ define([
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/export",
|
name: "example/export",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Example of using CSV Export",
|
"name": "Example of using CSV Export",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExampleFormController"
|
"./src/ExampleFormController"
|
||||||
@ -29,7 +28,7 @@ define([
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/forms",
|
name: "example/forms",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Declarative Forms example",
|
"name": "Declarative Forms example",
|
||||||
"sources": "src",
|
"sources": "src",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,window*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -80,7 +79,7 @@ define(
|
|||||||
control: "button",
|
control: "button",
|
||||||
csslass: "icon-save",
|
csslass: "icon-save",
|
||||||
click: function () {
|
click: function () {
|
||||||
window.alert("Save");
|
console.log("Save");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -88,7 +87,7 @@ define(
|
|||||||
csslass: "icon-x",
|
csslass: "icon-x",
|
||||||
description: "Button B",
|
description: "Button B",
|
||||||
click: function () {
|
click: function () {
|
||||||
window.alert("Cancel");
|
console.log("Cancel");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -97,7 +96,7 @@ define(
|
|||||||
description: "Button C",
|
description: "Button C",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
click: function () {
|
click: function () {
|
||||||
window.alert("Delete");
|
console.log("Delete");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -152,10 +151,22 @@ define(
|
|||||||
name: "Choose something",
|
name: "Choose something",
|
||||||
control: "select",
|
control: "select",
|
||||||
options: [
|
options: [
|
||||||
{ name: "Hats", value: "hats" },
|
{
|
||||||
{ name: "Bats", value: "bats" },
|
name: "Hats",
|
||||||
{ name: "Cats", value: "cats" },
|
value: "hats"
|
||||||
{ name: "Mats", value: "mats" }
|
},
|
||||||
|
{
|
||||||
|
name: "Bats",
|
||||||
|
value: "bats"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Cats",
|
||||||
|
value: "cats"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Mats",
|
||||||
|
value: "mats"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
key: "aChoice"
|
key: "aChoice"
|
||||||
},
|
},
|
||||||
@ -164,10 +175,22 @@ define(
|
|||||||
control: "select",
|
control: "select",
|
||||||
required: true,
|
required: true,
|
||||||
options: [
|
options: [
|
||||||
{ name: "Hats", value: "hats" },
|
{
|
||||||
{ name: "Bats", value: "bats" },
|
name: "Hats",
|
||||||
{ name: "Cats", value: "cats" },
|
value: "hats"
|
||||||
{ name: "Mats", value: "mats" }
|
},
|
||||||
|
{
|
||||||
|
name: "Bats",
|
||||||
|
value: "bats"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Cats",
|
||||||
|
value: "cats"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Mats",
|
||||||
|
value: "mats"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
key: "aRequiredChoice"
|
key: "aRequiredChoice"
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,20 @@ define([
|
|||||||
domain: 2
|
domain: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// Need to enable "LocalTimeSystem" plugin to make use of this
|
||||||
|
// {
|
||||||
|
// key: "local",
|
||||||
|
// name: "Time",
|
||||||
|
// format: "local-format",
|
||||||
|
// source: "utc",
|
||||||
|
// hints: {
|
||||||
|
// domain: 3
|
||||||
|
// }
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
key: "sin",
|
key: "sin",
|
||||||
name: "Sine",
|
name: "Sine",
|
||||||
|
unit: "Hz",
|
||||||
formatString: '%0.2f',
|
formatString: '%0.2f',
|
||||||
hints: {
|
hints: {
|
||||||
range: 1
|
range: 1
|
||||||
@ -39,6 +50,7 @@ define([
|
|||||||
{
|
{
|
||||||
key: "cos",
|
key: "cos",
|
||||||
name: "Cosine",
|
name: "Cosine",
|
||||||
|
unit: "deg",
|
||||||
formatString: '%0.2f',
|
formatString: '%0.2f',
|
||||||
hints: {
|
hints: {
|
||||||
range: 2
|
range: 2
|
||||||
@ -50,7 +62,8 @@ define([
|
|||||||
values: [
|
values: [
|
||||||
{
|
{
|
||||||
key: "name",
|
key: "name",
|
||||||
name: "Name"
|
name: "Name",
|
||||||
|
format: "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "utc",
|
key: "utc",
|
||||||
@ -60,6 +73,15 @@ define([
|
|||||||
domain: 1
|
domain: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "local",
|
||||||
|
name: "Time",
|
||||||
|
format: "utc",
|
||||||
|
source: "utc",
|
||||||
|
hints: {
|
||||||
|
domain: 2
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: "state",
|
key: "state",
|
||||||
source: "value",
|
source: "value",
|
||||||
@ -88,18 +110,18 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
function GeneratorMetadataProvider() {
|
function GeneratorMetadataProvider() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
||||||
return METADATA_BY_TYPE.hasOwnProperty(domainObject.type);
|
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type);
|
||||||
};
|
};
|
||||||
|
|
||||||
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
||||||
return _.extend(
|
return Object.assign(
|
||||||
{},
|
{},
|
||||||
domainObject.telemetry,
|
domainObject.telemetry,
|
||||||
METADATA_BY_TYPE[domainObject.type]
|
METADATA_BY_TYPE[domainObject.type]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -62,18 +62,23 @@ define([
|
|||||||
var workerRequest = {};
|
var workerRequest = {};
|
||||||
|
|
||||||
props.forEach(function (prop) {
|
props.forEach(function (prop) {
|
||||||
if (domainObject.telemetry && domainObject.telemetry.hasOwnProperty(prop)) {
|
if (domainObject.telemetry && Object.prototype.hasOwnProperty.call(domainObject.telemetry, prop)) {
|
||||||
workerRequest[prop] = domainObject.telemetry[prop];
|
workerRequest[prop] = domainObject.telemetry[prop];
|
||||||
}
|
}
|
||||||
if (request && request.hasOwnProperty(prop)) {
|
|
||||||
|
if (request && Object.prototype.hasOwnProperty.call(request, prop)) {
|
||||||
workerRequest[prop] = request[prop];
|
workerRequest[prop] = request[prop];
|
||||||
}
|
}
|
||||||
if (!workerRequest.hasOwnProperty(prop)) {
|
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(workerRequest, prop)) {
|
||||||
workerRequest[prop] = REQUEST_DEFAULTS[prop];
|
workerRequest[prop] = REQUEST_DEFAULTS[prop];
|
||||||
}
|
}
|
||||||
|
|
||||||
workerRequest[prop] = Number(workerRequest[prop]);
|
workerRequest[prop] = Number(workerRequest[prop]);
|
||||||
});
|
});
|
||||||
|
|
||||||
workerRequest.name = domainObject.name;
|
workerRequest.name = domainObject.name;
|
||||||
|
|
||||||
return workerRequest;
|
return workerRequest;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -81,11 +86,13 @@ define([
|
|||||||
var workerRequest = this.makeWorkerRequest(domainObject, request);
|
var workerRequest = this.makeWorkerRequest(domainObject, request);
|
||||||
workerRequest.start = request.start;
|
workerRequest.start = request.start;
|
||||||
workerRequest.end = request.end;
|
workerRequest.end = request.end;
|
||||||
|
|
||||||
return this.workerInterface.request(workerRequest);
|
return this.workerInterface.request(workerRequest);
|
||||||
};
|
};
|
||||||
|
|
||||||
GeneratorProvider.prototype.subscribe = function (domainObject, callback) {
|
GeneratorProvider.prototype.subscribe = function (domainObject, callback) {
|
||||||
var workerRequest = this.makeWorkerRequest(domainObject, {});
|
var workerRequest = this.makeWorkerRequest(domainObject, {});
|
||||||
|
|
||||||
return this.workerInterface.subscribe(workerRequest, callback);
|
return this.workerInterface.subscribe(workerRequest, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
|
|
||||||
@ -78,12 +77,15 @@ define([
|
|||||||
if (datum[range] > RED[range]) {
|
if (datum[range] > RED[range]) {
|
||||||
return LIMITS.rh;
|
return LIMITS.rh;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (datum[range] < -RED[range]) {
|
if (datum[range] < -RED[range]) {
|
||||||
return LIMITS.rl;
|
return LIMITS.rl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (datum[range] > YELLOW[range]) {
|
if (datum[range] > YELLOW[range]) {
|
||||||
return LIMITS.yh;
|
return LIMITS.yh;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (datum[range] < -YELLOW[range]) {
|
if (datum[range] < -YELLOW[range]) {
|
||||||
return LIMITS.yl;
|
return LIMITS.yl;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -48,7 +48,7 @@ define([
|
|||||||
var interval = setInterval(function () {
|
var interval = setInterval(function () {
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
var datum = pointForTimestamp(now, duration, domainObject.name);
|
var datum = pointForTimestamp(now, duration, domainObject.name);
|
||||||
datum.value += "";
|
datum.value = String(datum.value);
|
||||||
callback(datum);
|
callback(datum);
|
||||||
}, duration);
|
}, duration);
|
||||||
|
|
||||||
@ -57,7 +57,6 @@ define([
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
StateGeneratorProvider.prototype.supportsRequest = function (domainObject, options) {
|
StateGeneratorProvider.prototype.supportsRequest = function (domainObject, options) {
|
||||||
return domainObject.type === 'example.state-generator';
|
return domainObject.type === 'example.state-generator';
|
||||||
};
|
};
|
||||||
@ -69,11 +68,13 @@ define([
|
|||||||
if (options.strategy === 'latest' || options.size === 1) {
|
if (options.strategy === 'latest' || options.size === 1) {
|
||||||
start = end;
|
start = end;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = [];
|
var data = [];
|
||||||
while (start <= end && data.length < 5000) {
|
while (start <= end && data.length < 5000) {
|
||||||
data.push(pointForTimestamp(start, duration, domainObject.name));
|
data.push(pointForTimestamp(start, duration, domainObject.name));
|
||||||
start += duration;
|
start += duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.resolve(data);
|
return Promise.resolve(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -72,13 +72,16 @@ define([
|
|||||||
});
|
});
|
||||||
var messageId;
|
var messageId;
|
||||||
|
|
||||||
|
let self = this;
|
||||||
function callback(message) {
|
function callback(message) {
|
||||||
if (message.error) {
|
if (message.error) {
|
||||||
deferred.reject(message.error);
|
deferred.reject(message.error);
|
||||||
} else {
|
} else {
|
||||||
deferred.resolve(message.data);
|
deferred.resolve(message.data);
|
||||||
}
|
}
|
||||||
delete this.callbacks[messageId];
|
|
||||||
|
delete self.callbacks[messageId];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
messageId = this.dispatch('request', request, callback.bind(this));
|
messageId = this.dispatch('request', request, callback.bind(this));
|
||||||
@ -101,8 +104,5 @@ define([
|
|||||||
}.bind(this);
|
}.bind(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return WorkerInterface;
|
return WorkerInterface;
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -20,8 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global self*/
|
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
var FIFTEEN_MINUTES = 15 * 60 * 1000;
|
var FIFTEEN_MINUTES = 15 * 60 * 1000;
|
||||||
@ -64,13 +62,14 @@
|
|||||||
data: {
|
data: {
|
||||||
name: data.name,
|
name: data.name,
|
||||||
utc: nextStep,
|
utc: nextStep,
|
||||||
yesterday: nextStep - 60*60*24*1000,
|
yesterday: nextStep - 60 * 60 * 24 * 1000,
|
||||||
sin: sin(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness),
|
sin: sin(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness),
|
||||||
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)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
nextStep += step;
|
nextStep += step;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nextStep;
|
return nextStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,6 +86,7 @@
|
|||||||
if (request.end === undefined) {
|
if (request.end === undefined) {
|
||||||
request.end = Date.now();
|
request.end = Date.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.start === undefined) {
|
if (request.start === undefined) {
|
||||||
request.start = request.end - FIFTEEN_MINUTES;
|
request.start = request.end - FIFTEEN_MINUTES;
|
||||||
}
|
}
|
||||||
@ -108,13 +108,13 @@
|
|||||||
|
|
||||||
for (; nextStep < end && data.length < 5000; nextStep += step) {
|
for (; nextStep < end && data.length < 5000; nextStep += step) {
|
||||||
data.push({
|
data.push({
|
||||||
name: request.name,
|
|
||||||
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),
|
||||||
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: data
|
||||||
@ -122,13 +122,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cos(timestamp, period, amplitude, offset, phase, randomness) {
|
function cos(timestamp, period, amplitude, offset, phase, randomness) {
|
||||||
return amplitude *
|
return amplitude
|
||||||
Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
* Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sin(timestamp, period, amplitude, offset, phase, randomness) {
|
function sin(timestamp, period, amplitude, offset, phase, randomness) {
|
||||||
return amplitude *
|
return amplitude
|
||||||
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 sendError(error, message) {
|
function sendError(error, message) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./GeneratorProvider",
|
"./GeneratorProvider",
|
||||||
@ -56,7 +55,7 @@ define([
|
|||||||
initialize: function (object) {
|
initialize: function (object) {
|
||||||
object.telemetry = {
|
object.telemetry = {
|
||||||
duration: 5
|
duration: 5
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExampleIdentityService"
|
"./src/ExampleIdentityService"
|
||||||
@ -29,7 +28,7 @@ define([
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/identity",
|
name: "example/identity",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"components": [
|
"components": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,32 +19,35 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var DEFAULT_IDENTITY = { key: "user", name: "Example User" },
|
var DEFAULT_IDENTITY = {
|
||||||
|
key: "user",
|
||||||
|
name: "Example User"
|
||||||
|
},
|
||||||
DIALOG_STRUCTURE = {
|
DIALOG_STRUCTURE = {
|
||||||
name: "Identify Yourself",
|
name: "Identify Yourself",
|
||||||
sections: [{ rows: [
|
sections: [{
|
||||||
{
|
rows: [
|
||||||
name: "User ID",
|
{
|
||||||
control: "textfield",
|
name: "User ID",
|
||||||
key: "key",
|
control: "textfield",
|
||||||
required: true
|
key: "key",
|
||||||
},
|
required: true
|
||||||
{
|
},
|
||||||
name: "Human name",
|
{
|
||||||
control: "textfield",
|
name: "Human name",
|
||||||
key: "name",
|
control: "textfield",
|
||||||
required: true
|
key: "name",
|
||||||
}
|
required: true
|
||||||
]}]
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example implementation of an identity service. This prompts the
|
* Example implementation of an identity service. This prompts the
|
||||||
* user to enter a name and user ID; in a more realistic
|
* user to enter a name and user ID; in a more realistic
|
||||||
@ -77,14 +80,14 @@ define(
|
|||||||
*/
|
*/
|
||||||
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;
|
return ExampleIdentityProvider;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -27,7 +27,7 @@ define([
|
|||||||
) {
|
) {
|
||||||
function ImageryPlugin() {
|
function ImageryPlugin() {
|
||||||
|
|
||||||
var IMAGE_SAMPLES = [
|
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",
|
||||||
@ -47,12 +47,14 @@ define([
|
|||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
|
||||||
];
|
];
|
||||||
|
const IMAGE_DELAY = 20000;
|
||||||
|
|
||||||
function pointForTimestamp(timestamp, name) {
|
function pointForTimestamp(timestamp, name) {
|
||||||
return {
|
return {
|
||||||
name: name,
|
name: name,
|
||||||
utc: Math.floor(timestamp / 5000) * 5000,
|
utc: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
||||||
url: IMAGE_SAMPLES[Math.floor(timestamp / 5000) % IMAGE_SAMPLES.length]
|
local: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
||||||
|
url: IMAGE_SAMPLES[Math.floor(timestamp / IMAGE_DELAY) % IMAGE_SAMPLES.length]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +65,7 @@ define([
|
|||||||
subscribe: function (domainObject, callback) {
|
subscribe: function (domainObject, callback) {
|
||||||
var interval = setInterval(function () {
|
var interval = setInterval(function () {
|
||||||
callback(pointForTimestamp(Date.now(), domainObject.name));
|
callback(pointForTimestamp(Date.now(), domainObject.name));
|
||||||
}, 5000);
|
}, IMAGE_DELAY);
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
@ -78,34 +80,34 @@ define([
|
|||||||
},
|
},
|
||||||
request: function (domainObject, options) {
|
request: function (domainObject, options) {
|
||||||
var start = options.start;
|
var start = options.start;
|
||||||
var end = options.end;
|
var end = Math.min(options.end, Date.now());
|
||||||
var data = [];
|
var data = [];
|
||||||
while (start <= end && data.length < 5000) {
|
while (start <= end && data.length < IMAGE_DELAY) {
|
||||||
data.push(pointForTimestamp(start, domainObject.name));
|
data.push(pointForTimestamp(start, domainObject.name));
|
||||||
start += 5000;
|
start += IMAGE_DELAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.resolve(data);
|
return Promise.resolve(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var ladProvider = {
|
var ladProvider = {
|
||||||
supportsRequest: function (domainObject, options) {
|
supportsRequest: function (domainObject, options) {
|
||||||
return domainObject.type === 'example.imagery' &&
|
return domainObject.type === 'example.imagery'
|
||||||
options.strategy === 'latest';
|
&& options.strategy === 'latest';
|
||||||
},
|
},
|
||||||
request: function (domainObject, options) {
|
request: function (domainObject, options) {
|
||||||
return Promise.resolve([pointForTimestamp(Date.now(), domainObject.name)]);
|
return Promise.resolve([pointForTimestamp(Date.now(), domainObject.name)]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
return function install(openmct) {
|
return function install(openmct) {
|
||||||
openmct.types.addType('example.imagery', {
|
openmct.types.addType('example.imagery', {
|
||||||
key: 'example.imagery',
|
key: 'example.imagery',
|
||||||
name: 'Example Imagery',
|
name: 'Example Imagery',
|
||||||
cssClass: 'icon-image',
|
cssClass: 'icon-image',
|
||||||
description: 'For development use. Creates example imagery ' +
|
description: 'For development use. Creates example imagery '
|
||||||
'data that mimics a live imagery stream.',
|
+ 'data that mimics a live imagery stream.',
|
||||||
creatable: true,
|
creatable: true,
|
||||||
initialize: function (object) {
|
initialize: function (object) {
|
||||||
object.telemetry = {
|
object.telemetry = {
|
||||||
@ -118,6 +120,14 @@ define([
|
|||||||
name: 'Time',
|
name: 'Time',
|
||||||
key: 'utc',
|
key: 'utc',
|
||||||
format: 'utc',
|
format: 'utc',
|
||||||
|
hints: {
|
||||||
|
domain: 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Local Time',
|
||||||
|
key: 'local',
|
||||||
|
format: 'local-format',
|
||||||
hints: {
|
hints: {
|
||||||
domain: 1
|
domain: 1
|
||||||
}
|
}
|
||||||
@ -131,7 +141,7 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,13 +19,12 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([], function () {
|
define([], function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/mobile",
|
name: "example/mobile",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Mobile",
|
"name": "Mobile",
|
||||||
"description": "Allows elements with pertinence to mobile usage and development",
|
"description": "Allows elements with pertinence to mobile usage and development",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/RemsTelemetryServerAdapter",
|
"./src/RemsTelemetryServerAdapter",
|
||||||
@ -31,14 +30,15 @@ define([
|
|||||||
RemsTelemetryProvider
|
RemsTelemetryProvider
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/msl",
|
name: "example/msl",
|
||||||
definition: {
|
definition: {
|
||||||
"name" : "Mars Science Laboratory Data Adapter",
|
"name": "Mars Science Laboratory Data Adapter",
|
||||||
"extensions" : {
|
"extensions": {
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"name":"Mars Science Laboratory",
|
"name": "Mars Science Laboratory",
|
||||||
"key": "msl.curiosity",
|
"key": "msl.curiosity",
|
||||||
"cssClass": "icon-object"
|
"cssClass": "icon-object"
|
||||||
},
|
},
|
||||||
@ -89,7 +89,7 @@ define([
|
|||||||
],
|
],
|
||||||
"services": [
|
"services": [
|
||||||
{
|
{
|
||||||
"key":"rems.adapter",
|
"key": "rems.adapter",
|
||||||
"implementation": RemsTelemetryServerAdapter,
|
"implementation": RemsTelemetryServerAdapter,
|
||||||
"depends": ["$http", "$log", "REMS_WS_URL"]
|
"depends": ["$http", "$log", "REMS_WS_URL"]
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -38,7 +37,7 @@ define(
|
|||||||
"identifier": "msl",
|
"identifier": "msl",
|
||||||
"instruments": [
|
"instruments": [
|
||||||
{
|
{
|
||||||
"name":"rems",
|
"name": "rems",
|
||||||
"identifier": "rems",
|
"identifier": "rems",
|
||||||
"measurements": [
|
"measurements": [
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
@ -81,6 +80,7 @@ define(
|
|||||||
(dictionary.instruments || []).forEach(function (instrument) {
|
(dictionary.instruments || []).forEach(function (instrument) {
|
||||||
addInstrument(instrument, "msl:curiosity");
|
addInstrument(instrument, "msl:curiosity");
|
||||||
});
|
});
|
||||||
|
|
||||||
return models;
|
return models;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,6 +90,7 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return RemsTelemetryModelProvider;
|
return RemsTelemetryModelProvider;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define */
|
|
||||||
define (
|
define (
|
||||||
['./RemsTelemetrySeries'],
|
['./RemsTelemetrySeries'],
|
||||||
function (RemsTelemetrySeries) {
|
function (RemsTelemetrySeries) {
|
||||||
@ -74,6 +73,7 @@ define (
|
|||||||
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
|
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
|
||||||
return function () {};
|
return function () {};
|
||||||
};
|
};
|
||||||
|
|
||||||
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
|
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
|
||||||
return function () {};
|
return function () {};
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define */
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
@ -57,6 +56,7 @@ define(
|
|||||||
RemsTelemetrySeries.prototype.getPointCount = function () {
|
RemsTelemetrySeries.prototype.getPointCount = function () {
|
||||||
return this.data.length;
|
return this.data.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The domain value at the given index. The Rems telemetry data is
|
* The domain value at the given index. The Rems telemetry data is
|
||||||
* time ordered, so the domain value is the time stamp of each data
|
* time ordered, so the domain value is the time stamp of each data
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
/*jslint es5: true */
|
/*jslint es5: true */
|
||||||
|
|
||||||
define(
|
define(
|
||||||
@ -95,28 +94,32 @@ define(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
function fallbackToLocal() {
|
function fallbackToLocal() {
|
||||||
self.$log.warn("Loading REMS data failed, probably due to" +
|
self.$log.warn("Loading REMS data failed, probably due to"
|
||||||
" cross origin policy. Falling back to local data");
|
+ " cross origin policy. Falling back to local data");
|
||||||
|
|
||||||
return self.$http.get(self.localDataURI);
|
return self.$http.get(self.localDataURI);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Filter results to match request parameters
|
//Filter results to match request parameters
|
||||||
function filterResults(results) {
|
function filterResults(results) {
|
||||||
return results.filter(function (result) {
|
return results.filter(function (result) {
|
||||||
return result.date >= (request.start || Number.MIN_VALUE) &&
|
return result.date >= (request.start || Number.MIN_VALUE)
|
||||||
result.date <= (request.end || Number.MAX_VALUE);
|
&& result.date <= (request.end || Number.MAX_VALUE);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function packageAndResolve(results) {
|
function packageAndResolve(results) {
|
||||||
return {id: id, values: results};
|
return {
|
||||||
|
id: id,
|
||||||
|
values: results
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return (this.promise = this.promise || this.$http.get(this.REMS_WS_URL))
|
return (this.promise = this.promise || this.$http.get(this.REMS_WS_URL))
|
||||||
.catch(fallbackToLocal)
|
.catch(fallbackToLocal)
|
||||||
.then(processResponse)
|
.then(processResponse)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/DialogLaunchController",
|
"./src/DialogLaunchController",
|
||||||
@ -39,7 +38,7 @@ define([
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/notifications",
|
name: "example/notifications",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"templates": [
|
"templates": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -91,7 +90,6 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Demonstrates launching an error dialog
|
Demonstrates launching an error dialog
|
||||||
*/
|
*/
|
||||||
@ -132,9 +130,9 @@ define(
|
|||||||
var dialog,
|
var dialog,
|
||||||
model = {
|
model = {
|
||||||
title: "Info Dialog Example",
|
title: "Info Dialog Example",
|
||||||
actionText: "This is an example of a blocking info" +
|
actionText: "This is an example of a blocking info"
|
||||||
" dialog. This dialog can be used to draw the user's" +
|
+ " dialog. This dialog can be used to draw the user's"
|
||||||
" attention to an event.",
|
+ " attention to an event.",
|
||||||
severity: "info",
|
severity: "info",
|
||||||
primaryOption: {
|
primaryOption: {
|
||||||
label: "OK",
|
label: "OK",
|
||||||
@ -153,6 +151,7 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return DialogLaunchController;
|
return DialogLaunchController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,window*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -42,9 +41,11 @@ define(
|
|||||||
DialogLaunchIndicator.prototype.getGlyphClass = function () {
|
DialogLaunchIndicator.prototype.getGlyphClass = function () {
|
||||||
return 'ok';
|
return 'ok';
|
||||||
};
|
};
|
||||||
|
|
||||||
DialogLaunchIndicator.prototype.getText = function () {
|
DialogLaunchIndicator.prototype.getText = function () {
|
||||||
return "Launch test dialog";
|
return "Launch test dialog";
|
||||||
};
|
};
|
||||||
|
|
||||||
DialogLaunchIndicator.prototype.getDescription = function () {
|
DialogLaunchIndicator.prototype.getDescription = function () {
|
||||||
return "Launch test dialog";
|
return "Launch test dialog";
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -48,7 +47,8 @@ define(
|
|||||||
"Eros turpis, pulvinar turpis eros eu",
|
"Eros turpis, pulvinar turpis eros eu",
|
||||||
"Lundium nascetur a, lectus montes ac, parturient in natoque, duis risus risus pulvinar pid rhoncus, habitasse auctor natoque!"
|
"Lundium nascetur a, lectus montes ac, parturient in natoque, duis risus risus pulvinar pid rhoncus, habitasse auctor natoque!"
|
||||||
];
|
];
|
||||||
return actionTexts[Math.floor(Math.random()*3)];
|
|
||||||
|
return actionTexts[Math.floor(Math.random() * 3)];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,6 +61,7 @@ define(
|
|||||||
severity: "error"
|
severity: "error"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launch a new notification with a severity of 'Alert'.
|
* Launch a new notification with a severity of 'Alert'.
|
||||||
*/
|
*/
|
||||||
@ -73,7 +74,6 @@ define(
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launch a new notification with a progress bar that is updated
|
* Launch a new notification with a progress bar that is updated
|
||||||
* periodically, tracking an ongoing process.
|
* periodically, tracking an ongoing process.
|
||||||
@ -93,10 +93,10 @@ define(
|
|||||||
* @param notification
|
* @param notification
|
||||||
*/
|
*/
|
||||||
function incrementProgress() {
|
function incrementProgress() {
|
||||||
progress = Math.min(100, Math.floor(progress + Math.random() * 30))
|
progress = Math.min(100, Math.floor(progress + Math.random() * 30));
|
||||||
let progressText = ["Estimated time" +
|
let progressText = ["Estimated time"
|
||||||
" remaining:" +
|
+ " remaining:"
|
||||||
" about ", 60 - Math.floor((progress / 100) * 60), " seconds"].join(" ");
|
+ " about ", 60 - Math.floor((progress / 100) * 60), " seconds"].join(" ");
|
||||||
notification.progress(progress, progressText);
|
notification.progress(progress, progressText);
|
||||||
|
|
||||||
if (progress < 100) {
|
if (progress < 100) {
|
||||||
@ -120,6 +120,7 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NotificationLaunchController;
|
return NotificationLaunchController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,window*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -42,9 +41,11 @@ define(
|
|||||||
NotificationLaunchIndicator.prototype.getGlyphClass = function () {
|
NotificationLaunchIndicator.prototype.getGlyphClass = function () {
|
||||||
return 'ok';
|
return 'ok';
|
||||||
};
|
};
|
||||||
|
|
||||||
NotificationLaunchIndicator.prototype.getText = function () {
|
NotificationLaunchIndicator.prototype.getText = function () {
|
||||||
return "Launch notification";
|
return "Launch notification";
|
||||||
};
|
};
|
||||||
|
|
||||||
NotificationLaunchIndicator.prototype.getDescription = function () {
|
NotificationLaunchIndicator.prototype.getDescription = function () {
|
||||||
return "Launch notification";
|
return "Launch notification";
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/BrowserPersistenceProvider"
|
"./src/BrowserPersistenceProvider"
|
||||||
@ -29,7 +28,7 @@ define([
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/persistence",
|
name: "example/persistence",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"components": [
|
"components": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stubbed implementation of a persistence provider,
|
* Stubbed implementation of a persistence provider,
|
||||||
@ -30,8 +29,6 @@ define(
|
|||||||
function () {
|
function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function BrowserPersistenceProvider($q, SPACE) {
|
function BrowserPersistenceProvider($q, SPACE) {
|
||||||
var spaces = SPACE ? [SPACE] : [],
|
var spaces = SPACE ? [SPACE] : [],
|
||||||
caches = {},
|
caches = {},
|
||||||
@ -51,6 +48,7 @@ define(
|
|||||||
},
|
},
|
||||||
listObjects: function (space) {
|
listObjects: function (space) {
|
||||||
var cache = caches[space];
|
var cache = caches[space];
|
||||||
|
|
||||||
return promises.as(
|
return promises.as(
|
||||||
cache ? Object.keys(cache) : null
|
cache ? Object.keys(cache) : null
|
||||||
);
|
);
|
||||||
@ -68,6 +66,7 @@ define(
|
|||||||
},
|
},
|
||||||
readObject: function (space, key) {
|
readObject: function (space, key) {
|
||||||
var cache = caches[space];
|
var cache = caches[space];
|
||||||
|
|
||||||
return promises.as(
|
return promises.as(
|
||||||
cache ? cache[key] : null
|
cache ? cache[key] : null
|
||||||
);
|
);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExamplePolicy"
|
"./src/ExamplePolicy"
|
||||||
@ -29,7 +28,7 @@ define([
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/policy",
|
name: "example/policy",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Example Policy",
|
"name": "Example Policy",
|
||||||
"description": "Provides an example of using policies to prohibit actions.",
|
"description": "Provides an example of using policies to prohibit actions.",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -37,6 +36,7 @@ define(
|
|||||||
model = (domainObject && domainObject.getModel()) || {},
|
model = (domainObject && domainObject.getModel()) || {},
|
||||||
name = model.name || "",
|
name = model.name || "",
|
||||||
metadata = action.getMetadata() || {};
|
metadata = action.getMetadata() || {};
|
||||||
|
|
||||||
return metadata.key !== 'remove' || name.indexOf('foo') < 0;
|
return metadata.key !== 'remove' || name.indexOf('foo') < 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/WatchIndicator",
|
"./src/WatchIndicator",
|
||||||
@ -31,7 +30,7 @@ define([
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/profiling",
|
name: "example/profiling",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"indicators": [
|
"indicators": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ScratchPersistenceProvider"
|
"./src/ScratchPersistenceProvider"
|
||||||
@ -29,7 +28,7 @@ define([
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"example/scratchpad",
|
name: "example/scratchpad",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"roots": [
|
"roots": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -20,8 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global define,window*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
function () {
|
function () {
|
||||||
@ -54,13 +52,14 @@ define(
|
|||||||
if (space === 'scratch') {
|
if (space === 'scratch') {
|
||||||
this.table[key] = JSON.stringify(value);
|
this.table[key] = JSON.stringify(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$q.when(space === 'scratch');
|
return this.$q.when(space === 'scratch');
|
||||||
};
|
};
|
||||||
|
|
||||||
ScratchPersistenceProvider.prototype.readObject = function (space, key) {
|
ScratchPersistenceProvider.prototype.readObject = function (space, key) {
|
||||||
return this.$q.when(
|
return this.$q.when(
|
||||||
(space === 'scratch' && this.table[key]) ?
|
(space === 'scratch' && this.table[key])
|
||||||
JSON.parse(this.table[key]) : undefined
|
? JSON.parse(this.table[key]) : undefined
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -68,6 +67,7 @@ define(
|
|||||||
if (space === 'scratch') {
|
if (space === 'scratch') {
|
||||||
delete this.table[key];
|
delete this.table[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$q.when(space === 'scratch');
|
return this.$q.when(space === 'scratch');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="example">{{ msg }}</div>
|
<div class="example">{{ msg }}</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
msg: 'Hello world!'
|
msg: 'Hello world!'
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -17,6 +17,7 @@ function SimpleVuePlugin() {
|
|||||||
},
|
},
|
||||||
view: function (domainObject) {
|
view: function (domainObject) {
|
||||||
var vm;
|
var vm;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
show: function (container) {
|
show: function (container) {
|
||||||
vm = new Vue(HelloWorld);
|
vm = new Vue(HelloWorld);
|
||||||
@ -29,7 +30,7 @@ function SimpleVuePlugin() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SimpleVuePlugin
|
export default SimpleVuePlugin;
|
||||||
|
@ -22,31 +22,111 @@ define([
|
|||||||
menusTemplate
|
menusTemplate
|
||||||
) {
|
) {
|
||||||
return {
|
return {
|
||||||
name:"example/styleguide",
|
name: "example/styleguide",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "Open MCT Style Guide",
|
"name": "Open MCT Style Guide",
|
||||||
"description": "Examples and documentation illustrating UI styles in use in Open MCT.",
|
"description": "Examples and documentation illustrating UI styles in use in Open MCT.",
|
||||||
"extensions":
|
"extensions":
|
||||||
{
|
{
|
||||||
"types": [
|
"types": [
|
||||||
{ "key": "styleguide.intro", "name": "Introduction", "cssClass": "icon-page", "description": "Introduction and overview to the style guide" },
|
{
|
||||||
{ "key": "styleguide.standards", "name": "Standards", "cssClass": "icon-page", "description": "" },
|
"key": "styleguide.intro",
|
||||||
{ "key": "styleguide.colors", "name": "Colors", "cssClass": "icon-page", "description": "" },
|
"name": "Introduction",
|
||||||
{ "key": "styleguide.status", "name": "status", "cssClass": "icon-page", "description": "Limits, telemetry paused, etc." },
|
"cssClass": "icon-page",
|
||||||
{ "key": "styleguide.glyphs", "name": "Glyphs", "cssClass": "icon-page", "description": "Glyphs overview" },
|
"description": "Introduction and overview to the style guide"
|
||||||
{ "key": "styleguide.controls", "name": "Controls", "cssClass": "icon-page", "description": "Buttons, selects, HTML controls" },
|
},
|
||||||
{ "key": "styleguide.input", "name": "Text Inputs", "cssClass": "icon-page", "description": "Various text inputs" },
|
{
|
||||||
{ "key": "styleguide.menus", "name": "Menus", "cssClass": "icon-page", "description": "Context menus, dropdowns" }
|
"key": "styleguide.standards",
|
||||||
|
"name": "Standards",
|
||||||
|
"cssClass": "icon-page",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.colors",
|
||||||
|
"name": "Colors",
|
||||||
|
"cssClass": "icon-page",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.status",
|
||||||
|
"name": "status",
|
||||||
|
"cssClass": "icon-page",
|
||||||
|
"description": "Limits, telemetry paused, etc."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.glyphs",
|
||||||
|
"name": "Glyphs",
|
||||||
|
"cssClass": "icon-page",
|
||||||
|
"description": "Glyphs overview"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.controls",
|
||||||
|
"name": "Controls",
|
||||||
|
"cssClass": "icon-page",
|
||||||
|
"description": "Buttons, selects, HTML controls"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.input",
|
||||||
|
"name": "Text Inputs",
|
||||||
|
"cssClass": "icon-page",
|
||||||
|
"description": "Various text inputs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.menus",
|
||||||
|
"name": "Menus",
|
||||||
|
"cssClass": "icon-page",
|
||||||
|
"description": "Context menus, dropdowns"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"views": [
|
"views": [
|
||||||
{ "key": "styleguide.intro", "type": "styleguide.intro", "template": introTemplate, "editable": false },
|
{
|
||||||
{ "key": "styleguide.standards", "type": "styleguide.standards", "template": standardsTemplate, "editable": false },
|
"key": "styleguide.intro",
|
||||||
{ "key": "styleguide.colors", "type": "styleguide.colors", "template": colorsTemplate, "editable": false },
|
"type": "styleguide.intro",
|
||||||
{ "key": "styleguide.status", "type": "styleguide.status", "template": statusTemplate, "editable": false },
|
"template": introTemplate,
|
||||||
{ "key": "styleguide.glyphs", "type": "styleguide.glyphs", "template": glyphsTemplate, "editable": false },
|
"editable": false
|
||||||
{ "key": "styleguide.controls", "type": "styleguide.controls", "template": controlsTemplate, "editable": false },
|
},
|
||||||
{ "key": "styleguide.input", "type": "styleguide.input", "template": inputTemplate, "editable": false },
|
{
|
||||||
{ "key": "styleguide.menus", "type": "styleguide.menus", "template": menusTemplate, "editable": false }
|
"key": "styleguide.standards",
|
||||||
|
"type": "styleguide.standards",
|
||||||
|
"template": standardsTemplate,
|
||||||
|
"editable": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.colors",
|
||||||
|
"type": "styleguide.colors",
|
||||||
|
"template": colorsTemplate,
|
||||||
|
"editable": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.status",
|
||||||
|
"type": "styleguide.status",
|
||||||
|
"template": statusTemplate,
|
||||||
|
"editable": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.glyphs",
|
||||||
|
"type": "styleguide.glyphs",
|
||||||
|
"template": glyphsTemplate,
|
||||||
|
"editable": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.controls",
|
||||||
|
"type": "styleguide.controls",
|
||||||
|
"template": controlsTemplate,
|
||||||
|
"editable": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.input",
|
||||||
|
"type": "styleguide.input",
|
||||||
|
"template": inputTemplate,
|
||||||
|
"editable": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "styleguide.menus",
|
||||||
|
"type": "styleguide.menus",
|
||||||
|
"template": menusTemplate,
|
||||||
|
"editable": false
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"roots": [
|
"roots": [
|
||||||
{
|
{
|
||||||
@ -56,7 +136,7 @@ define([
|
|||||||
"models": [
|
"models": [
|
||||||
{
|
{
|
||||||
"id": "styleguide:home",
|
"id": "styleguide:home",
|
||||||
"priority" : "preferred",
|
"priority": "preferred",
|
||||||
"model": {
|
"model": {
|
||||||
"type": "folder",
|
"type": "folder",
|
||||||
"name": "Style Guide Home",
|
"name": "Style Guide Home",
|
||||||
@ -73,7 +153,7 @@ define([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "styleguide:ui-elements",
|
"id": "styleguide:ui-elements",
|
||||||
"priority" : "preferred",
|
"priority": "preferred",
|
||||||
"model": {
|
"model": {
|
||||||
"type": "folder",
|
"type": "folder",
|
||||||
"name": "UI Elements",
|
"name": "UI Elements",
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -30,14 +29,46 @@ define(
|
|||||||
var pages = {};
|
var pages = {};
|
||||||
|
|
||||||
// Add pages
|
// Add pages
|
||||||
pages.intro = { name: "Introduction", type: "styleguide.intro", location: "styleguide:home" };
|
pages.intro = {
|
||||||
pages.standards = { name: "Standards", type: "styleguide.standards", location: "styleguide:home" };
|
name: "Introduction",
|
||||||
pages.colors = { name: "Colors", type: "styleguide.colors", location: "styleguide:home" };
|
type: "styleguide.intro",
|
||||||
pages.glyphs = { name: "Glyphs", type: "styleguide.glyphs", location: "styleguide:home" };
|
location: "styleguide:home"
|
||||||
pages.status = { name: "Status Indication", type: "styleguide.status", location: "styleguide:home" };
|
};
|
||||||
pages.controls = { name: "Controls", type: "styleguide.controls", location: "styleguide:ui-elements" };
|
pages.standards = {
|
||||||
pages.input = { name: "Text Inputs", type: "styleguide.input", location: "styleguide:ui-elements" };
|
name: "Standards",
|
||||||
pages.menus = { name: "Menus", type: "styleguide.menus", location: "styleguide:ui-elements" };
|
type: "styleguide.standards",
|
||||||
|
location: "styleguide:home"
|
||||||
|
};
|
||||||
|
pages.colors = {
|
||||||
|
name: "Colors",
|
||||||
|
type: "styleguide.colors",
|
||||||
|
location: "styleguide:home"
|
||||||
|
};
|
||||||
|
pages.glyphs = {
|
||||||
|
name: "Glyphs",
|
||||||
|
type: "styleguide.glyphs",
|
||||||
|
location: "styleguide:home"
|
||||||
|
};
|
||||||
|
pages.status = {
|
||||||
|
name: "Status Indication",
|
||||||
|
type: "styleguide.status",
|
||||||
|
location: "styleguide:home"
|
||||||
|
};
|
||||||
|
pages.controls = {
|
||||||
|
name: "Controls",
|
||||||
|
type: "styleguide.controls",
|
||||||
|
location: "styleguide:ui-elements"
|
||||||
|
};
|
||||||
|
pages.input = {
|
||||||
|
name: "Text Inputs",
|
||||||
|
type: "styleguide.input",
|
||||||
|
location: "styleguide:ui-elements"
|
||||||
|
};
|
||||||
|
pages.menus = {
|
||||||
|
name: "Menus",
|
||||||
|
type: "styleguide.menus",
|
||||||
|
location: "styleguide:ui-elements"
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
getModels: function () {
|
getModels: function () {
|
||||||
@ -46,6 +77,6 @@ define(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return ExampleStyleGuideModelProvider
|
return ExampleStyleGuideModelProvider;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
127
index.html
127
index.html
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
@ -30,12 +30,50 @@
|
|||||||
<link rel="icon" type="image/png" href="dist/favicons/favicon-96x96.png" sizes="96x96" type="image/x-icon">
|
<link rel="icon" type="image/png" href="dist/favicons/favicon-96x96.png" sizes="96x96" type="image/x-icon">
|
||||||
<link rel="icon" type="image/png" href="dist/favicons/favicon-32x32.png" sizes="32x32" type="image/x-icon">
|
<link rel="icon" type="image/png" href="dist/favicons/favicon-32x32.png" sizes="32x32" type="image/x-icon">
|
||||||
<link rel="icon" type="image/png" href="dist/favicons/favicon-16x16.png" sizes="16x16" type="image/x-icon">
|
<link rel="icon" type="image/png" href="dist/favicons/favicon-16x16.png" sizes="16x16" type="image/x-icon">
|
||||||
|
<style type="text/css">
|
||||||
|
@keyframes splash-spinner {
|
||||||
|
0% {
|
||||||
|
transform: translate(-50%, -50%) rotate(0deg); }
|
||||||
|
100% {
|
||||||
|
transform: translate(-50%, -50%) rotate(360deg); } }
|
||||||
|
|
||||||
|
#splash-screen {
|
||||||
|
background-color: black;
|
||||||
|
position: absolute;
|
||||||
|
top: 0; right: 0; bottom: 0; left: 0;
|
||||||
|
z-index: 10000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#splash-screen:before {
|
||||||
|
animation-name: splash-spinner;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
border-radius: 50%;
|
||||||
|
border-color: rgba(255,255,255,0.25);
|
||||||
|
border-top-color: white;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 10px;
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
opacity: 0.25;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%; top: 50%;
|
||||||
|
height: 100px; width: 100px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
const FIVE_MINUTES = 5 * 60 * 1000;
|
const THIRTY_SECONDS = 30 * 1000;
|
||||||
const THIRTY_MINUTES = 30 * 60 * 1000;
|
const ONE_MINUTE = THIRTY_SECONDS * 2;
|
||||||
|
const FIVE_MINUTES = ONE_MINUTE * 5;
|
||||||
|
const FIFTEEN_MINUTES = FIVE_MINUTES * 3;
|
||||||
|
const THIRTY_MINUTES = FIFTEEN_MINUTES * 2;
|
||||||
|
const ONE_HOUR = THIRTY_MINUTES * 2;
|
||||||
|
const TWO_HOURS = ONE_HOUR * 2;
|
||||||
|
const ONE_DAY = ONE_HOUR * 24;
|
||||||
|
|
||||||
[
|
[
|
||||||
'example/eventGenerator'
|
'example/eventGenerator'
|
||||||
@ -43,11 +81,12 @@
|
|||||||
openmct.legacyRegistry.enable.bind(openmct.legacyRegistry)
|
openmct.legacyRegistry.enable.bind(openmct.legacyRegistry)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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.LocalStorage());
|
|
||||||
openmct.install(openmct.plugins.Generator());
|
openmct.install(openmct.plugins.Generator());
|
||||||
openmct.install(openmct.plugins.ExampleImagery());
|
openmct.install(openmct.plugins.ExampleImagery());
|
||||||
|
openmct.install(openmct.plugins.Timeline());
|
||||||
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"
|
||||||
@ -63,7 +102,39 @@
|
|||||||
bounds: {
|
bounds: {
|
||||||
start: Date.now() - THIRTY_MINUTES,
|
start: Date.now() - THIRTY_MINUTES,
|
||||||
end: Date.now()
|
end: Date.now()
|
||||||
}
|
},
|
||||||
|
// commonly used bounds can be stored in history
|
||||||
|
// bounds (start and end) can accept either a milliseconds number
|
||||||
|
// or a callback function returning a milliseconds number
|
||||||
|
// a function is useful for invoking Date.now() at exact moment of preset selection
|
||||||
|
presets: [
|
||||||
|
{
|
||||||
|
label: 'Last Day',
|
||||||
|
bounds: {
|
||||||
|
start: () => Date.now() - ONE_DAY,
|
||||||
|
end: () => Date.now()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Last 2 hours',
|
||||||
|
bounds: {
|
||||||
|
start: () => Date.now() - TWO_HOURS,
|
||||||
|
end: () => Date.now()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Last hour',
|
||||||
|
bounds: {
|
||||||
|
start: () => Date.now() - ONE_HOUR,
|
||||||
|
end: () => Date.now()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// maximum recent bounds to retain in conductor history
|
||||||
|
records: 10,
|
||||||
|
// maximum duration between start and end bounds
|
||||||
|
// for utc-based time systems this is in milliseconds
|
||||||
|
limit: ONE_DAY
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Realtime",
|
name: "Realtime",
|
||||||
@ -71,8 +142,45 @@
|
|||||||
clock: 'local',
|
clock: 'local',
|
||||||
clockOffsets: {
|
clockOffsets: {
|
||||||
start: - THIRTY_MINUTES,
|
start: - THIRTY_MINUTES,
|
||||||
end: FIVE_MINUTES
|
end: THIRTY_SECONDS
|
||||||
}
|
},
|
||||||
|
presets: [
|
||||||
|
{
|
||||||
|
label: '1 Hour',
|
||||||
|
bounds: {
|
||||||
|
start: - ONE_HOUR,
|
||||||
|
end: THIRTY_SECONDS
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '30 Minutes',
|
||||||
|
bounds: {
|
||||||
|
start: - THIRTY_MINUTES,
|
||||||
|
end: THIRTY_SECONDS
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '15 Minutes',
|
||||||
|
bounds: {
|
||||||
|
start: - FIFTEEN_MINUTES,
|
||||||
|
end: THIRTY_SECONDS
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '5 Minutes',
|
||||||
|
bounds: {
|
||||||
|
start: - FIVE_MINUTES,
|
||||||
|
end: THIRTY_SECONDS
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '1 Minute',
|
||||||
|
bounds: {
|
||||||
|
start: - ONE_MINUTE,
|
||||||
|
end: THIRTY_SECONDS
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
@ -81,7 +189,10 @@
|
|||||||
openmct.install(openmct.plugins.LADTable());
|
openmct.install(openmct.plugins.LADTable());
|
||||||
openmct.install(openmct.plugins.Filters(['table', 'telemetry.plot.overlay']));
|
openmct.install(openmct.plugins.Filters(['table', 'telemetry.plot.overlay']));
|
||||||
openmct.install(openmct.plugins.ObjectMigration());
|
openmct.install(openmct.plugins.ObjectMigration());
|
||||||
openmct.install(openmct.plugins.ClearData(['table', 'telemetry.plot.overlay', 'telemetry.plot.stacked']));
|
openmct.install(openmct.plugins.ClearData(
|
||||||
|
['table', 'telemetry.plot.overlay', 'telemetry.plot.stacked'],
|
||||||
|
{indicator: true}
|
||||||
|
));
|
||||||
openmct.start();
|
openmct.start();
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
3
indexTest.js
Normal file
3
indexTest.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const testsContext = require.context('.', true, /\/(src|platform)\/.*Spec.js$/);
|
||||||
|
|
||||||
|
testsContext.keys().forEach(testsContext);
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -23,17 +23,28 @@
|
|||||||
/*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' : 'ChromeHeadless'];
|
const browsers = [process.env.NODE_ENV === 'debug' ? 'ChromeDebugging' : 'FirefoxHeadless'];
|
||||||
|
const coverageEnabled = process.env.COVERAGE === 'true';
|
||||||
|
const reporters = ['progress', 'html'];
|
||||||
|
|
||||||
|
if (coverageEnabled) {
|
||||||
|
reporters.push('coverage-istanbul');
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = (config) => {
|
module.exports = (config) => {
|
||||||
const webpackConfig = require('./webpack.config.js');
|
const webpackConfig = require('./webpack.config.js');
|
||||||
delete webpackConfig.output;
|
delete webpackConfig.output;
|
||||||
|
|
||||||
if (!devMode) {
|
if (!devMode || coverageEnabled) {
|
||||||
webpackConfig.module.rules.push({
|
webpackConfig.module.rules.push({
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
exclude: /node_modules|example/,
|
exclude: /node_modules|example|lib|dist/,
|
||||||
use: 'istanbul-instrumenter-loader'
|
use: {
|
||||||
|
loader: 'istanbul-instrumenter-loader',
|
||||||
|
options: {
|
||||||
|
esModules: true
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,16 +52,16 @@ module.exports = (config) => {
|
|||||||
basePath: '',
|
basePath: '',
|
||||||
frameworks: ['jasmine'],
|
frameworks: ['jasmine'],
|
||||||
files: [
|
files: [
|
||||||
'platform/**/*Spec.js',
|
'indexTest.js'
|
||||||
'src/**/*Spec.js'
|
|
||||||
],
|
],
|
||||||
port: 9876,
|
port: 9876,
|
||||||
reporters: [
|
reporters: reporters,
|
||||||
'progress',
|
|
||||||
'coverage',
|
|
||||||
'html'
|
|
||||||
],
|
|
||||||
browsers: browsers,
|
browsers: browsers,
|
||||||
|
client: {
|
||||||
|
jasmine: {
|
||||||
|
random: false
|
||||||
|
}
|
||||||
|
},
|
||||||
customLaunchers: {
|
customLaunchers: {
|
||||||
ChromeDebugging: {
|
ChromeDebugging: {
|
||||||
base: 'Chrome',
|
base: 'Chrome',
|
||||||
@ -61,33 +72,34 @@ module.exports = (config) => {
|
|||||||
colors: true,
|
colors: true,
|
||||||
logLevel: config.LOG_INFO,
|
logLevel: config.LOG_INFO,
|
||||||
autoWatch: true,
|
autoWatch: true,
|
||||||
coverageReporter: {
|
|
||||||
dir: process.env.CIRCLE_ARTIFACTS ?
|
|
||||||
process.env.CIRCLE_ARTIFACTS + '/coverage' :
|
|
||||||
"dist/reports/coverage",
|
|
||||||
check: {
|
|
||||||
global: {
|
|
||||||
lines: 80,
|
|
||||||
excludes: ['src/plugins/plot/**/*.js']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// HTML test reporting.
|
// HTML test reporting.
|
||||||
htmlReporter: {
|
htmlReporter: {
|
||||||
outputDir: "dist/reports/tests",
|
outputDir: "dist/reports/tests",
|
||||||
preserveDescribeNesting: true,
|
preserveDescribeNesting: true,
|
||||||
foldAll: false
|
foldAll: false
|
||||||
},
|
},
|
||||||
|
coverageIstanbulReporter: {
|
||||||
|
fixWebpackSourcePaths: true,
|
||||||
|
dir: process.env.CIRCLE_ARTIFACTS ?
|
||||||
|
process.env.CIRCLE_ARTIFACTS + '/coverage' :
|
||||||
|
"dist/reports/coverage",
|
||||||
|
reports: ['html', 'lcovonly', 'text-summary'],
|
||||||
|
thresholds: {
|
||||||
|
global: {
|
||||||
|
lines: 65
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
// add webpack as preprocessor
|
'indexTest.js': ['webpack', 'sourcemap']
|
||||||
'platform/**/*Spec.js': [ 'webpack', 'sourcemap' ],
|
|
||||||
'src/**/*Spec.js': [ 'webpack', 'sourcemap' ]
|
|
||||||
},
|
},
|
||||||
webpack: webpackConfig,
|
webpack: webpackConfig,
|
||||||
webpackMiddleware: {
|
webpackMiddleware: {
|
||||||
stats: 'errors-only',
|
stats: 'errors-only',
|
||||||
logLevel: 'warn'
|
logLevel: 'warn'
|
||||||
},
|
},
|
||||||
singleRun: true
|
concurrency: 1,
|
||||||
|
singleRun: true,
|
||||||
|
browserNoActivityTimeout: 400000
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -32,6 +32,6 @@ if (document.currentScript) {
|
|||||||
|
|
||||||
const MCT = require('./src/MCT');
|
const MCT = require('./src/MCT');
|
||||||
|
|
||||||
var openmct = new MCT();
|
const openmct = new MCT();
|
||||||
|
|
||||||
module.exports = openmct;
|
module.exports = openmct;
|
||||||
|
52
package.json
52
package.json
@ -1,13 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "openmct",
|
"name": "openmct",
|
||||||
"version": "1.0.0-snapshot",
|
"version": "1.4.0",
|
||||||
"description": "The Open MCT core platform",
|
"description": "The Open MCT core platform",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"acorn": "6.2.0",
|
"angular": ">=1.8.0",
|
||||||
"angular": "1.4.14",
|
|
||||||
"angular-route": "1.4.14",
|
"angular-route": "1.4.14",
|
||||||
"babel-eslint": "8.2.6",
|
"babel-eslint": "10.0.3",
|
||||||
"comma-separated-values": "^3.6.4",
|
"comma-separated-values": "^3.6.4",
|
||||||
"concurrently": "^3.6.1",
|
"concurrently": "^3.6.1",
|
||||||
"copy-webpack-plugin": "^4.5.2",
|
"copy-webpack-plugin": "^4.5.2",
|
||||||
@ -23,8 +22,9 @@
|
|||||||
"d3-selection": "1.3.x",
|
"d3-selection": "1.3.x",
|
||||||
"d3-time": "1.0.x",
|
"d3-time": "1.0.x",
|
||||||
"d3-time-format": "2.1.x",
|
"d3-time-format": "2.1.x",
|
||||||
"eslint": "5.2.0",
|
"eslint": "7.0.0",
|
||||||
"eslint-plugin-vue": "^6.0.0",
|
"eslint-plugin-vue": "^6.0.0",
|
||||||
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
|
||||||
"eventemitter3": "^1.2.0",
|
"eventemitter3": "^1.2.0",
|
||||||
"exports-loader": "^0.7.0",
|
"exports-loader": "^0.7.0",
|
||||||
"express": "^4.13.1",
|
"express": "^4.13.1",
|
||||||
@ -39,26 +39,28 @@
|
|||||||
"istanbul-instrumenter-loader": "^3.0.1",
|
"istanbul-instrumenter-loader": "^3.0.1",
|
||||||
"jasmine-core": "^3.1.0",
|
"jasmine-core": "^3.1.0",
|
||||||
"jsdoc": "^3.3.2",
|
"jsdoc": "^3.3.2",
|
||||||
"karma": "^2.0.3",
|
"karma": "5.1.1",
|
||||||
"karma-chrome-launcher": "^2.2.0",
|
"karma-chrome-launcher": "3.1.0",
|
||||||
"karma-cli": "^1.0.1",
|
"karma-firefox-launcher": "1.3.0",
|
||||||
"karma-coverage": "^1.1.2",
|
"karma-cli": "2.0.0",
|
||||||
"karma-html-reporter": "^0.2.7",
|
"karma-coverage": "2.0.3",
|
||||||
"karma-jasmine": "^1.1.2",
|
"karma-coverage-istanbul-reporter": "3.0.3",
|
||||||
"karma-sourcemap-loader": "^0.3.7",
|
"karma-html-reporter": "0.2.7",
|
||||||
"karma-webpack": "^3.0.0",
|
"karma-jasmine": "3.3.1",
|
||||||
|
"karma-sourcemap-loader": "0.3.7",
|
||||||
|
"karma-webpack": "4.0.2",
|
||||||
"location-bar": "^3.0.1",
|
"location-bar": "^3.0.1",
|
||||||
"lodash": "^3.10.1",
|
"lodash": "^4.17.12",
|
||||||
"markdown-toc": "^0.11.7",
|
"markdown-toc": "^0.11.7",
|
||||||
"marked": "^0.3.5",
|
"marked": "^0.3.5",
|
||||||
"mini-css-extract-plugin": "^0.4.1",
|
"mini-css-extract-plugin": "^0.4.1",
|
||||||
"minimist": "^1.1.1",
|
"minimist": "^1.2.5",
|
||||||
"moment": "^2.11.1",
|
"moment": "2.25.3",
|
||||||
"moment-duration-format": "^2.2.2",
|
"moment-duration-format": "^2.2.2",
|
||||||
"moment-timezone": "^0.5.21",
|
"moment-timezone": "0.5.28",
|
||||||
"node-bourbon": "^4.2.3",
|
"node-bourbon": "^4.2.3",
|
||||||
"node-sass": "^4.9.2",
|
"node-sass": "^4.14.1",
|
||||||
"painterro": "^0.2.65",
|
"painterro": "^1.0.35",
|
||||||
"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",
|
||||||
@ -76,15 +78,17 @@
|
|||||||
"zepto": "^1.2.0"
|
"zepto": "^1.2.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"clean": "rm -rf ./dist",
|
||||||
"start": "node app.js",
|
"start": "node app.js",
|
||||||
"lint": "eslint platform example src/**/*.{js,vue} openmct.js",
|
"lint": "eslint platform example src --ext .js,.vue openmct.js",
|
||||||
"lint:fix": "eslint platform example src/**/*.{js,vue} openmct.js --fix",
|
"lint:fix": "eslint platform example src --ext .js,.vue openmct.js --fix",
|
||||||
"build:prod": "cross-env NODE_ENV=production webpack",
|
"build:prod": "cross-env NODE_ENV=production webpack",
|
||||||
"build:dev": "webpack",
|
"build:dev": "webpack",
|
||||||
"build:watch": "webpack --watch",
|
"build:watch": "webpack --watch",
|
||||||
"test": "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:watch": "karma start --no-single-run",
|
"test:coverage": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" COVERAGE=true karma start --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",
|
||||||
"otherdoc": "node docs/gendocs.js --in docs/src --out dist/docs --suppress-toc 'docs/src/index.md|docs/src/process/index.md'",
|
"otherdoc": "node docs/gendocs.js --in docs/src --out dist/docs --suppress-toc 'docs/src/index.md|docs/src/process/index.md'",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -47,7 +47,7 @@ define([
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"platform/commonUI/about",
|
name: "platform/commonUI/about",
|
||||||
definition: {
|
definition: {
|
||||||
"name": "About Open MCT",
|
"name": "About Open MCT",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<div class="s-text l-content">
|
<div class="s-text l-content">
|
||||||
<h1 class="l-title s-title">Open MCT</h1>
|
<h1 class="l-title s-title">Open MCT</h1>
|
||||||
<div class="l-description s-description">
|
<div class="l-description s-description">
|
||||||
<p>Open MCT, Copyright © 2014-2018, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.</p>
|
<p>Open MCT, Copyright © 2014-2020, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.</p>
|
||||||
<p>Open MCT is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>.</p>
|
<p>Open MCT is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>.</p>
|
||||||
<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>
|
<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>
|
||||||
<p>Open MCT includes source code licensed under additional open source licenses. See the Open Source Licenses file included with this distribution or <a ng-click="about.openLicenses()">click here for licensing information</a>.</p>
|
<p>Open MCT includes source code licensed under additional open source licenses. See the Open Source Licenses file included with this distribution or <a ng-click="about.openLicenses()">click here for licensing information</a>.</p>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements Open MCT's About dialog.
|
* Implements Open MCT's About dialog.
|
||||||
* @namespace platform/commonUI/about
|
* @namespace platform/commonUI/about
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -25,14 +25,20 @@ define(
|
|||||||
function (AboutController) {
|
function (AboutController) {
|
||||||
|
|
||||||
describe("The About controller", function () {
|
describe("The About controller", function () {
|
||||||
var testVersions,
|
let testVersions;
|
||||||
mockWindow,
|
let mockWindow;
|
||||||
controller;
|
let controller;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
testVersions = [
|
testVersions = [
|
||||||
{ name: "Some name", value: "1.2.3" },
|
{
|
||||||
{ name: "Some other name", value: "3.2.1" }
|
name: "Some name",
|
||||||
|
value: "1.2.3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Some other name",
|
||||||
|
value: "3.2.1"
|
||||||
|
}
|
||||||
];
|
];
|
||||||
mockWindow = jasmine.createSpyObj("$window", ["open"]);
|
mockWindow = jasmine.createSpyObj("$window", ["open"]);
|
||||||
controller = new AboutController(testVersions, mockWindow);
|
controller = new AboutController(testVersions, mockWindow);
|
||||||
@ -50,8 +56,6 @@ define(
|
|||||||
controller.openLicenses();
|
controller.openLicenses();
|
||||||
expect(mockWindow.open).toHaveBeenCalledWith("#/licenses");
|
expect(mockWindow.open).toHaveBeenCalledWith("#/licenses");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -49,7 +49,7 @@ define([
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"platform/commonUI/browse",
|
name: "platform/commonUI/browse",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"routes": [
|
"routes": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -46,6 +46,7 @@ define(
|
|||||||
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);
|
||||||
|
|
||||||
return Promise.resolve({});
|
return Promise.resolve({});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -69,8 +69,10 @@ define(
|
|||||||
NavigationService.prototype.setNavigation = function (domainObject, force) {
|
NavigationService.prototype.setNavigation = function (domainObject, force) {
|
||||||
if (force) {
|
if (force) {
|
||||||
this.doNavigation(domainObject);
|
this.doNavigation(domainObject);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.navigated === domainObject) {
|
if (this.navigated === domainObject) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -81,6 +83,7 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.doNavigation(domainObject);
|
this.doNavigation(domainObject);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -120,6 +123,7 @@ define(
|
|||||||
*/
|
*/
|
||||||
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);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -135,6 +139,7 @@ define(
|
|||||||
*/
|
*/
|
||||||
NavigationService.prototype.checkBeforeNavigation = function (checkFn) {
|
NavigationService.prototype.checkBeforeNavigation = function (checkFn) {
|
||||||
this.checks.push(checkFn);
|
this.checks.push(checkFn);
|
||||||
|
|
||||||
return function removeCheck() {
|
return function removeCheck() {
|
||||||
this.checks = this.checks.filter(function (fn) {
|
this.checks = this.checks.filter(function (fn) {
|
||||||
return checkFn !== fn;
|
return checkFn !== fn;
|
||||||
@ -172,6 +177,7 @@ define(
|
|||||||
if (reasons.length) {
|
if (reasons.length) {
|
||||||
return reasons.join('\n');
|
return reasons.join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -186,6 +192,7 @@ define(
|
|||||||
if (shouldWarnBeforeNavigate) {
|
if (shouldWarnBeforeNavigate) {
|
||||||
return shouldWarnBeforeNavigate;
|
return shouldWarnBeforeNavigate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.oldUnload) {
|
if (this.oldUnload) {
|
||||||
return this.oldUnload.apply(undefined, [].slice.apply(arguments));
|
return this.oldUnload.apply(undefined, [].slice.apply(arguments));
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -40,6 +40,7 @@ define([], function () {
|
|||||||
|
|
||||||
function getParent(domainObject) {
|
function getParent(domainObject) {
|
||||||
var context = domainObject.getCapability('context');
|
var context = domainObject.getCapability('context');
|
||||||
|
|
||||||
return context.getParent();
|
return context.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -53,6 +53,7 @@ define([
|
|||||||
|
|
||||||
it("sets navigation if it is allowed", function () {
|
it("sets navigation if it is allowed", function () {
|
||||||
mockNavigationService.shouldNavigate.and.returnValue(true);
|
mockNavigationService.shouldNavigate.and.returnValue(true);
|
||||||
|
|
||||||
return action.perform()
|
return action.perform()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
expect(mockNavigationService.setNavigation)
|
expect(mockNavigationService.setNavigation)
|
||||||
@ -63,6 +64,7 @@ define([
|
|||||||
it("does not set navigation if it is not allowed", function () {
|
it("does not set navigation if it is not allowed", function () {
|
||||||
mockNavigationService.shouldNavigate.and.returnValue(false);
|
mockNavigationService.shouldNavigate.and.returnValue(false);
|
||||||
var onSuccess = jasmine.createSpy('onSuccess');
|
var onSuccess = jasmine.createSpy('onSuccess');
|
||||||
|
|
||||||
return action.perform()
|
return action.perform()
|
||||||
.then(onSuccess, function () {
|
.then(onSuccess, function () {
|
||||||
expect(onSuccess).not.toHaveBeenCalled();
|
expect(onSuccess).not.toHaveBeenCalled();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -79,7 +79,6 @@ define(
|
|||||||
navigationService.addListener(callback);
|
navigationService.addListener(callback);
|
||||||
navigationService.removeListener(callback);
|
navigationService.removeListener(callback);
|
||||||
|
|
||||||
|
|
||||||
navigationService.setNavigation(testObject);
|
navigationService.setNavigation(testObject);
|
||||||
expect(callback).not.toHaveBeenCalled();
|
expect(callback).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -70,6 +70,7 @@ define([
|
|||||||
jasmine.createSpy('throttled-' + mockThrottledFns.length);
|
jasmine.createSpy('throttled-' + mockThrottledFns.length);
|
||||||
mockThrottledFn.and.callFake(fn);
|
mockThrottledFn.and.callFake(fn);
|
||||||
mockThrottledFns.push(mockThrottledFn);
|
mockThrottledFns.push(mockThrottledFn);
|
||||||
|
|
||||||
return mockThrottledFn;
|
return mockThrottledFn;
|
||||||
});
|
});
|
||||||
mockTopic.and.returnValue(mockMutationTopic);
|
mockTopic.and.returnValue(mockMutationTopic);
|
||||||
@ -81,7 +82,7 @@ define([
|
|||||||
}[c];
|
}[c];
|
||||||
});
|
});
|
||||||
mockDomainObject.hasCapability.and.callFake(function (c) {
|
mockDomainObject.hasCapability.and.callFake(function (c) {
|
||||||
return !!mockDomainObject.getCapability(c);
|
return Boolean(mockDomainObject.getCapability(c));
|
||||||
});
|
});
|
||||||
mockParentObject.getCapability.and.callFake(function (c) {
|
mockParentObject.getCapability.and.callFake(function (c) {
|
||||||
return {
|
return {
|
||||||
@ -102,7 +103,6 @@ define([
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
it("listens for mutation with a throttled function", function () {
|
it("listens for mutation with a throttled function", function () {
|
||||||
expect(mockMutationTopic.listen)
|
expect(mockMutationTopic.listen)
|
||||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||||
@ -129,8 +129,8 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
[false, true].forEach(function (isEditRoot) {
|
[false, true].forEach(function (isEditRoot) {
|
||||||
var caseName = isEditRoot ?
|
var caseName = isEditRoot
|
||||||
"that are being edited" : "that are not being edited";
|
? "that are being edited" : "that are not being edited";
|
||||||
|
|
||||||
function itNavigatesAsExpected() {
|
function itNavigatesAsExpected() {
|
||||||
if (isOrphan && !isEditRoot) {
|
if (isOrphan && !isEditRoot) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -45,7 +45,7 @@ define([
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name:"platform/commonUI/dialog",
|
name: "platform/commonUI/dialog",
|
||||||
definition: {
|
definition: {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
@ -31,13 +31,13 @@
|
|||||||
</mct-form>
|
</mct-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="c-overlay__button-bar">
|
<div class="c-overlay__button-bar">
|
||||||
<a class='c-button c-button--major'
|
<button class='c-button c-button--major'
|
||||||
ng-class="{ disabled: !createForm.$valid }"
|
ng-class="{ disabled: !createForm.$valid }"
|
||||||
ng-click="ngModel.confirm()">
|
ng-click="ngModel.confirm()">
|
||||||
OK
|
OK
|
||||||
</a>
|
</button>
|
||||||
<a class='c-button '
|
<button class='c-button '
|
||||||
ng-click="ngModel.cancel()">
|
ng-click="ngModel.cancel()">
|
||||||
Cancel
|
Cancel
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -6,6 +6,12 @@
|
|||||||
ng-show="ngModel.dialog.messages.length > 1 ||
|
ng-show="ngModel.dialog.messages.length > 1 ||
|
||||||
ngModel.dialog.messages.length == 0">s</span>
|
ngModel.dialog.messages.length == 0">s</span>
|
||||||
</div>
|
</div>
|
||||||
|
<button
|
||||||
|
ng-if="ngModel.dialog.topBarButton"
|
||||||
|
class="c-button c-button--major"
|
||||||
|
ng-click="ngModel.topBarButton.onClick">
|
||||||
|
{{ ngModel.topBarButton.label }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-messages c-overlay__messages">
|
<div class="w-messages c-overlay__messages">
|
||||||
<mct-include
|
<mct-include
|
||||||
@ -16,7 +22,7 @@
|
|||||||
<button ng-repeat="dialogAction in ngModel.dialog.actions"
|
<button ng-repeat="dialogAction in ngModel.dialog.actions"
|
||||||
class="c-button c-button--major"
|
class="c-button c-button--major"
|
||||||
ng-click="dialogAction.action()">
|
ng-click="dialogAction.action()">
|
||||||
{{dialogAction.label}}
|
{{ dialogAction.label }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
@ -31,13 +31,13 @@
|
|||||||
</mct-include>
|
</mct-include>
|
||||||
</div>
|
</div>
|
||||||
<div class="c-overlay__button-bar">
|
<div class="c-overlay__button-bar">
|
||||||
<a ng-repeat="option in ngModel.dialog.options"
|
<button ng-repeat="option in ngModel.dialog.options"
|
||||||
href=''
|
href=''
|
||||||
class="s-button lg"
|
class="s-button lg"
|
||||||
title="{{option.description}}"
|
title="{{option.description}}"
|
||||||
ng-click="ngModel.confirm(option.key)"
|
ng-click="ngModel.confirm(option.key)"
|
||||||
ng-class="{ major: $first, subtle: !$first }">
|
ng-class="{ major: $first, subtle: !$first }">
|
||||||
{{option.name}}
|
{{option.name}}
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</mct-container>
|
</mct-container>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<div class="c-overlay__outer">
|
<div class="c-overlay__outer">
|
||||||
<button ng-click="ngModel.cancel()"
|
<button ng-click="ngModel.cancel()"
|
||||||
ng-if="ngModel.cancel"
|
ng-if="ngModel.cancel"
|
||||||
class="c-click-icon c-overlay__close-button icon-x-in-circle"></button>
|
class="c-click-icon c-overlay__close-button icon-x"></button>
|
||||||
<div class="c-overlay__contents" ng-transclude></div>
|
<div class="c-overlay__contents" ng-transclude></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user