Compare commits
1072 Commits
layout-imp
...
adding-uni
Author | SHA1 | Date | |
---|---|---|---|
16c15ccf3e | |||
a010be5718 | |||
2b89c61911 | |||
a09da30768 | |||
0d478d5dfc | |||
2a9b431c50 | |||
756e7e5372 | |||
573a63d359 | |||
3f2ad2be0c | |||
e667b22b3c | |||
7d51d9c1eb | |||
72f7ec1481 | |||
9124f4f566 | |||
5e21f98309 | |||
26069dac79 | |||
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 | |||
d7c266d70f | |||
87d63806b9 | |||
f0e7f8cfc0 | |||
db597e1e93 | |||
98db273f5d | |||
8a6f944655 | |||
bacad24811 | |||
8cc58946cf | |||
3338bc1000 | |||
80c20b3d05 | |||
0d9558b891 | |||
c29c3c386f | |||
9ceb3c5b1e | |||
bee3a9eedf | |||
e515d19acd | |||
dd13efe065 | |||
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 | |||
26838635b6 | |||
11f2c35bb2 | |||
766f48c1ba | |||
da7b93f9b3 | |||
99c095a69f | |||
f885e83505 | |||
928bc4c68a | |||
d5539c7ae4 | |||
c86a104fb6 | |||
46fedc1a30 | |||
3b6ef9b44b | |||
c68edd9b7d | |||
11574b7c40 | |||
abc2cd2413 | |||
5d74882646 | |||
9fe7f230e6 | |||
de4c5b3729 | |||
2a7901914a | |||
73b0fc6f79 | |||
ddef16795c | |||
d188b9a056 | |||
f510f3edd0 | |||
e05b0bb562 | |||
713c5e9fb7 | |||
17bca04560 | |||
61bdadc33c | |||
e0c5bca47d | |||
cdc7c1af64 | |||
3158baa998 | |||
698508fde4 | |||
68a96989e1 | |||
46a6a43234 | |||
d41fc27b55 | |||
24bb96cc90 | |||
483ee173d6 | |||
469e93d916 | |||
f96dfcc942 | |||
063a6c0e51 | |||
7c289d76b6 | |||
c617a440eb | |||
8f81a45b9b | |||
666459be87 | |||
53df89aa5d | |||
8f553f6327 | |||
f91a64483b | |||
de8d63c09d | |||
58b4a6ebf5 | |||
9d45080526 | |||
d3fe2a6811 | |||
97b37edce4 | |||
d3443518d6 | |||
c33314a4bf | |||
59eb034ab4 | |||
67d53fb62b | |||
0fd637c0e9 | |||
169cc6617a | |||
a946325e95 | |||
1beba78111 | |||
2edfeaa606 | |||
2a1f9fd063 | |||
63fe92f8ea | |||
35f303ffa4 | |||
dd70bb470f | |||
250fee125a | |||
956029c786 | |||
b9ab599c35 | |||
5a690932e9 | |||
b00757150e | |||
8515a411bd | |||
3034ec016a | |||
a81af1ce34 | |||
64c5725687 | |||
72a3248123 | |||
ee4a81bdfd | |||
b90eb80584 | |||
ebaf702c59 | |||
3956cd1c06 | |||
064cf6747e | |||
8512b634c7 | |||
4220a8a68a | |||
e7e5116773 | |||
079201273e | |||
e4c9f156a7 | |||
42eeeea374 | |||
7b060509f5 | |||
3ca9e9ae56 | |||
984bede43b | |||
87d838c690 | |||
072bf361de | |||
4e39d9fb84 | |||
14eaf4e899 | |||
a31d10e708 | |||
f9e88321a3 | |||
9e12203b86 | |||
a5326a7b95 | |||
84874f22e6 | |||
d00e8b68a5 | |||
2907d6d79c | |||
a5a4bb87c5 | |||
389589d7f7 | |||
c02cbd1ba7 | |||
90b475e17b | |||
89a298f5b3 | |||
f990a14a3c | |||
6b00af6ece | |||
5ec8ac95c1 | |||
5f061001d6 | |||
ef3c4ccf47 | |||
1a86204637 | |||
0a1959df38 | |||
03a690a158 | |||
459a055455 | |||
502d29dd25 | |||
bf947a8835 | |||
f0fd0a9cc7 | |||
7282792da1 | |||
ec0291c54d | |||
4413c29abb | |||
91e1a144ed | |||
53440c31d5 | |||
5128af2531 | |||
eedc0f13bc | |||
4172fdf1d5 | |||
7c200df4c4 | |||
d1b28e079a | |||
23ec838643 | |||
271c619c63 | |||
0552769670 | |||
99a9f5b3ba | |||
4b535ade31 | |||
de8f8088e2 | |||
32c16416d3 | |||
0cf27c349b | |||
015aa8c637 | |||
4a07ddbefc | |||
a81009541c | |||
1b680cfaca | |||
311ff003c0 | |||
0cae61444d | |||
28a603def8 | |||
d2b7407674 | |||
fff89a6384 | |||
953b95f79c | |||
6ff5ce78e1 | |||
0857fd95a7 | |||
a1f2608e7c | |||
b7cea7b955 | |||
32da19a486 | |||
39d7dc8372 | |||
f76f537be7 | |||
a681d67e05 | |||
0a634eb490 | |||
fcca8fa8d9 | |||
829eecf1ae | |||
dc7f83754a | |||
51498c0e75 | |||
6dbdebbe05 | |||
c994227d5d | |||
761ca7ad56 | |||
7f49a7bc99 | |||
ca022b8a28 | |||
6f500d0d0b | |||
07d101ac1c | |||
cdf0dd0c10 | |||
c27c347d29 | |||
dc54eef2c9 | |||
57a68a24de | |||
2c1b4b4cfc | |||
437e8a0263 | |||
0a2e912091 | |||
87513a14b7 | |||
168c040f3c | |||
78487a48f6 | |||
a5a197680d | |||
d42bd44485 | |||
77b705ecc8 | |||
48af39a584 | |||
ec978f3a35 | |||
f13714e0c4 | |||
42ac3ef9af | |||
26ffe8efde | |||
87b4000b12 | |||
f790c9bd39 | |||
096c9688d5 | |||
1f19f480ce | |||
44f48a3e2a | |||
60fce4a003 | |||
f04b5b689e | |||
05d981768e | |||
e4a6c21101 | |||
d51dd8b7d0 | |||
aed5377ad2 | |||
459b2060a5 | |||
cbeb25c583 | |||
b38a9ad4ce | |||
ecf3e19f16 | |||
3b82fd5d8b | |||
e08b4ff0ab | |||
1f3ec77bf1 | |||
3f61db2067 | |||
ce1fdbddda | |||
5332d136b7 | |||
983ed7f0e7 | |||
11978cd869 | |||
00d1b5e69f | |||
6731283cf8 | |||
6b4cd25417 | |||
0cd2799d00 | |||
243b9cac24 | |||
316e0f24cf | |||
05f94edb49 | |||
e22458f09e | |||
cc2df8401b | |||
43a82ec05f | |||
fe2e29d69b | |||
60aecfe27e | |||
5d21a8b6fe | |||
500ab52476 | |||
b0bb723357 | |||
b7fffeab1c | |||
e339d743ed | |||
84f0d49d6f | |||
090e89d524 | |||
90dd53e954 | |||
6ab60ab52e | |||
8975bc8c55 | |||
55e5c49f6e | |||
f090f7ffe7 | |||
94b5617e63 | |||
41c79c6032 | |||
83c648cc26 | |||
76e7fec1a0 | |||
09bfd80f69 | |||
15a7d03e74 | |||
1dc9743484 | |||
8f05c57d1a | |||
81caa27cba | |||
74a7ef2565 | |||
649575fd2d | |||
b75b7a958a | |||
625b39d722 | |||
65f80f4c45 | |||
02cd3048c8 | |||
63feaef988 | |||
6095872682 | |||
dba55867f4 | |||
0da80c2a67 | |||
084df5329a | |||
49ff0c79db | |||
7a4b967a01 | |||
ddfa611c44 | |||
efca7c8e58 | |||
8900072239 | |||
a7e57c62f4 | |||
24bade2284 | |||
5fcc4eebe1 | |||
27a09239e3 | |||
8d86c914a1 | |||
fab04519c6 | |||
4a5e106709 | |||
4675fc8ae6 | |||
cf9336dae9 | |||
7f32d196e4 | |||
897d05276a | |||
3e6509ce6f | |||
576b843bd5 | |||
9b8b63a0d8 | |||
a1b1fa464e | |||
95f855f905 | |||
5b00246cc0 | |||
47c388450f | |||
34a149661c | |||
4c4b587d9c | |||
b8b838f490 | |||
8cb29ba4a9 | |||
ece6223b23 | |||
ecabd00b0c | |||
768df84f10 | |||
f8b3899bb9 | |||
3b046db4f8 | |||
97f829da9f | |||
fb1eed1982 | |||
dd9b567025 | |||
fa83b4867c | |||
47d4fc9103 | |||
dabd0bff29 | |||
51c70d02d7 | |||
b74733bf3f | |||
84ae65536b | |||
71424dcf8d | |||
2c40396139 | |||
16a0bf9d6c | |||
5498ba8e1e | |||
0f9d7d2832 | |||
9bd1c51a6e | |||
fd74fb0ec4 | |||
3626ff9947 | |||
fd568409d3 | |||
14e3500a88 | |||
83d08ae369 | |||
39bf601ee1 | |||
cfafecdd64 | |||
629ca089cf | |||
89ae6ef8c7 | |||
300acd6ec8 | |||
ba780981a5 | |||
62774678a7 | |||
ac13bc5850 | |||
e526626e09 | |||
564be6f8ba | |||
371a7d3a3e | |||
8539d60562 | |||
d333fd5822 | |||
364191eddc | |||
583f4dac85 | |||
28255dce01 | |||
c9419d3e2d | |||
b386275330 | |||
d2a45e46f1 | |||
35d1727dbf | |||
8125a4f321 | |||
1a409afb03 | |||
e57c18fd69 | |||
3aec9ec6ff | |||
0e9bf74332 | |||
2609a41ee8 | |||
b8dc5acf00 | |||
fbbdf8cff7 | |||
b0edb19239 | |||
85902b878e | |||
9d5c7a4015 | |||
fc53e855c4 | |||
467c57b7c6 | |||
a51c0d5139 | |||
d46310ca7d | |||
8f87cc78e8 | |||
ee6e0f310e | |||
f328a1078e | |||
b4cf81a0ef | |||
1b9b7e2345 | |||
4456633010 | |||
cda97d142a | |||
858199e396 | |||
f504a335af | |||
463ec47af6 | |||
ec4d121a98 | |||
fea6d2df96 | |||
598d2b31e9 | |||
25e28ab97c | |||
43056c4068 | |||
614206b10c | |||
30a493d038 | |||
96e433beaa | |||
0915aaea3b | |||
80656c1be0 | |||
acd75f86f4 | |||
486dae54bd | |||
92ecf3af1d | |||
fd0c19026d | |||
3109c8d825 | |||
78cf75323f | |||
b744467f21 | |||
a0b7999ea2 | |||
2bb2bb6a1b | |||
11ed7027e7 | |||
36bcfd5a41 | |||
70b5c627ca | |||
f4f1d0387b | |||
a1bf4a92e5 | |||
7d2256d70f | |||
5814d2a35e | |||
6ab84c0bc3 | |||
a7fc9b3caa | |||
67f493f012 | |||
0686e6d38f | |||
7fc825949c | |||
2a9ccdcffd | |||
6db78af69f | |||
038489256c | |||
53b785269b | |||
007b14b5c9 | |||
50b331c451 | |||
44fc62e0ba | |||
2635f085f0 | |||
22161fce7f | |||
386fc75047 | |||
fa6dd84945 | |||
d425bd564c | |||
93e3065b3e | |||
0ad2d59924 | |||
f4468a8233 | |||
dc08877bbb | |||
f08caa6135 | |||
ad7d029ce8 | |||
387912b4d3 | |||
53e0ed4d4a | |||
11c205b5c4 | |||
4ede6351ec | |||
24bbcb466f | |||
682601477c | |||
b6b5cfe403 | |||
b6ce9c6ed7 | |||
6e5e8f0ce8 | |||
2415d785cc | |||
2b5d6beb84 | |||
86316d8940 | |||
1f2b5ec5c8 | |||
0a9d23d86f | |||
379e37c881 | |||
37ef269dce | |||
8db6f8f633 | |||
79557165a3 | |||
ec1d4abde9 | |||
07c5e2800a | |||
79811d6662 | |||
67919ece16 | |||
7029dcf09e | |||
38deef6e72 | |||
b6220288ac | |||
fc03b3a79d | |||
096d6371f1 | |||
e580734c95 | |||
2690156a9d | |||
7ac7a40b1b | |||
dc9e572052 | |||
b15ebfd492 | |||
8baee7a0c9 | |||
dc85063467 | |||
be428b326e | |||
dd0e360709 | |||
04da88e3b4 | |||
9bcab02e35 | |||
1ff4d41b7c | |||
04a5c8f69f | |||
8886a94a01 | |||
f25eebdf3f | |||
f9ba46fe85 | |||
6f6fb859d6 | |||
1e3389b427 | |||
c977c64139 | |||
e419149378 | |||
a5a3e41d21 | |||
ecef8eaf86 | |||
de03cfbe64 | |||
03a6de55d6 | |||
3c5047df5e | |||
3cc630d4c2 | |||
b3488c54cd | |||
01b1d66bea | |||
2e82edb306 | |||
8f0e773ac1 | |||
223a0feada | |||
bc9cadaa77 | |||
0fd0da8331 | |||
f42ec7e2c5 | |||
d6a422fbdb | |||
d98b54bea7 | |||
0beda1d053 | |||
e912ab8f4e | |||
5055a18ca1 | |||
fa21911287 | |||
96746f4042 | |||
b22ad3ded9 | |||
7e0f475c63 | |||
efb3c2b71e | |||
862ea6986f | |||
cfa5dcb02e | |||
23aaada79d | |||
9e4458db10 | |||
a8da06033c | |||
0bf3597147 | |||
cfd9730055 | |||
e88ead30dc | |||
67b24ce846 | |||
709c3fff65 | |||
ab6e87ae6b | |||
cdb7066bed | |||
73d0507f1f | |||
4d263bcf32 | |||
2d8f61172d | |||
621c1dc11e | |||
dd136a5ff4 | |||
8fc785bbd6 | |||
82be503f4f | |||
7feb933519 | |||
e806e5a293 | |||
770951c6da | |||
7b7c7b528a | |||
a554aa20f8 | |||
ff1ef1f184 | |||
bf1efaf912 | |||
ff2bc41317 | |||
bdaf8aff15 | |||
1dc4f9f6bb | |||
d6320f5da1 | |||
276be5e857 | |||
3101e77ecc | |||
ab6dae16f1 | |||
36222d79c6 | |||
08656a6674 | |||
8034317796 | |||
a59f3a550e | |||
415b967c0b | |||
642499d519 | |||
fa0a54eee7 | |||
82f175f6c7 | |||
8df549e8d9 | |||
9fd720777b | |||
4c68c725b1 | |||
06a5207c6d | |||
78b885c508 | |||
a18a3b6099 | |||
68949e070c | |||
654333dabe | |||
81b8a76f1b | |||
31736fa194 | |||
33632ef1dc | |||
94305ed82c | |||
c8abc45e25 | |||
cd25459ac9 | |||
aaf1eb8059 | |||
1589e4236a | |||
8ca202d0a9 | |||
d2f7904118 | |||
2d059fb856 | |||
8bbd7898bb | |||
ea6f8c9a50 | |||
d152440436 | |||
1ffe76a525 | |||
a6825f530c | |||
7cf6dc386f | |||
5d8252bb07 | |||
e1e1e0fb2f | |||
4f7345563f | |||
68a2b9f3a8 | |||
d79402c568 | |||
d0e8f650be | |||
d819c6efe2 | |||
91c877f234 | |||
55a674ba7b | |||
36055b7c04 | |||
7db4ac8ff6 | |||
fe3cc661d3 | |||
eb7efae1cc | |||
63f8fb54d4 | |||
097fa2e655 | |||
3d0b4d51c2 | |||
37650487f7 | |||
6ccc0b4fbf | |||
79fe95372d | |||
6adb190d0e | |||
c094e6c6f4 | |||
8c796b4e57 | |||
c08e9a89ff | |||
03829af2ad | |||
cc8ba18ccc | |||
57c671a42e | |||
1ee6ecf3ae | |||
5f80b3773b | |||
8452455050 | |||
e5d8f60cdb | |||
de466000a0 | |||
49664c011c | |||
cf34d6b127 | |||
e52f6ce099 | |||
1ecdc4c487 | |||
d38e2c49cb | |||
f8464fa76f | |||
308ae2cb2e | |||
88219659fb | |||
c34c2df061 | |||
99c7bd4c10 | |||
322cd94be7 | |||
f93d5a6fbf | |||
cd116667be | |||
2f2de3952d | |||
45e56798c5 | |||
0664d480e6 | |||
5d31806fb7 | |||
283599ddf5 | |||
09e3ceefa0 | |||
87f76ebfe4 | |||
384f0efcb3 | |||
55a195b841 | |||
c7946fd7b3 | |||
5d3ba3199c | |||
f0d10306fc | |||
161943b5b8 | |||
e545043a26 | |||
40fb58b5b7 | |||
1f9d4708b3 | |||
162809e081 | |||
482c871ac2 | |||
f0b3311630 | |||
656d6d6c3f | |||
ea45f0f4aa | |||
6a25cb0a58 | |||
4a1901420d | |||
ad64f00608 | |||
65aea29cb9 | |||
7981424e9a | |||
10c4340475 | |||
0a95db1a51 | |||
ace77dce65 | |||
c1d58bb25f | |||
fbcafe0f62 | |||
9a9d9222a9 | |||
221e5b4f6c | |||
5df74aee68 | |||
3b195e9c7d | |||
17838d8040 | |||
2248c2da08 | |||
532c0e98db | |||
ef3bae1312 | |||
37a8cf071c | |||
98c9cc92b8 | |||
490cb2225d | |||
ecd8372efa | |||
50173a4413 | |||
76fc0b01fa | |||
23781fa686 | |||
8ec1b9965a | |||
a16a44208a | |||
f82ca91a61 | |||
f86b8cce16 | |||
b06c234b59 | |||
31a7ebd4f1 | |||
c83e44ff1c | |||
d6faa25888 | |||
55327a0150 | |||
28d2194d51 | |||
b3bc618bb0 | |||
14a0f84c1b | |||
14ce5e159b | |||
419285c396 | |||
c51fd21847 | |||
72e382c46a | |||
8825a458dc | |||
cab51f2665 | |||
c6f83dea8d | |||
6e2497461a | |||
bdd55b3db0 | |||
700ca90c8e | |||
3f6f893e29 | |||
360881cf66 | |||
a4c2e944b3 | |||
93abb09419 | |||
e58e9d3a26 | |||
527c5ec7dd | |||
286d6e5082 | |||
14e8c7a401 | |||
fab8bb516a | |||
6d526eaf42 | |||
8b715f331c | |||
d6950a0976 | |||
68f3436792 | |||
4414161faf | |||
7477536478 | |||
2dd7307fce | |||
6b2f2b758d | |||
c13b07e648 | |||
2ecff75da5 | |||
ff5b88b544 | |||
9b7a986475 | |||
c054914a9c | |||
69b6f8afa9 | |||
45164a2f68 | |||
b189a887e6 | |||
71abfbc336 | |||
ee690545fb | |||
fcf3c76aa1 | |||
5dbd77d10c | |||
43515ca84e | |||
54fe881e71 | |||
7c32700b69 | |||
e98d0cc7c5 | |||
2200503e48 | |||
8f0081acc8 | |||
003c3e9fbe | |||
02ef58ced1 | |||
e89881c266 | |||
fa66289d5c | |||
4f3a3befe0 | |||
a0864a8702 | |||
a34ad4e58c | |||
7e50010463 | |||
974be0ae2c | |||
3dee6db5e2 | |||
3dc6dac12d | |||
aafe524454 | |||
e84ade1752 | |||
3b094e43e3 | |||
e6a7b4ed6c | |||
97230bb21f | |||
768d99d928 | |||
c760190a29 | |||
7fe4a77c43 | |||
8578d78c51 | |||
362e565a09 | |||
9517c1f2cd | |||
262d35804d | |||
e0587bf0e7 | |||
f1494fd285 | |||
884aec8ea0 | |||
216f447578 | |||
c38d810658 | |||
f5c48b7bf6 | |||
d0e08f1d9a | |||
72ea7b80fd | |||
35d0c02bc5 | |||
abd7506b45 | |||
526b4aa07e | |||
b5e23963d4 | |||
2c11eb90d4 | |||
90e9c79e19 | |||
1b83631e43 | |||
547d4e82db | |||
3377ad5e0d | |||
1c0df60f05 | |||
138067dca9 | |||
844280eaa5 | |||
d2e2d55caf | |||
f01d4071a1 | |||
06524ce967 | |||
1ec529f360 | |||
cf6458c69d | |||
3316500774 | |||
0f780587c0 | |||
ea69508e22 | |||
4274d8cc0b | |||
1a2048332f | |||
38a875395f | |||
f601ab03e7 | |||
ee1d92d4a9 | |||
548286bacd | |||
9c9006d415 | |||
3219a64d09 | |||
570aa2c02a | |||
c577d2e231 | |||
6bf4b3aba8 | |||
b659f205f7 | |||
40d54df567 | |||
b7fa5c7ba8 | |||
3b0605d17b | |||
d93e7bfd1a | |||
104cd0ed29 | |||
7fb3d86d06 | |||
dbb42e9bb6 | |||
d1baa1f98b | |||
5ab68c0586 | |||
3cf78f509d | |||
c6053e234a | |||
964c326535 | |||
baf410a364 | |||
517a40a32b | |||
8b275b206b | |||
a40a31aa4c | |||
6c0c1df010 | |||
c552afff17 | |||
0837129ad5 | |||
6f3e2a8fbb | |||
4189a05758 | |||
97ccaa58c7 | |||
08ef932926 | |||
1d2ed0398c | |||
5a00e0c549 | |||
ebcf47733f | |||
381d7e7615 | |||
8246b47668 | |||
bc5e300ba9 | |||
57efef3160 | |||
dfc5a9f040 | |||
57443d227d | |||
d36441db73 | |||
327782835e | |||
994f6be535 | |||
72fc8a24a5 | |||
07002c12eb | |||
c688d19e15 | |||
c0ce448dc3 | |||
6c479d6d59 | |||
76ba487261 | |||
e3f4da19f9 | |||
c7ffcbf7e0 | |||
a27b3737f1 | |||
78dccf1e0a | |||
9cb7e09aef | |||
4111c12895 | |||
b6ec023920 | |||
e8e7067993 | |||
0e9319e97b | |||
df53af7b4d | |||
bcbf244fd2 | |||
7ff5febae0 | |||
019d108bb2 | |||
a14f628ca3 | |||
6116351dad | |||
23efef4469 | |||
95549f7be2 | |||
6338bd1168 | |||
f7d0d2c166 | |||
7c2e10ba0e | |||
350d3c92e7 | |||
0f2918efaf | |||
b72ad529aa | |||
f77c6c821c | |||
248f160e73 | |||
5151f90bb8 | |||
402062110d | |||
1c8f23dea1 | |||
5ee22b3481 | |||
322a7bd5a8 | |||
98c8e19d93 | |||
0e30fba72d | |||
1c77ef142c | |||
853764d863 | |||
d0ab59f9da | |||
21e08709cb | |||
a1aa99837b | |||
037264b0bf | |||
1a06702dbe | |||
666bb41697 | |||
e254fafb5c | |||
1dc1cc6c24 | |||
baa5d10009 | |||
ac2b9acccb | |||
075d4deecb | |||
ac11f898d4 | |||
dd31de6935 | |||
9e811e722f | |||
8ef53d85c4 | |||
abcc5cb023 | |||
931871ff95 | |||
6b1e8862ef | |||
00ce246fc5 | |||
c0c7d96429 | |||
92b2582d0d | |||
4084a1ac86 | |||
cb1a1c2616 | |||
ce6c1f173e | |||
30a4888363 | |||
b0917a9866 | |||
464e5de947 | |||
47a07da17d | |||
ec4c443299 | |||
3122168b0e | |||
da3af4b3db | |||
850fa28bf6 | |||
270684c5fd | |||
afa1589cb5 | |||
18a94d938f | |||
d026bc2134 | |||
c0b7276787 | |||
a8ba3b3fdb | |||
bb8342f62b | |||
0d8dad1559 | |||
c1ef701eb2 | |||
c6a181a2e7 | |||
981392ea07 | |||
5928a102a6 | |||
c748569433 | |||
a87fc51fbb | |||
1b31a472a5 | |||
e5fe8fd975 | |||
b36d1ca2bc | |||
e9730ced9e | |||
ff2f79b087 | |||
76e163473a | |||
6fdc24ab21 | |||
cb93124ee1 | |||
4bda4080d2 | |||
e710cafb2c | |||
e9643ad07f | |||
ca16892237 | |||
a2b0d350d8 | |||
534bdbae50 | |||
831873e7de | |||
622d246fdd | |||
4a1ca9f299 | |||
4e1de2678c | |||
33a4792531 | |||
37dd4856a6 | |||
6a9cf3389d | |||
2da2395473 | |||
00ecd27bb3 | |||
0fa4486dcf |
@ -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:
|
||||||
@ -11,17 +11,17 @@ jobs:
|
|||||||
name: Update npm
|
name: Update npm
|
||||||
command: 'sudo npm install -g npm@latest'
|
command: 'sudo npm install -g npm@latest'
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: dependency-cache-{{ checksum "package.json" }}
|
key: dependency-cache-13-{{ checksum "package.json" }}
|
||||||
- run:
|
- run:
|
||||||
name: Installing dependencies (npm install)
|
name: Installing dependencies (npm install)
|
||||||
command: npm install
|
command: npm install
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: dependency-cache-{{ checksum "package.json" }}
|
key: dependency-cache-13-{{ checksum "package.json" }}
|
||||||
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
|
||||||
|
159
.eslintrc.js
@ -1,3 +1,4 @@
|
|||||||
|
const LEGACY_FILES = ["platform/**", "example/**"];
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true,
|
"browser": true,
|
||||||
@ -5,9 +6,17 @@ module.exports = {
|
|||||||
"jasmine": true,
|
"jasmine": true,
|
||||||
"amd": true
|
"amd": true
|
||||||
},
|
},
|
||||||
"extends": "eslint:recommended",
|
"globals": {
|
||||||
"parser": "babel-eslint",
|
"_": "readonly"
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:vue/recommended",
|
||||||
|
"plugin:you-dont-need-lodash-underscore/compatible"
|
||||||
|
],
|
||||||
|
"parser": "vue-eslint-parser",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
|
"parser": "babel-eslint",
|
||||||
"allowImportExportEverywhere": true,
|
"allowImportExportEverywhere": true,
|
||||||
"ecmaVersion": 2015,
|
"ecmaVersion": 2015,
|
||||||
"ecmaFeatures": {
|
"ecmaFeatures": {
|
||||||
@ -15,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",
|
||||||
@ -58,7 +70,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-implicit-coercion
|
||||||
|
"no-implicit-coercion": "error",
|
||||||
|
//https://eslint.org/docs/rules/no-unneeded-ternary
|
||||||
|
"no-unneeded-ternary": "error",
|
||||||
|
// https://eslint.org/docs/rules/semi
|
||||||
|
"semi": ["error", "always"],
|
||||||
|
// https://eslint.org/docs/rules/no-multi-spaces
|
||||||
|
"no-multi-spaces": "error",
|
||||||
|
// https://eslint.org/docs/rules/key-spacing
|
||||||
|
"key-spacing": ["error", {
|
||||||
|
"afterColon": true
|
||||||
|
}],
|
||||||
|
// https://eslint.org/docs/rules/keyword-spacing
|
||||||
|
"keyword-spacing": ["error", {
|
||||||
|
"before": true,
|
||||||
|
"after": true
|
||||||
|
}],
|
||||||
|
// https://eslint.org/docs/rules/comma-spacing
|
||||||
|
// Also requires one line code fix
|
||||||
|
"comma-spacing": ["error", {
|
||||||
|
"after": true
|
||||||
|
}],
|
||||||
|
//https://eslint.org/docs/rules/no-whitespace-before-property
|
||||||
|
"no-whitespace-before-property": "error",
|
||||||
|
// https://eslint.org/docs/rules/object-curly-newline
|
||||||
|
"object-curly-newline": ["error", {"consistent": true, "multiline": true}],
|
||||||
|
// https://eslint.org/docs/rules/object-property-newline
|
||||||
|
"object-property-newline": "error",
|
||||||
|
// https://eslint.org/docs/rules/brace-style
|
||||||
|
"brace-style": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-multiple-empty-lines
|
||||||
|
"no-multiple-empty-lines": ["error", {"max": 1}],
|
||||||
|
// https://eslint.org/docs/rules/operator-linebreak
|
||||||
|
"operator-linebreak": ["error", "before", {"overrides": {"=": "after"}}],
|
||||||
|
// https://eslint.org/docs/rules/padding-line-between-statements
|
||||||
|
"padding-line-between-statements":["error", {
|
||||||
|
"blankLine": "always",
|
||||||
|
"prev": "multiline-block-like",
|
||||||
|
"next": "*"
|
||||||
|
}, {
|
||||||
|
"blankLine": "always",
|
||||||
|
"prev": "*",
|
||||||
|
"next": "return"
|
||||||
|
}],
|
||||||
|
// https://eslint.org/docs/rules/space-infix-ops
|
||||||
|
"space-infix-ops": "error",
|
||||||
|
// https://eslint.org/docs/rules/space-unary-ops
|
||||||
|
"space-unary-ops": ["error", {"words": true, "nonwords": false}],
|
||||||
|
// https://eslint.org/docs/rules/arrow-spacing
|
||||||
|
"arrow-spacing": "error",
|
||||||
|
// https://eslint.org/docs/rules/semi-spacing
|
||||||
|
"semi-spacing": ["error", {"before": false, "after": true}],
|
||||||
|
|
||||||
|
"vue/html-indent": [
|
||||||
|
"error",
|
||||||
|
4,
|
||||||
|
{
|
||||||
|
"attribute": 1,
|
||||||
|
"baseIndent": 0,
|
||||||
|
"closeBracket": 0,
|
||||||
|
"alignAttributesVertically": true,
|
||||||
|
"ignores": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vue/html-self-closing": ["error",
|
||||||
|
{
|
||||||
|
"html": {
|
||||||
|
"void": "never",
|
||||||
|
"normal": "never",
|
||||||
|
"component": "always"
|
||||||
|
},
|
||||||
|
"svg": "always",
|
||||||
|
"math": "always"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vue/max-attributes-per-line": ["error", {
|
||||||
|
"singleline": 1,
|
||||||
|
"multiline": {
|
||||||
|
"max": 1,
|
||||||
|
"allowFirstLine": true
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
"vue/multiline-html-element-content-newline": "off",
|
||||||
|
"vue/singleline-html-element-content-newline": "off"
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
@ -74,6 +220,13 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"files": LEGACY_FILES,
|
||||||
|
"rules": {
|
||||||
|
// https://eslint.org/docs/rules/no-nested-ternary
|
||||||
|
"no-nested-ternary": "off",
|
||||||
|
"no-var": "off"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
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
|
||||||
|
80
API.md
@ -52,7 +52,6 @@
|
|||||||
- [The URL Status Indicator](#the-url-status-indicator)
|
- [The URL Status Indicator](#the-url-status-indicator)
|
||||||
- [Creating a Simple Indicator](#creating-a-simple-indicator)
|
- [Creating a Simple Indicator](#creating-a-simple-indicator)
|
||||||
- [Custom Indicators](#custom-indicators)
|
- [Custom Indicators](#custom-indicators)
|
||||||
- [Included Plugins](#included-plugins)
|
|
||||||
|
|
||||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
|
||||||
@ -109,15 +108,13 @@ script loaders are also supported.
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Open MCT</title>
|
<title>Open MCT</title>
|
||||||
<script src="openmct.js"></script>
|
<script src="dist/openmct.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
openmct.setAssetPath('openmct/dist');
|
|
||||||
openmct.install(openmct.plugins.LocalStorage());
|
openmct.install(openmct.plugins.LocalStorage());
|
||||||
openmct.install(openmct.plugins.MyItems());
|
openmct.install(openmct.plugins.MyItems());
|
||||||
openmct.install(openmct.plugins.UTCTimeSystem());
|
openmct.install(openmct.plugins.UTCTimeSystem());
|
||||||
openmct.install(openmct.plugins.Espresso());
|
|
||||||
openmct.start();
|
openmct.start();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
@ -128,9 +125,6 @@ The Open MCT library included above requires certain assets such as html
|
|||||||
templates, images, and css. If you installed Open MCT from GitHub as described
|
templates, images, and css. If you installed Open MCT from GitHub as described
|
||||||
in the section on [Building from Source](#building-from-source) then these
|
in the section on [Building from Source](#building-from-source) then these
|
||||||
assets will have been downloaded along with the Open MCT javascript library.
|
assets will have been downloaded along with the Open MCT javascript library.
|
||||||
You can specify the location of these assets by calling `openmct.setAssetPath()`.
|
|
||||||
Typically this will be the same location as the `openmct.js` library is
|
|
||||||
included from.
|
|
||||||
|
|
||||||
There are some plugins bundled with the application that provide UI,
|
There are some plugins bundled with the application that provide UI,
|
||||||
persistence, and other default configuration which are necessary to be able to
|
persistence, and other default configuration which are necessary to be able to
|
||||||
@ -237,7 +231,7 @@ attributes
|
|||||||
of this object. This is used for specifying an icon to appear next to each
|
of this object. This is used for specifying an icon to appear next to each
|
||||||
object of this type.
|
object of this type.
|
||||||
|
|
||||||
The [Open MCT Tutorials](https://github.com/openmct/openmct-tutorial) provide a
|
The [Open MCT Tutorials](https://github.com/nasa/openmct-tutorial) provide a
|
||||||
step-by-step examples of writing code for Open MCT that includes a [section on
|
step-by-step examples of writing code for Open MCT that includes a [section on
|
||||||
defining a new object type](https://github.com/nasa/openmct-tutorial#step-3---providing-objects).
|
defining a new object type](https://github.com/nasa/openmct-tutorial#step-3---providing-objects).
|
||||||
|
|
||||||
@ -429,12 +423,12 @@ attribute | type | flags | notes
|
|||||||
|
|
||||||
###### Value Hints
|
###### Value Hints
|
||||||
|
|
||||||
Each telemetry value description has an object defining hints. Keys in this this object represent the hint itself, and the value represents the weight of that hint. A lower weight means the hint has a higher priority. For example, multiple values could be hinted for use as the y axis of a plot (raw, engineering), but the highest priority would be the default choice. Likewise, a table will use hints to determine the default order of columns.
|
Each telemetry value description has an object defining hints. Keys in this this object represent the hint itself, and the value represents the weight of that hint. A lower weight means the hint has a higher priority. For example, multiple values could be hinted for use as the y-axis of a plot (raw, engineering), but the highest priority would be the default choice. Likewise, a table will use hints to determine the default order of columns.
|
||||||
|
|
||||||
Known hints:
|
Known hints:
|
||||||
|
|
||||||
* `domain`: 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
|
||||||
@ -511,7 +505,7 @@ example:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This strategy says "I want the lastest data point in this time range". A provider which recognizes this request should return only one value-- the latest-- in the requested time range. Depending on your back-end implementation, performing these queries in bulk can be a large performance increase. These are generally issued by views that are only capable of displaying a single value and only need to show the latest value.
|
This strategy says "I want the latest data point in this time range". A provider which recognizes this request should return only one value-- the latest-- in the requested time range. Depending on your back-end implementation, performing these queries in bulk can be a large performance increase. These are generally issued by views that are only capable of displaying a single value and only need to show the latest value.
|
||||||
|
|
||||||
##### `minmax` request strategy
|
##### `minmax` request strategy
|
||||||
|
|
||||||
@ -606,7 +600,7 @@ evaluator, take a look at `examples/generator/SinewaveLimitProvider.js`.
|
|||||||
|
|
||||||
### Telemetry Consumer APIs **draft**
|
### Telemetry Consumer APIs **draft**
|
||||||
|
|
||||||
The APIs for requesting telemetry from Open MCT -- e.g. for use in custom views -- are currently in draft state and are being revised. If you'd like to experiement with them before they are finalized, please contact the team via the contact-us link on our website.
|
The APIs for requesting telemetry from Open MCT -- e.g. for use in custom views -- are currently in draft state and are being revised. If you'd like to experiment with them before they are finalized, please contact the team via the contact-us link on our website.
|
||||||
|
|
||||||
|
|
||||||
## Time API
|
## Time API
|
||||||
@ -994,7 +988,7 @@ A common use case for indicators is to convey the state of some external system
|
|||||||
persistence backend or HTTP server. So long as this system is accessible via HTTP request,
|
persistence backend or HTTP server. So long as this system is accessible via HTTP request,
|
||||||
Open MCT provides a general purpose indicator to show whether the server is available and
|
Open MCT provides a general purpose indicator to show whether the server is available and
|
||||||
returing a 2xx status code. The URL Status Indicator is made available as a default plugin. See
|
returing a 2xx status code. The URL Status Indicator is made available as a default plugin. See
|
||||||
[Included Plugins](#included-plugins) below for details on how to install and configure the
|
the [documentation](./src/plugins/URLIndicatorPlugin) for details on how to install and configure the
|
||||||
URL Status Indicator.
|
URL Status Indicator.
|
||||||
|
|
||||||
### Creating a Simple Indicator
|
### Creating a Simple Indicator
|
||||||
@ -1033,7 +1027,7 @@ different colors to indicate status.
|
|||||||
|
|
||||||
### Custom Indicators
|
### Custom Indicators
|
||||||
|
|
||||||
A completely custom indicator can be added by simple providing a DOM element to place alongside other indicators.
|
A completely custom indicator can be added by simply providing a DOM element to place alongside other indicators.
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
var domNode = document.createElement('div');
|
var domNode = document.createElement('div');
|
||||||
@ -1046,59 +1040,3 @@ A completely custom indicator can be added by simple providing a DOM element to
|
|||||||
element: domNode
|
element: domNode
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Included Plugins
|
|
||||||
|
|
||||||
Open MCT is packaged along with a few general-purpose plugins:
|
|
||||||
|
|
||||||
* `openmct.plugins.Conductor` provides a user interface for working with time
|
|
||||||
within the application. If activated, configuration must be provided. This is
|
|
||||||
detailed in the section on [Time Conductor Configuration](#time-conductor-configuration).
|
|
||||||
* `openmct.plugins.CouchDB` is an adapter for using CouchDB for persistence
|
|
||||||
of user-created objects. This is a constructor that takes the URL for the
|
|
||||||
CouchDB database as a parameter, e.g.
|
|
||||||
```javascript
|
|
||||||
openmct.install(openmct.plugins.CouchDB('http://localhost:5984/openmct'))
|
|
||||||
```
|
|
||||||
* `openmct.plugins.Elasticsearch` is an adapter for using Elasticsearch for
|
|
||||||
persistence of user-created objects. This is a
|
|
||||||
constructor that takes the URL for the Elasticsearch instance as a
|
|
||||||
parameter. eg.
|
|
||||||
```javascript
|
|
||||||
openmct.install(openmct.plugins.CouchDB('http://localhost:9200'))
|
|
||||||
```
|
|
||||||
* `openmct.plugins.Espresso` and `openmct.plugins.Snow` are two different
|
|
||||||
themes (dark and light) available for Open MCT. Note that at least one
|
|
||||||
of these themes must be installed for Open MCT to appear correctly.
|
|
||||||
* `openmct.plugins.URLIndicator` adds an indicator which shows the
|
|
||||||
availability of a URL with the following options:
|
|
||||||
- `url` : URL to indicate the status of
|
|
||||||
- `iconClass`: Icon to show in the status bar, defaults to `icon-database`, [list of all icons](https://nasa.github.io/openmct/style-guide/#/browse/styleguide:home?view=items)
|
|
||||||
- `interval`: Interval between checking the connection, defaults to `10000`
|
|
||||||
- `label` Name showing up as text in the status bar, defaults to url
|
|
||||||
```javascript
|
|
||||||
openmct.install(openmct.plugins.URLIndicator({
|
|
||||||
url: 'http://localhost:8080',
|
|
||||||
iconClass: 'check',
|
|
||||||
interval: 10000,
|
|
||||||
label: 'Localhost'
|
|
||||||
})
|
|
||||||
);
|
|
||||||
```
|
|
||||||
* `openmct.plugins.LocalStorage` provides persistence of user-created
|
|
||||||
objects in browser-local storage. This is particularly useful in
|
|
||||||
development environments.
|
|
||||||
* `openmct.plugins.MyItems` adds a top-level folder named "My Items"
|
|
||||||
when the application is first started, providing a place for a
|
|
||||||
user to store created items.
|
|
||||||
* `openmct.plugins.UTCTimeSystem` provides a default time system for Open MCT.
|
|
||||||
|
|
||||||
Generally, you will want to either install these plugins, or install
|
|
||||||
different plugins that provide persistence and an initial folder
|
|
||||||
hierarchy.
|
|
||||||
|
|
||||||
eg.
|
|
||||||
```javascript
|
|
||||||
openmct.install(openmct.plugins.LocalStorage());
|
|
||||||
openmct.install(openmct.plugins.MyItems());
|
|
||||||
```
|
|
||||||
|
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)
|
||||||
|
7
LICENSE.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Open MCT License
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
691
LICENSES.md
@ -1,691 +0,0 @@
|
|||||||
# Open MCT Licenses
|
|
||||||
|
|
||||||
Open MCT, Copyright (c) 2014-2017, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.
|
|
||||||
|
|
||||||
Open MCT is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
||||||
|
|
||||||
Open MCT includes source code licensed under additional open source licenses as follows.
|
|
||||||
|
|
||||||
## Software Components Licenses
|
|
||||||
|
|
||||||
This software includes components released under the following licenses:
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### SuperSocket
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: https://supersocket.codeplex.com/
|
|
||||||
|
|
||||||
* Version: 0.9.0.2
|
|
||||||
|
|
||||||
* Author: Kerry Jiang
|
|
||||||
|
|
||||||
* Description: Supports SuperWebSocket
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright 2012 Kerry Jiang (kerry-jiang@hotmail.com)
|
|
||||||
|
|
||||||
SuperSocket is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### SuperWebSocket
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: https://superswebocket.codeplex.com/
|
|
||||||
|
|
||||||
* Version: 0.9.0.2
|
|
||||||
|
|
||||||
* Author: Kerry Jiang
|
|
||||||
|
|
||||||
* Description: WebSocket implementation for client-server communication
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright 2010-2013 Kerry Jiang (kerry-jiang@hotmail.com)
|
|
||||||
|
|
||||||
SuperWebSocket is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### log4net
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://logging.apache.org/log4net/
|
|
||||||
|
|
||||||
* Version: 1.2.13
|
|
||||||
|
|
||||||
* Author: Apache Software Foundation
|
|
||||||
|
|
||||||
* Description: Logging.
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright © 2004-2015 Apache Software Foundation.
|
|
||||||
|
|
||||||
log4net is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Blanket.js
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://blanketjs.org/
|
|
||||||
|
|
||||||
* Version: 1.1.5
|
|
||||||
|
|
||||||
* Author: Alex Seville
|
|
||||||
|
|
||||||
* Description: Code coverage measurement and reporting
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2013 Alex Seville
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Jasmine
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://jasmine.github.io/
|
|
||||||
|
|
||||||
* Version: 1.3.1
|
|
||||||
|
|
||||||
* Author: Pivotal Labs
|
|
||||||
|
|
||||||
* Description: Unit testing
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2008-2011 Pivotal Labs
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### RequireJS
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://requirejs.org/
|
|
||||||
|
|
||||||
* Version: 2.1.22
|
|
||||||
|
|
||||||
* Author: The Dojo Foundation
|
|
||||||
|
|
||||||
* Description: Script loader
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2010-2015, The Dojo Foundation
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### requirejs-text
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: https://github.com/requirejs/text
|
|
||||||
|
|
||||||
* Version: 2.0.14
|
|
||||||
|
|
||||||
* Author: The Dojo Foundation
|
|
||||||
|
|
||||||
* Description: Text loading plugin for RequireJS
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2010-2014, The Dojo Foundation
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### AngularJS
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://angularjs.org/
|
|
||||||
|
|
||||||
* Version: 1.4.4
|
|
||||||
|
|
||||||
* Author: Google
|
|
||||||
|
|
||||||
* Description: Client-side web application framework
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Angular-Route
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://angularjs.org/
|
|
||||||
|
|
||||||
* Version: 1.4.4
|
|
||||||
|
|
||||||
* Author: Google
|
|
||||||
|
|
||||||
* Description: Client-side view routing
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### ES6-Promise
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: https://github.com/jakearchibald/es6-promise
|
|
||||||
|
|
||||||
* Version: 3.0.2
|
|
||||||
|
|
||||||
* Authors: Yehuda Katz, Tom Dale, Stefan Penner and contributors
|
|
||||||
|
|
||||||
* Description: Promise polyfill for pre-ECMAScript 6 browsers
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### screenfull.js
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: https://github.com/sindresorhus/screenfull.js/
|
|
||||||
|
|
||||||
* Version: 3.0.0
|
|
||||||
|
|
||||||
* Author: Sindre Sorhus
|
|
||||||
|
|
||||||
* Description: Wrapper for cross-browser usage of fullscreen API
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Math.uuid.js
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: https://github.com/broofa/node-uuid
|
|
||||||
|
|
||||||
* Version: 1.4.7
|
|
||||||
|
|
||||||
* Author: Robert Kieffer
|
|
||||||
|
|
||||||
* Description: Unique identifer generation.
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2010-2012 Robert Kieffer
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Normalize.css
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: https://github.com/necolas/normalize.css
|
|
||||||
|
|
||||||
* Version: 1.1.2
|
|
||||||
|
|
||||||
* Authors: Nicolas Gallagher, Jonathan Neal
|
|
||||||
|
|
||||||
* Description: Browser style normalization
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) Nicolas Gallagher and Jonathan Neal
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Moment.js
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://momentjs.com
|
|
||||||
|
|
||||||
* Version: 2.11.1
|
|
||||||
|
|
||||||
* Authors: Tim Wood, Iskren Chernev, Moment.js contributors
|
|
||||||
|
|
||||||
* Description: Time/date parsing/formatting
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2011-2014 Tim Wood, Iskren Chernev, Moment.js contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### moment-duration-format
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: https://github.com/jsmreese/moment-duration-format
|
|
||||||
|
|
||||||
* Version: 1.3.0
|
|
||||||
|
|
||||||
* Authors: John Madhavan-Reese
|
|
||||||
|
|
||||||
* Description: Duration parsing/formatting
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright 2014 John Madhavan-Reese
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
||||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
||||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
||||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### CSV.js
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: https://github.com/knrz/CSV.js
|
|
||||||
|
|
||||||
* Version: 3.6.4
|
|
||||||
|
|
||||||
* Authors: Kash Nouroozi
|
|
||||||
|
|
||||||
* Description: Encoder for CSV (comma separated values) export
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2014 Kash Nouroozi
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### FileSaver.js
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: https://github.com/eligrey/FileSaver.js/
|
|
||||||
|
|
||||||
* Version: 0.0.2
|
|
||||||
|
|
||||||
* Authors: Eli Grey
|
|
||||||
|
|
||||||
* Description: File download initiator (for file exports)
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright © 2015 Eli Grey.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Zepto
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://zeptojs.com/
|
|
||||||
|
|
||||||
* Version: 1.1.6
|
|
||||||
|
|
||||||
* Authors: Thomas Fuchs
|
|
||||||
|
|
||||||
* Description: DOM manipulation
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2010-2016 Thomas Fuchs
|
|
||||||
http://zeptojs.com/
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Json.NET
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://www.newtonsoft.com/json
|
|
||||||
|
|
||||||
* Version: 6.0.8
|
|
||||||
|
|
||||||
* Author: Newtonsoft
|
|
||||||
|
|
||||||
* Description: JSON serialization/deserialization
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright (c) 2007 James Newton-King
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Nancy
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://nancyfx.org
|
|
||||||
|
|
||||||
* Version: 0.23.2
|
|
||||||
|
|
||||||
* Author: Andreas Håkansson, Steven Robbins and contributors
|
|
||||||
|
|
||||||
* Description: Embedded web server
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Nancy.Hosting.Self
|
|
||||||
|
|
||||||
#### Info
|
|
||||||
|
|
||||||
* Link: http://nancyfx.org
|
|
||||||
|
|
||||||
* Version: 0.23.2
|
|
||||||
|
|
||||||
* Author: Andreas Håkansson, Steven Robbins and contributors
|
|
||||||
|
|
||||||
* Description: Embedded web server
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Almond
|
|
||||||
|
|
||||||
* Link: https://github.com/requirejs/almond
|
|
||||||
|
|
||||||
* Version: 0.3.3
|
|
||||||
|
|
||||||
* Author: jQuery Foundation
|
|
||||||
|
|
||||||
* Description: Lightweight RequireJS replacement for builds
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
|
||||||
|
|
||||||
This software consists of voluntary contributions made by many
|
|
||||||
individuals. For exact contribution history, see the revision history
|
|
||||||
available at https://github.com/requirejs/almond
|
|
||||||
|
|
||||||
The following license applies to all parts of this software except as
|
|
||||||
documented below:
|
|
||||||
|
|
||||||
====
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
====
|
|
||||||
|
|
||||||
Copyright and related rights for sample code are waived via CC0. Sample
|
|
||||||
code is defined as all source code displayed within the prose of the
|
|
||||||
documentation.
|
|
||||||
|
|
||||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
|
||||||
|
|
||||||
====
|
|
||||||
|
|
||||||
Files located in the node_modules directory, and certain utilities used
|
|
||||||
to build or test the software in the test and dist directories, are
|
|
||||||
externally maintained libraries used by this software which have their own
|
|
||||||
licenses; we recommend you read them, as their terms may differ from the
|
|
||||||
terms above.
|
|
||||||
|
|
||||||
|
|
||||||
### Lodash
|
|
||||||
|
|
||||||
* Link: https://lodash.com
|
|
||||||
|
|
||||||
* Version: 3.10.1
|
|
||||||
|
|
||||||
* Author: Dojo Foundation
|
|
||||||
|
|
||||||
* Description: Utility functions
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
|
||||||
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
|
|
||||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
### EventEmitter3
|
|
||||||
|
|
||||||
* Link: https://github.com/primus/eventemitter3
|
|
||||||
|
|
||||||
* Version: 1.2.0
|
|
||||||
|
|
||||||
* Author: Arnout Kazemier
|
|
||||||
|
|
||||||
* Description: Event-driven programming support
|
|
||||||
|
|
||||||
#### License
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014 Arnout Kazemier
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
96
README.md
@ -9,26 +9,6 @@ Please visit our [Official Site](https://nasa.github.io/openmct/) and [Getting S
|
|||||||
Try Open MCT now with our [live demo](https://openmct-demo.herokuapp.com/).
|
Try Open MCT now with our [live demo](https://openmct-demo.herokuapp.com/).
|
||||||

|

|
||||||
|
|
||||||
## New API
|
|
||||||
|
|
||||||
A simpler, [easier-to-use API](https://nasa.github.io/openmct/docs/api/)
|
|
||||||
has been added to Open MCT. Changes in this
|
|
||||||
API include a move away from a declarative system of JSON configuration files
|
|
||||||
towards an imperative system based on function calls. Developers will be able
|
|
||||||
to extend and build on Open MCT by making direct function calls to a public
|
|
||||||
API. Open MCT is also being refactored to minimize the dependencies that using
|
|
||||||
Open MCT imposes on developers, such as the current requirement to use
|
|
||||||
AngularJS.
|
|
||||||
|
|
||||||
This new API has not yet been heavily used and is likely to contain defects.
|
|
||||||
You can help by trying it out, and reporting any issues you encounter
|
|
||||||
using our GitHub issue tracker. Such issues may include bugs, suggestions,
|
|
||||||
missing documentation, or even just requests for help if you're having
|
|
||||||
trouble.
|
|
||||||
|
|
||||||
We want Open MCT to be as easy to use, install, run, and develop for as
|
|
||||||
possible, and your feedback will help us get there!
|
|
||||||
|
|
||||||
## Building and Running Open MCT Locally
|
## Building and Running Open MCT Locally
|
||||||
|
|
||||||
Building and running Open MCT in your local dev environment is very easy. Be sure you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed, then follow the directions below. Need additional information? Check out the [Getting Started](https://nasa.github.io/openmct/getting-started/) page on our website.
|
Building and running Open MCT in your local dev environment is very easy. Be sure you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed, then follow the directions below. Need additional information? Check out the [Getting Started](https://nasa.github.io/openmct/getting-started/) page on our website.
|
||||||
@ -48,9 +28,14 @@ Building and running Open MCT in your local dev environment is very easy. Be sur
|
|||||||
|
|
||||||
Open MCT is now running, and can be accessed by pointing a web browser at [http://localhost:8080/](http://localhost:8080/)
|
Open MCT is now running, and can be accessed by pointing a web browser at [http://localhost:8080/](http://localhost:8080/)
|
||||||
|
|
||||||
|
## Open MCT v1.0.0
|
||||||
|
This represents a major overhaul of Open MCT with significant changes under the hood. We aim to maintain backward compatibility but if you do find compatibility issues, please let us know by filing an issue in this repository. If you are having major issues with v1.0.0 please check-out the v0.14.0 tag until we can resolve them for you.
|
||||||
|
|
||||||
|
If you are migrating an application built with Open MCT as a dependency to v1.0.0 from an earlier version, please refer to [our migration guide](https://nasa.github.io/openmct/documentation/migration-guide).
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Documentation is available on the [Open MCT website](https://nasa.github.io/openmct/documentation/). The documentation can also be built locally.
|
Documentation is available on the [Open MCT website](https://nasa.github.io/openmct/documentation/).
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
@ -58,48 +43,29 @@ The clearest examples for developing Open MCT plugins are in the
|
|||||||
[tutorials](https://github.com/nasa/openmct-tutorial) provided in
|
[tutorials](https://github.com/nasa/openmct-tutorial) provided in
|
||||||
our documentation.
|
our documentation.
|
||||||
|
|
||||||
For a practical example of a telemetry adapter, see David Hudson's
|
We want Open MCT to be as easy to use, install, run, and develop for as
|
||||||
[Kerbal Space Program plugin](https://github.com/hudsonfoo/kerbal-openmct),
|
possible, and your feedback will help us get there! Feedback can be provided via [GitHub issues](https://github.com/nasa/openmct/issues), or by emailing us at [arc-dl-openmct@mail.nasa.gov](mailto:arc-dl-openmct@mail.nasa.gov).
|
||||||
which allows [Kerbal Space Program](https://kerbalspaceprogram.com) players
|
|
||||||
to build and use displays for their own missions in Open MCT.
|
|
||||||
|
|
||||||
Additional examples are available in the `examples` hierarchy of this
|
## Building Applications With Open MCT
|
||||||
repository; however, be aware that these examples are
|
|
||||||
[not fully-documented](https://github.com/nasa/openmct/issues/846), so
|
|
||||||
the tutorials will likely serve as a better starting point.
|
|
||||||
|
|
||||||
### Building the Open MCT Documentation Locally
|
Open MCT is built using [`npm`](http://npmjs.com/) and [`webpack`](https://webpack.js.org/).
|
||||||
Open MCT's documentation is generated by an
|
|
||||||
[npm](https://www.npmjs.com/)-based build. It has additional dependencies that
|
|
||||||
may not be available on every platform and thus is not covered in the standard
|
|
||||||
npm install. Ensure your system has [libcairo](http://cairographics.org/)
|
|
||||||
installed and then run the following commands:
|
|
||||||
|
|
||||||
* `npm install`
|
See our documentation for a guide on [building Applications with Open MCT](https://github.com/nasa/openmct/blob/master/API.md#starting-an-open-mct-application).
|
||||||
* `npm install canvas nomnoml`
|
|
||||||
* `npm run docs`
|
|
||||||
|
|
||||||
Documentation will be generated in `target/docs`.
|
## Plugins
|
||||||
|
|
||||||
## Deploying Open MCT
|
Open MCT can be extended via plugins that make calls to the Open MCT API. A plugin is a group
|
||||||
|
of software components (including source code and resources such as images and HTML templates)
|
||||||
|
that is intended to be added or removed as a single unit.
|
||||||
|
|
||||||
Open MCT is built using [`npm`](http://npmjs.com/)
|
As well as providing an extension mechanism, most of the core Open MCT codebase is also
|
||||||
|
written as plugins.
|
||||||
|
|
||||||
To build Open MCT for deployment:
|
For information on writing plugins, please see [our API documentation](https://github.com/nasa/openmct/blob/master/API.md#plugins).
|
||||||
|
|
||||||
`npm run prepare`
|
|
||||||
|
|
||||||
This will compile and minify JavaScript sources, as well as copy over assets.
|
|
||||||
The contents of the `dist` folder will contain a runnable Open MCT
|
|
||||||
instance (e.g. by starting an HTTP server in that directory), including:
|
|
||||||
|
|
||||||
* `openmct.js` - Open MCT source code.
|
|
||||||
* `openmct.css` - Basic styles to load to prevent a FOUC.
|
|
||||||
* `index.html`, an example to run Open MCT in the basic configuration.
|
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
Tests are written for [Jasmine 3](http://jasmine.github.io/)
|
Tests are written for [Jasmine 3](https://jasmine.github.io/api/3.1/global)
|
||||||
and run by [Karma](http://karma-runner.github.io). To run:
|
and run by [Karma](http://karma-runner.github.io). To run:
|
||||||
|
|
||||||
`npm test`
|
`npm test`
|
||||||
@ -115,7 +81,7 @@ naming convention is otherwise the same.)
|
|||||||
### Test Reporting
|
### Test Reporting
|
||||||
|
|
||||||
When `npm test` is run, test results will be written as HTML to
|
When `npm test` is run, test results will be written as HTML to
|
||||||
`target/tests`. Code coverage information is written to `target/coverage`.
|
`dist/reports/tests/`. Code coverage information is written to `dist/reports/coverage`.
|
||||||
|
|
||||||
# Glossary
|
# Glossary
|
||||||
|
|
||||||
@ -125,11 +91,8 @@ addressed (either by updating this glossary or changing code to reflect
|
|||||||
correct usage.) Other developer documentation, particularly in-line
|
correct usage.) Other developer documentation, particularly in-line
|
||||||
documentation, may presume an understanding of these terms.
|
documentation, may presume an understanding of these terms.
|
||||||
|
|
||||||
* _bundle_: A bundle is a removable, reusable grouping of software elements.
|
* _plugin_: A plugin is a removable, reusable grouping of software elements.
|
||||||
The application is composed of bundles. Plug-ins are bundles. For more
|
The application is composed of plugins.
|
||||||
information, refer to framework documentation (under `platform/framework`.)
|
|
||||||
* _capability_: An object which exposes dynamic behavior or non-persistent
|
|
||||||
state associated with a domain object.
|
|
||||||
* _composition_: In the context of a domain object, this refers to the set of
|
* _composition_: In the context of a domain object, this refers to the set of
|
||||||
other domain objects that compose or are contained by that object. A domain
|
other domain objects that compose or are contained by that object. A domain
|
||||||
object's composition is the set of domain objects that should appear
|
object's composition is the set of domain objects that should appear
|
||||||
@ -144,13 +107,8 @@ documentation, may presume an understanding of these terms.
|
|||||||
* _domain object_: A meaningful object to the user; a distinct thing in
|
* _domain object_: A meaningful object to the user; a distinct thing in
|
||||||
the work support by Open MCT. Anything that appears in the left-hand
|
the work support by Open MCT. Anything that appears in the left-hand
|
||||||
tree is a domain object.
|
tree is a domain object.
|
||||||
* _extension_: An extension is a unit of functionality exposed to the
|
* _identifier_: A tuple consisting of a namespace and a key, which together uniquely
|
||||||
platform in a declarative fashion by a bundle. For more
|
identifies a domain object.
|
||||||
information, refer to framework documentation (under `platform/framework`.)
|
|
||||||
* _id_: A string which uniquely identifies a domain object.
|
|
||||||
* _key_: When used as an object property, this refers to the machine-readable
|
|
||||||
identifier for a specific thing in a set of things. (Most often used in the
|
|
||||||
context of extensions or other similar application-specific object sets.)
|
|
||||||
* _model_: The persistent state associated with a domain object. A domain
|
* _model_: The persistent state associated with a domain object. A domain
|
||||||
object's model is a JavaScript object which can be converted to JSON
|
object's model is a JavaScript object which can be converted to JSON
|
||||||
without losing information (that is, it contains no methods.)
|
without losing information (that is, it contains no methods.)
|
||||||
@ -162,7 +120,5 @@ documentation, may presume an understanding of these terms.
|
|||||||
a user clicks on a domain object in the tree, they are _navigating_ to
|
a user clicks on a domain object in the tree, they are _navigating_ to
|
||||||
it, and it is thereafter considered the _navigated_ object (until the
|
it, and it is thereafter considered the _navigated_ object (until the
|
||||||
user makes another such choice.)
|
user makes another such choice.)
|
||||||
* _space_: A name used to identify a persistence store. Interactions with
|
* _namespace_: A name used to identify a persistence store. A running open MCT
|
||||||
persistence will generally involve a `space` parameter in some form, to
|
application could potentially use multiple persistence stores, with the
|
||||||
distinguish multiple persistence stores from one another (for cases
|
|
||||||
where there are multiple valid persistence locations available.)
|
|
||||||
|
2
app.js
@ -16,7 +16,7 @@ const request = require('request');
|
|||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
options.port = options.port || options.p || 8080;
|
options.port = options.port || options.p || 8080;
|
||||||
options.host = options.host || options.h || 'localhost';
|
options.host = options.host || 'localhost';
|
||||||
options.directory = options.directory || options.D || '.';
|
options.directory = options.directory || options.D || '.';
|
||||||
|
|
||||||
// Show command line options
|
// Show command line options
|
||||||
|
@ -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.
|
||||||
|
|
||||||
@ -18,4 +18,4 @@
|
|||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
this source code distribution or the Licensing information page available
|
this source code distribution or the Licensing information page available
|
||||||
at runtime from the About dialog for additional information.
|
at runtime from the About dialog for additional information.
|
||||||
-->
|
-->
|
||||||
|
@ -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.
|
||||||
*
|
*
|
||||||
@ -18,4 +18,4 @@
|
|||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
@ -33,5 +33,5 @@ As we transition to a new API, the following documentation for the old API
|
|||||||
* The [Developer's Guide](guide/) goes into more detail about how to use the
|
* The [Developer's Guide](guide/) goes into more detail about how to use the
|
||||||
platform and the functionality that it provides.
|
platform and the functionality that it provides.
|
||||||
|
|
||||||
* The [Tutorials](tutorials/) give examples of extending the platform to add
|
* The [Tutorials](https://github.com/nasa/openmct-tutorial) give examples of extending the platform to add
|
||||||
functionality, and integrate with data sources.
|
functionality, and integrate with data sources.
|
||||||
|
@ -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.
|
||||||
|
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 43 KiB |
@ -22,59 +22,60 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/EventTelemetryProvider",
|
"./src/EventTelemetryProvider"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
EventTelemetryProvider,
|
EventTelemetryProvider
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
legacyRegistry.register("example/eventGenerator", {
|
return {
|
||||||
"name": "Event Message Generator",
|
name: "example/eventGenerator",
|
||||||
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
definition: {
|
||||||
"extensions": {
|
"name": "Event Message Generator",
|
||||||
"components": [
|
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
||||||
{
|
"extensions": {
|
||||||
"implementation": EventTelemetryProvider,
|
"components": [
|
||||||
"type": "provider",
|
{
|
||||||
"provides": "telemetryService",
|
"implementation": EventTelemetryProvider,
|
||||||
"depends": [
|
"type": "provider",
|
||||||
"$q",
|
"provides": "telemetryService",
|
||||||
"$timeout"
|
"depends": [
|
||||||
]
|
"$q",
|
||||||
}
|
"$timeout"
|
||||||
],
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"key": "eventGenerator",
|
|
||||||
"name": "Event Message Generator",
|
|
||||||
"cssClass": "icon-generator-events",
|
|
||||||
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
|
||||||
"priority": 10,
|
|
||||||
"features": "creation",
|
|
||||||
"model": {
|
|
||||||
"telemetry": {}
|
|
||||||
},
|
|
||||||
"telemetry": {
|
|
||||||
"source": "eventGenerator",
|
|
||||||
"domains": [
|
|
||||||
{
|
|
||||||
"key": "utc",
|
|
||||||
"name": "Timestamp",
|
|
||||||
"format": "utc"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ranges": [
|
|
||||||
{
|
|
||||||
"key": "message",
|
|
||||||
"name": "Message",
|
|
||||||
"format": "string"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
],
|
||||||
]
|
"types": [
|
||||||
|
{
|
||||||
|
"key": "eventGenerator",
|
||||||
|
"name": "Event Message Generator",
|
||||||
|
"cssClass": "icon-generator-events",
|
||||||
|
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
||||||
|
"priority": 10,
|
||||||
|
"features": "creation",
|
||||||
|
"model": {
|
||||||
|
"telemetry": {}
|
||||||
|
},
|
||||||
|
"telemetry": {
|
||||||
|
"source": "eventGenerator",
|
||||||
|
"domains": [
|
||||||
|
{
|
||||||
|
"key": "utc",
|
||||||
|
"name": "Timestamp",
|
||||||
|
"format": "utc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ranges": [
|
||||||
|
{
|
||||||
|
"key": "message",
|
||||||
|
"name": "Message",
|
||||||
|
"format": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -44,15 +44,16 @@ 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() + "]";
|
||||||
};
|
};
|
||||||
|
|
||||||
return generatorData;
|
return generatorData;
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,9 @@ define(
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EventTelemetryProvider($q, $timeout) {
|
function EventTelemetryProvider($q, $timeout) {
|
||||||
var
|
var subscriptions = [],
|
||||||
subscriptions = [],
|
genInterval = 1000,
|
||||||
genInterval = 1000,
|
generating = false;
|
||||||
generating = false,
|
|
||||||
id = Math.random() * 100000;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
function matchesSource(request) {
|
function matchesSource(request) {
|
||||||
@ -47,7 +45,6 @@ define(
|
|||||||
|
|
||||||
// Used internally; this will be repacked by doPackage
|
// Used internally; this will be repacked by doPackage
|
||||||
function generateData(request) {
|
function generateData(request) {
|
||||||
//console.log("generateData " + (Date.now() - startTime).toString());
|
|
||||||
return {
|
return {
|
||||||
key: request.key,
|
key: request.key,
|
||||||
telemetry: new EventTelemetry(request, genInterval)
|
telemetry: new EventTelemetry(request, genInterval)
|
||||||
@ -60,6 +57,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 };
|
||||||
}
|
}
|
||||||
|
@ -58,15 +58,15 @@ define([], function () {
|
|||||||
row,
|
row,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
function copyDomainsToRow(row, index) {
|
function copyDomainsToRow(telemetryRow, index) {
|
||||||
domains.forEach(function (domain) {
|
domains.forEach(function (domain) {
|
||||||
row[domain.name] = series.getDomainValue(index, domain.key);
|
telemetryRow[domain.name] = series.getDomainValue(index, domain.key);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyRangesToRow(row, index) {
|
function copyRangesToRow(telemetryRow, index) {
|
||||||
ranges.forEach(function (range) {
|
ranges.forEach(function (range) {
|
||||||
row[range.name] = series.getRangeValue(index, range.key);
|
telemetryRow[range.name] = series.getRangeValue(index, range.key);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,13 +76,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;
|
||||||
|
@ -22,24 +22,26 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'legacyRegistry',
|
|
||||||
'./ExportTelemetryAsCSVAction'
|
'./ExportTelemetryAsCSVAction'
|
||||||
], function (legacyRegistry, ExportTelemetryAsCSVAction) {
|
], function (ExportTelemetryAsCSVAction) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
legacyRegistry.register("example/export", {
|
return {
|
||||||
"name": "Example of using CSV Export",
|
name: "example/export",
|
||||||
"extensions": {
|
definition: {
|
||||||
"actions": [
|
"name": "Example of using CSV Export",
|
||||||
{
|
"extensions": {
|
||||||
"key": "example.export",
|
"actions": [
|
||||||
"name": "Export Telemetry as CSV",
|
{
|
||||||
"implementation": ExportTelemetryAsCSVAction,
|
"key": "example.export",
|
||||||
"category": "contextual",
|
"name": "Export Telemetry as CSV",
|
||||||
"cssClass": "icon-download",
|
"implementation": ExportTelemetryAsCSVAction,
|
||||||
"depends": [ "exportService" ]
|
"category": "contextual",
|
||||||
}
|
"cssClass": "icon-download",
|
||||||
]
|
"depends": ["exportService"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -22,32 +22,33 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExampleFormController",
|
"./src/ExampleFormController"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
ExampleFormController,
|
ExampleFormController
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
legacyRegistry.register("example/forms", {
|
return {
|
||||||
"name": "Declarative Forms example",
|
name: "example/forms",
|
||||||
"sources": "src",
|
definition: {
|
||||||
"extensions": {
|
"name": "Declarative Forms example",
|
||||||
"controllers": [
|
"sources": "src",
|
||||||
{
|
"extensions": {
|
||||||
"key": "ExampleFormController",
|
"controllers": [
|
||||||
"implementation": ExampleFormController,
|
{
|
||||||
"depends": [
|
"key": "ExampleFormController",
|
||||||
"$scope"
|
"implementation": ExampleFormController,
|
||||||
]
|
"depends": [
|
||||||
}
|
"$scope"
|
||||||
],
|
]
|
||||||
"routes": [
|
}
|
||||||
{
|
],
|
||||||
"templateUrl": "templates/exampleForm.html"
|
"routes": [
|
||||||
}
|
{
|
||||||
]
|
"templateUrl": "templates/exampleForm.html"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -152,10 +152,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 +176,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"
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,8 @@ define([
|
|||||||
values: [
|
values: [
|
||||||
{
|
{
|
||||||
key: "name",
|
key: "name",
|
||||||
name: "Name"
|
name: "Name",
|
||||||
|
format: "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "utc",
|
key: "utc",
|
||||||
@ -27,6 +28,16 @@ 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",
|
||||||
@ -49,7 +60,8 @@ define([
|
|||||||
values: [
|
values: [
|
||||||
{
|
{
|
||||||
key: "name",
|
key: "name",
|
||||||
name: "Name"
|
name: "Name",
|
||||||
|
format: "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "utc",
|
key: "utc",
|
||||||
@ -59,6 +71,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",
|
||||||
@ -87,7 +108,7 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
function GeneratorMetadataProvider() {
|
function GeneratorMetadataProvider() {
|
||||||
|
|
||||||
@ -98,11 +119,11 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
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]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return GeneratorMetadataProvider;
|
return GeneratorMetadataProvider;
|
||||||
|
@ -31,6 +31,7 @@ define([
|
|||||||
period: 10,
|
period: 10,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
dataRateInHz: 1,
|
dataRateInHz: 1,
|
||||||
|
randomness: 0,
|
||||||
phase: 0
|
phase: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -53,6 +54,7 @@ define([
|
|||||||
'offset',
|
'offset',
|
||||||
'dataRateInHz',
|
'dataRateInHz',
|
||||||
'phase',
|
'phase',
|
||||||
|
'randomness'
|
||||||
];
|
];
|
||||||
|
|
||||||
request = request || {};
|
request = request || {};
|
||||||
@ -63,15 +65,19 @@ define([
|
|||||||
if (domainObject.telemetry && domainObject.telemetry.hasOwnProperty(prop)) {
|
if (domainObject.telemetry && domainObject.telemetry.hasOwnProperty(prop)) {
|
||||||
workerRequest[prop] = domainObject.telemetry[prop];
|
workerRequest[prop] = domainObject.telemetry[prop];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request && request.hasOwnProperty(prop)) {
|
if (request && request.hasOwnProperty(prop)) {
|
||||||
workerRequest[prop] = request[prop];
|
workerRequest[prop] = request[prop];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!workerRequest.hasOwnProperty(prop)) {
|
if (!workerRequest.hasOwnProperty(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;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -79,11 +85,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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ define([
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
var RED = {
|
var RED = {
|
||||||
sin: 0.9,
|
sin: 0.9,
|
||||||
cos: 0.9
|
cos: 0.9
|
||||||
},
|
},
|
||||||
YELLOW = {
|
YELLOW = {
|
||||||
@ -37,25 +37,25 @@ define([
|
|||||||
},
|
},
|
||||||
LIMITS = {
|
LIMITS = {
|
||||||
rh: {
|
rh: {
|
||||||
cssClass: "s-limit-upr s-limit-red",
|
cssClass: "is-limit--upr is-limit--red",
|
||||||
low: RED,
|
low: RED,
|
||||||
high: Number.POSITIVE_INFINITY,
|
high: Number.POSITIVE_INFINITY,
|
||||||
name: "Red High"
|
name: "Red High"
|
||||||
},
|
},
|
||||||
rl: {
|
rl: {
|
||||||
cssClass: "s-limit-lwr s-limit-red",
|
cssClass: "is-limit--lwr is-limit--red",
|
||||||
high: -RED,
|
high: -RED,
|
||||||
low: Number.NEGATIVE_INFINITY,
|
low: Number.NEGATIVE_INFINITY,
|
||||||
name: "Red Low"
|
name: "Red Low"
|
||||||
},
|
},
|
||||||
yh: {
|
yh: {
|
||||||
cssClass: "s-limit-upr s-limit-yellow",
|
cssClass: "is-limit--upr is-limit--yellow",
|
||||||
low: YELLOW,
|
low: YELLOW,
|
||||||
high: RED,
|
high: RED,
|
||||||
name: "Yellow High"
|
name: "Yellow High"
|
||||||
},
|
},
|
||||||
yl: {
|
yl: {
|
||||||
cssClass: "s-limit-lwr s-limit-yellow",
|
cssClass: "is-limit--lwr is-limit--yellow",
|
||||||
low: -RED,
|
low: -RED,
|
||||||
high: -YELLOW,
|
high: -YELLOW,
|
||||||
name: "Yellow Low"
|
name: "Yellow Low"
|
||||||
@ -74,16 +74,19 @@ define([
|
|||||||
return {
|
return {
|
||||||
evaluate: function (datum, valueMetadata) {
|
evaluate: function (datum, valueMetadata) {
|
||||||
var range = valueMetadata && valueMetadata.key;
|
var range = valueMetadata && valueMetadata.key;
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ define([
|
|||||||
} else {
|
} else {
|
||||||
deferred.resolve(message.data);
|
deferred.resolve(message.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete this.callbacks[messageId];
|
delete this.callbacks[messageId];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +90,7 @@ define([
|
|||||||
WorkerInterface.prototype.subscribe = function (request, cb) {
|
WorkerInterface.prototype.subscribe = function (request, cb) {
|
||||||
function callback(message) {
|
function callback(message) {
|
||||||
cb(message.data);
|
cb(message.data);
|
||||||
};
|
}
|
||||||
|
|
||||||
var messageId = this.dispatch('subscribe', request, callback);
|
var messageId = this.dispatch('subscribe', request, callback);
|
||||||
|
|
||||||
@ -101,8 +102,5 @@ define([
|
|||||||
}.bind(this);
|
}.bind(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return WorkerInterface;
|
return WorkerInterface;
|
||||||
});
|
});
|
||||||
|
@ -64,13 +64,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),
|
sin: sin(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness),
|
||||||
cos: cos(nextStep, data.period, data.amplitude, data.offset, data.phase)
|
cos: cos(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
nextStep += step;
|
nextStep += step;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nextStep;
|
return nextStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,10 +85,11 @@
|
|||||||
|
|
||||||
function onRequest(message) {
|
function onRequest(message) {
|
||||||
var request = message.data;
|
var request = message.data;
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,6 +101,7 @@
|
|||||||
var offset = request.offset;
|
var offset = request.offset;
|
||||||
var dataRateInHz = request.dataRateInHz;
|
var dataRateInHz = request.dataRateInHz;
|
||||||
var phase = request.phase;
|
var phase = request.phase;
|
||||||
|
var randomness = request.randomness;
|
||||||
|
|
||||||
var step = 1000 / dataRateInHz;
|
var step = 1000 / dataRateInHz;
|
||||||
var nextStep = start - (start % step) + step;
|
var nextStep = start - (start % step) + step;
|
||||||
@ -109,25 +112,26 @@
|
|||||||
data.push({
|
data.push({
|
||||||
name: request.name,
|
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),
|
sin: sin(nextStep, period, amplitude, offset, phase, randomness),
|
||||||
cos: cos(nextStep, period, amplitude, offset, phase)
|
cos: cos(nextStep, period, amplitude, offset, phase, randomness)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.postMessage({
|
self.postMessage({
|
||||||
id: message.id,
|
id: message.id,
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function cos(timestamp, period, amplitude, offset, phase) {
|
function cos(timestamp, period, amplitude, offset, phase, randomness) {
|
||||||
return amplitude *
|
return amplitude
|
||||||
Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + offset;
|
* Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sin(timestamp, period, amplitude, offset, phase) {
|
function sin(timestamp, period, amplitude, offset, phase, randomness) {
|
||||||
return amplitude *
|
return amplitude
|
||||||
Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + offset;
|
* Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendError(error, message) {
|
function sendError(error, message) {
|
||||||
|
@ -33,7 +33,7 @@ define([
|
|||||||
GeneratorMetadataProvider
|
GeneratorMetadataProvider
|
||||||
) {
|
) {
|
||||||
|
|
||||||
return function(openmct){
|
return function (openmct) {
|
||||||
|
|
||||||
openmct.types.addType("example.state-generator", {
|
openmct.types.addType("example.state-generator", {
|
||||||
name: "State Generator",
|
name: "State Generator",
|
||||||
@ -43,21 +43,20 @@ define([
|
|||||||
form: [
|
form: [
|
||||||
{
|
{
|
||||||
name: "State Duration (seconds)",
|
name: "State Duration (seconds)",
|
||||||
control: "textfield",
|
control: "numberfield",
|
||||||
cssClass: "l-input-sm l-numeric",
|
cssClass: "l-input-sm l-numeric",
|
||||||
key: "duration",
|
key: "duration",
|
||||||
required: true,
|
required: true,
|
||||||
property: [
|
property: [
|
||||||
"telemetry",
|
"telemetry",
|
||||||
"duration"
|
"duration"
|
||||||
],
|
]
|
||||||
pattern: "^\\d*(\\.\\d*)?$"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
initialize: function (object) {
|
initialize: function (object) {
|
||||||
object.telemetry = {
|
object.telemetry = {
|
||||||
duration: 5
|
duration: 5
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -123,6 +122,17 @@ define([
|
|||||||
"telemetry",
|
"telemetry",
|
||||||
"phase"
|
"phase"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Randomness",
|
||||||
|
control: "numberfield",
|
||||||
|
cssClass: "l-input-sm l-numeric",
|
||||||
|
key: "randomness",
|
||||||
|
required: true,
|
||||||
|
property: [
|
||||||
|
"telemetry",
|
||||||
|
"randomness"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
initialize: function (object) {
|
initialize: function (object) {
|
||||||
@ -131,7 +141,8 @@ define([
|
|||||||
amplitude: 1,
|
amplitude: 1,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
dataRateInHz: 1,
|
dataRateInHz: 1,
|
||||||
phase: 0
|
phase: 0,
|
||||||
|
randomness: 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -22,27 +22,28 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExampleIdentityService",
|
"./src/ExampleIdentityService"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
ExampleIdentityService,
|
ExampleIdentityService
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
legacyRegistry.register("example/identity", {
|
return {
|
||||||
"extensions": {
|
name: "example/identity",
|
||||||
"components": [
|
definition: {
|
||||||
{
|
"extensions": {
|
||||||
"implementation": ExampleIdentityService,
|
"components": [
|
||||||
"provides": "identityService",
|
{
|
||||||
"type": "provider",
|
"implementation": ExampleIdentityService,
|
||||||
"depends": [
|
"provides": "identityService",
|
||||||
"dialogService",
|
"type": "provider",
|
||||||
"$q"
|
"depends": [
|
||||||
]
|
"dialogService",
|
||||||
}
|
"$q"
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -25,26 +25,30 @@ 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 +81,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;
|
||||||
}
|
}
|
||||||
|
@ -22,36 +22,37 @@
|
|||||||
|
|
||||||
define([
|
define([
|
||||||
|
|
||||||
], function(
|
], function (
|
||||||
|
|
||||||
) {
|
) {
|
||||||
function ImageryPlugin() {
|
function ImageryPlugin() {
|
||||||
|
|
||||||
var IMAGE_SAMPLES = [
|
var IMAGE_SAMPLES = [
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18734.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18734.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18735.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18735.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18736.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18736.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18737.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18737.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18738.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18738.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18739.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18739.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18740.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18740.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18741.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18741.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18742.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18742.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18743.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18743.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18744.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18744.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18745.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18745.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18746.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18746.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
|
||||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
|
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
|
||||||
];
|
];
|
||||||
|
|
||||||
function pointForTimestamp(timestamp, name) {
|
function pointForTimestamp(timestamp, name) {
|
||||||
return {
|
return {
|
||||||
name: name,
|
name: name,
|
||||||
utc: Math.floor(timestamp / 5000) * 5000,
|
utc: Math.floor(timestamp / 5000) * 5000,
|
||||||
|
local: Math.floor(timestamp / 5000) * 5000,
|
||||||
url: IMAGE_SAMPLES[Math.floor(timestamp / 5000) % IMAGE_SAMPLES.length]
|
url: IMAGE_SAMPLES[Math.floor(timestamp / 5000) % IMAGE_SAMPLES.length]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -65,7 +66,7 @@ define([
|
|||||||
callback(pointForTimestamp(Date.now(), domainObject.name));
|
callback(pointForTimestamp(Date.now(), domainObject.name));
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
return function (interval) {
|
return function () {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -78,34 +79,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 < 5000) {
|
||||||
data.push(pointForTimestamp(start, domainObject.name));
|
data.push(pointForTimestamp(start, domainObject.name));
|
||||||
start += 5000;
|
start += 5000;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.resolve(data);
|
return Promise.resolve(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var ladProvider = {
|
var ladProvider = {
|
||||||
supportsRequest: function (domainObject, options) {
|
supportsRequest: function (domainObject, options) {
|
||||||
return domainObject.type === 'example.imagery' &&
|
return domainObject.type === 'example.imagery'
|
||||||
options.strategy === 'latest';
|
&& options.strategy === 'latest';
|
||||||
},
|
},
|
||||||
request: function (domainObject, options) {
|
request: function (domainObject, options) {
|
||||||
return Promise.resolve([pointForTimestamp(Date.now(), domainObject.name)]);
|
return Promise.resolve([pointForTimestamp(Date.now(), 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 +119,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 +140,7 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -21,25 +21,22 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([], function () {
|
||||||
|
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
|
||||||
|
|
||||||
legacyRegistry
|
|
||||||
) {
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
legacyRegistry.register("example/mobile", {
|
return {
|
||||||
"name": "Mobile",
|
name: "example/mobile",
|
||||||
"description": "Allows elements with pertinence to mobile usage and development",
|
definition: {
|
||||||
"extensions": {
|
"name": "Mobile",
|
||||||
"stylesheets": [
|
"description": "Allows elements with pertinence to mobile usage and development",
|
||||||
{
|
"extensions": {
|
||||||
"stylesheetUrl": "css/mobile-example.css",
|
"stylesheets": [
|
||||||
"priority": "mandatory"
|
{
|
||||||
}
|
"stylesheetUrl": "css/mobile-example.css",
|
||||||
]
|
"priority": "mandatory"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -24,92 +24,93 @@
|
|||||||
define([
|
define([
|
||||||
"./src/RemsTelemetryServerAdapter",
|
"./src/RemsTelemetryServerAdapter",
|
||||||
"./src/RemsTelemetryModelProvider",
|
"./src/RemsTelemetryModelProvider",
|
||||||
"./src/RemsTelemetryProvider",
|
"./src/RemsTelemetryProvider"
|
||||||
'legacyRegistry',
|
|
||||||
"module"
|
|
||||||
], function (
|
], function (
|
||||||
RemsTelemetryServerAdapter,
|
RemsTelemetryServerAdapter,
|
||||||
RemsTelemetryModelProvider,
|
RemsTelemetryModelProvider,
|
||||||
RemsTelemetryProvider,
|
RemsTelemetryProvider
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
legacyRegistry.register("example/msl", {
|
|
||||||
"name" : "Mars Science Laboratory Data Adapter",
|
return {
|
||||||
"extensions" : {
|
name: "example/msl",
|
||||||
"types": [
|
definition: {
|
||||||
{
|
"name": "Mars Science Laboratory Data Adapter",
|
||||||
"name":"Mars Science Laboratory",
|
"extensions": {
|
||||||
"key": "msl.curiosity",
|
"types": [
|
||||||
"cssClass": "icon-object"
|
{
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Instrument",
|
|
||||||
"key": "msl.instrument",
|
|
||||||
"cssClass": "icon-object",
|
|
||||||
"model": {"composition": []}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Measurement",
|
|
||||||
"key": "msl.measurement",
|
|
||||||
"cssClass": "icon-telemetry",
|
|
||||||
"model": {"telemetry": {}},
|
|
||||||
"telemetry": {
|
|
||||||
"source": "rems.source",
|
|
||||||
"domains": [
|
|
||||||
{
|
|
||||||
"name": "Time",
|
|
||||||
"key": "utc",
|
|
||||||
"format": "utc"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"constants": [
|
|
||||||
{
|
|
||||||
"key": "REMS_WS_URL",
|
|
||||||
"value": "/proxyUrl?url=http://cab.inta-csic.es/rems/wp-content/plugins/marsweather-widget/api.php"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"roots": [
|
|
||||||
{
|
|
||||||
"id": "msl:curiosity"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"models": [
|
|
||||||
{
|
|
||||||
"id": "msl:curiosity",
|
|
||||||
"priority": "preferred",
|
|
||||||
"model": {
|
|
||||||
"type": "msl.curiosity",
|
|
||||||
"name": "Mars Science Laboratory",
|
"name": "Mars Science Laboratory",
|
||||||
"composition": ["msl_tlm:rems"]
|
"key": "msl.curiosity",
|
||||||
|
"cssClass": "icon-object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Instrument",
|
||||||
|
"key": "msl.instrument",
|
||||||
|
"cssClass": "icon-object",
|
||||||
|
"model": {"composition": []}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Measurement",
|
||||||
|
"key": "msl.measurement",
|
||||||
|
"cssClass": "icon-telemetry",
|
||||||
|
"model": {"telemetry": {}},
|
||||||
|
"telemetry": {
|
||||||
|
"source": "rems.source",
|
||||||
|
"domains": [
|
||||||
|
{
|
||||||
|
"name": "Time",
|
||||||
|
"key": "utc",
|
||||||
|
"format": "utc"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
],
|
||||||
],
|
"constants": [
|
||||||
"services": [
|
{
|
||||||
{
|
"key": "REMS_WS_URL",
|
||||||
"key":"rems.adapter",
|
"value": "/proxyUrl?url=http://cab.inta-csic.es/rems/wp-content/plugins/marsweather-widget/api.php"
|
||||||
"implementation": RemsTelemetryServerAdapter,
|
}
|
||||||
"depends": ["$http", "$log", "REMS_WS_URL"]
|
],
|
||||||
}
|
"roots": [
|
||||||
],
|
{
|
||||||
"components": [
|
"id": "msl:curiosity"
|
||||||
{
|
}
|
||||||
"provides": "modelService",
|
],
|
||||||
"type": "provider",
|
"models": [
|
||||||
"implementation": RemsTelemetryModelProvider,
|
{
|
||||||
"depends": ["rems.adapter"]
|
"id": "msl:curiosity",
|
||||||
},
|
"priority": "preferred",
|
||||||
{
|
"model": {
|
||||||
"provides": "telemetryService",
|
"type": "msl.curiosity",
|
||||||
"type": "provider",
|
"name": "Mars Science Laboratory",
|
||||||
"implementation": RemsTelemetryProvider,
|
"composition": ["msl_tlm:rems"]
|
||||||
"depends": ["rems.adapter", "$q"]
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"key": "rems.adapter",
|
||||||
|
"implementation": RemsTelemetryServerAdapter,
|
||||||
|
"depends": ["$http", "$log", "REMS_WS_URL"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"provides": "modelService",
|
||||||
|
"type": "provider",
|
||||||
|
"implementation": RemsTelemetryModelProvider,
|
||||||
|
"depends": ["rems.adapter"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"provides": "telemetryService",
|
||||||
|
"type": "provider",
|
||||||
|
"implementation": RemsTelemetryProvider,
|
||||||
|
"depends": ["rems.adapter", "$q"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ define(
|
|||||||
"identifier": "msl",
|
"identifier": "msl",
|
||||||
"instruments": [
|
"instruments": [
|
||||||
{
|
{
|
||||||
"name":"rems",
|
"name": "rems",
|
||||||
"identifier": "rems",
|
"identifier": "rems",
|
||||||
"measurements": [
|
"measurements": [
|
||||||
{
|
{
|
||||||
@ -76,4 +76,4 @@ define(
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
function (){
|
function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var PREFIX = "msl_tlm:",
|
var PREFIX = "msl_tlm:",
|
||||||
@ -32,20 +32,20 @@ define(
|
|||||||
string: "string"
|
string: "string"
|
||||||
};
|
};
|
||||||
|
|
||||||
function RemsTelemetryModelProvider(adapter){
|
function RemsTelemetryModelProvider(adapter) {
|
||||||
|
|
||||||
function isRelevant(id) {
|
function isRelevant(id) {
|
||||||
return id.indexOf(PREFIX) === 0;
|
return id.indexOf(PREFIX) === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeId(element){
|
function makeId(element) {
|
||||||
return PREFIX + element.identifier;
|
return PREFIX + element.identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildTaxonomy(dictionary){
|
function buildTaxonomy(dictionary) {
|
||||||
var models = {};
|
var models = {};
|
||||||
|
|
||||||
function addMeasurement(measurement, parent){
|
function addMeasurement(measurement, parent) {
|
||||||
var format = FORMAT_MAPPINGS[measurement.type];
|
var format = FORMAT_MAPPINGS[measurement.type];
|
||||||
models[makeId(measurement)] = {
|
models[makeId(measurement)] = {
|
||||||
type: "msl.measurement",
|
type: "msl.measurement",
|
||||||
@ -73,14 +73,15 @@ define(
|
|||||||
location: spacecraftId,
|
location: spacecraftId,
|
||||||
composition: measurements.map(makeId)
|
composition: measurements.map(makeId)
|
||||||
};
|
};
|
||||||
measurements.forEach(function(measurement) {
|
measurements.forEach(function (measurement) {
|
||||||
addMeasurement(measurement, instrumentId);
|
addMeasurement(measurement, instrumentId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
(dictionary.instruments || []).forEach(function(instrument) {
|
(dictionary.instruments || []).forEach(function (instrument) {
|
||||||
addInstrument(instrument, "msl:curiosity");
|
addInstrument(instrument, "msl:curiosity");
|
||||||
});
|
});
|
||||||
|
|
||||||
return models;
|
return models;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,6 +91,7 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return RemsTelemetryModelProvider;
|
return RemsTelemetryModelProvider;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -72,10 +72,11 @@ define (
|
|||||||
* This data source does not support real-time subscriptions
|
* This data source does not support real-time subscriptions
|
||||||
*/
|
*/
|
||||||
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
|
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
|
||||||
return function() {};
|
return function () {};
|
||||||
};
|
};
|
||||||
|
|
||||||
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
|
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
|
||||||
return function() {};
|
return function () {};
|
||||||
};
|
};
|
||||||
|
|
||||||
return RemsTelemetryProvider;
|
return RemsTelemetryProvider;
|
||||||
|
@ -54,9 +54,10 @@ define(
|
|||||||
* @returns {number} A count of the number of data values available in
|
* @returns {number} A count of the number of data values available in
|
||||||
* this series
|
* this series
|
||||||
*/
|
*/
|
||||||
RemsTelemetrySeries.prototype.getPointCount = function() {
|
RemsTelemetrySeries.prototype.getPointCount = function () {
|
||||||
return this.data.length;
|
return this.data.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The domain value at the given index. The Rems telemetry data is
|
* The domain value at the given index. The Rems telemetry data is
|
||||||
* time ordered, so the domain value is the time stamp of each data
|
* time ordered, so the domain value is the time stamp of each data
|
||||||
@ -64,8 +65,8 @@ define(
|
|||||||
* @param index
|
* @param index
|
||||||
* @returns {number} the time value in ms since 1 January 1970
|
* @returns {number} the time value in ms since 1 January 1970
|
||||||
*/
|
*/
|
||||||
RemsTelemetrySeries.prototype.getDomainValue = function(index) {
|
RemsTelemetrySeries.prototype.getDomainValue = function (index) {
|
||||||
return this.data[index].date;
|
return this.data[index].date;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,8 +76,8 @@ define(
|
|||||||
* value of.
|
* value of.
|
||||||
* @returns {number} A floating point number
|
* @returns {number} A floating point number
|
||||||
*/
|
*/
|
||||||
RemsTelemetrySeries.prototype.getRangeValue = function(index) {
|
RemsTelemetrySeries.prototype.getRangeValue = function (index) {
|
||||||
return this.data[index].value;
|
return this.data[index].value;
|
||||||
};
|
};
|
||||||
|
|
||||||
return RemsTelemetrySeries;
|
return RemsTelemetrySeries;
|
||||||
|
@ -68,18 +68,18 @@ define(
|
|||||||
* given request ID.
|
* given request ID.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
RemsTelemetryServerAdapter.prototype.requestHistory = function(request) {
|
RemsTelemetryServerAdapter.prototype.requestHistory = function (request) {
|
||||||
var self = this,
|
var self = this,
|
||||||
id = request.key;
|
id = request.key;
|
||||||
|
|
||||||
var dataTransforms = this.dataTransforms;
|
var dataTransforms = this.dataTransforms;
|
||||||
|
|
||||||
function processResponse(response){
|
function processResponse(response) {
|
||||||
var data = [];
|
var data = [];
|
||||||
/*
|
/*
|
||||||
* History data is organised by Sol. Iterate over sols...
|
* History data is organised by Sol. Iterate over sols...
|
||||||
*/
|
*/
|
||||||
response.data.soles.forEach(function(solData){
|
response.data.soles.forEach(function (solData) {
|
||||||
/*
|
/*
|
||||||
* Check that valid data exists
|
* Check that valid data exists
|
||||||
*/
|
*/
|
||||||
@ -95,28 +95,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)
|
||||||
@ -132,7 +136,7 @@ define(
|
|||||||
* @param id The telemetry data point key to be queried.
|
* @param id The telemetry data point key to be queried.
|
||||||
* @returns {Promise | Array<RemsTelemetryValue>} that resolves with an Array of {@link RemsTelemetryValue} objects for the request data key.
|
* @returns {Promise | Array<RemsTelemetryValue>} that resolves with an Array of {@link RemsTelemetryValue} objects for the request data key.
|
||||||
*/
|
*/
|
||||||
RemsTelemetryServerAdapter.prototype.history = function(request) {
|
RemsTelemetryServerAdapter.prototype.history = function (request) {
|
||||||
return this.requestHistory(request);
|
return this.requestHistory(request);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,64 +27,65 @@ define([
|
|||||||
"./src/DialogLaunchIndicator",
|
"./src/DialogLaunchIndicator",
|
||||||
"./src/NotificationLaunchIndicator",
|
"./src/NotificationLaunchIndicator",
|
||||||
"./res/dialog-launch.html",
|
"./res/dialog-launch.html",
|
||||||
"./res/notification-launch.html",
|
"./res/notification-launch.html"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
DialogLaunchController,
|
DialogLaunchController,
|
||||||
NotificationLaunchController,
|
NotificationLaunchController,
|
||||||
DialogLaunchIndicator,
|
DialogLaunchIndicator,
|
||||||
NotificationLaunchIndicator,
|
NotificationLaunchIndicator,
|
||||||
DialogLaunch,
|
DialogLaunch,
|
||||||
NotificationLaunch,
|
NotificationLaunch
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
legacyRegistry.register("example/notifications", {
|
return {
|
||||||
"extensions": {
|
name: "example/notifications",
|
||||||
"templates": [
|
definition: {
|
||||||
{
|
"extensions": {
|
||||||
"key": "dialogLaunchTemplate",
|
"templates": [
|
||||||
"template": DialogLaunch
|
{
|
||||||
},
|
"key": "dialogLaunchTemplate",
|
||||||
{
|
"template": DialogLaunch
|
||||||
"key": "notificationLaunchTemplate",
|
},
|
||||||
"template": NotificationLaunch
|
{
|
||||||
}
|
"key": "notificationLaunchTemplate",
|
||||||
],
|
"template": NotificationLaunch
|
||||||
"controllers": [
|
}
|
||||||
{
|
],
|
||||||
"key": "DialogLaunchController",
|
"controllers": [
|
||||||
"implementation": DialogLaunchController,
|
{
|
||||||
"depends": [
|
"key": "DialogLaunchController",
|
||||||
"$scope",
|
"implementation": DialogLaunchController,
|
||||||
"$timeout",
|
"depends": [
|
||||||
"$log",
|
"$scope",
|
||||||
"dialogService",
|
"$timeout",
|
||||||
"notificationService"
|
"$log",
|
||||||
]
|
"dialogService",
|
||||||
},
|
"notificationService"
|
||||||
{
|
]
|
||||||
"key": "NotificationLaunchController",
|
},
|
||||||
"implementation": NotificationLaunchController,
|
{
|
||||||
"depends": [
|
"key": "NotificationLaunchController",
|
||||||
"$scope",
|
"implementation": NotificationLaunchController,
|
||||||
"$timeout",
|
"depends": [
|
||||||
"$log",
|
"$scope",
|
||||||
"notificationService"
|
"$timeout",
|
||||||
]
|
"$log",
|
||||||
}
|
"notificationService"
|
||||||
],
|
]
|
||||||
"indicators": [
|
}
|
||||||
{
|
],
|
||||||
"implementation": DialogLaunchIndicator,
|
"indicators": [
|
||||||
"priority": "fallback"
|
{
|
||||||
},
|
"implementation": DialogLaunchIndicator,
|
||||||
{
|
"priority": "fallback"
|
||||||
"implementation": NotificationLaunchIndicator,
|
},
|
||||||
"priority": "fallback"
|
{
|
||||||
}
|
"implementation": NotificationLaunchIndicator,
|
||||||
]
|
"priority": "fallback"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<span class="h-indicator" ng-controller="DialogLaunchController">
|
<span class="h-indicator" ng-controller="DialogLaunchController">
|
||||||
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
||||||
<div class="ls-indicator icon-box-with-arrow s-status-available"><span class="label">
|
<div class="c-indicator c-indicator--clickable icon-box-with-arrow s-status-available"><span class="label c-indicator__label">
|
||||||
<a ng-click="launchProgress(true)">Known</a>
|
<button ng-click="launchProgress(true)">Known</button>
|
||||||
<a ng-click="launchProgress(false)">Unknown</a>
|
<button ng-click="launchProgress(false)">Unknown</button>
|
||||||
<a ng-click="launchError()">Error</a>
|
<button ng-click="launchError()">Error</button>
|
||||||
<a ng-click="launchInfo()">Info</a>
|
<button ng-click="launchInfo()">Info</button>
|
||||||
</span></div>
|
</span></div>
|
||||||
</span>
|
</span>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<span class="h-indicator" ng-controller="NotificationLaunchController">
|
<span class="h-indicator" ng-controller="NotificationLaunchController">
|
||||||
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
<!-- DO NOT ADD SPACES BETWEEN THE SPANS - IT ADDS WHITE SPACE!! -->
|
||||||
<div class="ls-indicator icon-bell s-status-available"><span class="label">
|
<div class="c-indicator c-indicator--clickable icon-bell s-status-available"><span class="label c-indicator__label">
|
||||||
<a ng-click="newInfo()">Success</a>
|
<button ng-click="newInfo()">Success</button>
|
||||||
<a ng-click="newError()">Error</a>
|
<button ng-click="newError()">Error</button>
|
||||||
<a ng-click="newAlert()">Alert</a>
|
<button ng-click="newAlert()">Alert</button>
|
||||||
<a ng-click="newProgress()">Progress</a>
|
<button ng-click="newProgress()">Progress</button>
|
||||||
</span></div>
|
</span></div>
|
||||||
</span>
|
</span>
|
||||||
|
@ -91,7 +91,6 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Demonstrates launching an error dialog
|
Demonstrates launching an error dialog
|
||||||
*/
|
*/
|
||||||
@ -132,17 +131,17 @@ 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",
|
||||||
callback: function () {
|
callback: function () {
|
||||||
$log.debug("OK Pressed");
|
$log.debug("OK Pressed");
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
dialog = dialogService.showBlockingMessage(model);
|
dialog = dialogService.showBlockingMessage(model);
|
||||||
@ -153,6 +152,7 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return DialogLaunchController;
|
return DialogLaunchController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -42,9 +42,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";
|
||||||
};
|
};
|
||||||
|
@ -48,7 +48,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 +62,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 +75,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 +94,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 +121,7 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NotificationLaunchController;
|
return NotificationLaunchController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -42,9 +42,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";
|
||||||
};
|
};
|
||||||
|
@ -22,33 +22,34 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/BrowserPersistenceProvider",
|
"./src/BrowserPersistenceProvider"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
BrowserPersistenceProvider,
|
BrowserPersistenceProvider
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
legacyRegistry.register("example/persistence", {
|
return {
|
||||||
"extensions": {
|
name: "example/persistence",
|
||||||
"components": [
|
definition: {
|
||||||
{
|
"extensions": {
|
||||||
"provides": "persistenceService",
|
"components": [
|
||||||
"type": "provider",
|
{
|
||||||
"implementation": BrowserPersistenceProvider,
|
"provides": "persistenceService",
|
||||||
"depends": [
|
"type": "provider",
|
||||||
"$q",
|
"implementation": BrowserPersistenceProvider,
|
||||||
"PERSISTENCE_SPACE"
|
"depends": [
|
||||||
]
|
"$q",
|
||||||
}
|
"PERSISTENCE_SPACE"
|
||||||
],
|
]
|
||||||
"constants": [
|
}
|
||||||
{
|
],
|
||||||
"key": "PERSISTENCE_SPACE",
|
"constants": [
|
||||||
"value": "mct"
|
{
|
||||||
}
|
"key": "PERSISTENCE_SPACE",
|
||||||
]
|
"value": "mct"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -30,8 +30,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 +49,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 +67,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
|
||||||
);
|
);
|
||||||
|
@ -22,24 +22,25 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExamplePolicy",
|
"./src/ExamplePolicy"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
ExamplePolicy,
|
ExamplePolicy
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
legacyRegistry.register("example/policy", {
|
return {
|
||||||
"name": "Example Policy",
|
name: "example/policy",
|
||||||
"description": "Provides an example of using policies to prohibit actions.",
|
definition: {
|
||||||
"extensions": {
|
"name": "Example Policy",
|
||||||
"policies": [
|
"description": "Provides an example of using policies to prohibit actions.",
|
||||||
{
|
"extensions": {
|
||||||
"implementation": ExamplePolicy,
|
"policies": [
|
||||||
"category": "action"
|
{
|
||||||
}
|
"implementation": ExamplePolicy,
|
||||||
]
|
"category": "action"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -37,6 +37,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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -23,33 +23,34 @@
|
|||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/WatchIndicator",
|
"./src/WatchIndicator",
|
||||||
"./src/DigestIndicator",
|
"./src/DigestIndicator"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
WatchIndicator,
|
WatchIndicator,
|
||||||
DigestIndicator,
|
DigestIndicator
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
legacyRegistry.register("example/profiling", {
|
return {
|
||||||
"extensions": {
|
name: "example/profiling",
|
||||||
"indicators": [
|
definition: {
|
||||||
{
|
"extensions": {
|
||||||
"implementation": WatchIndicator,
|
"indicators": [
|
||||||
"depends": [
|
{
|
||||||
"$interval",
|
"implementation": WatchIndicator,
|
||||||
"$rootScope"
|
"depends": [
|
||||||
]
|
"$interval",
|
||||||
},
|
"$rootScope"
|
||||||
{
|
]
|
||||||
"implementation": DigestIndicator,
|
},
|
||||||
"depends": [
|
{
|
||||||
"$interval",
|
"implementation": DigestIndicator,
|
||||||
"$rootScope"
|
"depends": [
|
||||||
]
|
"$interval",
|
||||||
}
|
"$rootScope"
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -22,42 +22,43 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ScratchPersistenceProvider",
|
"./src/ScratchPersistenceProvider"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
ScratchPersistenceProvider,
|
ScratchPersistenceProvider
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
legacyRegistry.register("example/scratchpad", {
|
return {
|
||||||
"extensions": {
|
name: "example/scratchpad",
|
||||||
"roots": [
|
definition: {
|
||||||
{
|
"extensions": {
|
||||||
"id": "scratch:root"
|
"roots": [
|
||||||
}
|
{
|
||||||
],
|
"id": "scratch:root"
|
||||||
"models": [
|
}
|
||||||
{
|
],
|
||||||
"id": "scratch:root",
|
"models": [
|
||||||
"model": {
|
{
|
||||||
"type": "folder",
|
"id": "scratch:root",
|
||||||
"composition": [],
|
"model": {
|
||||||
"name": "Scratchpad"
|
"type": "folder",
|
||||||
},
|
"composition": [],
|
||||||
"priority": "preferred"
|
"name": "Scratchpad"
|
||||||
}
|
},
|
||||||
],
|
"priority": "preferred"
|
||||||
"components": [
|
}
|
||||||
{
|
],
|
||||||
"provides": "persistenceService",
|
"components": [
|
||||||
"type": "provider",
|
{
|
||||||
"implementation": ScratchPersistenceProvider,
|
"provides": "persistenceService",
|
||||||
"depends": [
|
"type": "provider",
|
||||||
"$q"
|
"implementation": ScratchPersistenceProvider,
|
||||||
]
|
"depends": [
|
||||||
}
|
"$q"
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -54,13 +54,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 +69,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>
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
import Vue from 'Vue';
|
import Vue from 'Vue';
|
||||||
import HelloWorld from './HelloWorld.vue';
|
import HelloWorld from './HelloWorld.vue';
|
||||||
|
|
||||||
function SimpleVuePlugin () {
|
function SimpleVuePlugin() {
|
||||||
return function install(openmct) {
|
return function install(openmct) {
|
||||||
var views = (openmct.mainViews || openmct.objectViews);
|
|
||||||
|
|
||||||
openmct.types.addType('hello-world', {
|
openmct.types.addType('hello-world', {
|
||||||
name: 'Hello World',
|
name: 'Hello World',
|
||||||
description: 'An introduction object',
|
description: 'An introduction object',
|
||||||
@ -19,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);
|
||||||
@ -31,7 +30,7 @@ function SimpleVuePlugin () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SimpleVuePlugin
|
export default SimpleVuePlugin;
|
||||||
|
@ -8,8 +8,7 @@ define([
|
|||||||
"./res/templates/glyphs.html",
|
"./res/templates/glyphs.html",
|
||||||
"./res/templates/controls.html",
|
"./res/templates/controls.html",
|
||||||
"./res/templates/input.html",
|
"./res/templates/input.html",
|
||||||
"./res/templates/menus.html",
|
"./res/templates/menus.html"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
ExampleStyleGuideModelProvider,
|
ExampleStyleGuideModelProvider,
|
||||||
MCTExample,
|
MCTExample,
|
||||||
@ -20,33 +19,114 @@ define([
|
|||||||
glyphsTemplate,
|
glyphsTemplate,
|
||||||
controlsTemplate,
|
controlsTemplate,
|
||||||
inputTemplate,
|
inputTemplate,
|
||||||
menusTemplate,
|
menusTemplate
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
legacyRegistry.register("example/styleguide", {
|
return {
|
||||||
"name": "Open MCT Style Guide",
|
name: "example/styleguide",
|
||||||
"description": "Examples and documentation illustrating UI styles in use in Open MCT.",
|
definition: {
|
||||||
"extensions":
|
"name": "Open MCT Style Guide",
|
||||||
|
"description": "Examples and documentation illustrating UI styles in use in Open MCT.",
|
||||||
|
"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",
|
||||||
@ -103,5 +183,6 @@ define([
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
@ -30,14 +30,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 +78,6 @@ define(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return ExampleStyleGuideModelProvider
|
return ExampleStyleGuideModelProvider;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
274
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.
|
||||||
|
|
||||||
@ -27,32 +27,34 @@
|
|||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<title></title>
|
<title></title>
|
||||||
<script src="dist/openmct.js"></script>
|
<script src="dist/openmct.js"></script>
|
||||||
<link rel="stylesheet" href="dist/openmct.css">
|
<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">
|
<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-96x96.png" sizes="96x96">
|
<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">
|
|
||||||
<link rel="shortcut icon" href="dist/favicons/favicon.ico">
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
var THIRTY_MINUTES = 30 * 60 * 1000;
|
const THIRTY_SECONDS = 30 * 1000;
|
||||||
|
const THIRTY_MINUTES = THIRTY_SECONDS * 60;
|
||||||
|
|
||||||
[
|
[
|
||||||
'example/eventGenerator',
|
'example/eventGenerator'
|
||||||
'example/styleguide'
|
|
||||||
].forEach(
|
].forEach(
|
||||||
openmct.legacyRegistry.enable.bind(openmct.legacyRegistry)
|
openmct.legacyRegistry.enable.bind(openmct.legacyRegistry)
|
||||||
);
|
);
|
||||||
openmct.install(openmct.plugins.MyItems());
|
|
||||||
openmct.install(openmct.plugins.LocalStorage());
|
openmct.install(openmct.plugins.LocalStorage());
|
||||||
|
openmct.install(openmct.plugins.Espresso());
|
||||||
|
openmct.install(openmct.plugins.MyItems());
|
||||||
openmct.install(openmct.plugins.Generator());
|
openmct.install(openmct.plugins.Generator());
|
||||||
openmct.install(openmct.plugins.ExampleImagery());
|
openmct.install(openmct.plugins.ExampleImagery());
|
||||||
openmct.install(openmct.plugins.UTCTimeSystem());
|
openmct.install(openmct.plugins.UTCTimeSystem());
|
||||||
openmct.install(openmct.plugins.ImportExport());
|
|
||||||
openmct.install(openmct.plugins.FixedView());
|
|
||||||
openmct.install(openmct.plugins.AutoflowView({
|
openmct.install(openmct.plugins.AutoflowView({
|
||||||
type: "telemetry.panel"
|
type: "telemetry.panel"
|
||||||
}));
|
}));
|
||||||
|
openmct.install(openmct.plugins.DisplayLayout({
|
||||||
|
showAsView: ['summary-widget', 'example.imagery']
|
||||||
|
}));
|
||||||
openmct.install(openmct.plugins.Conductor({
|
openmct.install(openmct.plugins.Conductor({
|
||||||
menuOptions: [
|
menuOptions: [
|
||||||
{
|
{
|
||||||
@ -61,224 +63,60 @@
|
|||||||
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() - 1000 * 60 * 60 * 24,
|
||||||
|
end: () => Date.now()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Last 2 hours',
|
||||||
|
bounds: {
|
||||||
|
start: () => Date.now() - 1000 * 60 * 60 * 2,
|
||||||
|
end: () => Date.now()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Last hour',
|
||||||
|
bounds: {
|
||||||
|
start: () => Date.now() - 1000 * 60 * 60,
|
||||||
|
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: 1000 * 60 * 60 * 24
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Realtime",
|
name: "Realtime",
|
||||||
timeSystem: 'utc',
|
timeSystem: 'utc',
|
||||||
clock: 'local',
|
clock: 'local',
|
||||||
clockOffsets: {
|
clockOffsets: {
|
||||||
start: -25 * 60 * 1000,
|
start: - THIRTY_MINUTES,
|
||||||
end: 5 * 60 * 1000
|
end: THIRTY_SECONDS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
openmct.install(openmct.plugins.SummaryWidget());
|
openmct.install(openmct.plugins.SummaryWidget());
|
||||||
openmct.install(openmct.plugins.Notebook());
|
openmct.install(openmct.plugins.Notebook());
|
||||||
openmct.install(openmct.plugins.FolderView());
|
openmct.install(openmct.plugins.LADTable());
|
||||||
openmct.install(openmct.plugins.Tabs());
|
openmct.install(openmct.plugins.Filters(['table', 'telemetry.plot.overlay']));
|
||||||
openmct.install(openmct.plugins.FlexibleLayout());
|
openmct.install(openmct.plugins.ObjectMigration());
|
||||||
openmct.time.clock('local', {start: -THIRTY_MINUTES, end: 0});
|
openmct.install(openmct.plugins.ClearData(
|
||||||
openmct.time.timeSystem('utc');
|
['table', 'telemetry.plot.overlay', 'telemetry.plot.stacked'],
|
||||||
|
{indicator: true}
|
||||||
|
));
|
||||||
openmct.start();
|
openmct.start();
|
||||||
|
|
||||||
// openmct.toolbars.addProvider({
|
|
||||||
// name: "Testing Toolbar",
|
|
||||||
// key: "testing",
|
|
||||||
// description: "a mock toolbar that exercises all controls",
|
|
||||||
// forSelection: function (selection) {
|
|
||||||
// return true; // always applies.
|
|
||||||
// },
|
|
||||||
// toolbar: function (selection) {
|
|
||||||
// return [
|
|
||||||
// {
|
|
||||||
// control: 'menu',
|
|
||||||
// icon: 'icon-plus',
|
|
||||||
// label: 'Add',
|
|
||||||
// options: [
|
|
||||||
// { name: 'Box', class: 'icon-box', title: 'Add Box' },
|
|
||||||
// { name: 'Line', class: 'icon-line-horz', title: 'Add Line' },
|
|
||||||
// { name: 'Text', class: 'icon-font', title: 'Add Text' },
|
|
||||||
// { name: 'Image', class: 'icon-image', title: 'Add Image' }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'separator'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'color-picker',
|
|
||||||
// icon: 'icon-paint-bucket',
|
|
||||||
// value: '#33ff00',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'color-picker',
|
|
||||||
// icon: 'icon-pencil',
|
|
||||||
// value: '#ffffff',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'color-picker',
|
|
||||||
// icon: 'icon-font',
|
|
||||||
// value: '#333333',
|
|
||||||
// },
|
|
||||||
//
|
|
||||||
// {
|
|
||||||
// control: 'separator'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'select-menu',
|
|
||||||
// value: 11,
|
|
||||||
// options: [
|
|
||||||
// { value: 9, name: '9 px' },
|
|
||||||
// { value: 10, name: '10 px' },
|
|
||||||
// { value: 11, name: '11 px' },
|
|
||||||
// { value: 12, name: '12 px' },
|
|
||||||
// { value: 13, name: '13 px' },
|
|
||||||
// { value: 14, name: '14 px' },
|
|
||||||
// { value: 16, name: '16 px' },
|
|
||||||
// { value: 18, name: '18 px' },
|
|
||||||
// { value: 20, name: '20 px' },
|
|
||||||
// { value: 24, name: '24 px' },
|
|
||||||
// { value: 28, name: '28 px' },
|
|
||||||
// { value: 32, name: '32 px' },
|
|
||||||
// { value: 40, name: '40 px' },
|
|
||||||
// { value: 48, name: '48 px' },
|
|
||||||
// { value: 56, name: '56 px' },
|
|
||||||
// { value: 64, name: '64 px' },
|
|
||||||
// { value: 72, name: '72 px' },
|
|
||||||
// { value: 80, name: '80 px' },
|
|
||||||
// { value: 88, name: '88 px' },
|
|
||||||
// { value: 96, name: '96 px' },
|
|
||||||
// { value: 128, name: '128 px' },
|
|
||||||
// { value: 160, name: '160 px' }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
//
|
|
||||||
// {
|
|
||||||
// control: 'separator'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'menu',
|
|
||||||
// icon: 'icon-layers',
|
|
||||||
// options: [
|
|
||||||
// { name: 'Move to top', class: 'icon-arrow-double-up', title: 'Move to top' },
|
|
||||||
// { name: 'Move up', class: 'icon-arrow-up', title: 'Move up' },
|
|
||||||
// { name: 'Move down', class: 'icon-arrow-down', title: 'Move down' },
|
|
||||||
// { name: 'Move to bottom', class: 'icon-arrow-double-down', title: 'Move to bottom' }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
//
|
|
||||||
// {
|
|
||||||
// control: 'separator'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'button',
|
|
||||||
// icon: 'icon-gear'
|
|
||||||
// },
|
|
||||||
//
|
|
||||||
// {
|
|
||||||
// control: 'separator'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'input',
|
|
||||||
// type: 'number',
|
|
||||||
// label: 'X',
|
|
||||||
// value: 1,
|
|
||||||
// title: 'X position'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'input',
|
|
||||||
// type: 'number',
|
|
||||||
// label: 'Y',
|
|
||||||
// value: 2,
|
|
||||||
// title: 'Y position'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'input',
|
|
||||||
// type: 'number',
|
|
||||||
// label: 'W',
|
|
||||||
// value: 3,
|
|
||||||
// title: 'Width'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'input',
|
|
||||||
// type: 'number',
|
|
||||||
// label: 'H',
|
|
||||||
// value: 4,
|
|
||||||
// title: 'Height'
|
|
||||||
// },
|
|
||||||
//
|
|
||||||
// {
|
|
||||||
// control: 'separator'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'button',
|
|
||||||
// icon: 'icon-trash',
|
|
||||||
// label: 'delete',
|
|
||||||
// modifier: 'caution'
|
|
||||||
// },
|
|
||||||
//
|
|
||||||
// {
|
|
||||||
// control: 'separator'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'checkbox',
|
|
||||||
// name: 'this is a checkbox',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'separator'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'toggle-button',
|
|
||||||
// title: 'Toggle Frame',
|
|
||||||
// property: 'hideFrame',
|
|
||||||
// value: false,
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// value: true,
|
|
||||||
// icon: 'icon-frame-hide'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: false,
|
|
||||||
// icon: 'icon-frame-show'
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'toggle-button',
|
|
||||||
// title: 'Snap to grid',
|
|
||||||
// property: 'snapToGrid',
|
|
||||||
// value: true,
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// value: true,
|
|
||||||
// icon: 'icon-grid-snap-to'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: false,
|
|
||||||
// icon: 'icon-grid-snap-no'
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// control: 'toggle-button',
|
|
||||||
// title: 'Toggle label',
|
|
||||||
// property: 'showLabel',
|
|
||||||
// value: true,
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// value: true,
|
|
||||||
// icon: 'icon-two-parts-both'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: false,
|
|
||||||
// icon: 'icon-two-parts-one-only'
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
// ];
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
@ -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' : '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
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,48 +56,46 @@ module.exports = (config) => {
|
|||||||
'src/**/*Spec.js'
|
'src/**/*Spec.js'
|
||||||
],
|
],
|
||||||
port: 9876,
|
port: 9876,
|
||||||
reporters: [
|
reporters: reporters,
|
||||||
'progress',
|
browsers: browsers,
|
||||||
'coverage',
|
customLaunchers: {
|
||||||
'html'
|
ChromeDebugging: {
|
||||||
],
|
base: 'Chrome',
|
||||||
browsers: ['ChromeHeadless'],
|
flags: ['--remote-debugging-port=9222'],
|
||||||
|
debug: true
|
||||||
|
}
|
||||||
|
},
|
||||||
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: {
|
||||||
preprocessors: {
|
fixWebpackSourcePaths: true,
|
||||||
// add webpack as preprocessor
|
dir: process.env.CIRCLE_ARTIFACTS ?
|
||||||
'platform/**/*Spec.js': [ 'webpack' ],
|
process.env.CIRCLE_ARTIFACTS + '/coverage' :
|
||||||
'src/**/*Spec.js': [ 'webpack' ]
|
"dist/reports/coverage",
|
||||||
|
reports: ['html', 'lcovonly', 'text-summary'],
|
||||||
|
thresholds: {
|
||||||
|
global: {
|
||||||
|
lines: 62
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
preprocessors: {
|
||||||
|
'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
|
singleRun: true,
|
||||||
|
browserNoActivityTimeout: 90000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global module,BUILD_CONSTANTS*/
|
/*global module*/
|
||||||
|
|
||||||
const matcher = /\/openmct.js$/;
|
const matcher = /\/openmct.js$/;
|
||||||
if (document.currentScript) {
|
if (document.currentScript) {
|
||||||
|
39
package.json
@ -1,15 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "openmct",
|
"name": "openmct",
|
||||||
"version": "0.14.0-SNAPSHOT",
|
"version": "1.0.0-snapshot",
|
||||||
"description": "The Open MCT core platform",
|
"description": "The Open MCT core platform",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"angular": "1.4.14",
|
"angular": ">=1.8.0",
|
||||||
"angular-route": "1.4.14",
|
"angular-route": "1.4.14",
|
||||||
"babel-eslint": "8.2.6",
|
"babel-eslint": "8.2.6",
|
||||||
"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",
|
||||||
|
"cross-env": "^6.0.3",
|
||||||
"css-loader": "^1.0.0",
|
"css-loader": "^1.0.0",
|
||||||
"d3-array": "1.2.x",
|
"d3-array": "1.2.x",
|
||||||
"d3-axis": "1.0.x",
|
"d3-axis": "1.0.x",
|
||||||
@ -22,10 +23,12 @@
|
|||||||
"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": "5.2.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",
|
||||||
"fast-sass-loader": "^1.4.5",
|
"fast-sass-loader": "1.4.6",
|
||||||
"file-loader": "^1.1.11",
|
"file-loader": "^1.1.11",
|
||||||
"file-saver": "^1.3.8",
|
"file-saver": "^1.3.8",
|
||||||
"git-rev-sync": "^1.4.0",
|
"git-rev-sync": "^1.4.0",
|
||||||
@ -38,29 +41,32 @@
|
|||||||
"jsdoc": "^3.3.2",
|
"jsdoc": "^3.3.2",
|
||||||
"karma": "^2.0.3",
|
"karma": "^2.0.3",
|
||||||
"karma-chrome-launcher": "^2.2.0",
|
"karma-chrome-launcher": "^2.2.0",
|
||||||
|
"karma-firefox-launcher": "^1.3.0",
|
||||||
"karma-cli": "^1.0.1",
|
"karma-cli": "^1.0.1",
|
||||||
"karma-coverage": "^1.1.2",
|
"karma-coverage": "^1.1.2",
|
||||||
|
"karma-coverage-istanbul-reporter": "^2.1.1",
|
||||||
"karma-html-reporter": "^0.2.7",
|
"karma-html-reporter": "^0.2.7",
|
||||||
"karma-jasmine": "^1.1.2",
|
"karma-jasmine": "^1.1.2",
|
||||||
|
"karma-sourcemap-loader": "^0.3.7",
|
||||||
"karma-webpack": "^3.0.0",
|
"karma-webpack": "^3.0.0",
|
||||||
"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.1.1",
|
||||||
"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.9.2",
|
||||||
"painterro": "^0.2.65",
|
"painterro": "^1.0.35",
|
||||||
"printj": "^1.1.0",
|
"printj": "^1.2.1",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"request": "^2.69.0",
|
"request": "^2.69.0",
|
||||||
"screenfull": "^3.3.2",
|
|
||||||
"split": "^1.0.0",
|
"split": "^1.0.0",
|
||||||
"style-loader": "^0.21.0",
|
"style-loader": "^1.0.1",
|
||||||
|
"uuid": "^3.3.3",
|
||||||
"v8-compile-cache": "^1.1.0",
|
"v8-compile-cache": "^1.1.0",
|
||||||
"vue": "2.5.6",
|
"vue": "2.5.6",
|
||||||
"vue-loader": "^15.2.6",
|
"vue-loader": "^15.2.6",
|
||||||
@ -72,14 +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 src openmct.js",
|
"lint": "eslint platform example src --ext .js,.vue openmct.js",
|
||||||
"lint:fix": "eslint platform src openmct.js --fix",
|
"lint:fix": "eslint platform example src --ext .js,.vue openmct.js --fix",
|
||||||
"build:prod": "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:watch": "karma start --no-single-run",
|
"test:debug": "cross-env NODE_ENV=debug karma start --no-single-run",
|
||||||
|
"test:coverage": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" COVERAGE=true karma start --single-run",
|
||||||
|
"test: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'",
|
||||||
|
@ -31,8 +31,7 @@ define([
|
|||||||
"./res/templates/license-apache.html",
|
"./res/templates/license-apache.html",
|
||||||
"./res/templates/license-mit.html",
|
"./res/templates/license-mit.html",
|
||||||
"./res/templates/licenses.html",
|
"./res/templates/licenses.html",
|
||||||
"./res/templates/licenses-export-md.html",
|
"./res/templates/licenses-export-md.html"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
aboutDialogTemplate,
|
aboutDialogTemplate,
|
||||||
LogoController,
|
LogoController,
|
||||||
@ -44,137 +43,139 @@ define([
|
|||||||
licenseApacheTemplate,
|
licenseApacheTemplate,
|
||||||
licenseMitTemplate,
|
licenseMitTemplate,
|
||||||
licensesTemplate,
|
licensesTemplate,
|
||||||
licensesExportMdTemplate,
|
licensesExportMdTemplate
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
legacyRegistry.register("platform/commonUI/about", {
|
return {
|
||||||
"name": "About Open MCT",
|
name: "platform/commonUI/about",
|
||||||
"extensions": {
|
definition: {
|
||||||
"templates": [
|
"name": "About Open MCT",
|
||||||
{
|
"extensions": {
|
||||||
"key": "app-logo",
|
"templates": [
|
||||||
"priority": "optional",
|
{
|
||||||
"template": appLogoTemplate
|
"key": "app-logo",
|
||||||
},
|
"priority": "optional",
|
||||||
{
|
"template": appLogoTemplate
|
||||||
"key": "about-logo",
|
},
|
||||||
"priority": "preferred",
|
{
|
||||||
"template": aboutLogoTemplate
|
"key": "about-logo",
|
||||||
},
|
"priority": "preferred",
|
||||||
{
|
"template": aboutLogoTemplate
|
||||||
"key": "about-dialog",
|
},
|
||||||
"template": aboutDialogTemplate
|
{
|
||||||
},
|
"key": "about-dialog",
|
||||||
{
|
"template": aboutDialogTemplate
|
||||||
"key": "overlay-about",
|
},
|
||||||
"template": overlayAboutTemplate
|
{
|
||||||
},
|
"key": "overlay-about",
|
||||||
{
|
"template": overlayAboutTemplate
|
||||||
"key": "license-apache",
|
},
|
||||||
"template": licenseApacheTemplate
|
{
|
||||||
},
|
"key": "license-apache",
|
||||||
{
|
"template": licenseApacheTemplate
|
||||||
"key": "license-mit",
|
},
|
||||||
"template": licenseMitTemplate
|
{
|
||||||
}
|
"key": "license-mit",
|
||||||
],
|
"template": licenseMitTemplate
|
||||||
"controllers": [
|
}
|
||||||
{
|
],
|
||||||
"key": "LogoController",
|
"controllers": [
|
||||||
"depends": [
|
{
|
||||||
"overlayService"
|
"key": "LogoController",
|
||||||
],
|
"depends": [
|
||||||
"implementation": LogoController
|
"overlayService"
|
||||||
},
|
],
|
||||||
{
|
"implementation": LogoController
|
||||||
"key": "AboutController",
|
},
|
||||||
"depends": [
|
{
|
||||||
"versions[]",
|
"key": "AboutController",
|
||||||
"$window"
|
"depends": [
|
||||||
],
|
"versions[]",
|
||||||
"implementation": AboutController
|
"$window"
|
||||||
},
|
],
|
||||||
{
|
"implementation": AboutController
|
||||||
"key": "LicenseController",
|
},
|
||||||
"depends": [
|
{
|
||||||
"licenses[]"
|
"key": "LicenseController",
|
||||||
],
|
"depends": [
|
||||||
"implementation": LicenseController
|
"licenses[]"
|
||||||
}
|
],
|
||||||
],
|
"implementation": LicenseController
|
||||||
"licenses": [
|
}
|
||||||
{
|
],
|
||||||
"name": "Json.NET",
|
"licenses": [
|
||||||
"version": "6.0.8",
|
{
|
||||||
"author": "Newtonsoft",
|
"name": "Json.NET",
|
||||||
"description": "JSON serialization/deserialization",
|
"version": "6.0.8",
|
||||||
"website": "http://www.newtonsoft.com/json",
|
"author": "Newtonsoft",
|
||||||
"copyright": "Copyright (c) 2007 James Newton-King",
|
"description": "JSON serialization/deserialization",
|
||||||
"license": "license-mit",
|
"website": "http://www.newtonsoft.com/json",
|
||||||
"link": "https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md"
|
"copyright": "Copyright (c) 2007 James Newton-King",
|
||||||
},
|
"license": "license-mit",
|
||||||
{
|
"link": "https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md"
|
||||||
"name": "Nancy",
|
},
|
||||||
"version": "0.23.2",
|
{
|
||||||
"author": "Andreas Håkansson, Steven Robbins and contributors",
|
"name": "Nancy",
|
||||||
"description": "Embedded web server",
|
"version": "0.23.2",
|
||||||
"website": "http://nancyfx.org/",
|
"author": "Andreas Håkansson, Steven Robbins and contributors",
|
||||||
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
|
"description": "Embedded web server",
|
||||||
"license": "license-mit",
|
"website": "http://nancyfx.org/",
|
||||||
"link": "http://www.opensource.org/licenses/mit-license.php"
|
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
|
||||||
},
|
"license": "license-mit",
|
||||||
{
|
"link": "http://www.opensource.org/licenses/mit-license.php"
|
||||||
"name": "Nancy.Hosting.Self",
|
},
|
||||||
"version": "0.23.2",
|
{
|
||||||
"author": "Andreas Håkansson, Steven Robbins and contributors",
|
"name": "Nancy.Hosting.Self",
|
||||||
"description": "Embedded web server",
|
"version": "0.23.2",
|
||||||
"website": "http://nancyfx.org/",
|
"author": "Andreas Håkansson, Steven Robbins and contributors",
|
||||||
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
|
"description": "Embedded web server",
|
||||||
"license": "license-mit",
|
"website": "http://nancyfx.org/",
|
||||||
"link": "http://www.opensource.org/licenses/mit-license.php"
|
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
|
||||||
},
|
"license": "license-mit",
|
||||||
{
|
"link": "http://www.opensource.org/licenses/mit-license.php"
|
||||||
"name": "SuperSocket",
|
},
|
||||||
"version": "0.9.0.2",
|
{
|
||||||
"author": " Kerry Jiang",
|
"name": "SuperSocket",
|
||||||
"description": "Supports SuperWebSocket",
|
"version": "0.9.0.2",
|
||||||
"website": "https://supersocket.codeplex.com/",
|
"author": " Kerry Jiang",
|
||||||
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
|
"description": "Supports SuperWebSocket",
|
||||||
"license": "license-apache",
|
"website": "https://supersocket.codeplex.com/",
|
||||||
"link": "https://supersocket.codeplex.com/license"
|
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
|
||||||
},
|
"license": "license-apache",
|
||||||
{
|
"link": "https://supersocket.codeplex.com/license"
|
||||||
"name": "SuperWebSocket",
|
},
|
||||||
"version": "0.9.0.2",
|
{
|
||||||
"author": " Kerry Jiang",
|
"name": "SuperWebSocket",
|
||||||
"description": "WebSocket implementation for client-server communication",
|
"version": "0.9.0.2",
|
||||||
"website": "https://superwebsocket.codeplex.com/",
|
"author": " Kerry Jiang",
|
||||||
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
|
"description": "WebSocket implementation for client-server communication",
|
||||||
"license": "license-apache",
|
"website": "https://superwebsocket.codeplex.com/",
|
||||||
"link": "https://superwebsocket.codeplex.com/license"
|
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
|
||||||
},
|
"license": "license-apache",
|
||||||
{
|
"link": "https://superwebsocket.codeplex.com/license"
|
||||||
"name": "log4net",
|
},
|
||||||
"version": "2.0.3",
|
{
|
||||||
"author": "Apache Software Foundation",
|
"name": "log4net",
|
||||||
"description": "Logging",
|
"version": "2.0.3",
|
||||||
"website": "http://logging.apache.org/log4net/",
|
"author": "Apache Software Foundation",
|
||||||
"copyright": "Copyright © 2004-2015 Apache Software Foundation.",
|
"description": "Logging",
|
||||||
"license": "license-apache",
|
"website": "http://logging.apache.org/log4net/",
|
||||||
"link": "http://logging.apache.org/log4net/license.html"
|
"copyright": "Copyright © 2004-2015 Apache Software Foundation.",
|
||||||
}
|
"license": "license-apache",
|
||||||
],
|
"link": "http://logging.apache.org/log4net/license.html"
|
||||||
"routes": [
|
}
|
||||||
{
|
],
|
||||||
"when": "/licenses",
|
"routes": [
|
||||||
"template": licensesTemplate
|
{
|
||||||
},
|
"when": "/licenses",
|
||||||
{
|
"template": licensesTemplate
|
||||||
"when": "/licenses-md",
|
},
|
||||||
"template": licensesExportMdTemplate
|
{
|
||||||
}
|
"when": "/licenses-md",
|
||||||
]
|
"template": licensesExportMdTemplate
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -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
|
||||||
|
@ -31,8 +31,14 @@ define(
|
|||||||
|
|
||||||
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);
|
||||||
@ -51,7 +57,6 @@ define(
|
|||||||
expect(mockWindow.open).toHaveBeenCalledWith("#/licenses");
|
expect(mockWindow.open).toHaveBeenCalledWith("#/licenses");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,18 +21,10 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/BrowseController",
|
|
||||||
"./src/PaneController",
|
|
||||||
"./src/InspectorPaneController",
|
|
||||||
"./src/BrowseObjectController",
|
|
||||||
"./src/MenuArrowController",
|
|
||||||
"./src/ObjectHeaderController",
|
|
||||||
"./src/navigation/NavigationService",
|
"./src/navigation/NavigationService",
|
||||||
"./src/navigation/NavigateAction",
|
"./src/navigation/NavigateAction",
|
||||||
"./src/navigation/OrphanNavigationHandler",
|
"./src/navigation/OrphanNavigationHandler",
|
||||||
"./src/windowing/NewTabAction",
|
"./src/windowing/NewTabAction",
|
||||||
"./src/windowing/FullscreenAction",
|
|
||||||
"./src/windowing/WindowTitler",
|
|
||||||
"./res/templates/browse.html",
|
"./res/templates/browse.html",
|
||||||
"./res/templates/browse-object.html",
|
"./res/templates/browse-object.html",
|
||||||
"./res/templates/browse/object-header.html",
|
"./res/templates/browse/object-header.html",
|
||||||
@ -40,21 +32,12 @@ define([
|
|||||||
"./res/templates/menu-arrow.html",
|
"./res/templates/menu-arrow.html",
|
||||||
"./res/templates/back-arrow.html",
|
"./res/templates/back-arrow.html",
|
||||||
"./res/templates/browse/object-properties.html",
|
"./res/templates/browse/object-properties.html",
|
||||||
"./res/templates/browse/inspector-region.html",
|
"./res/templates/browse/inspector-region.html"
|
||||||
'legacyRegistry'
|
|
||||||
], function (
|
], function (
|
||||||
BrowseController,
|
|
||||||
PaneController,
|
|
||||||
InspectorPaneController,
|
|
||||||
BrowseObjectController,
|
|
||||||
MenuArrowController,
|
|
||||||
ObjectHeaderController,
|
|
||||||
NavigationService,
|
NavigationService,
|
||||||
NavigateAction,
|
NavigateAction,
|
||||||
OrphanNavigationHandler,
|
OrphanNavigationHandler,
|
||||||
NewTabAction,
|
NewTabAction,
|
||||||
FullscreenAction,
|
|
||||||
WindowTitler,
|
|
||||||
browseTemplate,
|
browseTemplate,
|
||||||
browseObjectTemplate,
|
browseObjectTemplate,
|
||||||
objectHeaderTemplate,
|
objectHeaderTemplate,
|
||||||
@ -62,222 +45,133 @@ define([
|
|||||||
menuArrowTemplate,
|
menuArrowTemplate,
|
||||||
backArrowTemplate,
|
backArrowTemplate,
|
||||||
objectPropertiesTemplate,
|
objectPropertiesTemplate,
|
||||||
inspectorRegionTemplate,
|
inspectorRegionTemplate
|
||||||
legacyRegistry
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
legacyRegistry.register("platform/commonUI/browse", {
|
return {
|
||||||
"extensions": {
|
name: "platform/commonUI/browse",
|
||||||
"routes": [
|
definition: {
|
||||||
],
|
"extensions": {
|
||||||
"constants": [
|
"routes": [
|
||||||
{
|
],
|
||||||
"key": "DEFAULT_PATH",
|
"constants": [
|
||||||
"value": "mine",
|
{
|
||||||
"priority": "fallback"
|
"key": "DEFAULT_PATH",
|
||||||
}
|
"value": "mine",
|
||||||
],
|
"priority": "fallback"
|
||||||
"controllers": [
|
}
|
||||||
{
|
],
|
||||||
"key": "BrowseController",
|
"representations": [
|
||||||
"implementation": BrowseController,
|
{
|
||||||
"depends": [
|
"key": "browse-object",
|
||||||
"$scope",
|
"template": browseObjectTemplate,
|
||||||
"$route",
|
"gestures": [
|
||||||
"$location",
|
"drop"
|
||||||
"objectService",
|
],
|
||||||
"navigationService",
|
"uses": [
|
||||||
"urlService",
|
"view"
|
||||||
"DEFAULT_PATH"
|
]
|
||||||
]
|
},
|
||||||
},
|
{
|
||||||
{
|
"key": "object-header",
|
||||||
"key": "PaneController",
|
"template": objectHeaderTemplate,
|
||||||
"implementation": PaneController,
|
"uses": [
|
||||||
"priority": "preferred",
|
"type"
|
||||||
"depends": [
|
]
|
||||||
"$scope",
|
},
|
||||||
"agentService",
|
{
|
||||||
"$window",
|
"key": "object-header-frame",
|
||||||
"$location",
|
"template": objectHeaderFrameTemplate,
|
||||||
"$attrs",
|
"uses": [
|
||||||
"navigationService"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "BrowseObjectController",
|
"key": "menu-arrow",
|
||||||
"implementation": BrowseObjectController,
|
"template": menuArrowTemplate,
|
||||||
"depends": [
|
"uses": [
|
||||||
"$scope",
|
"action"
|
||||||
"$location",
|
],
|
||||||
"$route"
|
"gestures": [
|
||||||
]
|
"menu"
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
"key": "MenuArrowController",
|
{
|
||||||
"implementation": MenuArrowController,
|
"key": "back-arrow",
|
||||||
"depends": [
|
"uses": [
|
||||||
"$scope"
|
"context"
|
||||||
]
|
],
|
||||||
},
|
"template": backArrowTemplate
|
||||||
{
|
},
|
||||||
"key": "InspectorPaneController",
|
{
|
||||||
"implementation": InspectorPaneController,
|
"key": "object-properties",
|
||||||
"priority": "preferred",
|
"template": objectPropertiesTemplate
|
||||||
"depends": [
|
},
|
||||||
"$scope",
|
{
|
||||||
"agentService",
|
"key": "inspector-region",
|
||||||
"$window",
|
"template": inspectorRegionTemplate
|
||||||
"navigationService",
|
}
|
||||||
"$location",
|
],
|
||||||
"$attrs"
|
"services": [
|
||||||
]
|
{
|
||||||
},
|
"key": "navigationService",
|
||||||
{
|
"implementation": NavigationService,
|
||||||
"key": "ObjectHeaderController",
|
"depends": [
|
||||||
"implementation": ObjectHeaderController,
|
"$window"
|
||||||
"depends": [
|
]
|
||||||
"$scope"
|
}
|
||||||
]
|
],
|
||||||
}
|
"actions": [
|
||||||
],
|
{
|
||||||
"representations": [
|
"key": "navigate",
|
||||||
{
|
"implementation": NavigateAction,
|
||||||
"key": "browse-object",
|
"depends": [
|
||||||
"template": browseObjectTemplate,
|
"navigationService"
|
||||||
"gestures": [
|
]
|
||||||
"drop"
|
},
|
||||||
],
|
{
|
||||||
"uses": [
|
"key": "window",
|
||||||
"view"
|
"name": "Open In New Tab",
|
||||||
]
|
"implementation": NewTabAction,
|
||||||
},
|
"description": "Open in a new browser tab",
|
||||||
{
|
"category": [
|
||||||
"key": "object-header",
|
"view-control",
|
||||||
"template": objectHeaderTemplate,
|
"contextual"
|
||||||
"uses": [
|
],
|
||||||
"type"
|
"depends": [
|
||||||
]
|
"urlService",
|
||||||
},
|
"$window"
|
||||||
{
|
],
|
||||||
"key": "object-header-frame",
|
"group": "windowing",
|
||||||
"template": objectHeaderFrameTemplate,
|
"cssClass": "icon-new-window",
|
||||||
"uses": [
|
"priority": "preferred"
|
||||||
"type"
|
}
|
||||||
]
|
],
|
||||||
},
|
"runs": [
|
||||||
{
|
{
|
||||||
"key": "menu-arrow",
|
"implementation": OrphanNavigationHandler,
|
||||||
"template": menuArrowTemplate,
|
"depends": [
|
||||||
"uses": [
|
"throttle",
|
||||||
"action"
|
"topic",
|
||||||
],
|
"navigationService"
|
||||||
"gestures": [
|
]
|
||||||
"menu"
|
}
|
||||||
]
|
],
|
||||||
},
|
"templates": [
|
||||||
{
|
{
|
||||||
"key": "back-arrow",
|
key: "browseRoot",
|
||||||
"uses": [
|
template: browseTemplate
|
||||||
"context"
|
},
|
||||||
],
|
{
|
||||||
"template": backArrowTemplate
|
key: "browseObject",
|
||||||
},
|
template: browseObjectTemplate
|
||||||
{
|
},
|
||||||
"key": "object-properties",
|
{
|
||||||
"template": objectPropertiesTemplate
|
key: "inspectorRegion",
|
||||||
},
|
template: inspectorRegionTemplate
|
||||||
{
|
}
|
||||||
"key": "inspector-region",
|
]
|
||||||
"template": inspectorRegionTemplate
|
}
|
||||||
}
|
|
||||||
],
|
|
||||||
"services": [
|
|
||||||
{
|
|
||||||
"key": "navigationService",
|
|
||||||
"implementation": NavigationService,
|
|
||||||
"depends": [
|
|
||||||
"$window"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"actions": [
|
|
||||||
{
|
|
||||||
"key": "navigate",
|
|
||||||
"implementation": NavigateAction,
|
|
||||||
"depends": [
|
|
||||||
"navigationService"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "window",
|
|
||||||
"name": "Open In New Tab",
|
|
||||||
"implementation": NewTabAction,
|
|
||||||
"description": "Open in a new browser tab",
|
|
||||||
"category": [
|
|
||||||
"view-control",
|
|
||||||
"contextual"
|
|
||||||
],
|
|
||||||
"depends": [
|
|
||||||
"urlService",
|
|
||||||
"$window"
|
|
||||||
],
|
|
||||||
"group": "windowing",
|
|
||||||
"cssClass": "icon-new-window",
|
|
||||||
"priority": "preferred"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "fullscreen",
|
|
||||||
"implementation": FullscreenAction,
|
|
||||||
"category": "view-control",
|
|
||||||
"group": "windowing",
|
|
||||||
"priority": "default"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"runs": [
|
|
||||||
{
|
|
||||||
"implementation": WindowTitler,
|
|
||||||
"depends": [
|
|
||||||
"navigationService",
|
|
||||||
"$rootScope",
|
|
||||||
"$document"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"implementation": OrphanNavigationHandler,
|
|
||||||
"depends": [
|
|
||||||
"throttle",
|
|
||||||
"topic",
|
|
||||||
"navigationService"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"templates": [
|
|
||||||
{
|
|
||||||
key: "browseRoot",
|
|
||||||
template: browseTemplate
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "browseObject",
|
|
||||||
template: browseObjectTemplate
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "inspectorRegion",
|
|
||||||
template: inspectorRegionTemplate
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"licenses": [
|
|
||||||
{
|
|
||||||
"name": "screenfull.js",
|
|
||||||
"version": "1.2.0",
|
|
||||||
"description": "Wrapper for cross-browser usage of fullscreen API",
|
|
||||||
"author": "Sindre Sorhus",
|
|
||||||
"website": "https://github.com/sindresorhus/screenfull.js/",
|
|
||||||
"copyright": "Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
|
|
||||||
"license": "license-mit",
|
|
||||||
"link": "https://github.com/sindresorhus/screenfull.js/blob/gh-pages/license"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
});
|
||||||
|
@ -1,215 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This bundle implements Browse mode.
|
|
||||||
* @namespace platform/commonUI/browse
|
|
||||||
*/
|
|
||||||
define(
|
|
||||||
['lodash'],
|
|
||||||
function (_) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The BrowseController is used to populate the initial scope in Browse
|
|
||||||
* mode. It loads the root object from the objectService and makes it
|
|
||||||
* available in the scope for Angular template's; this is the point at
|
|
||||||
* which Angular templates first have access to the domain object
|
|
||||||
* hierarchy.
|
|
||||||
*
|
|
||||||
* @memberof platform/commonUI/browse
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
function BrowseController(
|
|
||||||
$scope,
|
|
||||||
$route,
|
|
||||||
$location,
|
|
||||||
objectService,
|
|
||||||
navigationService,
|
|
||||||
urlService,
|
|
||||||
defaultPath
|
|
||||||
) {
|
|
||||||
window.browseScope = $scope;
|
|
||||||
var initialPath = ($route.current.params.ids || defaultPath).split("/"),
|
|
||||||
currentIds;
|
|
||||||
|
|
||||||
$scope.treeModel = {
|
|
||||||
selectedObject: undefined,
|
|
||||||
onSelection: function (object) {
|
|
||||||
navigationService.setNavigation(object, true);
|
|
||||||
},
|
|
||||||
allowSelection: function (object) {
|
|
||||||
var domainObjectInView = navigationService.getNavigation(),
|
|
||||||
isInEditMode = domainObjectInView.getCapability('status').get('editing');
|
|
||||||
|
|
||||||
if (isInEditMode) {
|
|
||||||
|
|
||||||
var actions = object.getCapability('action'),
|
|
||||||
previewAction = actions.getActions({key: 'mct-preview-action'})[0];
|
|
||||||
|
|
||||||
if (previewAction && previewAction.perform) {
|
|
||||||
previewAction.perform();
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return navigationService.shouldNavigate();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function idsForObject(domainObject) {
|
|
||||||
return urlService
|
|
||||||
.urlForLocation("", domainObject)
|
|
||||||
.replace('/', '');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find an object in an array of objects.
|
|
||||||
function findObject(domainObjects, id) {
|
|
||||||
var i;
|
|
||||||
for (i = 0; i < domainObjects.length; i += 1) {
|
|
||||||
if (domainObjects[i].getId() === id) {
|
|
||||||
return domainObjects[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// helper, fetch a single object from the object service.
|
|
||||||
function getObject(id) {
|
|
||||||
return objectService.getObjects([id])
|
|
||||||
.then(function (results) {
|
|
||||||
return results[id];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// recursively locate and return an object inside of a container
|
|
||||||
// via a path. If at any point in the recursion it fails to find
|
|
||||||
// the next object, it will return the parent.
|
|
||||||
function findViaComposition(containerObject, path) {
|
|
||||||
var nextId = path.shift();
|
|
||||||
if (!nextId) {
|
|
||||||
return containerObject;
|
|
||||||
}
|
|
||||||
return containerObject.useCapability('composition')
|
|
||||||
.then(function (composees) {
|
|
||||||
var nextObject = findObject(composees, nextId);
|
|
||||||
if (!nextObject) {
|
|
||||||
return containerObject;
|
|
||||||
}
|
|
||||||
if (!nextObject.hasCapability('composition')) {
|
|
||||||
return nextObject;
|
|
||||||
}
|
|
||||||
return findViaComposition(nextObject, path);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function navigateToObject(desiredObject) {
|
|
||||||
$scope.navigatedObject = desiredObject;
|
|
||||||
$scope.treeModel.selectedObject = desiredObject;
|
|
||||||
currentIds = idsForObject(desiredObject);
|
|
||||||
$route.current.pathParams.ids = currentIds;
|
|
||||||
$location.path('/browse/' + currentIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getLastChildIfRoot(object) {
|
|
||||||
if (object.getId() !== 'ROOT') {
|
|
||||||
return object;
|
|
||||||
}
|
|
||||||
return object.useCapability('composition')
|
|
||||||
.then(function (composees) {
|
|
||||||
return composees[composees.length - 1];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function navigateToPath(path) {
|
|
||||||
return getObject('ROOT')
|
|
||||||
.then(function (root) {
|
|
||||||
return findViaComposition(root, path);
|
|
||||||
})
|
|
||||||
.then(getLastChildIfRoot)
|
|
||||||
.then(function (object) {
|
|
||||||
navigationService.setNavigation(object);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
getObject('ROOT')
|
|
||||||
.then(function (root) {
|
|
||||||
$scope.domainObject = root;
|
|
||||||
navigateToPath(initialPath);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Handle navigation events from view service. Only navigates
|
|
||||||
// if path has changed.
|
|
||||||
function navigateDirectlyToModel(domainObject) {
|
|
||||||
var newIds = idsForObject(domainObject);
|
|
||||||
if (currentIds !== newIds) {
|
|
||||||
currentIds = newIds;
|
|
||||||
navigateToObject(domainObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Listen for changes in navigation state.
|
|
||||||
navigationService.addListener(navigateDirectlyToModel);
|
|
||||||
|
|
||||||
// Listen for route changes which are caused by browser events
|
|
||||||
// (e.g. bookmarks to pages in OpenMCT) and prevent them. Instead,
|
|
||||||
// navigate to the path ourselves, which results in it being
|
|
||||||
// properly set.
|
|
||||||
$scope.$on('$routeChangeStart', function (event, route, oldRoute) {
|
|
||||||
if (route.$$route === $route.current.$$route) {
|
|
||||||
if (route.pathParams.ids &&
|
|
||||||
route.pathParams.ids !== $route.current.pathParams.ids) {
|
|
||||||
|
|
||||||
var otherParams = _.omit(route.params, 'ids');
|
|
||||||
var oldOtherParams = _.omit(oldRoute.params, 'ids');
|
|
||||||
var deletedParams = _.omit(oldOtherParams, _.keys(otherParams));
|
|
||||||
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
navigateToPath(route.pathParams.ids.split('/'))
|
|
||||||
.then(function () {
|
|
||||||
if (!_.isEqual(otherParams, oldOtherParams)) {
|
|
||||||
_.forEach(otherParams, function (v, k) {
|
|
||||||
$location.search(k, v);
|
|
||||||
});
|
|
||||||
_.forEach(deletedParams, function (k) {
|
|
||||||
$location.search(k, null);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
navigateToPath([]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Clean up when the scope is destroyed
|
|
||||||
$scope.$on("$destroy", function () {
|
|
||||||
navigationService.removeListener(navigateDirectlyToModel);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return BrowseController;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
[],
|
|
||||||
function () {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Controller for the `browse-object` representation of a domain
|
|
||||||
* object (the right-hand side of Browse mode.)
|
|
||||||
* @memberof platform/commonUI/browse
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
function BrowseObjectController($scope, $location, $route) {
|
|
||||||
function setViewForDomainObject(domainObject) {
|
|
||||||
|
|
||||||
var locationViewKey = $location.search().view;
|
|
||||||
|
|
||||||
function selectViewIfMatching(view) {
|
|
||||||
if (view.key === locationViewKey) {
|
|
||||||
$scope.representation = $scope.representation || {};
|
|
||||||
$scope.representation.selected = view;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (locationViewKey) {
|
|
||||||
((domainObject && domainObject.useCapability('view')) || [])
|
|
||||||
.forEach(selectViewIfMatching);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateQueryParam(viewKey) {
|
|
||||||
if (viewKey && $location.search().view !== viewKey) {
|
|
||||||
$location.search('view', viewKey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.$watch('domainObject', setViewForDomainObject);
|
|
||||||
$scope.$watch('representation.selected.key', updateQueryParam);
|
|
||||||
$scope.$on('$locationChangeSuccess', function () {
|
|
||||||
setViewForDomainObject($scope.domainObject);
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.doAction = function (action) {
|
|
||||||
return $scope[action] && $scope[action]();
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return BrowseObjectController;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT Web includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
define(
|
|
||||||
["./PaneController"],
|
|
||||||
function (PaneController) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pane controller that reveals inspector, if hidden, when object
|
|
||||||
* switches to edit mode.
|
|
||||||
*
|
|
||||||
* @param $scope
|
|
||||||
* @param agentService
|
|
||||||
* @param $window
|
|
||||||
* @param navigationService
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
function InspectorPaneController($scope, agentService, $window, navigationService, $location, $attrs) {
|
|
||||||
PaneController.call(this, $scope, agentService, $window, $location, $attrs);
|
|
||||||
var statusListener,
|
|
||||||
self = this;
|
|
||||||
|
|
||||||
function showInspector(statuses) {
|
|
||||||
if (statuses.indexOf('editing') !== -1 && !self.visible()) {
|
|
||||||
self.toggle();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function attachStatusListener(domainObject) {
|
|
||||||
// Remove existing status listener if existing
|
|
||||||
if (statusListener) {
|
|
||||||
statusListener();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (domainObject.hasCapability("status")) {
|
|
||||||
statusListener = domainObject.getCapability("status").listen(showInspector);
|
|
||||||
}
|
|
||||||
return statusListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
var domainObject = navigationService.getNavigation();
|
|
||||||
if (domainObject) {
|
|
||||||
attachStatusListener(domainObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
navigationService.addListener(attachStatusListener);
|
|
||||||
|
|
||||||
$scope.$on("$destroy", function () {
|
|
||||||
statusListener();
|
|
||||||
navigationService.removeListener(attachStatusListener);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
InspectorPaneController.prototype = Object.create(PaneController.prototype);
|
|
||||||
|
|
||||||
return InspectorPaneController;
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,59 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Module defining MenuArrowController. Created by shale on 06/30/2015.
|
|
||||||
*/
|
|
||||||
define(
|
|
||||||
[],
|
|
||||||
function () {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A left-click on the menu arrow should display a
|
|
||||||
* context menu. This controller launches the context
|
|
||||||
* menu.
|
|
||||||
* @memberof platform/commonUI/browse
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
function MenuArrowController($scope) {
|
|
||||||
this.$scope = $scope;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show a context menu for the domain object in this scope.
|
|
||||||
*
|
|
||||||
* @param event the browser event which caused this (used to
|
|
||||||
* position the menu)
|
|
||||||
*/
|
|
||||||
MenuArrowController.prototype.showMenu = function (event) {
|
|
||||||
var actionContext = {
|
|
||||||
key: 'menu',
|
|
||||||
domainObject: this.$scope.domainObject,
|
|
||||||
event: event
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$scope.domainObject.getCapability('action').perform(actionContext);
|
|
||||||
};
|
|
||||||
|
|
||||||
return MenuArrowController;
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,92 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
[],
|
|
||||||
function () {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Controller to provide the ability to inline edit an object name.
|
|
||||||
*
|
|
||||||
* @constructor
|
|
||||||
* @memberof platform/commonUI/browse
|
|
||||||
*/
|
|
||||||
function ObjectHeaderController($scope) {
|
|
||||||
this.$scope = $scope;
|
|
||||||
this.domainObject = $scope.domainObject;
|
|
||||||
this.editable = this.allowEdit();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the object name on blur and enter keypress events.
|
|
||||||
*
|
|
||||||
* @param event the mouse event
|
|
||||||
*/
|
|
||||||
ObjectHeaderController.prototype.updateName = function (event) {
|
|
||||||
if (!event || !event.currentTarget) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.type === 'blur') {
|
|
||||||
this.updateModel(event);
|
|
||||||
} else if (event.which === 13) {
|
|
||||||
this.updateModel(event);
|
|
||||||
event.currentTarget.blur();
|
|
||||||
window.getSelection().removeAllRanges();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the model.
|
|
||||||
*
|
|
||||||
* @param event the mouse event
|
|
||||||
* @param private
|
|
||||||
*/
|
|
||||||
ObjectHeaderController.prototype.updateModel = function (event) {
|
|
||||||
var name = event.currentTarget.textContent.replace(/\n/g, ' ');
|
|
||||||
|
|
||||||
if (name.length === 0) {
|
|
||||||
name = "Unnamed " + this.domainObject.getCapability("type").typeDef.name;
|
|
||||||
event.currentTarget.textContent = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name !== this.domainObject.getModel().name) {
|
|
||||||
this.domainObject.getCapability('mutation').mutate(function (model) {
|
|
||||||
model.name = name;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if the domain object is editable.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @return true if object is editable
|
|
||||||
*/
|
|
||||||
ObjectHeaderController.prototype.allowEdit = function () {
|
|
||||||
var type = this.domainObject && this.domainObject.getCapability('type');
|
|
||||||
return !!(type && type.hasFeature('creation'));
|
|
||||||
};
|
|
||||||
|
|
||||||
return ObjectHeaderController;
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,88 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
define(
|
|
||||||
[],
|
|
||||||
function () {
|
|
||||||
var navigationListenerAdded = false;
|
|
||||||
/**
|
|
||||||
* Controller to provide the ability to show/hide the tree in
|
|
||||||
* Browse mode.
|
|
||||||
* @constructor
|
|
||||||
* @memberof platform/commonUI/browse
|
|
||||||
*/
|
|
||||||
function PaneController($scope, agentService, $window, $location, $attrs, navigationService) {
|
|
||||||
var self = this;
|
|
||||||
this.agentService = agentService;
|
|
||||||
var hideParameterPresent = $location.search().hasOwnProperty($attrs.hideParameter);
|
|
||||||
|
|
||||||
if ($attrs.hideParameter && hideParameterPresent) {
|
|
||||||
this.state = false;
|
|
||||||
$location.search($attrs.hideParameter, undefined);
|
|
||||||
} else {
|
|
||||||
this.state = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback to invoke when any selection occurs in the tree.
|
|
||||||
* This controller can be passed in as the `parameters` object
|
|
||||||
* to the tree representation.
|
|
||||||
*
|
|
||||||
* @property {Function} callback
|
|
||||||
* @memberof platform/commonUI/browse.PaneController#
|
|
||||||
*/
|
|
||||||
this.callback = function () {
|
|
||||||
// Note that, since this is a callback to pass, this is not
|
|
||||||
// declared as a method but as a property which happens to
|
|
||||||
// be a function.
|
|
||||||
if (agentService.isPhone() && agentService.isPortrait()) {
|
|
||||||
// On phones, trees should collapse in portrait mode
|
|
||||||
// when something is navigated-to.
|
|
||||||
self.state = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (navigationService && navigationService.addListener && !navigationListenerAdded) {
|
|
||||||
navigationService.addListener(this.callback);
|
|
||||||
navigationListenerAdded = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Toggle the visibility of the pane.
|
|
||||||
*/
|
|
||||||
PaneController.prototype.toggle = function () {
|
|
||||||
this.state = !this.state;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the desired visibility state of the pane.
|
|
||||||
* @returns {boolean} true when visible
|
|
||||||
*/
|
|
||||||
PaneController.prototype.visible = function () {
|
|
||||||
return !!this.state;
|
|
||||||
};
|
|
||||||
|
|
||||||
return PaneController;
|
|
||||||
}
|
|
||||||
);
|
|
@ -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({});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
|
@ -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,64 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Module defining FullscreenAction. Created by vwoeltje on 11/18/14.
|
|
||||||
*/
|
|
||||||
define(
|
|
||||||
["screenfull"],
|
|
||||||
function (screenfull) {
|
|
||||||
|
|
||||||
var ENTER_FULLSCREEN = "Enter full screen mode",
|
|
||||||
EXIT_FULLSCREEN = "Exit full screen mode";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The fullscreen action toggles between fullscreen display
|
|
||||||
* and regular in-window display.
|
|
||||||
* @memberof platform/commonUI/browse
|
|
||||||
* @constructor
|
|
||||||
* @implements {Action}
|
|
||||||
*/
|
|
||||||
function FullscreenAction(context) {
|
|
||||||
this.context = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
FullscreenAction.prototype.perform = function () {
|
|
||||||
screenfull.toggle();
|
|
||||||
};
|
|
||||||
|
|
||||||
FullscreenAction.prototype.getMetadata = function () {
|
|
||||||
// We override getMetadata, because the icon cssClass and
|
|
||||||
// description need to be determined at run-time
|
|
||||||
// based on whether or not we are currently
|
|
||||||
// full screen.
|
|
||||||
var metadata = Object.create(FullscreenAction);
|
|
||||||
metadata.cssClass = screenfull.isFullscreen ? "icon-fullscreen-expand" : "icon-fullscreen-collapse";
|
|
||||||
metadata.description = screenfull.isFullscreen ?
|
|
||||||
EXIT_FULLSCREEN : ENTER_FULLSCREEN;
|
|
||||||
metadata.group = "windowing";
|
|
||||||
metadata.context = this.context;
|
|
||||||
return metadata;
|
|
||||||
};
|
|
||||||
|
|
||||||
return FullscreenAction;
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,51 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
[],
|
|
||||||
function () {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the title of the current window to reflect the name
|
|
||||||
* of the currently navigated-to domain object.
|
|
||||||
* @memberof platform/commonUI/browse
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
function WindowTitler(navigationService, $rootScope, $document) {
|
|
||||||
// Look up name of the navigated domain object...
|
|
||||||
function getNavigatedObjectName() {
|
|
||||||
var navigatedObject = navigationService.getNavigation();
|
|
||||||
return navigatedObject && navigatedObject.getModel().name;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the window title...
|
|
||||||
function setTitle(name) {
|
|
||||||
$document[0].title = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch the former, and invoke the latter
|
|
||||||
$rootScope.$watch(getNavigatedObjectName, setTitle);
|
|
||||||
}
|
|
||||||
|
|
||||||
return WindowTitler;
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,266 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
/*global console*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
|
|
||||||
*/
|
|
||||||
define(
|
|
||||||
[
|
|
||||||
"../src/BrowseController",
|
|
||||||
"../src/navigation/NavigationService"
|
|
||||||
],
|
|
||||||
function (
|
|
||||||
BrowseController,
|
|
||||||
NavigationService
|
|
||||||
) {
|
|
||||||
|
|
||||||
describe("The browse controller", function () {
|
|
||||||
var mockScope,
|
|
||||||
mockRoute,
|
|
||||||
mockLocation,
|
|
||||||
mockObjectService,
|
|
||||||
mockNavigationService,
|
|
||||||
mockRootObject,
|
|
||||||
mockUrlService,
|
|
||||||
mockDefaultRootObject,
|
|
||||||
mockOtherDomainObject,
|
|
||||||
mockNextObject,
|
|
||||||
testDefaultRoot,
|
|
||||||
controller;
|
|
||||||
|
|
||||||
function waitsForNavigation() {
|
|
||||||
return new Promise(function (resolve) {
|
|
||||||
mockNavigationService.setNavigation.and.callFake(function (obj) {
|
|
||||||
var returnValue;
|
|
||||||
try {
|
|
||||||
returnValue = NavigationService.prototype.setNavigation.call(mockNavigationService, obj);
|
|
||||||
} catch (err) {
|
|
||||||
console.error(err);
|
|
||||||
//Not rejecting because 'setNavigation' has been called, which is what's being tested here.
|
|
||||||
//Rejecting will fail tests.
|
|
||||||
}
|
|
||||||
resolve();
|
|
||||||
return returnValue;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function instantiateController() {
|
|
||||||
controller = new BrowseController(
|
|
||||||
mockScope,
|
|
||||||
mockRoute,
|
|
||||||
mockLocation,
|
|
||||||
mockObjectService,
|
|
||||||
mockNavigationService,
|
|
||||||
mockUrlService,
|
|
||||||
testDefaultRoot
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
testDefaultRoot = "some-root-level-domain-object";
|
|
||||||
|
|
||||||
mockScope = jasmine.createSpyObj(
|
|
||||||
"$scope",
|
|
||||||
["$on", "$watch"]
|
|
||||||
);
|
|
||||||
mockRoute = { current: { params: {}, pathParams: {} } };
|
|
||||||
mockUrlService = jasmine.createSpyObj(
|
|
||||||
"urlService",
|
|
||||||
["urlForLocation"]
|
|
||||||
);
|
|
||||||
mockUrlService.urlForLocation.and.callFake(function (mode, object) {
|
|
||||||
if (object === mockDefaultRootObject) {
|
|
||||||
return [mode, testDefaultRoot].join('/');
|
|
||||||
}
|
|
||||||
if (object === mockOtherDomainObject) {
|
|
||||||
return [mode, 'other'].join('/');
|
|
||||||
}
|
|
||||||
if (object === mockNextObject) {
|
|
||||||
return [mode, testDefaultRoot, 'next'].join('/');
|
|
||||||
}
|
|
||||||
throw new Error('Tried to get url for unexpected object');
|
|
||||||
});
|
|
||||||
mockLocation = jasmine.createSpyObj(
|
|
||||||
"$location",
|
|
||||||
["path"]
|
|
||||||
);
|
|
||||||
mockObjectService = jasmine.createSpyObj(
|
|
||||||
"objectService",
|
|
||||||
["getObjects"]
|
|
||||||
);
|
|
||||||
mockNavigationService = new NavigationService({});
|
|
||||||
[
|
|
||||||
"getNavigation",
|
|
||||||
"setNavigation",
|
|
||||||
"addListener",
|
|
||||||
"removeListener"
|
|
||||||
].forEach(function (method) {
|
|
||||||
spyOn(mockNavigationService, method)
|
|
||||||
.and.callThrough();
|
|
||||||
});
|
|
||||||
mockRootObject = jasmine.createSpyObj(
|
|
||||||
"rootObjectContainer",
|
|
||||||
["getId", "getCapability", "getModel", "useCapability", "hasCapability"]
|
|
||||||
);
|
|
||||||
mockDefaultRootObject = jasmine.createSpyObj(
|
|
||||||
"defaultRootObject",
|
|
||||||
["getId", "getCapability", "getModel", "useCapability", "hasCapability"]
|
|
||||||
);
|
|
||||||
mockOtherDomainObject = jasmine.createSpyObj(
|
|
||||||
"otherDomainObject",
|
|
||||||
["getId", "getCapability", "getModel", "useCapability", "hasCapability"]
|
|
||||||
);
|
|
||||||
mockNextObject = jasmine.createSpyObj(
|
|
||||||
"nestedDomainObject",
|
|
||||||
["getId", "getCapability", "getModel", "useCapability", "hasCapability"]
|
|
||||||
);
|
|
||||||
mockObjectService.getObjects.and.returnValue(Promise.resolve({
|
|
||||||
ROOT: mockRootObject
|
|
||||||
}));
|
|
||||||
mockRootObject.useCapability.and.returnValue(Promise.resolve([
|
|
||||||
mockOtherDomainObject,
|
|
||||||
mockDefaultRootObject
|
|
||||||
]));
|
|
||||||
mockRootObject.hasCapability.and.returnValue(true);
|
|
||||||
mockDefaultRootObject.useCapability.and.returnValue(Promise.resolve([
|
|
||||||
mockNextObject
|
|
||||||
]));
|
|
||||||
mockDefaultRootObject.hasCapability.and.returnValue(true);
|
|
||||||
mockOtherDomainObject.hasCapability.and.returnValue(false);
|
|
||||||
mockNextObject.useCapability.and.returnValue(undefined);
|
|
||||||
mockNextObject.hasCapability.and.returnValue(false);
|
|
||||||
mockNextObject.getId.and.returnValue("next");
|
|
||||||
mockDefaultRootObject.getId.and.returnValue(testDefaultRoot);
|
|
||||||
|
|
||||||
instantiateController();
|
|
||||||
return waitsForNavigation();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("uses composition to set the navigated object, if there is none", function () {
|
|
||||||
instantiateController();
|
|
||||||
return waitsForNavigation().then(function () {
|
|
||||||
expect(mockNavigationService.setNavigation)
|
|
||||||
.toHaveBeenCalledWith(mockDefaultRootObject);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it("navigates to a root-level object, even when default path is not found", function () {
|
|
||||||
mockDefaultRootObject.getId
|
|
||||||
.and.returnValue("something-other-than-the-" + testDefaultRoot);
|
|
||||||
instantiateController();
|
|
||||||
|
|
||||||
return waitsForNavigation().then(function () {
|
|
||||||
expect(mockNavigationService.setNavigation)
|
|
||||||
.toHaveBeenCalledWith(mockDefaultRootObject);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it("does not try to override navigation", function () {
|
|
||||||
mockNavigationService.getNavigation.and.returnValue(mockDefaultRootObject);
|
|
||||||
instantiateController();
|
|
||||||
return waitsForNavigation().then(function () {
|
|
||||||
expect(mockScope.navigatedObject).toBe(mockDefaultRootObject);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it("updates scope when navigated object changes", function () {
|
|
||||||
// Should have registered a listener - call it
|
|
||||||
mockNavigationService.addListener.calls.mostRecent().args[0](
|
|
||||||
mockOtherDomainObject
|
|
||||||
);
|
|
||||||
expect(mockScope.navigatedObject).toEqual(mockOtherDomainObject);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
it("releases its navigation listener when its scope is destroyed", function () {
|
|
||||||
expect(mockScope.$on).toHaveBeenCalledWith(
|
|
||||||
"$destroy",
|
|
||||||
jasmine.any(Function)
|
|
||||||
);
|
|
||||||
mockScope.$on.calls.mostRecent().args[1]();
|
|
||||||
|
|
||||||
// Should remove the listener it added earlier
|
|
||||||
expect(mockNavigationService.removeListener).toHaveBeenCalledWith(
|
|
||||||
mockNavigationService.addListener.calls.mostRecent().args[0]
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("uses route parameters to choose initially-navigated object", function () {
|
|
||||||
mockRoute.current.params.ids = testDefaultRoot + "/next";
|
|
||||||
instantiateController();
|
|
||||||
return waitsForNavigation().then(function () {
|
|
||||||
expect(mockScope.navigatedObject).toBe(mockNextObject);
|
|
||||||
expect(mockNavigationService.setNavigation)
|
|
||||||
.toHaveBeenCalledWith(mockNextObject);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it("handles invalid IDs by going as far as possible", function () {
|
|
||||||
// Idea here is that if we get a bad path of IDs,
|
|
||||||
// browse controller should traverse down it until
|
|
||||||
// it hits an invalid ID.
|
|
||||||
mockRoute.current.params.ids = testDefaultRoot + "/junk";
|
|
||||||
instantiateController();
|
|
||||||
return waitsForNavigation().then(function () {
|
|
||||||
expect(mockScope.navigatedObject).toBe(mockDefaultRootObject);
|
|
||||||
expect(mockNavigationService.setNavigation)
|
|
||||||
.toHaveBeenCalledWith(mockDefaultRootObject);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it("handles compositionless objects by going as far as possible", function () {
|
|
||||||
// Idea here is that if we get a path which passes
|
|
||||||
// through an object without a composition, browse controller
|
|
||||||
// should stop at it since remaining IDs cannot be loaded.
|
|
||||||
mockRoute.current.params.ids = testDefaultRoot + "/next/junk";
|
|
||||||
instantiateController();
|
|
||||||
return waitsForNavigation().then(function () {
|
|
||||||
expect(mockScope.navigatedObject).toBe(mockNextObject);
|
|
||||||
expect(mockNavigationService.setNavigation)
|
|
||||||
.toHaveBeenCalledWith(mockNextObject);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it("updates the displayed route to reflect current navigation", function () {
|
|
||||||
// In order to trigger a route update and not a route change,
|
|
||||||
// the current route must be updated before location.path is
|
|
||||||
// called.
|
|
||||||
expect(mockRoute.current.pathParams.ids)
|
|
||||||
.not
|
|
||||||
.toBe(testDefaultRoot + '/next');
|
|
||||||
mockLocation.path.and.callFake(function () {
|
|
||||||
expect(mockRoute.current.pathParams.ids)
|
|
||||||
.toBe(testDefaultRoot + '/next');
|
|
||||||
});
|
|
||||||
mockNavigationService.addListener.calls.mostRecent().args[0](
|
|
||||||
mockNextObject
|
|
||||||
);
|
|
||||||
expect(mockLocation.path).toHaveBeenCalledWith(
|
|
||||||
'/browse/' + testDefaultRoot + '/next'
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,93 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
["../src/BrowseObjectController"],
|
|
||||||
function (BrowseObjectController) {
|
|
||||||
|
|
||||||
describe("The browse object controller", function () {
|
|
||||||
var mockScope,
|
|
||||||
mockLocation,
|
|
||||||
mockRoute,
|
|
||||||
controller;
|
|
||||||
|
|
||||||
// Utility function; look for a $watch on scope and fire it
|
|
||||||
function fireWatch(expr, value) {
|
|
||||||
mockScope.$watch.calls.all().forEach(function (call) {
|
|
||||||
if (call.args[0] === expr) {
|
|
||||||
call.args[1](value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
mockScope = jasmine.createSpyObj(
|
|
||||||
"$scope",
|
|
||||||
["$on", "$watch"]
|
|
||||||
);
|
|
||||||
mockRoute = { current: { params: {} } };
|
|
||||||
mockLocation = jasmine.createSpyObj(
|
|
||||||
"$location",
|
|
||||||
["path", "search"]
|
|
||||||
);
|
|
||||||
mockLocation.search.and.returnValue({});
|
|
||||||
|
|
||||||
controller = new BrowseObjectController(
|
|
||||||
mockScope,
|
|
||||||
mockLocation,
|
|
||||||
mockRoute
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("updates query parameters when selected view changes", function () {
|
|
||||||
fireWatch("representation.selected.key", "xyz");
|
|
||||||
expect(mockLocation.search).toHaveBeenCalledWith('view', "xyz");
|
|
||||||
|
|
||||||
// Allows the path index to be checked
|
|
||||||
// prior to setting $route.current
|
|
||||||
mockLocation.path.and.returnValue("/browse/");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("sets the active view from query parameters", function () {
|
|
||||||
var mockDomainObject = jasmine.createSpyObj(
|
|
||||||
"domainObject",
|
|
||||||
['getId', 'getModel', 'getCapability', 'useCapability']
|
|
||||||
),
|
|
||||||
testViews = [
|
|
||||||
{ key: 'abc' },
|
|
||||||
{ key: 'def', someKey: 'some value' },
|
|
||||||
{ key: 'xyz' }
|
|
||||||
];
|
|
||||||
|
|
||||||
mockDomainObject.useCapability.and.callFake(function (c) {
|
|
||||||
return (c === 'view') && testViews;
|
|
||||||
});
|
|
||||||
mockLocation.search.and.returnValue({ view: 'def' });
|
|
||||||
|
|
||||||
fireWatch('domainObject', mockDomainObject);
|
|
||||||
expect(mockScope.representation.selected)
|
|
||||||
.toEqual(testViews[1]);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,103 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT Web includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
["../src/InspectorPaneController"],
|
|
||||||
function (InspectorPaneController) {
|
|
||||||
|
|
||||||
describe("The InspectorPaneController", function () {
|
|
||||||
var mockScope,
|
|
||||||
mockAgentService,
|
|
||||||
mockDomainObject,
|
|
||||||
mockWindow,
|
|
||||||
mockStatusCapability,
|
|
||||||
mockNavigationService,
|
|
||||||
mockNavigationUnlistener,
|
|
||||||
mockStatusUnlistener,
|
|
||||||
controller,
|
|
||||||
mockLocation,
|
|
||||||
mockAttrs;
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
mockScope = jasmine.createSpyObj("$scope", ["$on"]);
|
|
||||||
mockWindow = jasmine.createSpyObj("$window", ["open"]);
|
|
||||||
mockAgentService = jasmine.createSpyObj(
|
|
||||||
"agentService",
|
|
||||||
["isMobile", "isPhone", "isTablet", "isPortrait", "isLandscape"]
|
|
||||||
);
|
|
||||||
|
|
||||||
mockNavigationUnlistener = jasmine.createSpy("navigationUnlistener");
|
|
||||||
mockNavigationService = jasmine.createSpyObj(
|
|
||||||
"navigationService",
|
|
||||||
["getNavigation", "addListener"]
|
|
||||||
);
|
|
||||||
mockNavigationService.addListener.and.returnValue(mockNavigationUnlistener);
|
|
||||||
|
|
||||||
mockStatusUnlistener = jasmine.createSpy("statusUnlistener");
|
|
||||||
mockStatusCapability = jasmine.createSpyObj(
|
|
||||||
"statusCapability",
|
|
||||||
["listen"]
|
|
||||||
);
|
|
||||||
mockStatusCapability.listen.and.returnValue(mockStatusUnlistener);
|
|
||||||
|
|
||||||
mockDomainObject = jasmine.createSpyObj(
|
|
||||||
'domainObject',
|
|
||||||
[
|
|
||||||
'getId',
|
|
||||||
'getModel',
|
|
||||||
'getCapability',
|
|
||||||
'hasCapability'
|
|
||||||
]
|
|
||||||
);
|
|
||||||
mockDomainObject.getId.and.returnValue("domainObject");
|
|
||||||
mockDomainObject.getModel.and.returnValue({});
|
|
||||||
mockDomainObject.hasCapability.and.returnValue(true);
|
|
||||||
mockDomainObject.getCapability.and.returnValue(mockStatusCapability);
|
|
||||||
|
|
||||||
mockLocation = jasmine.createSpyObj('location', ['search']);
|
|
||||||
mockLocation.search.and.returnValue({});
|
|
||||||
|
|
||||||
mockAttrs = {};
|
|
||||||
|
|
||||||
controller = new InspectorPaneController(mockScope, mockAgentService, mockWindow, mockNavigationService, mockLocation, mockAttrs);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("listens for changes to navigation and attaches a status" +
|
|
||||||
" listener", function () {
|
|
||||||
expect(mockNavigationService.addListener).toHaveBeenCalledWith(jasmine.any(Function));
|
|
||||||
mockNavigationService.addListener.calls.mostRecent().args[0](mockDomainObject);
|
|
||||||
expect(mockStatusCapability.listen).toHaveBeenCalledWith(jasmine.any(Function));
|
|
||||||
});
|
|
||||||
|
|
||||||
it("if hidden, shows the inspector when domain object switches to" +
|
|
||||||
" edit mode", function () {
|
|
||||||
controller.toggle();
|
|
||||||
// test pre-condition that inspector is hidden
|
|
||||||
expect(controller.visible()).toBe(false);
|
|
||||||
mockNavigationService.addListener.calls.mostRecent().args[0](mockDomainObject);
|
|
||||||
mockStatusCapability.listen.calls.mostRecent().args[0](["editing"]);
|
|
||||||
expect(controller.visible()).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,79 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MenuArrowControllerSpec. Created by shale on 07/02/2015.
|
|
||||||
*/
|
|
||||||
define(
|
|
||||||
["../src/MenuArrowController"],
|
|
||||||
function (MenuArrowController) {
|
|
||||||
|
|
||||||
describe("The menu arrow controller ", function () {
|
|
||||||
var mockScope,
|
|
||||||
mockDomainObject,
|
|
||||||
mockEvent,
|
|
||||||
mockContextMenuAction,
|
|
||||||
mockActionContext,
|
|
||||||
controller;
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
mockScope = jasmine.createSpyObj(
|
|
||||||
"$scope",
|
|
||||||
[""]
|
|
||||||
);
|
|
||||||
mockDomainObject = jasmine.createSpyObj(
|
|
||||||
"domainObject",
|
|
||||||
["getCapability"]
|
|
||||||
);
|
|
||||||
mockEvent = jasmine.createSpyObj(
|
|
||||||
"event",
|
|
||||||
["preventDefault"]
|
|
||||||
);
|
|
||||||
mockContextMenuAction = jasmine.createSpyObj(
|
|
||||||
"action",
|
|
||||||
["perform", "getActions"]
|
|
||||||
);
|
|
||||||
mockActionContext = jasmine.createSpyObj(
|
|
||||||
"actionContext",
|
|
||||||
[""]
|
|
||||||
);
|
|
||||||
|
|
||||||
mockActionContext.domainObject = mockDomainObject;
|
|
||||||
mockActionContext.event = mockEvent;
|
|
||||||
mockScope.domainObject = mockDomainObject;
|
|
||||||
mockDomainObject.getCapability.and.returnValue(mockContextMenuAction);
|
|
||||||
mockContextMenuAction.perform.and.returnValue(jasmine.any(Function));
|
|
||||||
|
|
||||||
controller = new MenuArrowController(mockScope);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("calls the context menu action when clicked", function () {
|
|
||||||
// Simulate a click on the menu arrow
|
|
||||||
controller.showMenu(mockEvent);
|
|
||||||
|
|
||||||
// Expect the menu action to be performed
|
|
||||||
expect(mockDomainObject.getCapability).toHaveBeenCalledWith('action');
|
|
||||||
expect(mockContextMenuAction.perform).toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,137 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
["../src/ObjectHeaderController"],
|
|
||||||
function (ObjectHeaderController) {
|
|
||||||
|
|
||||||
describe("The object header controller", function () {
|
|
||||||
var mockScope,
|
|
||||||
mockDomainObject,
|
|
||||||
mockCapabilities,
|
|
||||||
mockMutationCapability,
|
|
||||||
mockTypeCapability,
|
|
||||||
mockEvent,
|
|
||||||
mockCurrentTarget,
|
|
||||||
model,
|
|
||||||
controller;
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
mockMutationCapability = jasmine.createSpyObj("mutation", ["mutate"]);
|
|
||||||
mockTypeCapability = jasmine.createSpyObj("type", ["typeDef", "hasFeature"]);
|
|
||||||
mockTypeCapability.typeDef = { name: ""};
|
|
||||||
mockTypeCapability.hasFeature.and.callFake(function (feature) {
|
|
||||||
return feature === 'creation';
|
|
||||||
});
|
|
||||||
|
|
||||||
mockCapabilities = {
|
|
||||||
mutation: mockMutationCapability,
|
|
||||||
type: mockTypeCapability
|
|
||||||
};
|
|
||||||
|
|
||||||
model = {
|
|
||||||
name: "Test name"
|
|
||||||
};
|
|
||||||
mockDomainObject = jasmine.createSpyObj("domainObject", ["getCapability", "getModel"]);
|
|
||||||
mockDomainObject.getModel.and.returnValue(model);
|
|
||||||
mockDomainObject.getCapability.and.callFake(function (key) {
|
|
||||||
return mockCapabilities[key];
|
|
||||||
});
|
|
||||||
|
|
||||||
mockScope = {
|
|
||||||
domainObject: mockDomainObject
|
|
||||||
};
|
|
||||||
|
|
||||||
mockCurrentTarget = jasmine.createSpyObj("currentTarget", ["blur", "textContent"]);
|
|
||||||
mockCurrentTarget.blur.and.returnValue(mockCurrentTarget);
|
|
||||||
|
|
||||||
mockEvent = {
|
|
||||||
which: {},
|
|
||||||
type: {},
|
|
||||||
currentTarget: mockCurrentTarget
|
|
||||||
};
|
|
||||||
|
|
||||||
controller = new ObjectHeaderController(mockScope);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("updates the model with new name on blur", function () {
|
|
||||||
mockEvent.type = "blur";
|
|
||||||
mockCurrentTarget.textContent = "New name";
|
|
||||||
controller.updateName(mockEvent);
|
|
||||||
|
|
||||||
expect(mockMutationCapability.mutate).toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("updates the model with a default for blank names", function () {
|
|
||||||
mockEvent.type = "blur";
|
|
||||||
mockCurrentTarget.textContent = "";
|
|
||||||
controller.updateName(mockEvent);
|
|
||||||
|
|
||||||
expect(mockCurrentTarget.textContent.length).not.toEqual(0);
|
|
||||||
expect(mockMutationCapability.mutate).toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("does not update the model if the same name", function () {
|
|
||||||
mockEvent.type = "blur";
|
|
||||||
mockCurrentTarget.textContent = mockDomainObject.getModel().name;
|
|
||||||
controller.updateName(mockEvent);
|
|
||||||
|
|
||||||
expect(mockMutationCapability.mutate).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("updates the model on enter keypress event only", function () {
|
|
||||||
mockCurrentTarget.textContent = "New name";
|
|
||||||
controller.updateName(mockEvent);
|
|
||||||
|
|
||||||
expect(mockMutationCapability.mutate).not.toHaveBeenCalled();
|
|
||||||
|
|
||||||
mockEvent.which = 13;
|
|
||||||
controller.updateName(mockEvent);
|
|
||||||
|
|
||||||
expect(mockMutationCapability.mutate).toHaveBeenCalledWith(jasmine.any(Function));
|
|
||||||
|
|
||||||
mockMutationCapability.mutate.calls.mostRecent().args[0](model);
|
|
||||||
|
|
||||||
expect(mockDomainObject.getModel().name).toBe("New name");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("blurs the field on enter key press", function () {
|
|
||||||
mockCurrentTarget.textContent = "New name";
|
|
||||||
mockEvent.which = 13;
|
|
||||||
controller.updateName(mockEvent);
|
|
||||||
|
|
||||||
expect(mockEvent.currentTarget.blur).toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("allows editting name when object is creatable", function () {
|
|
||||||
expect(controller.allowEdit()).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("disallows editting name when object is non-creatable", function () {
|
|
||||||
mockTypeCapability.hasFeature.and.returnValue(false);
|
|
||||||
|
|
||||||
expect(controller.allowEdit()).toBe(false);
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,106 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
["../src/PaneController"],
|
|
||||||
function (PaneController) {
|
|
||||||
|
|
||||||
describe("The PaneController", function () {
|
|
||||||
var mockScope,
|
|
||||||
mockAgentService,
|
|
||||||
mockWindow,
|
|
||||||
controller,
|
|
||||||
mockLocation,
|
|
||||||
mockAttrs;
|
|
||||||
|
|
||||||
// We want to reinstantiate for each test case
|
|
||||||
// because device state can influence constructor-time behavior
|
|
||||||
function instantiateController() {
|
|
||||||
return new PaneController(
|
|
||||||
mockScope,
|
|
||||||
mockAgentService,
|
|
||||||
mockWindow,
|
|
||||||
mockLocation,
|
|
||||||
mockAttrs
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
mockScope = jasmine.createSpyObj("$scope", ["$on"]);
|
|
||||||
mockAgentService = jasmine.createSpyObj(
|
|
||||||
"agentService",
|
|
||||||
["isMobile", "isPhone", "isTablet", "isPortrait", "isLandscape"]
|
|
||||||
);
|
|
||||||
mockWindow = jasmine.createSpyObj("$window", ["open"]);
|
|
||||||
|
|
||||||
mockLocation = jasmine.createSpyObj('location', ['search']);
|
|
||||||
mockLocation.search.and.returnValue({});
|
|
||||||
|
|
||||||
mockAttrs = {};
|
|
||||||
});
|
|
||||||
|
|
||||||
it("is initially visible", function () {
|
|
||||||
expect(instantiateController().visible()).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("allows visibility to be toggled", function () {
|
|
||||||
controller = instantiateController();
|
|
||||||
controller.toggle();
|
|
||||||
expect(controller.visible()).toBeFalsy();
|
|
||||||
controller.toggle();
|
|
||||||
expect(controller.visible()).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("collapses on navigation changes on portrait-oriented phones", function () {
|
|
||||||
mockAgentService.isMobile.and.returnValue(true);
|
|
||||||
mockAgentService.isPhone.and.returnValue(true);
|
|
||||||
mockAgentService.isPortrait.and.returnValue(true);
|
|
||||||
controller = instantiateController();
|
|
||||||
expect(controller.visible()).toBeTruthy();
|
|
||||||
|
|
||||||
// Simulate a change from the tree by invoking controller's
|
|
||||||
controller.callback();
|
|
||||||
|
|
||||||
// Tree should have collapsed
|
|
||||||
expect(controller.visible()).toBeFalsy();
|
|
||||||
});
|
|
||||||
|
|
||||||
describe("specifying hideParameter", function () {
|
|
||||||
beforeEach(function () {
|
|
||||||
mockAttrs = {hideParameter: 'hideTree'};
|
|
||||||
});
|
|
||||||
|
|
||||||
it("sets pane state to false when in location.search", function () {
|
|
||||||
mockLocation.search.and.returnValue({'hideTree': true});
|
|
||||||
expect(instantiateController().visible()).toBe(false);
|
|
||||||
expect(mockLocation.search).toHaveBeenCalledWith('hideTree', undefined);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("sets state to true when not found in location.search", function () {
|
|
||||||
mockLocation.search.and.returnValue({});
|
|
||||||
expect(instantiateController().visible()).toBe(true);
|
|
||||||
expect(mockLocation.search).not.toHaveBeenCalledWith('hideTree', undefined);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
@ -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();
|
||||||
|
@ -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();
|
||||||
});
|
});
|
||||||
|
@ -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,59 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
|
|
||||||
*/
|
|
||||||
define(
|
|
||||||
["../../src/windowing/FullscreenAction", "screenfull"],
|
|
||||||
function (FullscreenAction, screenfull) {
|
|
||||||
|
|
||||||
describe("The fullscreen action", function () {
|
|
||||||
var action,
|
|
||||||
oldToggle;
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
// Screenfull is not shimmed or injected, so
|
|
||||||
// we need to spy on it in the global scope.
|
|
||||||
oldToggle = screenfull.toggle;
|
|
||||||
|
|
||||||
screenfull.toggle = jasmine.createSpy("toggle");
|
|
||||||
|
|
||||||
action = new FullscreenAction({});
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(function () {
|
|
||||||
screenfull.toggle = oldToggle;
|
|
||||||
});
|
|
||||||
|
|
||||||
it("toggles fullscreen mode when performed", function () {
|
|
||||||
action.perform();
|
|
||||||
expect(screenfull.toggle).toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("provides displayable metadata", function () {
|
|
||||||
expect(action.getMetadata().cssClass).toBeDefined();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|