Compare commits
726 Commits
prototype-
...
open450
Author | SHA1 | Date | |
---|---|---|---|
4a0d50c7bd | |||
b8aaba26dd | |||
ba8d926ebb | |||
792fda48e3 | |||
9ebafa157b | |||
612dd7db2c | |||
b87dd5def6 | |||
a39e8e44f0 | |||
65fb5ab2a5 | |||
76aa9e1fd2 | |||
9f66f39d8d | |||
fdc875379f | |||
019e04f9ab | |||
9b63a63efc | |||
8e68914b56 | |||
f0a5a836d6 | |||
2b0f6dd577 | |||
fcee30c27e | |||
560825cc86 | |||
2df61998ab | |||
91b42fc0cc | |||
5eac0bc5d9 | |||
d397f0f283 | |||
9c4c020f54 | |||
08c4302011 | |||
5f96861c44 | |||
995d71f901 | |||
82e4a53472 | |||
e7a41061c6 | |||
4848a61e21 | |||
6302e45c10 | |||
451157b653 | |||
ae89a169d0 | |||
941d0d0057 | |||
0296cfe3c1 | |||
f55168d1ac | |||
3c4fb8c43d | |||
ed7e16d341 | |||
9dc958b952 | |||
ed3ee1099d | |||
7fb506d4df | |||
67707678a8 | |||
930b13f9a0 | |||
b59fc43038 | |||
9b32461240 | |||
d1f617a54e | |||
c4f99a6cab | |||
83e77303aa | |||
29a1c7dc5d | |||
65a1d7495d | |||
a98ab958c9 | |||
6e1cadf338 | |||
83a9b984e5 | |||
978df93ffd | |||
33b1c1689c | |||
0cfc070f3c | |||
21fd16ddf1 | |||
ce94db0a4b | |||
0d894a9f39 | |||
5ad150a17e | |||
b6acdb12ec | |||
604b29096d | |||
6200ceddf8 | |||
de88bf94d4 | |||
19f07aa398 | |||
46f9b31cff | |||
e32feb29e2 | |||
89a93e2966 | |||
038322e9aa | |||
6cef663db5 | |||
b2f5861458 | |||
f8809ce67f | |||
3c97eb6014 | |||
3498b0a50a | |||
14c5a817a7 | |||
258c5d95e6 | |||
30a8ba5c11 | |||
33c372765f | |||
ed7e0d8b0a | |||
f3828ba516 | |||
2a48c25453 | |||
096da0cb94 | |||
ca8a07e1ae | |||
c02f965460 | |||
5f440bb6de | |||
fc729279ec | |||
dd0f9ab74e | |||
d2a4a85e04 | |||
37890280ae | |||
a6ceae4045 | |||
3447e735dc | |||
989c937ce1 | |||
e0608ddee0 | |||
b35224061f | |||
b25576aed8 | |||
d5f054e328 | |||
eb4959cf49 | |||
cce415fc51 | |||
00f96c314a | |||
fefd27162c | |||
b388c76e45 | |||
aaeaf3a096 | |||
57efe4e0d1 | |||
dd4dbc9326 | |||
6aa77ff468 | |||
f8099550bd | |||
96249e6bcc | |||
6e391098a3 | |||
baec0f9719 | |||
6aab9f4e34 | |||
1bf73935e4 | |||
49e51d0a62 | |||
3e7bc2f37f | |||
0f56fd2561 | |||
9f0114eb39 | |||
4b82893c36 | |||
734e979c94 | |||
983973843e | |||
3b427c31a2 | |||
cee0ecf0ef | |||
8e3c5db3bf | |||
11d8daf3ed | |||
9953e16415 | |||
fe600de0f7 | |||
386f1f20ff | |||
5e07951892 | |||
2514e44083 | |||
20d9c7158e | |||
d8e319ebf8 | |||
a39cbbd917 | |||
8df27a1c05 | |||
26cf9c14f4 | |||
03edd26e17 | |||
571f6d183a | |||
1292e39c46 | |||
6fe3f82fb1 | |||
da8fb99e82 | |||
c8d77bc2db | |||
b5e52fce75 | |||
3afcb52934 | |||
677b0cffec | |||
248bc68f0d | |||
02050fa3ef | |||
57d23c3696 | |||
8babfc5ca9 | |||
271b5d1a73 | |||
7d4e7a0925 | |||
92f5d5f190 | |||
1731b985fc | |||
bd4590ad9d | |||
55fc60ec82 | |||
ab075e9ad8 | |||
3ac1710d83 | |||
730878938e | |||
3fd4304de1 | |||
db7224486c | |||
424953c894 | |||
6d0f3c7faa | |||
434a52ded3 | |||
2ec906e2d4 | |||
ffff13205a | |||
16efd85dfc | |||
1ef09ffbdd | |||
976ecce075 | |||
87a51a9eb3 | |||
c84de00e80 | |||
91997ced01 | |||
7a4be9e67e | |||
eb942b0bf7 | |||
1cf23c7ad6 | |||
15ec9df538 | |||
d6e2895666 | |||
7974ffdda2 | |||
d5858622ba | |||
9656e09066 | |||
096fee8b6d | |||
0635e7c38e | |||
845b1dcd6f | |||
2e959e8503 | |||
e6c9cbf0cd | |||
fd3059b380 | |||
5a7349117a | |||
50134bbc7f | |||
3854df27d8 | |||
fc53dbd8a4 | |||
fb0ba0cff9 | |||
573e5608fc | |||
37a7c2b1df | |||
38274728f6 | |||
49b3d67272 | |||
400b992ec3 | |||
de59f191b8 | |||
3d3b250536 | |||
32815d8427 | |||
3e25d17702 | |||
b5d1118a3f | |||
5b9e43f8ff | |||
3ffa6f70aa | |||
0d07c3c289 | |||
29fdb6d641 | |||
39d007470a | |||
285c8cbd1e | |||
a7f277b0d2 | |||
5ced8e655d | |||
4de7b7dfb5 | |||
a9518e9890 | |||
4ed35cddde | |||
40b21e35fd | |||
3a36389815 | |||
606667eb4d | |||
ef5a26dfcc | |||
8363302caf | |||
2b2ac0b0d9 | |||
f9a7ca85ac | |||
46b110e12f | |||
b7eb9491cb | |||
a92d13c10f | |||
4ad007f882 | |||
9f2303face | |||
99512f41b9 | |||
49a5ac833b | |||
646df81874 | |||
c5736cafb1 | |||
93d969ad67 | |||
7dc6f553ac | |||
b30e72081c | |||
d60bf94501 | |||
a88fadcb49 | |||
7264a711a3 | |||
ae7a1618e8 | |||
d6d95fed19 | |||
04ce2f985a | |||
a14f30c03c | |||
bd85392b54 | |||
7c427e0b6e | |||
6cf8335f31 | |||
647a1403d0 | |||
1d9b8f34e2 | |||
adf119007b | |||
7114e9b150 | |||
76c1f5bfe9 | |||
33f88d30ed | |||
ffdcbece56 | |||
44eb723efb | |||
689f80bb23 | |||
a2db98d275 | |||
49b983cd3a | |||
ad60b9225e | |||
0c096db8bd | |||
fdf6148811 | |||
62e7adc0b0 | |||
72e0304fc0 | |||
e1110a2bc4 | |||
7172c45404 | |||
d8ced8f635 | |||
e3e44f74d6 | |||
acdd9622d2 | |||
2866574dc0 | |||
cfc9b61e25 | |||
066fd55590 | |||
c0dc30edb7 | |||
2a201df435 | |||
07179f7290 | |||
87684e0945 | |||
55d3a27917 | |||
1d13b245f9 | |||
e31d9decdc | |||
a5fa11749c | |||
2b92c1619e | |||
fd135a16af | |||
aed49d89e3 | |||
05f8739952 | |||
bf39aa1b1d | |||
4e79de6156 | |||
78004ebf37 | |||
51968954a9 | |||
64607b8e56 | |||
cb432051dc | |||
c184a9ce7c | |||
62e2114349 | |||
cca1928b82 | |||
81b136eab1 | |||
d059116782 | |||
bdc99950c6 | |||
76e15f2963 | |||
06436bb876 | |||
d8f3f0f430 | |||
177c1874b9 | |||
96a7c12d69 | |||
148a5eb248 | |||
31d3ec5d20 | |||
7564384b57 | |||
639546bf86 | |||
932e3cb7b0 | |||
cbffc221fb | |||
eef801f1ae | |||
d69cf6c6fe | |||
0a9c162f26 | |||
942fa46022 | |||
74aff1b407 | |||
2f658348a8 | |||
dbff9e2125 | |||
793ed7ebe6 | |||
bed1556a3a | |||
822b4ae96f | |||
99f3b986b6 | |||
fd4c1ea747 | |||
944a5a7424 | |||
dda2c89a58 | |||
c8cfbf5281 | |||
9f383ab101 | |||
063e97fcb5 | |||
7811d50372 | |||
e1c6c76612 | |||
aa2a835cb1 | |||
3741a02d2a | |||
f14cad4a39 | |||
c0ac3a0f96 | |||
09bae63de7 | |||
62b9eb5180 | |||
3f26be885e | |||
7ab318d57b | |||
65a33f8af5 | |||
331b4e9259 | |||
474afdf8ef | |||
3f4ccd93ab | |||
92cf86837b | |||
5274923c49 | |||
a356e01b14 | |||
21a37db15b | |||
a20bbd98f5 | |||
5b3f780204 | |||
43e920d3b6 | |||
8ca22cc510 | |||
3443780ac7 | |||
8e85675732 | |||
2bdc95eb95 | |||
f2efb07d93 | |||
863c3f1720 | |||
b73f9fc19e | |||
10e711f717 | |||
529dde57b9 | |||
7d1a1acc11 | |||
5e1b0f38b7 | |||
4e69ca50fb | |||
05481dcab5 | |||
fa7131ad5c | |||
bd1c3cb7da | |||
cbd21212d1 | |||
5cd458a733 | |||
2f90a89065 | |||
4312857fd4 | |||
6c4c53dde7 | |||
e49b55024f | |||
5f1f54fa91 | |||
f4325e2bb3 | |||
e09cf91def | |||
ff1e1251f6 | |||
5697a39ec3 | |||
32fb84a3cd | |||
2815d97682 | |||
ab01f64cea | |||
e5aa2b4f87 | |||
522ce02302 | |||
e32eb11e60 | |||
bda1bf9f9a | |||
226f0932da | |||
15f9bc083c | |||
1c4a4e475b | |||
f7839b758d | |||
ac529be55c | |||
99376391a9 | |||
2c7c7b90e6 | |||
903778799f | |||
9523c918fb | |||
09be19310b | |||
b8b9b1f79a | |||
4300338b9c | |||
6a42d0c7a1 | |||
c0ed19fd92 | |||
df484c1800 | |||
5940f94644 | |||
7cd255670e | |||
eabde6b2d0 | |||
37f466705a | |||
0dccaab9cb | |||
c8848b5788 | |||
8d65335786 | |||
2d1faeba8c | |||
cecc52f0a9 | |||
a1d765f271 | |||
fe12cdefc5 | |||
648cdcc86e | |||
946a6d4a04 | |||
f7588d57c2 | |||
91a4138334 | |||
141a54cbd6 | |||
64c6ef6cfd | |||
fe8d9f6717 | |||
c913f173e3 | |||
ae928a138c | |||
d926110b4e | |||
485e6a9de1 | |||
1e6731e6f2 | |||
454a63e1f1 | |||
b487fa4438 | |||
560454e7c2 | |||
04594ea536 | |||
b5b6546710 | |||
a45dfc3822 | |||
f7f6b8d612 | |||
e4a14b7603 | |||
5706fa4567 | |||
796d6b800a | |||
b12bb55495 | |||
f42498ab60 | |||
ec56fe7bfd | |||
4abb48abd8 | |||
7f571415dc | |||
4f9a65a5fe | |||
6db7f056dc | |||
5a1d774b47 | |||
101e3bb346 | |||
a38d4829eb | |||
d5f1d45759 | |||
5ed34c1c30 | |||
bc82a5bf7e | |||
5af3d575a2 | |||
58198636ed | |||
86bf6c6dff | |||
0e07fb860e | |||
b3d4f48e2e | |||
b6d08726fb | |||
675c5be3da | |||
4eaeea1e14 | |||
f44819a7fe | |||
1dbd721b14 | |||
05722d9b11 | |||
92a3fa3e4c | |||
ddebbf119f | |||
8c4fdf5c1c | |||
dd83662e0f | |||
1b0ce7166d | |||
9c90eb52a4 | |||
a0c6ddff5a | |||
f51230b3f7 | |||
660e9f0d4f | |||
59b24d91bb | |||
df3b0bd6fb | |||
5b475c9f64 | |||
a48370abd3 | |||
54d608adb2 | |||
5fba6f5ead | |||
b177c38656 | |||
11ca39b94c | |||
bb0e27ce1f | |||
56e8cd81e6 | |||
e37fa75289 | |||
ee314ab387 | |||
59cd346911 | |||
e7e66bff4b | |||
ca62cc9066 | |||
01b6fda1f2 | |||
ae0cb63a92 | |||
5604bf6d69 | |||
c5fcc5a558 | |||
ea9f607bba | |||
0404303042 | |||
5677548298 | |||
bcc42d705e | |||
ab008ae497 | |||
3d59f6df0b | |||
4708ac0ec1 | |||
bd984abc0f | |||
b4a44dee8f | |||
942f617bd8 | |||
757cb0f015 | |||
90389ea910 | |||
d1bc93cd31 | |||
0541f6edfa | |||
0ad22f6842 | |||
134d853f19 | |||
00c0019122 | |||
e80d094174 | |||
60ba80d307 | |||
c89aa026b0 | |||
8a3f77d784 | |||
15a5c593fa | |||
fc704b8056 | |||
0a19ab4389 | |||
9e8152719f | |||
55745d281f | |||
8ba112498b | |||
44fc9423df | |||
bd8bbc6e8f | |||
2ee53b17db | |||
60e97eb94a | |||
ce5a650d8c | |||
5ff2e6b652 | |||
f30a2dd791 | |||
920c83771d | |||
a2d06583ca | |||
cc8a7e513f | |||
9dce3a04cc | |||
18cdaf1b53 | |||
e5d4376f06 | |||
6784c6567b | |||
71618ce4b9 | |||
e5ebbdaf7f | |||
6b805183b0 | |||
9723c65016 | |||
5d5425db04 | |||
7bd0e279b0 | |||
caee1f520f | |||
a8856c0612 | |||
b375ede217 | |||
0bd1d53d25 | |||
3fe386fcd6 | |||
74f289cb34 | |||
82b321b3f9 | |||
3bdaae292e | |||
b627de45ba | |||
2056f3aed0 | |||
b928b7d3f2 | |||
df6cd8f403 | |||
c6b7121cf0 | |||
86c61f7543 | |||
741fc57442 | |||
daed6a5b06 | |||
498f854bef | |||
77a1a90905 | |||
f655346f46 | |||
20cb2ff239 | |||
7d42292184 | |||
ed9a5b0890 | |||
aa23d358cc | |||
fd582d45d2 | |||
0f34d38451 | |||
f8ee244475 | |||
322d1c8389 | |||
c45bf45475 | |||
8ee4fc9b71 | |||
99c977ce9d | |||
85809ae1e1 | |||
4ec243c6fb | |||
94649b12fd | |||
407d9881ff | |||
aa3cf70b22 | |||
6ee622b3f5 | |||
95ea33b441 | |||
099d70b8d9 | |||
3d996ac466 | |||
896dd8d2c7 | |||
789b640b9b | |||
90828ef63d | |||
8acf01ebdf | |||
ddb567aeb5 | |||
17b3378655 | |||
efd209826d | |||
a43c8f2ce8 | |||
fffe07e7e6 | |||
26db524f0e | |||
4fcef33c58 | |||
dc9369c0f1 | |||
c5b786e5e0 | |||
3e0534c4c3 | |||
19ad4c8174 | |||
8159c365b5 | |||
307047d3ac | |||
83f135e48c | |||
29bdc9d574 | |||
a7ea4c3c6e | |||
bf24ac7c93 | |||
e05858e26b | |||
89046ecad5 | |||
fa7431d68b | |||
78b528b4a5 | |||
1d3870d07f | |||
2452b25fd4 | |||
0c4d422e2d | |||
a283a2a0d3 | |||
827e1af581 | |||
57f11a9767 | |||
3687cc5edd | |||
bf17b77e82 | |||
536d5616d4 | |||
59f094763b | |||
e3ef68bc6f | |||
83276d70d3 | |||
111b3bac09 | |||
67cf8d8cee | |||
b4dd95490c | |||
16e4c32709 | |||
a154c9c870 | |||
1e71df5ce9 | |||
5e9f38dadd | |||
552435b009 | |||
109ae3323d | |||
4f27104663 | |||
0053989de8 | |||
b98c1cdfe8 | |||
0628398b01 | |||
4ff03b081d | |||
e8d7093eb5 | |||
9bc4327c59 | |||
c0fda5b572 | |||
950578f09b | |||
117470068a | |||
0d47b7c47d | |||
c882b2d4c3 | |||
794231143e | |||
6b42d3bf4b | |||
1c5101eca6 | |||
dc5feb8b1a | |||
3080861764 | |||
dbebf08500 | |||
847c356063 | |||
06bcd28558 | |||
f88e8ebb51 | |||
6d2b2fd81e | |||
608800ae63 | |||
07818b0a6d | |||
496cf85b7e | |||
833f57e284 | |||
cc97408433 | |||
93f8e61c40 | |||
9a63e99710 | |||
21739fffd9 | |||
77d81f899b | |||
fe3263fdfe | |||
ce42429fbd | |||
76151d09a0 | |||
ec7e6cc5b4 | |||
1ddce48f7e | |||
98b5ff3c77 | |||
14094a48fc | |||
be79c104fb | |||
6d08c81b3b | |||
89e763b515 | |||
2a1388772a | |||
8e2a2eeba5 | |||
fa3821b50f | |||
0f63e4dde9 | |||
12efb47be7 | |||
a2fce8e56c | |||
78e5c0143b | |||
099591ad2e | |||
b5505f372f | |||
9ad860babd | |||
87e317a6f5 | |||
9d17768327 | |||
688718cad0 | |||
efb7611f6e | |||
d3ff0a258e | |||
4f18663c71 | |||
8c2a29e895 | |||
821a1a485c | |||
f08725b6a2 | |||
301b73c6c6 | |||
912e70d219 | |||
1d41939418 | |||
ee382be38d | |||
34ea3ad9bb | |||
2ba6f18c59 | |||
b2a09599a0 | |||
11264759ec | |||
c0ff6de27b | |||
60dda8a7a4 | |||
5b617295e9 | |||
53a3a2f459 | |||
64fae21d16 | |||
87f48aac35 | |||
e43a788a6d | |||
fa487e026e | |||
3701fd75dd | |||
d787e84fd4 | |||
1922e1e241 | |||
e52f53b7ff | |||
d1be256691 | |||
82ae9e72c1 | |||
85300d3743 | |||
fe3e3325e1 | |||
2b97d61d6c | |||
954fdd5906 | |||
8267058487 | |||
4a913376ac | |||
5ff3c71523 | |||
ba614fe2d6 | |||
5e713f279b | |||
df590107cb | |||
fc8630dbc6 | |||
12a94f828a | |||
0e840ae003 | |||
e1e5919f68 | |||
b2cd66bd5d | |||
af1fa6e77a | |||
5ff90f7254 | |||
0ca9e5c952 | |||
dbcad51325 | |||
8ee93d9603 | |||
ac59df9595 | |||
182eff977c | |||
3af23b7bc5 | |||
7f529eec68 | |||
ad4292f1e9 | |||
6840e596a5 | |||
bf41d82a78 | |||
a4944717a1 | |||
70bbd3cf97 | |||
e3afaf0842 | |||
60f2f9fb6c | |||
30fd8c451e | |||
bf0014f1b9 | |||
2aeebff652 | |||
471a25a625 | |||
d606ee421f | |||
926aed72c3 | |||
7014808c13 | |||
37dede568c | |||
b3fb06ba3f | |||
b7a612127d | |||
2f4cf44229 | |||
73e959f95a | |||
8ce8080253 | |||
96f72b3765 | |||
c932e953bc |
2
.gitignore
vendored
@ -28,3 +28,5 @@ node_modules
|
||||
# Protractor logs
|
||||
protractor/logs
|
||||
|
||||
# npm-debug log
|
||||
npm-debug.log
|
||||
|
@ -291,7 +291,7 @@ checklist.)
|
||||
1. Changes address original issue?
|
||||
2. Unit tests included and/or updated with changes?
|
||||
3. Command line build passes?
|
||||
4. Expect to pass code review?
|
||||
4. Changes have been smoke-tested?
|
||||
|
||||
### Reviewer Checklist
|
||||
|
||||
|
35
LICENSES.md
@ -345,6 +345,41 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
|
||||
---
|
||||
|
||||
### 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.
|
||||
|
||||
---
|
||||
|
||||
### Json.NET
|
||||
|
||||
#### Info
|
||||
|
2
Procfile
@ -1 +1 @@
|
||||
web: node app.js --port $PORT --include example/localstorage
|
||||
web: node app.js --port $PORT
|
||||
|
@ -3,29 +3,34 @@
|
||||
"platform/core",
|
||||
"platform/representation",
|
||||
"platform/commonUI/about",
|
||||
"platform/commonUI/browse",
|
||||
"platform/commonUI/edit",
|
||||
"platform/commonUI/dialog",
|
||||
"platform/commonUI/formats",
|
||||
"platform/commonUI/general",
|
||||
"platform/commonUI/inspect",
|
||||
"platform/commonUI/mobile",
|
||||
"platform/commonUI/themes/espresso",
|
||||
"platform/commonUI/notification",
|
||||
"platform/containment",
|
||||
"platform/execution",
|
||||
"platform/telemetry",
|
||||
"platform/features/clock",
|
||||
"platform/features/events",
|
||||
"platform/features/imagery",
|
||||
"platform/features/layout",
|
||||
"platform/features/pages",
|
||||
"platform/features/plot",
|
||||
"platform/features/scrolling",
|
||||
"platform/features/events",
|
||||
"platform/features/timeline",
|
||||
"platform/forms",
|
||||
"platform/identity",
|
||||
"platform/persistence/aggregator",
|
||||
"platform/persistence/local",
|
||||
"platform/persistence/queue",
|
||||
"platform/policy",
|
||||
"platform/entanglement",
|
||||
"platform/search",
|
||||
"platform/status",
|
||||
|
||||
"example/imagery",
|
||||
"example/eventGenerator",
|
||||
|
9
docs/footer.html
Normal file
@ -0,0 +1,9 @@
|
||||
<hr>
|
||||
<cite>
|
||||
This document is styled using
|
||||
<a href="https://github.com/jasonm23/markdown-css-themes">
|
||||
https://github.com/jasonm23/markdown-css-themes
|
||||
</a>.
|
||||
</cite>
|
||||
</body>
|
||||
</html>
|
@ -20,7 +20,7 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global require,process,GLOBAL*/
|
||||
/*global require,process,__dirname,GLOBAL*/
|
||||
/*jslint nomen: false */
|
||||
|
||||
|
||||
@ -30,7 +30,8 @@
|
||||
var CONSTANTS = {
|
||||
DIAGRAM_WIDTH: 800,
|
||||
DIAGRAM_HEIGHT: 500
|
||||
};
|
||||
},
|
||||
TOC_HEAD = "# Table of Contents";
|
||||
|
||||
GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be defined
|
||||
(function () {
|
||||
@ -44,7 +45,10 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
||||
split = require("split"),
|
||||
stream = require("stream"),
|
||||
nomnoml = require('nomnoml'),
|
||||
toc = require("markdown-toc"),
|
||||
Canvas = require('canvas'),
|
||||
header = fs.readFileSync(path.resolve(__dirname, 'header.html')),
|
||||
footer = fs.readFileSync(path.resolve(__dirname, 'footer.html')),
|
||||
options = require("minimist")(process.argv.slice(2));
|
||||
|
||||
// Convert from nomnoml source to a target PNG file.
|
||||
@ -102,7 +106,7 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
||||
}
|
||||
|
||||
// Convert from Github-flavored Markdown to HTML
|
||||
function gfmifier() {
|
||||
function gfmifier(renderTOC) {
|
||||
var transform = new stream.Transform({ objectMode: true }),
|
||||
markdown = "";
|
||||
transform._transform = function (chunk, encoding, done) {
|
||||
@ -110,9 +114,14 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
||||
done();
|
||||
};
|
||||
transform._flush = function (done) {
|
||||
this.push("<html><body>\n");
|
||||
if (renderTOC){
|
||||
// Prepend table of contents
|
||||
markdown =
|
||||
[ TOC_HEAD, toc(markdown).content, "", markdown ].join("\n");
|
||||
}
|
||||
this.push(header);
|
||||
this.push(marked(markdown));
|
||||
this.push("\n</body></html>\n");
|
||||
this.push(footer);
|
||||
done();
|
||||
};
|
||||
return transform;
|
||||
@ -133,8 +142,8 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
||||
customRenderer.link = function (href, title, text) {
|
||||
// ...but only if they look like relative paths
|
||||
return (href || "").indexOf(":") === -1 && href[0] !== "/" ?
|
||||
renderer.link(href.replace(/\.md/, ".html"), title, text) :
|
||||
renderer.link.apply(renderer, arguments);
|
||||
renderer.link(href.replace(/\.md/, ".html"), title, text) :
|
||||
renderer.link.apply(renderer, arguments);
|
||||
};
|
||||
return customRenderer;
|
||||
}
|
||||
@ -161,13 +170,16 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
||||
var destination = file.replace(options['in'], options.out)
|
||||
.replace(/md$/, "html"),
|
||||
destPath = path.dirname(destination),
|
||||
prefix = path.basename(destination).replace(/\.html$/, "");
|
||||
prefix = path.basename(destination).replace(/\.html$/, ""),
|
||||
//Determine whether TOC should be rendered for this file based
|
||||
//on regex provided as command line option
|
||||
renderTOC = file.match(options['suppress-toc'] || "") === null;
|
||||
|
||||
mkdirp(destPath, function (err) {
|
||||
fs.createReadStream(file, { encoding: 'utf8' })
|
||||
.pipe(split())
|
||||
.pipe(nomnomlifier(destPath, prefix))
|
||||
.pipe(gfmifier())
|
||||
.pipe(gfmifier(renderTOC))
|
||||
.pipe(fs.createWriteStream(destination, {
|
||||
encoding: 'utf8'
|
||||
}));
|
||||
@ -179,13 +191,17 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
||||
glob(options['in'] + "/**/*.@(html|css|png)", {}, function (err, files) {
|
||||
files.forEach(function (file) {
|
||||
var destination = file.replace(options['in'], options.out),
|
||||
destPath = path.dirname(destination);
|
||||
destPath = path.dirname(destination),
|
||||
streamOptions = {};
|
||||
if (file.match(/png$/)) {
|
||||
streamOptions.encoding = null;
|
||||
} else {
|
||||
streamOptions.encoding = 'utf8';
|
||||
}
|
||||
|
||||
mkdirp(destPath, function (err) {
|
||||
fs.createReadStream(file, { encoding: 'utf8' })
|
||||
.pipe(fs.createWriteStream(destination, {
|
||||
encoding: 'utf8'
|
||||
}));
|
||||
fs.createReadStream(file, streamOptions)
|
||||
.pipe(fs.createWriteStream(destination, streamOptions));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
7
docs/header.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet"
|
||||
href="http://jasonm23.github.io/markdown-css-themes/avenir-white.css">
|
||||
</head>
|
||||
<body>
|
||||
|
@ -58,13 +58,13 @@ of the software.
|
||||
|
||||
These layers are:
|
||||
|
||||
* [_Framework_](Framework.md): The framework layer is responsible for
|
||||
* [_Framework_](framework.md): The framework layer is responsible for
|
||||
managing the interactions between application components. It has no
|
||||
application-specific knowledge; at this layer, we have only
|
||||
established an abstraction by which different software components
|
||||
may communicate and/or interact.
|
||||
* [_Platform_](Platform.md): The platform layer defines the general look, feel, and
|
||||
behavior of Open MCT Web. This includes user-facing components like
|
||||
* [_Platform_](platform.md): The platform layer defines the general look,
|
||||
feel, and behavior of Open MCT Web. This includes user-facing components like
|
||||
Browse mode and Edit mode, as well as underlying elements of the
|
||||
information model and the general service infrastructure.
|
||||
* _Application_: The application layer defines specific features of
|
||||
|
@ -35,16 +35,26 @@ in __any of these tiers__.
|
||||
* _DOM_: The rendered HTML document, composed from HTML templates which
|
||||
have been processed by AngularJS and will be updated by AngularJS
|
||||
to reflect changes from the presentation layer. User interactions
|
||||
are initiated from here and invoke behavior in the presentation layer.
|
||||
are initiated from here and invoke behavior in the presentation layer. HTML
|
||||
templates are written in Angular’s template syntax; see the [Angular documentation on templates](https://docs.angularjs.org/guide/templates).
|
||||
These describe the page as actually seen by the user. Conceptually,
|
||||
stylesheets (controlling the lookandfeel of the rendered templates) belong
|
||||
in this grouping as well.
|
||||
* [_Presentation layer_](#presentation-layer): The presentation layer
|
||||
is responsible for updating (and providing information to update)
|
||||
the displayed state of the application. The presentation layer consists
|
||||
primarily of _controllers_ and _directives_. The presentation layer is
|
||||
concerned with inspecting the information model and preparing it for
|
||||
display.
|
||||
* [_Information model_](#information-model): The information model
|
||||
describes the state and behavior of the objects with which the user
|
||||
interacts.
|
||||
* [_Information model_](#information-model): Provides a common (within Open MCT
|
||||
Web) set of interfaces for dealing with “things” domain objects within the
|
||||
system. Userfacing concerns in a Open MCT Web application are expressed as
|
||||
domain objects; examples include folders (used to organize other domain
|
||||
objects), layouts (used to build displays), or telemetry points (used as
|
||||
handles for streams of remote measurements.) These domain objects expose a
|
||||
common set of interfaces to allow reusable user interfaces to be built in the
|
||||
presentation and template tiers; the specifics of these behaviors are then
|
||||
mapped to interactions with underlying services.
|
||||
* [_Service infrastructure_](#service-infrastructure): The service
|
||||
infrastructure is responsible for providing the underlying general
|
||||
functionality needed to support the information model. This includes
|
||||
@ -52,7 +62,9 @@ in __any of these tiers__.
|
||||
back-end.
|
||||
* _Back-end_: The back-end is out of the scope of Open MCT Web, except
|
||||
for the interfaces which are utilized by adapters participating in the
|
||||
service infrastructure.
|
||||
service infrastructure. Includes the underlying persistence stores, telemetry
|
||||
streams, and so forth which the Open MCT Web client is being used to interact
|
||||
with.
|
||||
|
||||
## Application Start-up
|
||||
|
35
docs/src/index.md
Normal file
@ -0,0 +1,35 @@
|
||||
# Open MCT Web Documentation
|
||||
|
||||
## Overview
|
||||
|
||||
Documentation is provided to support the use and development of
|
||||
Open MCT Web. It's recommended that before doing
|
||||
any development with Open MCT Web you take some time to familiarize yourself
|
||||
with the documentation below.
|
||||
|
||||
Open MCT Web provides functionality out of the box, but it's also a platform for
|
||||
building rich mission operations applications based on modern web technology.
|
||||
The platform is configured declaratively, and defines conventions for
|
||||
building on the provided capabilities by creating modular 'bundles' that
|
||||
extend the platform at a variety of extension points. The details of how to
|
||||
extend the platform are provided in the following documentation.
|
||||
|
||||
## Sections
|
||||
|
||||
* The [Architecture Overview](architecture/) describes the concepts used
|
||||
throughout Open MCT Web, and gives a high level overview of the platform's design.
|
||||
|
||||
* The [Developer's Guide](guide/) goes into more detail about how to use the
|
||||
platform and the functionality that it provides.
|
||||
|
||||
* The [Tutorials](tutorials/) give examples of extending the platform to add
|
||||
functionality,
|
||||
and integrate with data sources.
|
||||
|
||||
* The [API](api/) document is generated from inline documentation
|
||||
using [JSDoc](http://usejsdoc.org/), and describes the JavaScript objects and
|
||||
functions that make up the software platform.
|
||||
|
||||
* Finally, the [Development Process](process/) document describes the
|
||||
Open MCT Web software development cycle.
|
||||
|
161
docs/src/process/cycle.md
Normal file
@ -0,0 +1,161 @@
|
||||
# Development Cycle
|
||||
|
||||
Development of Open MCT Web occurs on an iterative cycle of
|
||||
sprints and releases.
|
||||
|
||||
* A _sprint_ is three weeks in duration, and represents a
|
||||
set of improvements that can be completed and tested by the
|
||||
development team. Software at the end of the sprint is
|
||||
"semi-stable"; it will have undergone reduced testing and may carry
|
||||
defects or usability issues of lower severity, particularly if
|
||||
there are workarounds.
|
||||
* A _release_ occurs every four sprints. Releases are stable, and
|
||||
will have undergone full acceptance testing to ensure that the
|
||||
software behaves correctly and usably.
|
||||
|
||||
## Roles
|
||||
|
||||
The sprint process assumes the presence of a __project manager.__
|
||||
The project manager is responsible for
|
||||
making tactical decisions about what development work will be
|
||||
performed, and for coordinating with stakeholders to arrive at
|
||||
higher-level strategic decisions about desired functionality
|
||||
and characteristics of the software, major external milestones,
|
||||
and so forth.
|
||||
|
||||
In the absence of a dedicated project manager, this role may be rotated
|
||||
among members of the development team on a per-sprint basis.
|
||||
|
||||
Responsibilities of the project manager including:
|
||||
|
||||
* Maintaining (with agreement of stakeholders) a "road map" of work
|
||||
planned for future releases/sprints; this should be higher-level,
|
||||
usually expressed as "themes",
|
||||
with just enough specificity to gauge feasibility of plans,
|
||||
relate work back to milestones, and identify longer-term
|
||||
dependencies.
|
||||
* Determining (with assistance from the rest of the team) which
|
||||
issues to work on in a given sprint and how they shall be
|
||||
assigned.
|
||||
* Pre-planning subsequent sprints to ensure that all members of the
|
||||
team always have a clear direction.
|
||||
* Scheduling and/or ensuring adherence to
|
||||
[process points](#process-points).
|
||||
* Responding to changes within the sprint (shifting priorities,
|
||||
new issues) and re-allocating work for the sprint as needed.
|
||||
|
||||
## Sprint Calendar
|
||||
|
||||
Certain [process points](#process-points) are regularly scheduled in
|
||||
the sprint cycle.
|
||||
|
||||
### Sprints by Release
|
||||
|
||||
Allocation of work among sprints should be planned relative to release
|
||||
goals and milestones. As a general guideline, higher-risk work (large
|
||||
new features which may carry new defects, major refactoring, design
|
||||
changes with uncertain effects on usability) should be allocated to
|
||||
earlier sprints, allowing for time in later sprints to ensure stability.
|
||||
|
||||
| Sprint | Focus |
|
||||
|:------:|:--------------------------------------------------------|
|
||||
| __1__ | Prototyping, design, experimentation. |
|
||||
| __2__ | New features, refinements, enhancements. |
|
||||
| __3__ | Feature completion, low-risk enhancements, bug fixing. |
|
||||
| __4__ | Stability & quality assurance. |
|
||||
|
||||
### Sprints 1-3
|
||||
|
||||
The first three sprints of a release are primarily centered around
|
||||
development work, with regular acceptance testing in the third
|
||||
week. During this third week, the top priority should be passing
|
||||
acceptance testing (e.g. by resolving any blockers found); any
|
||||
resources not needed for this effort should be used to begin work
|
||||
for the subsequent sprint.
|
||||
|
||||
| Week | Mon | Tue | Wed | Thu | Fri |
|
||||
|:-----:|:-------------------------:|:------:|:---:|:----------------------------:|:-----------:|
|
||||
| __1__ | Sprint plan | Tag-up | | | |
|
||||
| __2__ | | Tag-up | | | Code freeze |
|
||||
| __3__ | Per-sprint testing | Triage | | _Per-sprint testing*_ | Ship |
|
||||
|
||||
* If necessary.
|
||||
|
||||
### Sprint 4
|
||||
|
||||
The software must be stable at the end of the fourth sprint; because of
|
||||
this, the fourth sprint is scheduled differently, with a heightened
|
||||
emphasis on testing.
|
||||
|
||||
| Week | Mon | Tue | Wed | Thu | Fri |
|
||||
|-------:|:-------------------------:|:------:|:---:|:----------------------------:|:-----------:|
|
||||
| __1__ | Sprint plan | Tag-up | | | Code freeze |
|
||||
| __2__ | Per-release testing | Triage | | | |
|
||||
| __3__ | _Per-release testing*_ | Triage | | _Per-release testing*_ | Ship |
|
||||
|
||||
* If necessary.
|
||||
|
||||
## Process Points
|
||||
|
||||
* __Sprint plan.__ Project manager allocates issues based on
|
||||
theme(s) for sprint, then reviews with team. Each team member
|
||||
should have roughly two weeks of work allocated (to allow time
|
||||
in the third week for testing of work completed.)
|
||||
* Project manager should also sketch out subsequent sprint so
|
||||
that team may begin work for that sprint during the
|
||||
third week, since testing and blocker resolution is unlikely
|
||||
to require all available resources.
|
||||
* __Tag-up.__ Check in and status update among development team.
|
||||
May amend plan for sprint as-needed.
|
||||
* __Code freeze.__ Any new work from this sprint
|
||||
(features, bug fixes, enhancements) must be integrated by the
|
||||
end of the second week of the sprint. After code freeze
|
||||
(and until the end of the sprint) the only changes that should be
|
||||
merged into the master branch should directly address issues
|
||||
needed to pass acceptance testing.
|
||||
* [__Per-release Testing.__](testing/plan.md#per-release-testing)
|
||||
Structured testing with predefined
|
||||
success criteria. No release should ship without passing
|
||||
acceptance tests. Time is allocated in each sprint for subsequent
|
||||
rounds of acceptance testing if issues are identified during a
|
||||
prior round. Specific details of acceptance testing need to be
|
||||
agreed-upon with relevant stakeholders and delivery recipients,
|
||||
and should be flexible enough to allow changes to plans
|
||||
(e.g. deferring delivery of some feature in order to ensure
|
||||
stability of other features.) Baseline testing includes:
|
||||
* [__Testathon.__](testing/plan.md#user-testing)
|
||||
Multi-user testing, involving as many users as
|
||||
is feasible, plus development team. Open-ended; should verify
|
||||
completed work from this sprint, test exploratorily for
|
||||
regressions, et cetera.
|
||||
* [__Long-Duration Test.__](testing/plan.md#long-duration-testing) A
|
||||
test to verify that the software remains
|
||||
stable after running for longer durations. May include some
|
||||
combination of automated testing and user verification (e.g.
|
||||
checking to verify that software remains subjectively
|
||||
responsive at conclusion of test.)
|
||||
* [__Unit Testing.__](testing/plan.md#unit-testing)
|
||||
Automated testing integrated into the
|
||||
build. (These tests are verified to pass more often than once
|
||||
per sprint, as they run before any merge to master, but still
|
||||
play an important role in per-release testing.)
|
||||
* [__Per-sprint Testing.__](testing/plan.md#per-sprint-testing)
|
||||
Subset of Pre-release Testing
|
||||
which should be performed before shipping at the end of any
|
||||
sprint. Time is allocated for a second round of
|
||||
Pre-release Testing if the first round is not passed.
|
||||
* __Triage.__ Team reviews issues from acceptance testing and uses
|
||||
success criteria to determine whether or not they should block
|
||||
release, then formulates a plan to address these issues before
|
||||
the next round of acceptance testing. Focus here should be on
|
||||
ensuring software passes that testing in order to ship on time;
|
||||
may prefer to disable malfunctioning components and fix them
|
||||
in a subsequent sprint, for example.
|
||||
* __Ship.__ Tag a code snapshot that has passed acceptance
|
||||
testing and deploy that version. (Only true if acceptance
|
||||
testing has passed by this point; if acceptance testing has not
|
||||
been passed, will need to make ad hoc decisions with stakeholders,
|
||||
e.g. "extend the sprint" or "defer shipment until end of next
|
||||
sprint.")
|
||||
|
||||
|
13
docs/src/process/index.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Development Process
|
||||
|
||||
The process used to develop Open MCT Web is described in the following
|
||||
documents:
|
||||
|
||||
* [Development Cycle](cycle.md): Describes how and when specific
|
||||
process points are repeated during development.
|
||||
* Testing is described in two documents:
|
||||
* The [Test Plan](testing/plan.md) summarizes the approaches used
|
||||
to test Open MCT Web.
|
||||
* The [Test Procedures](testing/procedures.md) document what
|
||||
specific tests are performed to verify correctness, and how
|
||||
they should be carried out.
|
127
docs/src/process/testing/plan.md
Normal file
@ -0,0 +1,127 @@
|
||||
# Test Plan
|
||||
|
||||
## Test Levels
|
||||
|
||||
Testing for Open MCT Web includes:
|
||||
|
||||
* _Smoke testing_: Brief, informal testing to verify that no major issues
|
||||
or regressions are present in the software, or in specific features of
|
||||
the software.
|
||||
* _Unit testing_: Automated verification of the performance of individual
|
||||
software components.
|
||||
* _User testing_: Testing with a representative user base to verify
|
||||
that application behaves usably and as specified.
|
||||
* _Long-duration testing_: Testing which takes place over a long period
|
||||
of time to detect issues which are not readily noticeable during
|
||||
shorter test periods.
|
||||
|
||||
### Smoke Testing
|
||||
|
||||
Manual, non-rigorous testing of the software and/or specific features
|
||||
of interest. Verifies that the software runs and that basic functionality
|
||||
is present.
|
||||
|
||||
### Unit Testing
|
||||
|
||||
Unit tests are automated tests which exercise individual software
|
||||
components. Tests are subject to code review along with the actual
|
||||
implementation, to ensure that tests are applicable and useful.
|
||||
|
||||
Unit tests should meet
|
||||
[test standards](https://github.com/nasa/openmctweb/blob/master/CONTRIBUTING.md#test-standards)
|
||||
as described in the contributing guide.
|
||||
|
||||
### User Testing
|
||||
|
||||
User testing is performed at scheduled times involving target users
|
||||
of the software or reasonable representatives, along with members of
|
||||
the development team exercising known use cases. Users test the
|
||||
software directly; the software should be configured as similarly to
|
||||
its planned production configuration as is feasible without introducing
|
||||
other risks (e.g. damage to data in a production instance.)
|
||||
|
||||
User testing will focus on the following activities:
|
||||
|
||||
* Verifying issues resolved since the last test session.
|
||||
* Checking for regressions in areas related to recent changes.
|
||||
* Using major or important features of the software,
|
||||
as determined by the user.
|
||||
* General "trying to break things."
|
||||
|
||||
During user testing, users will
|
||||
[report issues](https://github.com/nasa/openmctweb/blob/master/CONTRIBUTING.md#issue-reporting)
|
||||
as they are encountered.
|
||||
|
||||
Desired outcomes of user testing are:
|
||||
|
||||
* Identified software defects.
|
||||
* Areas for usability improvement.
|
||||
* Feature requests (particularly missed requirements.)
|
||||
* Recorded issue verification.
|
||||
|
||||
### Long-duration Testing
|
||||
|
||||
Long-duration testing occurs over a twenty-four hour period. The
|
||||
software is run in one or more stressing cases representative of expected
|
||||
usage. After twenty-four hours, the software is evaluated for:
|
||||
|
||||
* Performance metrics: Have memory usage or CPU utilization increased
|
||||
during this time period in unexpected or undesirable ways?
|
||||
* Subjective usability: Does the software behave in the same way it did
|
||||
at the start of the test? Is it as responsive?
|
||||
|
||||
Any defects or unexpected behavior identified during testing should be
|
||||
[reported as issues](https://github.com/nasa/openmctweb/blob/master/CONTRIBUTING.md#issue-reporting)
|
||||
and reviewed for severity.
|
||||
|
||||
## Test Performance
|
||||
|
||||
Tests are performed at various levels of frequency.
|
||||
|
||||
* _Per-merge_: Performed before any new changes are integrated into
|
||||
the software.
|
||||
* _Per-sprint_: Performed at the end of every [sprint](../cycle.md).
|
||||
* _Per-release_: Performed at the end of every [release](../cycle.md).
|
||||
|
||||
### Per-merge Testing
|
||||
|
||||
Before changes are merged, the author of the changes must perform:
|
||||
|
||||
* _Smoke testing_ (both generally, and for areas which interact with
|
||||
the new changes.)
|
||||
* _Unit testing_ (as part of the automated build step.)
|
||||
|
||||
Changes are not merged until the author has affirmed that both
|
||||
forms of testing have been performed successfully; this is documented
|
||||
by the [Author Checklist](https://github.com/nasa/openmctweb/blob/master/CONTRIBUTING.md#author-checklist).
|
||||
|
||||
### Per-sprint Testing
|
||||
|
||||
Before a sprint is closed, the development team must additionally
|
||||
perform:
|
||||
|
||||
* A relevant subset of [_user testing_](procedures.md#user-test-procedures)
|
||||
identified by the acting [project manager](../cycle.md#roles).
|
||||
* [_Long-duration testing_](procedures.md#long-duration-testng)
|
||||
(specifically, for 24 hours.)
|
||||
|
||||
Issues are reported as a product of both forms of testing.
|
||||
|
||||
A sprint is not closed until both categories have been performed on
|
||||
the latest snapshot of the software, _and_ no issues labelled as
|
||||
["blocker"](https://github.com/nasa/openmctweb/blob/master/CONTRIBUTING.md#issue-reporting)
|
||||
remain open.
|
||||
|
||||
### Per-release Testing
|
||||
|
||||
As [per-sprint testing](#per-sprint-testing), except that _user testing_
|
||||
should cover all test cases, with less focus on changes from the specific
|
||||
sprint or release.
|
||||
|
||||
Per-release testing should also include any acceptance testing steps
|
||||
agreed upon with recipients of the software.
|
||||
|
||||
A release is not closed until both categories have been performed on
|
||||
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)
|
||||
remain open.
|
169
docs/src/process/testing/procedures.md
Normal file
@ -0,0 +1,169 @@
|
||||
# Test Procedures
|
||||
|
||||
## Introduction
|
||||
|
||||
This document is intended to be used:
|
||||
|
||||
* By testers, to verify that Open MCT Web behaves as specified.
|
||||
* By the development team, to document new test cases and to provide
|
||||
guidance on how to author these.
|
||||
|
||||
## Writing Procedures
|
||||
|
||||
### Template
|
||||
|
||||
Procedures for individual tests should use the following template,
|
||||
adapted from [https://swehb.nasa.gov/display/7150/SWE-114]().
|
||||
|
||||
Property | Value
|
||||
---------------|---------------------------------------------------------------
|
||||
Test ID |
|
||||
Relevant reqs. |
|
||||
Prerequisites |
|
||||
Test input |
|
||||
Instructions |
|
||||
Expectation |
|
||||
Eval. criteria |
|
||||
|
||||
For multi-line descriptions, use an asterisk or similar indicator to refer
|
||||
to a longer-form description below.
|
||||
|
||||
#### Example Procedure - Edit a Layout
|
||||
|
||||
Property | Value
|
||||
---------------|---------------------------------------------------------------
|
||||
Test ID | MCT-TEST-000X - Edit a layout
|
||||
Relevant reqs. | MCT-EDIT-000Y
|
||||
Prerequisites | Create a layout, as in MCT-TEST-000Z
|
||||
Test input | Domain object database XYZ
|
||||
Instructions | See below *
|
||||
Expectation | Change to editing context †
|
||||
Eval. criteria | Visual inspection
|
||||
|
||||
* Follow the following steps:
|
||||
|
||||
1. Verify that the created layout is currently navigated-to,
|
||||
as in MCT-TEST-00ZZ.
|
||||
2. Click the Edit button, identified by a pencil icon and the text "Edit"
|
||||
displayed on hover.
|
||||
|
||||
† Right-hand viewing area should be surrounded by a dashed
|
||||
blue border when a domain object is being edited.
|
||||
|
||||
### Guidelines
|
||||
|
||||
Test procedures should be written assuming minimal prior knowledge of the
|
||||
application: Non-standard terms should only be used when they are documented
|
||||
in [the glossary](#glossary), and shorthands used for user actions should
|
||||
be accompanied by useful references to test procedures describing those
|
||||
actions (when available) or descriptions in user documentation.
|
||||
|
||||
Test cases should be narrow in scope; if a list of steps is excessively
|
||||
long (or must be written vaguely to be kept short) it should be broken
|
||||
down into multiple tests which reference one another.
|
||||
|
||||
All requirements satisfied by Open MCT Web should be verifiable using
|
||||
one or more test procedures.
|
||||
|
||||
## Glossary
|
||||
|
||||
This section will contain terms used in test procedures. This may link to
|
||||
a common glossary, to avoid replication of content.
|
||||
|
||||
## Procedures
|
||||
|
||||
This section will contain specific test procedures. Presently, procedures
|
||||
are placeholders describing general patterns for setting up and conducting
|
||||
testing.
|
||||
|
||||
### User Testing Setup
|
||||
|
||||
These procedures describes a general pattern for setting up for user
|
||||
testing. Specific deployments should customize this pattern with
|
||||
relevant data and any additional steps necessary.
|
||||
|
||||
Property | Value
|
||||
---------------|---------------------------------------------------------------
|
||||
Test ID | MCT-TEST-SETUP0 - User Testing Setup
|
||||
Relevant reqs. | TBD
|
||||
Prerequisites | Build of relevant components
|
||||
Test input | Exemplary database; exemplary telemetry data set
|
||||
Instructions | See below
|
||||
Expectation | Able to load application in a web browser (Google Chrome)
|
||||
Eval. criteria | Visual inspection
|
||||
|
||||
Instructions:
|
||||
|
||||
1. Start telemetry server.
|
||||
2. Start ElasticSearch.
|
||||
3. Restore database snapshot to ElasticSearch.
|
||||
4. Start telemetry playback.
|
||||
5. Start HTTP server for client sources.
|
||||
|
||||
### User Test Procedures
|
||||
|
||||
Specific user test cases have not yet been authored. In their absence,
|
||||
user testing is conducted by:
|
||||
|
||||
* Reviewing the text of issues from the issue tracker to understand the
|
||||
desired behavior, and exercising this behavior in the running application.
|
||||
(For instance, by following steps to reproduce from the original issue.)
|
||||
* Issues which appear to be resolved should be marked as such with comments
|
||||
on the original issue (e.g. "verified during user testing MM/DD/YYYY".)
|
||||
* Issues which appear not to have been resolved should be reopened with an
|
||||
explanation of what unexpected behavior has been observed.
|
||||
* In cases where an issue appears resolved as-worded but other related
|
||||
undesirable behavior is observed during testing, a new issue should be
|
||||
opened, and linked to from a comment in the original issues.
|
||||
* General usage of new features and/or existing features which have undergone
|
||||
recent changes. Defects or problems with usability should be documented
|
||||
by filing issues in the issue tracker.
|
||||
* Open-ended testing to discover defects, identify usability issues, and
|
||||
generate feature requests.
|
||||
|
||||
### Long-Duration Testing
|
||||
|
||||
The purpose of long-duration testing is to identify performance issues
|
||||
and/or other defects which are sensitive to the amount of time the
|
||||
application is kept running. (Memory leaks, for instance.)
|
||||
|
||||
Property | Value
|
||||
---------------|---------------------------------------------------------------
|
||||
Test ID | MCT-TEST-LDT0 - Long-duration Testing
|
||||
Relevant reqs. | TBD
|
||||
Prerequisites | MCT-TEST-SETUP0
|
||||
Test input | (As for test setup.)
|
||||
Instructions | See "Instructions" below *
|
||||
Expectation | See "Expectations" below †
|
||||
Eval. criteria | Visual inspection
|
||||
|
||||
* Instructions:
|
||||
|
||||
1. Start `top` or a similar tool to measure CPU usage and memory utilization.
|
||||
2. Open several user-created displays (as many as would be realistically
|
||||
opened during actual usage in a stressing case) in some combination of
|
||||
separate tabs and windows (approximately as many tabs-per-window as
|
||||
total windows.)
|
||||
3. Ensure that playback data is set to run continuously for at least 24 hours
|
||||
(e.g. on a loop.)
|
||||
4. Record CPU usage and memory utilization.
|
||||
5. In at least one tab, try some general user interface gestures and make
|
||||
notes about the subjective experience of using the application. (Particularly,
|
||||
the degree of responsiveness.)
|
||||
6. Leave client displays open for 24 hours.
|
||||
7. Record CPU usage and memory utilization again.
|
||||
8. Make additional notes about the subjective experience of using the
|
||||
application (again, particularly responsiveness.)
|
||||
9. Check logs for any unexpected warnings or errors.
|
||||
|
||||
† Expectations:
|
||||
|
||||
* At the end of the test, CPU usage and memory usage should both be similar
|
||||
to their levels at the start of the test.
|
||||
* At the end of the test, subjective usage of the application should not
|
||||
be observably different from the way it was at the start of the test.
|
||||
(In particular, responsiveness should not decrease.)
|
||||
* Logs should not contain any unexpected warnings or errors ("expected"
|
||||
warnings or errors are those that have been documented and prioritized
|
||||
as known issues, or those that are explained by transient conditions
|
||||
external to the software, such as network outages.)
|
BIN
docs/src/tutorials/images/add-task.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
docs/src/tutorials/images/bar-plot-2.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
docs/src/tutorials/images/bar-plot-3.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
docs/src/tutorials/images/bar-plot-4.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
docs/src/tutorials/images/bar-plot.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
docs/src/tutorials/images/chrome.png
Normal file
After Width: | Height: | Size: 140 KiB |
BIN
docs/src/tutorials/images/remove-task.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
docs/src/tutorials/images/telemetry-1.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
docs/src/tutorials/images/telemetry-2.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
docs/src/tutorials/images/telemetry-3.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
docs/src/tutorials/images/todo-edit.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
docs/src/tutorials/images/todo-list.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
docs/src/tutorials/images/todo-restyled.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
docs/src/tutorials/images/todo-selection.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
docs/src/tutorials/images/todo.png
Normal file
After Width: | Height: | Size: 43 KiB |
3121
docs/src/tutorials/index.md
Normal file
58
example/builtins/bundle.js
Normal file
@ -0,0 +1,58 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/builtins", {
|
||||
"name": "Angular Built-ins Example",
|
||||
"description": "Example showing how to declare extensions with built-in support from Angular.",
|
||||
"sources": "src",
|
||||
"extensions": {
|
||||
"controllers": [
|
||||
{
|
||||
"key": "ExampleController",
|
||||
"implementation": "ExampleController.js",
|
||||
"depends": [ "$scope", "exampleService" ]
|
||||
}
|
||||
],
|
||||
"directives": [
|
||||
{
|
||||
"key": "exampleDirective",
|
||||
"implementation": "ExampleDirective.js",
|
||||
"depends": [ "examples[]" ]
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"templateUrl": "templates/example.html"
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key": "exampleService",
|
||||
"implementation": "ExampleService.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,32 +0,0 @@
|
||||
{
|
||||
"name": "Angular Built-ins Example",
|
||||
"description": "Example showing how to declare extensions with built-in support from Angular.",
|
||||
"sources": "src",
|
||||
"extensions": {
|
||||
"controllers": [
|
||||
{
|
||||
"key": "ExampleController",
|
||||
"implementation": "ExampleController.js",
|
||||
"depends": [ "$scope", "exampleService" ]
|
||||
}
|
||||
],
|
||||
"directives": [
|
||||
{
|
||||
"key": "exampleDirective",
|
||||
"implementation": "ExampleDirective.js",
|
||||
"depends": [ "examples[]" ]
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"templateUrl": "templates/example.html"
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key": "exampleService",
|
||||
"implementation": "ExampleService.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
63
example/composite/bundle.js
Normal file
@ -0,0 +1,63 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/composite", {
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"implementation": "SomeProvider.js",
|
||||
"provides": "someService",
|
||||
"type": "provider"
|
||||
},
|
||||
{
|
||||
"implementation": "SomeOtherProvider.js",
|
||||
"provides": "someService",
|
||||
"type": "provider"
|
||||
},
|
||||
{
|
||||
"implementation": "SomeDecorator.js",
|
||||
"provides": "someService",
|
||||
"type": "decorator"
|
||||
},
|
||||
{
|
||||
"implementation": "SomeOtherDecorator.js",
|
||||
"provides": "someService",
|
||||
"type": "decorator"
|
||||
},
|
||||
{
|
||||
"implementation": "SomeAggregator.js",
|
||||
"provides": "someService",
|
||||
"type": "aggregator"
|
||||
}
|
||||
],
|
||||
"examples": [
|
||||
{
|
||||
"implementation": "SomeOtherExample.js",
|
||||
"depends": [ "someService" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,37 +0,0 @@
|
||||
{
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"implementation": "SomeProvider.js",
|
||||
"provides": "someService",
|
||||
"type": "provider"
|
||||
},
|
||||
{
|
||||
"implementation": "SomeOtherProvider.js",
|
||||
"provides": "someService",
|
||||
"type": "provider"
|
||||
},
|
||||
{
|
||||
"implementation": "SomeDecorator.js",
|
||||
"provides": "someService",
|
||||
"type": "decorator"
|
||||
},
|
||||
{
|
||||
"implementation": "SomeOtherDecorator.js",
|
||||
"provides": "someService",
|
||||
"type": "decorator"
|
||||
},
|
||||
{
|
||||
"implementation": "SomeAggregator.js",
|
||||
"provides": "someService",
|
||||
"type": "aggregator"
|
||||
}
|
||||
],
|
||||
"examples": [
|
||||
{
|
||||
"implementation": "SomeOtherExample.js",
|
||||
"depends": [ "someService" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
58
example/eventGenerator/bundle.js
Normal file
@ -0,0 +1,58 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/eventGenerator", {
|
||||
"name": "Event Message Generator",
|
||||
"description": "Example of a component that produces event data.",
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"implementation": "EventTelemetryProvider.js",
|
||||
"type": "provider",
|
||||
"provides": "telemetryService",
|
||||
"depends": [ "$q", "$timeout" ]
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"key": "eventGenerator",
|
||||
"name": "Event Message Generator",
|
||||
"glyph": "f",
|
||||
"description": "An event message generator",
|
||||
"features": "creation",
|
||||
"model": {
|
||||
"telemetry": {}
|
||||
},
|
||||
"telemetry": {
|
||||
"source": "eventGenerator",
|
||||
"ranges": [
|
||||
{ "format": "string" }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,32 +0,0 @@
|
||||
{
|
||||
"name": "Event Message Generator",
|
||||
"description": "Example of a component that produces event data.",
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"implementation": "EventTelemetryProvider.js",
|
||||
"type": "provider",
|
||||
"provides": "telemetryService",
|
||||
"depends": [ "$q", "$timeout" ]
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"key": "eventGenerator",
|
||||
"name": "Event Message Generator",
|
||||
"glyph": "f",
|
||||
"description": "An event message generator",
|
||||
"features": "creation",
|
||||
"model": {
|
||||
"telemetry": {}
|
||||
},
|
||||
"telemetry": {
|
||||
"source": "eventGenerator",
|
||||
"ranges": [
|
||||
{ "format": "string" }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
42
example/extensions/bundle.js
Normal file
@ -0,0 +1,42 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/extensions", {
|
||||
"name": "Custom Extensions Examples",
|
||||
"description": "Example showing how to declare custom extensions.",
|
||||
"sources": "src",
|
||||
"extensions": {
|
||||
"examples": [
|
||||
{
|
||||
"text": "I came from example/extensions"
|
||||
},
|
||||
{
|
||||
"implementation": "SomeExample.js",
|
||||
"depends": [ "exampleService" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "Custom Extensions Examples",
|
||||
"description": "Example showing how to declare custom extensions.",
|
||||
"sources": "src",
|
||||
"extensions": {
|
||||
"examples": [
|
||||
{
|
||||
"text": "I came from example/extensions"
|
||||
},
|
||||
{
|
||||
"implementation": "SomeExample.js",
|
||||
"depends": [ "exampleService" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
44
example/forms/bundle.js
Normal file
@ -0,0 +1,44 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/forms", {
|
||||
"name": "Declarative Forms example",
|
||||
"sources": "src",
|
||||
"extensions": {
|
||||
"controllers": [
|
||||
{
|
||||
"key": "ExampleFormController",
|
||||
"implementation": "ExampleFormController.js",
|
||||
"depends": [ "$scope" ]
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"templateUrl": "templates/exampleForm.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "Declarative Forms example",
|
||||
"sources": "src",
|
||||
"extensions": {
|
||||
"controllers": [
|
||||
{
|
||||
"key": "ExampleFormController",
|
||||
"implementation": "ExampleFormController.js",
|
||||
"depends": [ "$scope" ]
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"templateUrl": "templates/exampleForm.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
116
example/generator/bundle.js
Normal file
@ -0,0 +1,116 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/generator", {
|
||||
"name": "Sine Wave Generator",
|
||||
"description": "Example of a component that produces dataa.",
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"implementation": "SinewaveTelemetryProvider.js",
|
||||
"type": "provider",
|
||||
"provides": "telemetryService",
|
||||
"depends": [ "$q", "$timeout" ]
|
||||
}
|
||||
],
|
||||
"capabilities": [
|
||||
{
|
||||
"key": "limit",
|
||||
"implementation": "SinewaveLimitCapability.js"
|
||||
}
|
||||
],
|
||||
"formats": [
|
||||
{
|
||||
"key": "example.delta",
|
||||
"implementation": "SinewaveDeltaFormat.js"
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "TIME_CONDUCTOR_DOMAINS",
|
||||
"value": [
|
||||
{ "key": "time", "name": "Time" },
|
||||
{ "key": "yesterday", "name": "Yesterday" },
|
||||
{ "key": "delta", "name": "Delta", "format": "example.delta" }
|
||||
],
|
||||
"priority": -1
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"key": "generator",
|
||||
"name": "Sine Wave Generator",
|
||||
"glyph": "T",
|
||||
"description": "A sine wave generator",
|
||||
"features": "creation",
|
||||
"model": {
|
||||
"telemetry": {
|
||||
"period": 10
|
||||
}
|
||||
},
|
||||
"telemetry": {
|
||||
"source": "generator",
|
||||
"domains": [
|
||||
{
|
||||
"key": "time",
|
||||
"name": "Time"
|
||||
},
|
||||
{
|
||||
"key": "yesterday",
|
||||
"name": "Yesterday"
|
||||
},
|
||||
{
|
||||
"key": "delta",
|
||||
"name": "Delta",
|
||||
"format": "example.delta"
|
||||
}
|
||||
],
|
||||
"ranges": [
|
||||
{
|
||||
"key": "sin",
|
||||
"name": "Sine"
|
||||
},
|
||||
{
|
||||
"key": "cos",
|
||||
"name": "Cosine"
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"name": "Period",
|
||||
"control": "textfield",
|
||||
"cssclass": "l-small l-numeric",
|
||||
"key": "period",
|
||||
"required": true,
|
||||
"property": [ "telemetry", "period" ],
|
||||
"pattern": "^\\d*(\\.\\d*)?$"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,68 +0,0 @@
|
||||
{
|
||||
"name": "Sine Wave Generator",
|
||||
"description": "Example of a component that produces dataa.",
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"implementation": "SinewaveTelemetryProvider.js",
|
||||
"type": "provider",
|
||||
"provides": "telemetryService",
|
||||
"depends": [ "$q", "$timeout" ]
|
||||
}
|
||||
],
|
||||
"capabilities": [
|
||||
{
|
||||
"key": "limit",
|
||||
"implementation": "SinewaveLimitCapability.js"
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"key": "generator",
|
||||
"name": "Sine Wave Generator",
|
||||
"glyph": "T",
|
||||
"description": "A sine wave generator",
|
||||
"features": "creation",
|
||||
"model": {
|
||||
"telemetry": {
|
||||
"period": 10
|
||||
}
|
||||
},
|
||||
"telemetry": {
|
||||
"source": "generator",
|
||||
"domains": [
|
||||
{
|
||||
"key": "time",
|
||||
"name": "Time"
|
||||
},
|
||||
{
|
||||
"key": "yesterday",
|
||||
"name": "Yesterday"
|
||||
}
|
||||
],
|
||||
"ranges": [
|
||||
{
|
||||
"key": "sin",
|
||||
"name": "Sine"
|
||||
},
|
||||
{
|
||||
"key": "cos",
|
||||
"name": "Cosine"
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"name": "Period",
|
||||
"control": "textfield",
|
||||
"cssclass": "l-small l-numeric",
|
||||
"key": "period",
|
||||
"required": true,
|
||||
"property": [ "telemetry", "period" ],
|
||||
"pattern": "^\\d*(\\.\\d*)?$"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -19,18 +19,8 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
// Styles to temporarily hide non-functional elements
|
||||
/*global define,Promise*/
|
||||
|
||||
/******************************** BROWSE */
|
||||
.browse-mode {
|
||||
.browse {
|
||||
&.top-bar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.browse-area.holder {
|
||||
// When .browse.top-bar is hidden, set the top of the browse-area holder
|
||||
top: $bodyMargin;
|
||||
}
|
||||
}
|
||||
define({
|
||||
START_TIME: Date.now() - 24 * 60 * 60 * 1000 // Now minus a day.
|
||||
});
|
68
example/generator/src/SinewaveDeltaFormat.js
Normal file
@ -0,0 +1,68 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define,Promise*/
|
||||
|
||||
define(
|
||||
['./SinewaveConstants', 'moment'],
|
||||
function (SinewaveConstants, moment) {
|
||||
"use strict";
|
||||
|
||||
var START_TIME = SinewaveConstants.START_TIME,
|
||||
FORMAT_REGEX = /^-?\d+:\d+:\d+$/,
|
||||
SECOND = 1000,
|
||||
MINUTE = SECOND * 60,
|
||||
HOUR = MINUTE * 60;
|
||||
|
||||
function SinewaveDeltaFormat() {
|
||||
}
|
||||
|
||||
function twoDigit(v) {
|
||||
return v >= 10 ? String(v) : ('0' + v);
|
||||
}
|
||||
|
||||
SinewaveDeltaFormat.prototype.format = function (value) {
|
||||
var delta = Math.abs(value - START_TIME),
|
||||
negative = value < START_TIME,
|
||||
seconds = Math.floor(delta / SECOND) % 60,
|
||||
minutes = Math.floor(delta / MINUTE) % 60,
|
||||
hours = Math.floor(delta / HOUR);
|
||||
return (negative ? "-" : "") +
|
||||
[ hours, minutes, seconds ].map(twoDigit).join(":");
|
||||
};
|
||||
|
||||
SinewaveDeltaFormat.prototype.validate = function (text) {
|
||||
return FORMAT_REGEX.test(text);
|
||||
};
|
||||
|
||||
SinewaveDeltaFormat.prototype.parse = function (text) {
|
||||
var negative = text[0] === "-",
|
||||
parts = text.replace("-", "").split(":");
|
||||
return [ HOUR, MINUTE, SECOND ].map(function (sz, i) {
|
||||
return parseInt(parts[i], 10) * sz;
|
||||
}).reduce(function (a, b) {
|
||||
return a + b;
|
||||
}, 0) * (negative ? -1 : 1) + START_TIME;
|
||||
};
|
||||
|
||||
return SinewaveDeltaFormat;
|
||||
}
|
||||
);
|
@ -30,25 +30,25 @@ define(
|
||||
YELLOW = 0.5,
|
||||
LIMITS = {
|
||||
rh: {
|
||||
cssClass: "s-limit-upr-red",
|
||||
cssClass: "s-limit-upr s-limit-red",
|
||||
low: RED,
|
||||
high: Number.POSITIVE_INFINITY,
|
||||
name: "Red High"
|
||||
},
|
||||
rl: {
|
||||
cssClass: "s-limit-lwr-red",
|
||||
cssClass: "s-limit-lwr s-limit-red",
|
||||
high: -RED,
|
||||
low: Number.NEGATIVE_INFINITY,
|
||||
name: "Red Low"
|
||||
},
|
||||
yh: {
|
||||
cssClass: "s-limit-upr-yellow",
|
||||
cssClass: "s-limit-upr s-limit-yellow",
|
||||
low: YELLOW,
|
||||
high: RED,
|
||||
name: "Yellow High"
|
||||
},
|
||||
yl: {
|
||||
cssClass: "s-limit-lwr-yellow",
|
||||
cssClass: "s-limit-lwr s-limit-yellow",
|
||||
low: -RED,
|
||||
high: -YELLOW,
|
||||
name: "Yellow Low"
|
||||
|
@ -25,12 +25,12 @@
|
||||
* Module defining SinewaveTelemetry. Created by vwoeltje on 11/12/14.
|
||||
*/
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
['./SinewaveConstants'],
|
||||
function (SinewaveConstants) {
|
||||
"use strict";
|
||||
|
||||
var ONE_DAY = 60 * 60 * 24,
|
||||
firstObservedTime = Math.floor(Date.now() / 1000) - ONE_DAY;
|
||||
firstObservedTime = Math.floor(SinewaveConstants.START_TIME / 1000);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -58,8 +58,11 @@ define(
|
||||
};
|
||||
|
||||
generatorData.getDomainValue = function (i, domain) {
|
||||
// delta uses the same numeric values as the default domain,
|
||||
// so it's not checked for here, just formatted for display
|
||||
// differently.
|
||||
return (i + offset) * 1000 + firstTime * 1000 -
|
||||
(domain === 'yesterday' ? ONE_DAY : 0);
|
||||
(domain === 'yesterday' ? (ONE_DAY * 1000) : 0);
|
||||
};
|
||||
|
||||
generatorData.getRangeValue = function (i, range) {
|
||||
|
38
example/identity/bundle.js
Normal file
@ -0,0 +1,38 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/identity", {
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"implementation": "ExampleIdentityService.js",
|
||||
"provides": "identityService",
|
||||
"type": "provider",
|
||||
"depends": [ "dialogService" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,12 +0,0 @@
|
||||
{
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"implementation": "ExampleIdentityService.js",
|
||||
"provides": "identityService",
|
||||
"type": "provider",
|
||||
"depends": [ "dialogService" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
68
example/imagery/bundle.js
Normal file
@ -0,0 +1,68 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/imagery", {
|
||||
"name": "Imagery",
|
||||
"description": "Example of a component that produces image telemetry.",
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"implementation": "ImageTelemetryProvider.js",
|
||||
"type": "provider",
|
||||
"provides": "telemetryService",
|
||||
"depends": [ "$q", "$timeout" ]
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"key": "imagery",
|
||||
"name": "Example Imagery",
|
||||
"glyph": "T",
|
||||
"features": "creation",
|
||||
"model": {
|
||||
"telemetry": {}
|
||||
},
|
||||
"telemetry": {
|
||||
"source": "imagery",
|
||||
"domains": [
|
||||
{
|
||||
"name": "Time",
|
||||
"key": "time",
|
||||
"format": "timestamp"
|
||||
}
|
||||
],
|
||||
"ranges": [
|
||||
{
|
||||
"name": "Image",
|
||||
"key": "url",
|
||||
"format": "imageUrl"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,42 +0,0 @@
|
||||
{
|
||||
"name": "Imagery",
|
||||
"description": "Example of a component that produces image telemetry.",
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"implementation": "ImageTelemetryProvider.js",
|
||||
"type": "provider",
|
||||
"provides": "telemetryService",
|
||||
"depends": [ "$q", "$timeout" ]
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"key": "imagery",
|
||||
"name": "Example Imagery",
|
||||
"glyph": "T",
|
||||
"features": "creation",
|
||||
"model": {
|
||||
"telemetry": {}
|
||||
},
|
||||
"telemetry": {
|
||||
"source": "imagery",
|
||||
"domains": [
|
||||
{
|
||||
"name": "Time",
|
||||
"key": "time",
|
||||
"format": "timestamp"
|
||||
}
|
||||
],
|
||||
"ranges": [
|
||||
{
|
||||
"name": "Image",
|
||||
"key": "url",
|
||||
"format": "imageUrl"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
38
example/mobile/bundle.js
Normal file
@ -0,0 +1,38 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/mobile", {
|
||||
"name": "Mobile",
|
||||
"description": "Allows elements with pertinence to mobile usage and development",
|
||||
"extensions": {
|
||||
"stylesheets": [
|
||||
{
|
||||
"stylesheetUrl": "css/mobile-example.css",
|
||||
"priority": "mandatory"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
26
example/mobile/res/config.rb
Executable file
@ -0,0 +1,26 @@
|
||||
# Require any additional compass plugins here.
|
||||
# require "compass-growl"
|
||||
|
||||
# Set this to the root of your project when deployed:
|
||||
http_path = "/"
|
||||
css_dir = "css"
|
||||
sass_dir = "sass"
|
||||
images_dir = "images"
|
||||
javascripts_dir = "js"
|
||||
|
||||
# You can select your preferred output style here (can be overridden via the command line):
|
||||
# :expanded, :compressed, :nested
|
||||
output_style = :nested
|
||||
|
||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||
relative_assets = true
|
||||
|
||||
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
||||
# line_comments = false
|
||||
|
||||
|
||||
# If you prefer the indented syntax, you might want to regenerate this
|
||||
# project again passing --syntax sass, or you can uncomment this:
|
||||
# preferred_syntax = :sass
|
||||
# and then run:
|
||||
# sass-convert -R --from scss --to sass vfn_platform/static/sass scss && rm -rf sass && mv scss sass
|
103
example/mobile/res/css/mobile-example.css
Normal file
@ -0,0 +1,103 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/************************** FEATURES */
|
||||
/************************** VERY INFLUENTIAL GLOBAL DIMENSIONS */
|
||||
/************************** RATIOS */
|
||||
/************************** LAYOUT */
|
||||
/************************** CONTROLS */
|
||||
/************************** PATHS */
|
||||
/************************** TIMINGS */
|
||||
/************************** LIMITS */
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/************************** MOBILE REPRESENTATION ITEMS DIMENSIONS */
|
||||
/************************** MOBILE TREE MENU DIMENSIONS */
|
||||
/************************** WINDOW DIMENSIONS FOR RWD */
|
||||
/************************** MEDIA QUERIES: WINDOW CHECKS FOR SPECIFIC ORIENTATIONS FOR EACH DEVICE */
|
||||
/************************** MEDIA QUERIES: WINDOWS FOR SPECIFIC ORIENTATIONS FOR EACH DEVICE */
|
||||
/************************** DEVICE PARAMETERS FOR MENUS/REPRESENTATIONS */
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/* REQUIRES mobile/_constants */
|
||||
@media screen and (orientation: portrait) and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px), screen and (orientation: portrait) and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) {
|
||||
/* line 28, ../sass/mobile-example.scss */
|
||||
.create-btn-holder {
|
||||
display: block !important; } }
|
31
example/mobile/res/sass/mobile-example.scss
Normal file
@ -0,0 +1,31 @@
|
||||
/*****************************************************************************
|
||||
* 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.
|
||||
*****************************************************************************/
|
||||
@import "../../../../platform/commonUI/general/res/sass/constants";
|
||||
@import "../../../../platform/commonUI/general/res/sass/mobile/constants";
|
||||
@import "../../../../platform/commonUI/general/res/sass/mobile/mixins";
|
||||
|
||||
@include phoneandtablet {
|
||||
// Show the Create button
|
||||
.create-btn-holder {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
73
example/notifications/bundle.js
Normal file
@ -0,0 +1,73 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/notifications", {
|
||||
"extensions": {
|
||||
"templates": [
|
||||
{
|
||||
"key": "dialogLaunchTemplate",
|
||||
"templateUrl": "dialog-launch.html"
|
||||
},
|
||||
{
|
||||
"key": "notificationLaunchTemplate",
|
||||
"templateUrl": "notification-launch.html"
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
{
|
||||
"key": "DialogLaunchController",
|
||||
"implementation": "DialogLaunchController.js",
|
||||
"depends": [
|
||||
"$scope",
|
||||
"$timeout",
|
||||
"$log",
|
||||
"dialogService",
|
||||
"notificationService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "NotificationLaunchController",
|
||||
"implementation": "NotificationLaunchController.js",
|
||||
"depends": [
|
||||
"$scope",
|
||||
"$timeout",
|
||||
"$log",
|
||||
"notificationService"
|
||||
]
|
||||
}
|
||||
],
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": "DialogLaunchIndicator.js",
|
||||
"priority": "fallback"
|
||||
},
|
||||
{
|
||||
"implementation": "NotificationLaunchIndicator.js",
|
||||
"priority": "fallback"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
10
example/notifications/res/dialog-launch.html
Normal file
@ -0,0 +1,10 @@
|
||||
<span class="status block ok" ng-controller="DialogLaunchController">
|
||||
<span class="ui-symbol status-indicator"></span>
|
||||
<span class="label">
|
||||
<a ng-click="launchProgress(true)">Known</a> |
|
||||
<a ng-click="launchProgress(false)">Unknown</a> |
|
||||
<a ng-click="launchError()">Error</a> |
|
||||
<a ng-click="launchInfo()">Info</a>
|
||||
</span>
|
||||
<span class="count">Dialogs</span>
|
||||
</span>
|
10
example/notifications/res/notification-launch.html
Normal file
@ -0,0 +1,10 @@
|
||||
<span class="status block ok" ng-controller="NotificationLaunchController">
|
||||
<span class="ui-symbol status-indicator"></span>
|
||||
<span class="label">
|
||||
<a ng-click="newInfo()">Success</a> |
|
||||
<a ng-click="newError()">Error</a> |
|
||||
<a ng-click="newAlert()">Alert</a> |
|
||||
<a ng-click="newProgress()">Progress</a>
|
||||
</span>
|
||||
<span class="count">Notifications</span>
|
||||
</span>
|
150
example/notifications/src/DialogLaunchController.js
Normal file
@ -0,0 +1,150 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* A controller for the dialog launch view. This view allows manual
|
||||
* launching of dialogs for demonstration and testing purposes. It
|
||||
* also demonstrates the use of the DialogService.
|
||||
* @param $scope
|
||||
* @param $timeout
|
||||
* @param $log
|
||||
* @param dialogService
|
||||
* @param notificationService
|
||||
* @constructor
|
||||
*/
|
||||
function DialogLaunchController($scope, $timeout, $log, dialogService, notificationService) {
|
||||
|
||||
/*
|
||||
Demonstrates launching a progress dialog and updating it
|
||||
periodically with the progress of an ongoing process.
|
||||
*/
|
||||
$scope.launchProgress = function (knownProgress) {
|
||||
var model = {
|
||||
title: "Progress Dialog Example",
|
||||
progress: 0,
|
||||
hint: "Do not navigate away from this page or close this browser tab while this operation is in progress.",
|
||||
actionText: "Calculating...",
|
||||
unknownProgress: !knownProgress,
|
||||
unknownDuration: false,
|
||||
severity: "info",
|
||||
options: [
|
||||
{
|
||||
label: "Cancel Operation",
|
||||
callback: function () {
|
||||
$log.debug("Operation cancelled");
|
||||
dialogService.dismiss();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Do something else...",
|
||||
callback: function () {
|
||||
$log.debug("Something else pressed");
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
function incrementProgress() {
|
||||
model.progress = Math.min(100, Math.floor(model.progress + Math.random() * 30));
|
||||
model.progressText = ["Estimated time remaining: about ", 60 - Math.floor((model.progress / 100) * 60), " seconds"].join(" ");
|
||||
if (model.progress < 100) {
|
||||
$timeout(incrementProgress, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
if (dialogService.showBlockingMessage(model)) {
|
||||
//Do processing here
|
||||
model.actionText = "Processing 100 objects...";
|
||||
if (knownProgress) {
|
||||
$timeout(incrementProgress, 1000);
|
||||
}
|
||||
} else {
|
||||
$log.error("Could not display modal dialog");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Demonstrates launching an error dialog
|
||||
*/
|
||||
$scope.launchError = function () {
|
||||
var model = {
|
||||
title: "Error Dialog Example",
|
||||
actionText: "Something happened, and it was not good.",
|
||||
severity: "error",
|
||||
options: [
|
||||
{
|
||||
label: "Try Again",
|
||||
callback: function () {
|
||||
$log.debug("Try Again Pressed");
|
||||
dialogService.dismiss();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Cancel",
|
||||
callback: function () {
|
||||
$log.debug("Cancel Pressed");
|
||||
dialogService.dismiss();
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
if (!dialogService.showBlockingMessage(model)) {
|
||||
$log.error("Could not display modal dialog");
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Demonstrates launching an error dialog
|
||||
*/
|
||||
$scope.launchInfo = function () {
|
||||
var model = {
|
||||
title: "Info Dialog Example",
|
||||
actionText: "This is an example of a blocking info" +
|
||||
" dialog. This dialog can be used to draw the user's" +
|
||||
" attention to an event.",
|
||||
severity: "info",
|
||||
primaryOption: {
|
||||
label: "OK",
|
||||
callback: function () {
|
||||
$log.debug("OK Pressed");
|
||||
dialogService.dismiss();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (!dialogService.showBlockingMessage(model)) {
|
||||
$log.error("Could not display modal dialog");
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
return DialogLaunchController;
|
||||
}
|
||||
);
|
56
example/notifications/src/DialogLaunchIndicator.js
Normal file
@ -0,0 +1,56 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define,window*/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* A tool for manually invoking dialogs. When included this
|
||||
* indicator will allow for dialogs of different types to be
|
||||
* launched for demonstration and testing purposes.
|
||||
* @constructor
|
||||
*/
|
||||
function DialogLaunchIndicator() {
|
||||
|
||||
}
|
||||
|
||||
DialogLaunchIndicator.template = 'dialogLaunchTemplate';
|
||||
|
||||
DialogLaunchIndicator.prototype.getGlyph = function () {
|
||||
return "i";
|
||||
};
|
||||
DialogLaunchIndicator.prototype.getGlyphClass = function () {
|
||||
return 'caution';
|
||||
};
|
||||
DialogLaunchIndicator.prototype.getText = function () {
|
||||
return "Launch test dialog";
|
||||
};
|
||||
DialogLaunchIndicator.prototype.getDescription = function () {
|
||||
return "Launch test dialog";
|
||||
};
|
||||
|
||||
return DialogLaunchIndicator;
|
||||
}
|
||||
);
|
172
example/notifications/src/NotificationLaunchController.js
Normal file
@ -0,0 +1,172 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Allows launching of notification messages for the purposes of
|
||||
* demonstration and testing. Also demonstrates use of
|
||||
* the NotificationService. Notifications are non-blocking messages that
|
||||
* appear at the bottom of the screen to inform the user of events
|
||||
* in a non-intrusive way. For more information see the
|
||||
* {@link NotificationService}
|
||||
* @param $scope
|
||||
* @param $timeout
|
||||
* @param $log
|
||||
* @param notificationService
|
||||
* @constructor
|
||||
*/
|
||||
function NotificationLaunchController($scope, $timeout, $log, notificationService) {
|
||||
var messageCounter = 1;
|
||||
|
||||
function getExampleActionText() {
|
||||
var actionTexts = [
|
||||
"Adipiscing turpis mauris in enim elementu hac, enim aliquam etiam.",
|
||||
"Eros turpis, pulvinar turpis eros eu",
|
||||
"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)];
|
||||
}
|
||||
|
||||
function getExampleActions() {
|
||||
var actions = [
|
||||
{
|
||||
label: "Try Again",
|
||||
callback: function () {
|
||||
$log.debug("Try Again pressed");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Remove",
|
||||
callback: function () {
|
||||
$log.debug("Remove pressed");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Cancel",
|
||||
callback: function () {
|
||||
$log.debug("Cancel pressed");
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
// Randomly remove some actions off the top; leave at least one
|
||||
actions.splice(0,Math.floor(Math.random() * actions.length));
|
||||
|
||||
return actions;
|
||||
}
|
||||
|
||||
function getExampleSeverity() {
|
||||
var severities = [
|
||||
"info",
|
||||
"alert",
|
||||
"error"
|
||||
];
|
||||
return severities[Math.floor(Math.random() * severities.length)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch a new notification with a severity level of 'Error'.
|
||||
*/
|
||||
$scope.newError = function(){
|
||||
|
||||
notificationService.notify({
|
||||
title: "Example error notification " + messageCounter++,
|
||||
hint: "An error has occurred",
|
||||
severity: "error",
|
||||
primaryOption: {
|
||||
label: 'Retry',
|
||||
callback: function() {
|
||||
$log.info('Retry clicked');
|
||||
}
|
||||
},
|
||||
options: getExampleActions()});
|
||||
};
|
||||
/**
|
||||
* Launch a new notification with a severity of 'Alert'.
|
||||
*/
|
||||
$scope.newAlert = function(){
|
||||
|
||||
notificationService.notify({
|
||||
title: "Alert notification " + (messageCounter++),
|
||||
hint: "This is an alert message",
|
||||
severity: "alert",
|
||||
primaryOption: {
|
||||
label: 'Retry',
|
||||
callback: function() {
|
||||
$log.info('Retry clicked');
|
||||
}
|
||||
},
|
||||
options: getExampleActions()});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Launch a new notification with a progress bar that is updated
|
||||
* periodically, tracking an ongoing process.
|
||||
*/
|
||||
$scope.newProgress = function(){
|
||||
|
||||
var notificationModel = {
|
||||
title: "Progress notification example",
|
||||
severity: "info",
|
||||
progress: 0,
|
||||
actionText: getExampleActionText(),
|
||||
unknownProgress: false
|
||||
};
|
||||
|
||||
/**
|
||||
* Simulate an ongoing process and update the progress bar.
|
||||
* @param notification
|
||||
*/
|
||||
function incrementProgress(notificationModel) {
|
||||
notificationModel.progress = Math.min(100, Math.floor(notificationModel.progress + Math.random() * 30));
|
||||
notificationModel.progressText = ["Estimated time" +
|
||||
" remaining:" +
|
||||
" about ", 60 - Math.floor((notificationModel.progress / 100) * 60), " seconds"].join(" ");
|
||||
if (notificationModel.progress < 100) {
|
||||
$timeout(function(){incrementProgress(notificationModel);}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
notificationService.notify(notificationModel);
|
||||
incrementProgress(notificationModel);
|
||||
};
|
||||
|
||||
/**
|
||||
* Launch a new notification with severity level of INFO.
|
||||
*/
|
||||
$scope.newInfo = function(){
|
||||
|
||||
notificationService.info({
|
||||
title: "Example Info notification " + messageCounter++
|
||||
});
|
||||
};
|
||||
|
||||
}
|
||||
return NotificationLaunchController;
|
||||
}
|
||||
);
|
50
example/notifications/src/NotificationLaunchIndicator.js
Normal file
@ -0,0 +1,50 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define,window*/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
function NotificationLaunchIndicator() {
|
||||
|
||||
}
|
||||
|
||||
NotificationLaunchIndicator.template = 'notificationLaunchTemplate';
|
||||
|
||||
NotificationLaunchIndicator.prototype.getGlyph = function () {
|
||||
return "i";
|
||||
};
|
||||
NotificationLaunchIndicator.prototype.getGlyphClass = function () {
|
||||
return 'caution';
|
||||
};
|
||||
NotificationLaunchIndicator.prototype.getText = function () {
|
||||
return "Launch notification";
|
||||
};
|
||||
NotificationLaunchIndicator.prototype.getDescription = function () {
|
||||
return "Launch notification";
|
||||
};
|
||||
|
||||
return NotificationLaunchIndicator;
|
||||
}
|
||||
);
|
44
example/persistence/bundle.js
Normal file
@ -0,0 +1,44 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/persistence", {
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "provider",
|
||||
"implementation": "BrowserPersistenceProvider.js",
|
||||
"depends": [ "$q", "PERSISTENCE_SPACE" ]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_SPACE",
|
||||
"value": "mct"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "provider",
|
||||
"implementation": "BrowserPersistenceProvider.js",
|
||||
"depends": [ "$q", "PERSISTENCE_SPACE" ]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_SPACE",
|
||||
"value": "mct"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
38
example/policy/bundle.js
Normal file
@ -0,0 +1,38 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/policy", {
|
||||
"name": "Example Policy",
|
||||
"description": "Provides an example of using policies to prohibit actions.",
|
||||
"extensions": {
|
||||
"policies": [
|
||||
{
|
||||
"implementation": "ExamplePolicy.js",
|
||||
"category": "action"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Example Policy",
|
||||
"description": "Provides an example of using policies to prohibit actions.",
|
||||
"extensions": {
|
||||
"policies": [
|
||||
{
|
||||
"implementation": "ExamplePolicy.js",
|
||||
"category": "action"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
40
example/profiling/bundle.js
Normal file
@ -0,0 +1,40 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/profiling", {
|
||||
"extensions": {
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": "WatchIndicator.js",
|
||||
"depends": ["$interval", "$rootScope"]
|
||||
},
|
||||
{
|
||||
"implementation": "DigestIndicator.js",
|
||||
"depends": ["$interval", "$rootScope"]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"extensions": {
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": "WatchIndicator.js",
|
||||
"depends": ["$interval", "$rootScope"]
|
||||
},
|
||||
{
|
||||
"implementation": "DigestIndicator.js",
|
||||
"depends": ["$interval", "$rootScope"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -39,8 +39,11 @@ define(
|
||||
start = Date.now();
|
||||
|
||||
function update() {
|
||||
var secs = (Date.now() - start) / 1000;
|
||||
var now = Date.now(),
|
||||
secs = (now - start) / 1000;
|
||||
displayed = Math.round(digests / secs);
|
||||
start = now;
|
||||
digests = 0;
|
||||
}
|
||||
|
||||
function increment() {
|
||||
|
2
example/scratchpad/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
Example of using multiple persistence stores by exposing a root
|
||||
object with a different space prefix.
|
49
example/scratchpad/bundle.js
Normal file
@ -0,0 +1,49 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/scratchpad", {
|
||||
"extensions": {
|
||||
"roots": [
|
||||
{
|
||||
"id": "scratch:root",
|
||||
"model": {
|
||||
"type": "folder",
|
||||
"composition": [],
|
||||
"name": "Scratchpad"
|
||||
},
|
||||
"priority": "preferred"
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "provider",
|
||||
"implementation": "ScratchPersistenceProvider.js",
|
||||
"depends": [ "$q" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
79
example/scratchpad/src/ScratchPersistenceProvider.js
Normal file
@ -0,0 +1,79 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,window*/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The ScratchPersistenceProvider keeps JSON documents in memory
|
||||
* and provides a persistence interface, but changes are lost on reload.
|
||||
* @memberof example/scratchpad
|
||||
* @constructor
|
||||
* @implements {PersistenceService}
|
||||
* @param q Angular's $q, for promises
|
||||
*/
|
||||
function ScratchPersistenceProvider($q) {
|
||||
this.$q = $q;
|
||||
this.table = {};
|
||||
}
|
||||
|
||||
ScratchPersistenceProvider.prototype.listSpaces = function () {
|
||||
return this.$q.when(['scratch']);
|
||||
};
|
||||
|
||||
ScratchPersistenceProvider.prototype.listObjects = function (space) {
|
||||
return this.$q.when(
|
||||
space === 'scratch' ? Object.keys(this.table) : []
|
||||
);
|
||||
};
|
||||
|
||||
ScratchPersistenceProvider.prototype.createObject = function (space, key, value) {
|
||||
if (space === 'scratch') {
|
||||
this.table[key] = JSON.stringify(value);
|
||||
}
|
||||
return this.$q.when(space === 'scratch');
|
||||
};
|
||||
|
||||
ScratchPersistenceProvider.prototype.readObject = function (space, key) {
|
||||
return this.$q.when(
|
||||
(space === 'scratch' && this.table[key]) ?
|
||||
JSON.parse(this.table[key]) : undefined
|
||||
);
|
||||
};
|
||||
|
||||
ScratchPersistenceProvider.prototype.deleteObject = function (space, key, value) {
|
||||
if (space === 'scratch') {
|
||||
delete this.table[key];
|
||||
}
|
||||
return this.$q.when(space === 'scratch');
|
||||
};
|
||||
|
||||
ScratchPersistenceProvider.prototype.updateObject =
|
||||
ScratchPersistenceProvider.prototype.createObject;
|
||||
|
||||
return ScratchPersistenceProvider;
|
||||
}
|
||||
);
|
54
example/taxonomy/bundle.js
Normal file
@ -0,0 +1,54 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/taxonomy", {
|
||||
"name": "Example taxonomy",
|
||||
"description": "Example illustrating the addition of a static top-level hierarchy",
|
||||
"extensions": {
|
||||
"roots": [
|
||||
{
|
||||
"id": "exampleTaxonomy",
|
||||
"model": {
|
||||
"type": "folder",
|
||||
"name": "Stub Subsystems",
|
||||
"composition": [
|
||||
"examplePacket0",
|
||||
"examplePacket1",
|
||||
"examplePacket2"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "provider",
|
||||
"implementation": "ExampleTaxonomyModelProvider.js",
|
||||
"depends": [ "$q" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,29 +0,0 @@
|
||||
{
|
||||
"name": "Example taxonomy",
|
||||
"description": "Example illustrating the addition of a static top-level hierarchy",
|
||||
"extensions": {
|
||||
"roots": [
|
||||
{
|
||||
"id": "exampleTaxonomy",
|
||||
"model": {
|
||||
"type": "folder",
|
||||
"name": "Stub Subsystems",
|
||||
"composition": [
|
||||
"examplePacket0",
|
||||
"examplePacket1",
|
||||
"examplePacket2"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "provider",
|
||||
"implementation": "ExampleTaxonomyModelProvider.js",
|
||||
"depends": [ "$q" ]
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
}
|
42
example/worker/bundle.js
Normal file
@ -0,0 +1,42 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("example/worker", {
|
||||
"extensions": {
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": "FibonacciIndicator.js",
|
||||
"depends": [ "workerService", "$rootScope" ]
|
||||
}
|
||||
],
|
||||
"workers": [
|
||||
{
|
||||
"key": "example.fibonacci",
|
||||
"scriptUrl": "FibonacciWorker.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"extensions": {
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": "FibonacciIndicator.js",
|
||||
"depends": [ "workerService", "$rootScope" ]
|
||||
}
|
||||
],
|
||||
"workers": [
|
||||
{
|
||||
"key": "example.fibonacci",
|
||||
"scriptUrl": "FibonacciWorker.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -27,7 +27,7 @@
|
||||
<title></title>
|
||||
<script type="text/javascript"
|
||||
src="platform/framework/lib/require.js"
|
||||
data-main="platform/framework/src/Main.js">
|
||||
data-main="main.js">
|
||||
</script>
|
||||
<link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-96x96.png" sizes="96x96">
|
||||
|
@ -34,7 +34,6 @@ module.exports = function(config) {
|
||||
// List of files / patterns to load in the browser.
|
||||
// By default, files are also included in a script tag.
|
||||
files: [
|
||||
'**/moment*',
|
||||
{pattern: 'example/**/*.js', included: false},
|
||||
{pattern: 'platform/**/*.js', included: false},
|
||||
{pattern: 'warp/**/*.js', included: false},
|
||||
|
84
main.js
Normal file
@ -0,0 +1,84 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define, window, requirejs*/
|
||||
|
||||
requirejs.config({
|
||||
"paths": {
|
||||
"legacyRegistry": "./src/legacyRegistry",
|
||||
"angular": "./platform/framework/lib/angular.min",
|
||||
"angular-route": "./platform/framework/lib/angular-route.min"
|
||||
},
|
||||
"shim": {
|
||||
"angular": {
|
||||
"exports": "angular"
|
||||
},
|
||||
"angular-route": {
|
||||
"deps": [ "angular" ]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
define([
|
||||
'./platform/framework/src/Main',
|
||||
'legacyRegistry',
|
||||
|
||||
'./platform/framework/bundle',
|
||||
'./platform/core/bundle',
|
||||
'./platform/representation/bundle',
|
||||
'./platform/commonUI/about/bundle',
|
||||
'./platform/commonUI/browse/bundle',
|
||||
'./platform/commonUI/edit/bundle',
|
||||
'./platform/commonUI/dialog/bundle',
|
||||
'./platform/commonUI/formats/bundle',
|
||||
'./platform/commonUI/general/bundle',
|
||||
'./platform/commonUI/inspect/bundle',
|
||||
'./platform/commonUI/mobile/bundle',
|
||||
'./platform/commonUI/themes/espresso/bundle',
|
||||
'./platform/commonUI/notification/bundle',
|
||||
'./platform/containment/bundle',
|
||||
'./platform/execution/bundle',
|
||||
'./platform/telemetry/bundle',
|
||||
'./platform/features/clock/bundle',
|
||||
'./platform/features/events/bundle',
|
||||
'./platform/features/imagery/bundle',
|
||||
'./platform/features/layout/bundle',
|
||||
'./platform/features/pages/bundle',
|
||||
'./platform/features/plot/bundle',
|
||||
'./platform/features/scrolling/bundle',
|
||||
'./platform/features/timeline/bundle',
|
||||
'./platform/forms/bundle',
|
||||
'./platform/identity/bundle',
|
||||
'./platform/persistence/aggregator/bundle',
|
||||
'./platform/persistence/local/bundle',
|
||||
'./platform/persistence/queue/bundle',
|
||||
'./platform/policy/bundle',
|
||||
'./platform/entanglement/bundle',
|
||||
'./platform/search/bundle',
|
||||
'./platform/status/bundle',
|
||||
|
||||
'./example/imagery/bundle',
|
||||
'./example/eventGenerator/bundle',
|
||||
'./example/generator/bundle'
|
||||
], function (Main, legacyRegistry) {
|
||||
'use strict';
|
||||
new Main().run(legacyRegistry);
|
||||
});
|
@ -22,7 +22,8 @@
|
||||
"split": "^1.0.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"nomnoml": "^0.0.3",
|
||||
"canvas": "^1.2.7"
|
||||
"canvas": "^1.2.7",
|
||||
"markdown-toc": "^0.11.7"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node app.js",
|
||||
@ -30,7 +31,7 @@
|
||||
"jshint": "jshint platform example || exit 0",
|
||||
"watch": "karma start",
|
||||
"jsdoc": "jsdoc -c jsdoc.json -r -d target/docs/api",
|
||||
"otherdoc": "node docs/gendocs.js --in docs/src --out target/docs",
|
||||
"otherdoc": "node docs/gendocs.js --in docs/src --out target/docs --suppress-toc 'docs/src/index.md|docs/src/process/index.md'",
|
||||
"docs": "npm run jsdoc ; npm run otherdoc"
|
||||
},
|
||||
"repository": {
|
||||
|
148
platform/commonUI/about/bundle.js
Normal file
@ -0,0 +1,148 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("platform/commonUI/about", {
|
||||
"name": "About Open MCT Web",
|
||||
"extensions": {
|
||||
"templates": [
|
||||
{
|
||||
"key": "app-logo",
|
||||
"priority": "optional",
|
||||
"templateUrl": "templates/app-logo.html"
|
||||
},
|
||||
{
|
||||
"key": "about-logo",
|
||||
"priority": "preferred",
|
||||
"templateUrl": "templates/about-logo.html"
|
||||
},
|
||||
{
|
||||
"key": "about-dialog",
|
||||
"templateUrl": "templates/about-dialog.html"
|
||||
},
|
||||
{
|
||||
"key": "overlay-about",
|
||||
"templateUrl": "templates/overlay-about.html"
|
||||
},
|
||||
{
|
||||
"key": "license-apache",
|
||||
"templateUrl": "templates/license-apache.html"
|
||||
},
|
||||
{
|
||||
"key": "license-mit",
|
||||
"templateUrl": "templates/license-mit.html"
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
{
|
||||
"key": "LogoController",
|
||||
"depends": [ "overlayService" ],
|
||||
"implementation": "LogoController.js"
|
||||
},
|
||||
{
|
||||
"key": "AboutController",
|
||||
"depends": [ "versions[]", "$window" ],
|
||||
"implementation": "AboutController.js"
|
||||
},
|
||||
{
|
||||
"key": "LicenseController",
|
||||
"depends": [ "licenses[]" ],
|
||||
"implementation": "LicenseController.js"
|
||||
}
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"name": "Json.NET",
|
||||
"version": "6.0.8",
|
||||
"author": "Newtonsoft",
|
||||
"description": "JSON serialization/deserialization",
|
||||
"website": "http://www.newtonsoft.com/json",
|
||||
"copyright": "Copyright (c) 2007 James Newton-King",
|
||||
"license": "license-mit",
|
||||
"link": "https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md"
|
||||
},
|
||||
{
|
||||
"name": "Nancy",
|
||||
"version": "0.23.2",
|
||||
"author": "Andreas Håkansson, Steven Robbins and contributors",
|
||||
"description": "Embedded web server",
|
||||
"website": "http://nancyfx.org/",
|
||||
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
|
||||
"license": "license-mit",
|
||||
"link": "http://www.opensource.org/licenses/mit-license.php"
|
||||
},
|
||||
{
|
||||
"name": "Nancy.Hosting.Self",
|
||||
"version": "0.23.2",
|
||||
"author": "Andreas Håkansson, Steven Robbins and contributors",
|
||||
"description": "Embedded web server",
|
||||
"website": "http://nancyfx.org/",
|
||||
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
|
||||
"license": "license-mit",
|
||||
"link": "http://www.opensource.org/licenses/mit-license.php"
|
||||
},
|
||||
{
|
||||
"name": "SuperSocket",
|
||||
"version": "0.9.0.2",
|
||||
"author": " Kerry Jiang",
|
||||
"description": "Supports SuperWebSocket",
|
||||
"website": "https://supersocket.codeplex.com/",
|
||||
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
|
||||
"license": "license-apache",
|
||||
"link": "https://supersocket.codeplex.com/license"
|
||||
},
|
||||
{
|
||||
"name": "SuperWebSocket",
|
||||
"version": "0.9.0.2",
|
||||
"author": " Kerry Jiang",
|
||||
"description": "WebSocket implementation for client-server communication",
|
||||
"website": "https://superwebsocket.codeplex.com/",
|
||||
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
|
||||
"license": "license-apache",
|
||||
"link": "https://superwebsocket.codeplex.com/license"
|
||||
},
|
||||
{
|
||||
"name": "log4net",
|
||||
"version": "2.0.3",
|
||||
"author": "Apache Software Foundation",
|
||||
"description": "Logging",
|
||||
"website": "http://logging.apache.org/log4net/",
|
||||
"copyright": "Copyright © 2004-2015 Apache Software Foundation.",
|
||||
"license": "license-apache",
|
||||
"link": "http://logging.apache.org/log4net/license.html"
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"when": "/licenses",
|
||||
"templateUrl": "templates/licenses.html"
|
||||
},
|
||||
{
|
||||
"when": "/licenses-md",
|
||||
"templateUrl": "templates/licenses-export-md.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
@ -1,122 +0,0 @@
|
||||
{
|
||||
"name": "About Open MCT Web",
|
||||
"extensions": {
|
||||
"templates": [
|
||||
{
|
||||
"key": "app-logo",
|
||||
"priority": "optional",
|
||||
"templateUrl": "templates/app-logo.html"
|
||||
},
|
||||
{
|
||||
"key": "about-logo",
|
||||
"priority": "preferred",
|
||||
"templateUrl": "templates/about-logo.html"
|
||||
},
|
||||
{
|
||||
"key": "about-dialog",
|
||||
"templateUrl": "templates/about-dialog.html"
|
||||
},
|
||||
{
|
||||
"key": "overlay-about",
|
||||
"templateUrl": "templates/overlay-about.html"
|
||||
},
|
||||
{
|
||||
"key": "license-apache",
|
||||
"templateUrl": "templates/license-apache.html"
|
||||
},
|
||||
{
|
||||
"key": "license-mit",
|
||||
"templateUrl": "templates/license-mit.html"
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
{
|
||||
"key": "LogoController",
|
||||
"depends": [ "overlayService" ],
|
||||
"implementation": "LogoController.js"
|
||||
},
|
||||
{
|
||||
"key": "AboutController",
|
||||
"depends": [ "versions[]", "$window" ],
|
||||
"implementation": "AboutController.js"
|
||||
},
|
||||
{
|
||||
"key": "LicenseController",
|
||||
"depends": [ "licenses[]" ],
|
||||
"implementation": "LicenseController.js"
|
||||
}
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"name": "Json.NET",
|
||||
"version": "6.0.8",
|
||||
"author": "Newtonsoft",
|
||||
"description": "JSON serialization/deserialization",
|
||||
"website": "http://www.newtonsoft.com/json",
|
||||
"copyright": "Copyright (c) 2007 James Newton-King",
|
||||
"license": "license-mit",
|
||||
"link": "https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md"
|
||||
},
|
||||
{
|
||||
"name": "Nancy",
|
||||
"version": "0.23.2",
|
||||
"author": "Andreas Håkansson, Steven Robbins and contributors",
|
||||
"description": "Embedded web server",
|
||||
"website": "http://nancyfx.org/",
|
||||
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
|
||||
"license": "license-mit",
|
||||
"link": "http://www.opensource.org/licenses/mit-license.php"
|
||||
},
|
||||
{
|
||||
"name": "Nancy.Hosting.Self",
|
||||
"version": "0.23.2",
|
||||
"author": "Andreas Håkansson, Steven Robbins and contributors",
|
||||
"description": "Embedded web server",
|
||||
"website": "http://nancyfx.org/",
|
||||
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
|
||||
"license": "license-mit",
|
||||
"link": "http://www.opensource.org/licenses/mit-license.php"
|
||||
},
|
||||
{
|
||||
"name": "SuperSocket",
|
||||
"version": "0.9.0.2",
|
||||
"author": " Kerry Jiang",
|
||||
"description": "Supports SuperWebSocket",
|
||||
"website": "https://supersocket.codeplex.com/",
|
||||
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
|
||||
"license": "license-apache",
|
||||
"link": "https://supersocket.codeplex.com/license"
|
||||
},
|
||||
{
|
||||
"name": "SuperWebSocket",
|
||||
"version": "0.9.0.2",
|
||||
"author": " Kerry Jiang",
|
||||
"description": "WebSocket implementation for client-server communication",
|
||||
"website": "https://superwebsocket.codeplex.com/",
|
||||
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
|
||||
"license": "license-apache",
|
||||
"link": "https://superwebsocket.codeplex.com/license"
|
||||
},
|
||||
{
|
||||
"name": "log4net",
|
||||
"version": "2.0.3",
|
||||
"author": "Apache Software Foundation",
|
||||
"description": "Logging",
|
||||
"website": "http://logging.apache.org/log4net/",
|
||||
"copyright": "Copyright © 2004-2015 Apache Software Foundation.",
|
||||
"license": "license-apache",
|
||||
"link": "http://logging.apache.org/log4net/license.html"
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"when": "/licenses",
|
||||
"templateUrl": "templates/licenses.html"
|
||||
},
|
||||
{
|
||||
"when": "/licenses-md",
|
||||
"templateUrl": "templates/licenses-export-md.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
211
platform/commonUI/browse/bundle.js
Normal file
@ -0,0 +1,211 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(['legacyRegistry'], function (legacyRegistry) {
|
||||
"use strict";
|
||||
legacyRegistry.register("platform/commonUI/browse", {
|
||||
"extensions": {
|
||||
"routes": [
|
||||
{
|
||||
"when": "/browse/:ids*",
|
||||
"templateUrl": "templates/browse.html",
|
||||
"reloadOnSearch": false
|
||||
},
|
||||
{
|
||||
"when": "",
|
||||
"templateUrl": "templates/browse.html",
|
||||
"reloadOnSearch": false
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
{
|
||||
"key": "BrowseController",
|
||||
"implementation": "BrowseController.js",
|
||||
"depends": [
|
||||
"$scope",
|
||||
"$route",
|
||||
"$location",
|
||||
"objectService",
|
||||
"navigationService",
|
||||
"urlService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "PaneController",
|
||||
"implementation": "PaneController.js",
|
||||
"priority": "preferred",
|
||||
"depends": [ "$scope", "agentService","$window" ]
|
||||
},
|
||||
{
|
||||
"key": "BrowseObjectController",
|
||||
"implementation": "BrowseObjectController.js",
|
||||
"depends": [ "$scope", "$location", "$route" ]
|
||||
},
|
||||
{
|
||||
"key": "CreateMenuController",
|
||||
"implementation": "creation/CreateMenuController.js",
|
||||
"depends": [ "$scope" ]
|
||||
},
|
||||
{
|
||||
"key": "LocatorController",
|
||||
"implementation": "creation/LocatorController.js",
|
||||
"depends": [ "$scope", "$timeout" ]
|
||||
},
|
||||
{
|
||||
"key": "MenuArrowController",
|
||||
"implementation": "MenuArrowController.js",
|
||||
"depends": [ "$scope" ]
|
||||
}
|
||||
],
|
||||
"controls": [
|
||||
{
|
||||
"key": "locator",
|
||||
"templateUrl": "templates/create/locator.html"
|
||||
}
|
||||
],
|
||||
"representations": [
|
||||
{
|
||||
"key": "browse-object",
|
||||
"templateUrl": "templates/browse-object.html",
|
||||
"uses": [ "view" ]
|
||||
},
|
||||
{
|
||||
"key": "create-button",
|
||||
"templateUrl": "templates/create/create-button.html"
|
||||
},
|
||||
{
|
||||
"key": "create-menu",
|
||||
"templateUrl": "templates/create/create-menu.html",
|
||||
"uses": [ "action" ]
|
||||
},
|
||||
{
|
||||
"key": "grid-item",
|
||||
"templateUrl": "templates/items/grid-item.html",
|
||||
"uses": [ "type", "action", "location" ],
|
||||
"gestures": [ "info", "menu" ]
|
||||
},
|
||||
{
|
||||
"key": "object-header",
|
||||
"templateUrl": "templates/browse/object-header.html",
|
||||
"uses": [ "type" ]
|
||||
},
|
||||
{
|
||||
"key": "menu-arrow",
|
||||
"templateUrl": "templates/menu-arrow.html",
|
||||
"uses": [ "action" ],
|
||||
"gestures": [ "menu" ]
|
||||
},
|
||||
{
|
||||
"key": "back-arrow",
|
||||
"uses": [ "context" ],
|
||||
"templateUrl": "templates/back-arrow.html"
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key": "navigationService",
|
||||
"implementation": "navigation/NavigationService.js"
|
||||
}
|
||||
],
|
||||
"policies": [
|
||||
{
|
||||
"implementation": "creation/CreationPolicy.js",
|
||||
"category": "creation"
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"key": "navigate",
|
||||
"implementation": "navigation/NavigateAction.js",
|
||||
"depends": [ "navigationService", "$q" ]
|
||||
},
|
||||
{
|
||||
"key": "window",
|
||||
"name": "Open In New Tab",
|
||||
"implementation": "windowing/NewTabAction.js",
|
||||
"description": "Open in a new browser tab",
|
||||
"category": ["view-control", "contextual"],
|
||||
"depends": [ "urlService", "$window" ],
|
||||
"group": "windowing",
|
||||
"glyph": "y",
|
||||
"priority": "preferred"
|
||||
},
|
||||
{
|
||||
"key": "fullscreen",
|
||||
"implementation": "windowing/FullscreenAction.js",
|
||||
"category": "view-control",
|
||||
"group": "windowing",
|
||||
"glyph": "z",
|
||||
"priority": "default"
|
||||
}
|
||||
],
|
||||
"views": [
|
||||
{
|
||||
"key": "items",
|
||||
"name": "Items",
|
||||
"glyph": "9",
|
||||
"description": "Grid of available items",
|
||||
"templateUrl": "templates/items/items.html",
|
||||
"uses": [ "composition" ],
|
||||
"gestures": [ "drop" ],
|
||||
"type": "folder",
|
||||
"editable": false
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
{
|
||||
"key": "CreateActionProvider",
|
||||
"provides": "actionService",
|
||||
"type": "provider",
|
||||
"implementation": "creation/CreateActionProvider.js",
|
||||
"depends": [ "typeService", "dialogService", "creationService", "policyService" ]
|
||||
},
|
||||
{
|
||||
"key": "CreationService",
|
||||
"provides": "creationService",
|
||||
"type": "provider",
|
||||
"implementation": "creation/CreationService.js",
|
||||
"depends": [ "$q", "$log" ]
|
||||
}
|
||||
],
|
||||
"runs": [
|
||||
{
|
||||
"implementation": "windowing/WindowTitler.js",
|
||||
"depends": [ "navigationService", "$rootScope", "$document" ]
|
||||
}
|
||||
],
|
||||
"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,189 +0,0 @@
|
||||
{
|
||||
"extensions": {
|
||||
"routes": [
|
||||
{
|
||||
"when": "/browse/:ids*",
|
||||
"templateUrl": "templates/browse.html",
|
||||
"reloadOnSearch": false
|
||||
},
|
||||
{
|
||||
"when": "",
|
||||
"templateUrl": "templates/browse.html",
|
||||
"reloadOnSearch": false
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
{
|
||||
"key": "BrowseController",
|
||||
"implementation": "BrowseController.js",
|
||||
"depends": [
|
||||
"$scope",
|
||||
"$route",
|
||||
"$location",
|
||||
"objectService",
|
||||
"navigationService",
|
||||
"urlService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "BrowseTreeController",
|
||||
"implementation": "BrowseTreeController.js",
|
||||
"priority": "preferred",
|
||||
"depends": [ "$scope", "agentService" ]
|
||||
},
|
||||
{
|
||||
"key": "BrowseObjectController",
|
||||
"implementation": "BrowseObjectController.js",
|
||||
"depends": [ "$scope", "$location", "$route" ]
|
||||
},
|
||||
{
|
||||
"key": "CreateMenuController",
|
||||
"implementation": "creation/CreateMenuController.js",
|
||||
"depends": [ "$scope" ]
|
||||
},
|
||||
{
|
||||
"key": "LocatorController",
|
||||
"implementation": "creation/LocatorController.js",
|
||||
"depends": [ "$scope", "$timeout" ]
|
||||
},
|
||||
{
|
||||
"key": "MenuArrowController",
|
||||
"implementation": "MenuArrowController.js",
|
||||
"depends": [ "$scope" ]
|
||||
}
|
||||
],
|
||||
"controls": [
|
||||
{
|
||||
"key": "locator",
|
||||
"templateUrl": "templates/create/locator.html"
|
||||
}
|
||||
],
|
||||
"representations": [
|
||||
{
|
||||
"key": "browse-object",
|
||||
"templateUrl": "templates/browse-object.html",
|
||||
"uses": [ "view" ]
|
||||
},
|
||||
{
|
||||
"key": "create-button",
|
||||
"templateUrl": "templates/create/create-button.html"
|
||||
},
|
||||
{
|
||||
"key": "create-menu",
|
||||
"templateUrl": "templates/create/create-menu.html",
|
||||
"uses": [ "action" ]
|
||||
},
|
||||
{
|
||||
"key": "grid-item",
|
||||
"templateUrl": "templates/items/grid-item.html",
|
||||
"uses": [ "type", "action", "location" ],
|
||||
"gestures": [ "info", "menu" ]
|
||||
},
|
||||
{
|
||||
"key": "object-header",
|
||||
"templateUrl": "templates/browse/object-header.html",
|
||||
"uses": [ "type" ]
|
||||
},
|
||||
{
|
||||
"key": "menu-arrow",
|
||||
"templateUrl": "templates/menu-arrow.html",
|
||||
"uses": [ "action" ],
|
||||
"gestures": [ "menu" ]
|
||||
},
|
||||
{
|
||||
"key": "back-arrow",
|
||||
"uses": [ "context" ],
|
||||
"templateUrl": "templates/back-arrow.html"
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key": "navigationService",
|
||||
"implementation": "navigation/NavigationService.js"
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"key": "navigate",
|
||||
"implementation": "navigation/NavigateAction.js",
|
||||
"depends": [ "navigationService", "$q" ]
|
||||
},
|
||||
{
|
||||
"key": "window",
|
||||
"name": "Open In New Tab",
|
||||
"implementation": "windowing/NewTabAction.js",
|
||||
"description": "Open in a new browser tab",
|
||||
"category": ["view-control", "contextual"],
|
||||
"depends": [ "urlService", "$window" ],
|
||||
"group": "windowing",
|
||||
"glyph": "y",
|
||||
"priority": "preferred"
|
||||
},
|
||||
{
|
||||
"key": "fullscreen",
|
||||
"implementation": "windowing/FullscreenAction.js",
|
||||
"category": "view-control",
|
||||
"group": "windowing",
|
||||
"glyph": "z",
|
||||
"priority": "default"
|
||||
}
|
||||
],
|
||||
"views": [
|
||||
{
|
||||
"key": "items",
|
||||
"name": "Items",
|
||||
"glyph": "9",
|
||||
"description": "Grid of available items",
|
||||
"templateUrl": "templates/items/items.html",
|
||||
"uses": [ "composition" ],
|
||||
"gestures": [ "drop" ],
|
||||
"type": "folder",
|
||||
"editable": false
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
{
|
||||
"key": "CreateActionProvider",
|
||||
"provides": "actionService",
|
||||
"type": "provider",
|
||||
"implementation": "creation/CreateActionProvider.js",
|
||||
"depends": [ "typeService", "dialogService", "creationService", "policyService" ]
|
||||
},
|
||||
{
|
||||
"key": "CreationService",
|
||||
"provides": "creationService",
|
||||
"type": "provider",
|
||||
"implementation": "creation/CreationService.js",
|
||||
"depends": [ "persistenceService", "now", "$q", "$log" ]
|
||||
}
|
||||
],
|
||||
"runs": [
|
||||
{
|
||||
"implementation": "windowing/WindowTitler.js",
|
||||
"depends": [ "navigationService", "$rootScope", "$document" ]
|
||||
}
|
||||
],
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"name": "Math.uuid.js",
|
||||
"version": "1.4",
|
||||
"description": "Unique identifer generation (code adapted.)",
|
||||
"author": "Robert Kieffer",
|
||||
"website": "https://github.com/broofa/node-uuid",
|
||||
"copyright": "Copyright (c) 2010 Robert Kieffer",
|
||||
"license": "license-mit",
|
||||
"link": "http://opensource.org/licenses/MIT"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -20,15 +20,17 @@
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
<span ng-controller="BrowseObjectController">
|
||||
<div class="object-browse-bar bar l-flex">
|
||||
<div class="items-select left">
|
||||
<div class="object-browse-bar l-flex-row">
|
||||
<div class="items-select left flex-elem l-flex-row grows">
|
||||
<mct-representation key="'back-arrow'"
|
||||
mct-object="domainObject"
|
||||
class="l-back"></mct-representation>
|
||||
<mct-representation key="'object-header'" mct-object="domainObject">
|
||||
class="flex-elem l-back"></mct-representation>
|
||||
<mct-representation key="'object-header'"
|
||||
mct-object="domainObject"
|
||||
class="l-flex-row flex-elem grows object-header">
|
||||
</mct-representation>
|
||||
</div>
|
||||
<div class="btn-bar right">
|
||||
<div class="btn-bar right l-flex-row flex-elem flex-justify-end flex-fixed">
|
||||
<mct-representation key="'switcher'"
|
||||
mct-object="domainObject"
|
||||
ng-model="representation">
|
||||
@ -41,7 +43,6 @@
|
||||
</mct-representation>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mct-representation key="representation.selected.key"
|
||||
mct-object="representation.selected.key && domainObject"
|
||||
class="abs object-holder">
|
||||
|
@ -22,45 +22,66 @@
|
||||
|
||||
<div class="abs holder-all browse-mode" ng-controller="BrowseController">
|
||||
<mct-include key="'topbar-browse'"></mct-include>
|
||||
<div class="holder browse-area s-browse-area abs browse-wrapper"
|
||||
ng-controller="BrowseTreeController as tree"
|
||||
ng-class="tree.visible() ? 'browse-showtree' : 'browse-hidetree'">
|
||||
<mct-split-pane class='contents abs' anchor='left'>
|
||||
<div class="abs holder holder-main browse-area s-browse-area browse-wrapper"
|
||||
ng-controller="PaneController as modelPaneTree"
|
||||
ng-class="modelPaneTree.visible() ? 'pane-tree-showing' : 'pane-tree-hidden'">
|
||||
<mct-split-pane class='abs contents'
|
||||
anchor='left'>
|
||||
<div class='split-pane-component treeview pane left'>
|
||||
<div class="holder abs l-mobile">
|
||||
<div class="abs holder l-flex-col holder-treeview-elements">
|
||||
<mct-representation key="'create-button'"
|
||||
mct-object="navigatedObject"
|
||||
mct-device="desktop">
|
||||
class="holder flex-elem create-btn-holder">
|
||||
</mct-representation>
|
||||
<mct-include key="'search'"
|
||||
ng-model="treeModel"
|
||||
class="holder l-flex-col flex-elem search-holder"
|
||||
ng-class="{ active: treeModel.search, grows: treeModel.search }">
|
||||
</mct-include>
|
||||
<mct-representation key="'tree'"
|
||||
mct-object="domainObject"
|
||||
parameters="tree"
|
||||
ng-model="treeModel"
|
||||
class="holder flex-elem grows vscroll tree-holder"
|
||||
ng-hide="treeModel.search">
|
||||
</mct-representation>
|
||||
<div class='holder search-holder abs'
|
||||
ng-class="{active: treeModel.search}">
|
||||
<mct-representation key="'search'"
|
||||
mct-object="domainObject"
|
||||
ng-model="treeModel">
|
||||
</mct-representation>
|
||||
</div>
|
||||
<div class='tree-holder abs mobile-tree-holder'
|
||||
ng-hide="treeModel.search">
|
||||
<mct-representation key="'tree'"
|
||||
mct-object="domainObject"
|
||||
parameters="tree"
|
||||
ng-model="treeModel">
|
||||
</mct-representation>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mct-splitter class="mobile-hide"></mct-splitter>
|
||||
<mct-splitter class="splitter-treeview mobile-hide"></mct-splitter>
|
||||
|
||||
<div class='split-pane-component items pane right-repr'>
|
||||
<div class='holder abs l-mobile' id='content-area'>
|
||||
<mct-representation mct-object="navigatedObject"
|
||||
key="'browse-object'">
|
||||
</mct-representation>
|
||||
<div class='split-pane-component items pane primary-pane right'>
|
||||
<a class="mini-tab-icon anchor-left toggle-pane toggle-tree"
|
||||
title="{{ modelPaneTree.visible()? 'Hide' : 'Show' }} this pane"
|
||||
ng-click="modelPaneTree.toggle()"
|
||||
ng-class="{ collapsed : !modelPaneTree.visible() }"></a>
|
||||
|
||||
<div class='holder holder-object-and-inspector abs' id='content-area'
|
||||
ng-controller="PaneController as modelPaneInspect"
|
||||
ng-class="modelPaneInspect.visible() ? 'pane-inspect-showing' : 'pane-inspect-hidden'">
|
||||
|
||||
<mct-split-pane class='l-object-and-inspector contents abs' anchor='right'>
|
||||
<div class='split-pane-component t-object pane primary-pane left'>
|
||||
<mct-representation mct-object="navigatedObject"
|
||||
key="'browse-object'"
|
||||
class="abs holder holder-object">
|
||||
</mct-representation>
|
||||
</div>
|
||||
|
||||
<mct-splitter class="splitter-inspect mobile-hide flush-right edge-shdw"></mct-splitter>
|
||||
|
||||
<div class="split-pane-component t-inspect pane right mobile-hide">
|
||||
<mct-representation key="'object-inspector'"
|
||||
mct-object="domainObject"
|
||||
ng-model="treeModel">
|
||||
</mct-representation>
|
||||
<a class="mini-tab-icon anchor-right mobile-hide toggle-pane toggle-inspect"
|
||||
title="{{ modelPaneInspect.visible()? 'Hide' : 'Show' }} the Inspection pane"
|
||||
ng-click="modelPaneInspect.toggle()"
|
||||
ng-class="{ collapsed : !modelPaneInspect.visible() }"></a>
|
||||
</div>
|
||||
</mct-split-pane>
|
||||
</div>
|
||||
<div class="key-properties ui-symbol icon mobile-menu-icon desktop-hide"
|
||||
mct-device="mobile"
|
||||
ng-click="tree.toggle()">m</div>
|
||||
</div>
|
||||
</mct-split-pane>
|
||||
</div>
|
||||
|
@ -19,12 +19,12 @@
|
||||
this source code distribution or the Licensing information page available
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
<div class='object-header object-header-mobile'>
|
||||
<span class='type-icon ui-symbol'>{{type.getGlyph()}}</span>
|
||||
<!--span class='type-name mobile-important-hide'>{{type.getName()}}</span-->
|
||||
<span class="l-elem-wrapper l-flex">
|
||||
<span ng-if="parameters.mode" class='action'>{{parameters.mode}}</span>
|
||||
<span class='title-label'>{{model.name}}</span>
|
||||
<mct-representation key="'menu-arrow'" mct-object='domainObject'></mct-representation>
|
||||
</span>
|
||||
</div>
|
||||
<span class='type-icon ui-symbol flex-elem'>{{type.getGlyph()}}</span>
|
||||
<span class="l-elem-wrapper l-flex-row flex-elem grows">
|
||||
<span ng-if="parameters.mode" class='action flex-elem'>{{parameters.mode}}</span>
|
||||
<span class='title-label flex-elem flex-can-shrink'>{{model.name}}</span>
|
||||
<mct-representation
|
||||
key="'menu-arrow'"
|
||||
mct-object='domainObject'
|
||||
class="flex-elem"></mct-representation>
|
||||
</span>
|
@ -19,13 +19,12 @@
|
||||
this source code distribution or the Licensing information page available
|
||||
at runtime from the About dialog for additional information.
|
||||
-->
|
||||
<div class="menu-element wrapper" ng-controller="ClickAwayController as createController">
|
||||
<span ng-controller="ClickAwayController as createController">
|
||||
<div class="s-menu-btn major create-btn" ng-click="createController.toggle()">
|
||||
<span class="ui-symbol icon type-icon">+</span>
|
||||
<span class="title-label">Create</span>
|
||||
</div>
|
||||
<div class="menu super-menu" ng-show="createController.isActive()">
|
||||
<mct-representation mct-object="domainObject" key="'create-menu'">
|
||||
</mct-representation>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
@ -26,14 +26,8 @@
|
||||
<div class='ui-symbol profile' title='Shared'>O</div>
|
||||
<mct-representation class="desktop-hide" key="'info-button'" mct-object="domainObject"></mct-representation>
|
||||
</div>
|
||||
<div class='item-main abs'>
|
||||
<div class='ui-symbol icon lg item-type'>
|
||||
{{type.getGlyph()}}
|
||||
<span
|
||||
class="ui-symbol l-icon-link" title="This object is a link"
|
||||
ng-show="location.isLink()"
|
||||
></span>
|
||||
</div>
|
||||
<div class='item-main abs lg'>
|
||||
<span class="t-item-icon" ng-class="{ 'l-icon-link':location.isLink() }">{{type.getGlyph()}}</span>
|
||||
<div class='ui-symbol abs item-open'>}</div>
|
||||
</div>
|
||||
<div class='bottom-bar bar abs'>
|
||||
|
@ -153,7 +153,6 @@ define(
|
||||
$scope.$on("$destroy", function () {
|
||||
navigationService.removeListener(setNavigation);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return BrowseController;
|
||||
|
@ -33,10 +33,12 @@ define(
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/browse
|
||||
*/
|
||||
function BrowseTreeController($scope, agentService) {
|
||||
function PaneController($scope, agentService, $window) {
|
||||
var self = this;
|
||||
this.agentService = agentService;
|
||||
this.state = true;
|
||||
|
||||
// Fast and cheap: if this has been opened in a new window, hide panes by default
|
||||
this.state = !$window.opener;
|
||||
|
||||
/**
|
||||
* Callback to invoke when any selection occurs in the tree.
|
||||
@ -44,7 +46,7 @@ define(
|
||||
* to the tree representation.
|
||||
*
|
||||
* @property {Function} callback
|
||||
* @memberof platform/commonUI/browse.BrowseTreeController#
|
||||
* @memberof platform/commonUI/browse.PaneController#
|
||||
*/
|
||||
this.callback = function () {
|
||||
// Note that, since this is a callback to pass, this is not
|
||||
@ -59,20 +61,20 @@ define(
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the visibility of the tree.
|
||||
* Toggle the visibility of the pane.
|
||||
*/
|
||||
BrowseTreeController.prototype.toggle = function () {
|
||||
PaneController.prototype.toggle = function () {
|
||||
this.state = !this.state;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the desired visibility state of the tree.
|
||||
* Get the desired visibility state of the pane.
|
||||
* @returns {boolean} true when visible
|
||||
*/
|
||||
BrowseTreeController.prototype.visible = function () {
|
||||
PaneController.prototype.visible = function () {
|
||||
return this.state;
|
||||
};
|
||||
|
||||
return BrowseTreeController;
|
||||
return PaneController;
|
||||
}
|
||||
);
|
@ -69,7 +69,7 @@ define(
|
||||
|
||||
// Introduce one create action per type
|
||||
return this.typeService.listTypes().filter(function (type) {
|
||||
return type.hasFeature("creation");
|
||||
return self.policyService.allow("creation", type);
|
||||
}).map(function (type) {
|
||||
return new CreateAction(
|
||||
type,
|
||||
|
45
platform/commonUI/browse/src/creation/CreationPolicy.js
Normal file
@ -0,0 +1,45 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* A policy for determining whether objects of a given type can be
|
||||
* created.
|
||||
* @constructor
|
||||
* @implements {Policy}
|
||||
* @memberof platform/commonUI/browse
|
||||
*/
|
||||
function CreationPolicy() {
|
||||
}
|
||||
|
||||
CreationPolicy.prototype.allow = function (type) {
|
||||
return type.hasFeature("creation");
|
||||
};
|
||||
|
||||
return CreationPolicy;
|
||||
}
|
||||
);
|
@ -25,8 +25,8 @@
|
||||
* Module defining CreateService. Created by vwoeltje on 11/10/14.
|
||||
*/
|
||||
define(
|
||||
["../../lib/uuid"],
|
||||
function (uuid) {
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
var NON_PERSISTENT_WARNING =
|
||||
@ -42,11 +42,9 @@ define(
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function CreationService(persistenceService, now, $q, $log) {
|
||||
this.persistenceService = persistenceService;
|
||||
function CreationService($q, $log) {
|
||||
this.$q = $q;
|
||||
this.$log = $log;
|
||||
this.now = now;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -70,26 +68,17 @@ define(
|
||||
*/
|
||||
CreationService.prototype.createObject = function (model, parent) {
|
||||
var persistence = parent.getCapability("persistence"),
|
||||
newObject = parent.useCapability("instantiation", model),
|
||||
newObjectPersistence = newObject.getCapability("persistence"),
|
||||
self = this;
|
||||
|
||||
// Persist the new domain object's model; it will be fully
|
||||
// constituted as a domain object when loaded back, as all
|
||||
// domain object models are.
|
||||
function doPersist(space, id, model) {
|
||||
return self.persistenceService.createObject(
|
||||
space,
|
||||
id,
|
||||
model
|
||||
).then(function () { return id; });
|
||||
}
|
||||
|
||||
// Add the newly-created object's id to the parent's
|
||||
// composition, so that it will subsequently appear
|
||||
// as a child contained by that parent.
|
||||
function addToComposition(id, parent, parentPersistence) {
|
||||
function addToComposition() {
|
||||
var compositionCapability = parent.getCapability('composition'),
|
||||
addResult = compositionCapability &&
|
||||
compositionCapability.add(id);
|
||||
compositionCapability.add(newObject);
|
||||
|
||||
return self.$q.when(addResult).then(function (result) {
|
||||
if (!result) {
|
||||
@ -97,7 +86,7 @@ define(
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return parentPersistence.persist().then(function () {
|
||||
return persistence.persist().then(function () {
|
||||
return result;
|
||||
});
|
||||
});
|
||||
@ -105,21 +94,13 @@ define(
|
||||
|
||||
// We need the parent's persistence capability to determine
|
||||
// what space to create the new object's model in.
|
||||
if (!persistence) {
|
||||
if (!persistence || !newObjectPersistence) {
|
||||
self.$log.warn(NON_PERSISTENT_WARNING);
|
||||
return self.$q.reject(new Error(NON_PERSISTENT_WARNING));
|
||||
}
|
||||
|
||||
// We create a new domain object in three sequential steps:
|
||||
// 1. Get a new UUID for the object
|
||||
// 2. Create a model with that ID in the persistence space
|
||||
// 3. Add that ID to
|
||||
return self.$q.when(uuid()).then(function (id) {
|
||||
model.persisted = self.now();
|
||||
return doPersist(persistence.getSpace(), id, model);
|
||||
}).then(function (id) {
|
||||
return addToComposition(id, parent, persistence);
|
||||
});
|
||||
// Persist the new object, then add it to composition.
|
||||
return newObjectPersistence.persist().then(addToComposition);
|
||||
};
|
||||
|
||||
|
||||
|
@ -22,22 +22,24 @@
|
||||
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/
|
||||
|
||||
define(
|
||||
["../src/BrowseTreeController"],
|
||||
function (BrowseTreeController) {
|
||||
["../src/PaneController"],
|
||||
function (PaneController) {
|
||||
'use strict';
|
||||
|
||||
describe("The BrowseTreeController", function () {
|
||||
describe("The PaneController", function () {
|
||||
var mockScope,
|
||||
mockAgentService,
|
||||
mockDomainObjects,
|
||||
mockWindow,
|
||||
controller;
|
||||
|
||||
// We want to reinstantiate for each test case
|
||||
// because device state can influence constructor-time behavior
|
||||
function instantiateController() {
|
||||
return new BrowseTreeController(
|
||||
return new PaneController(
|
||||
mockScope,
|
||||
mockAgentService
|
||||
mockAgentService,
|
||||
mockWindow
|
||||
);
|
||||
}
|
||||
|
||||
@ -58,6 +60,7 @@ define(
|
||||
"agentService",
|
||||
[ "isMobile", "isPhone", "isTablet", "isPortrait", "isLandscape" ]
|
||||
);
|
||||
mockWindow = jasmine.createSpyObj("$window", ["open"]);
|
||||
});
|
||||
|
||||
it("is initially visible", function () {
|
@ -33,6 +33,9 @@ define(
|
||||
var mockTypeService,
|
||||
mockDialogService,
|
||||
mockCreationService,
|
||||
mockPolicyService,
|
||||
mockCreationPolicy,
|
||||
mockPolicyMap = {},
|
||||
mockTypes,
|
||||
provider;
|
||||
|
||||
@ -67,14 +70,32 @@ define(
|
||||
"creationService",
|
||||
[ "createObject" ]
|
||||
);
|
||||
mockPolicyService = jasmine.createSpyObj(
|
||||
"policyService",
|
||||
[ "allow" ]
|
||||
);
|
||||
|
||||
mockTypes = [ "A", "B", "C" ].map(createMockType);
|
||||
|
||||
mockTypes.forEach(function(type){
|
||||
mockPolicyMap[type.getName()] = true;
|
||||
});
|
||||
|
||||
mockCreationPolicy = function(type){
|
||||
return mockPolicyMap[type.getName()];
|
||||
};
|
||||
|
||||
mockPolicyService.allow.andCallFake(function(category, type){
|
||||
return category === "creation" && mockCreationPolicy(type) ? true : false;
|
||||
});
|
||||
|
||||
mockTypeService.listTypes.andReturn(mockTypes);
|
||||
|
||||
provider = new CreateActionProvider(
|
||||
mockTypeService,
|
||||
mockDialogService,
|
||||
mockCreationService
|
||||
mockCreationService,
|
||||
mockPolicyService
|
||||
);
|
||||
});
|
||||
|
||||
@ -94,15 +115,15 @@ define(
|
||||
|
||||
it("does not expose non-creatable types", function () {
|
||||
// One of the types won't have the creation feature...
|
||||
mockTypes[1].hasFeature.andReturn(false);
|
||||
mockPolicyMap[mockTypes[0].getName()] = false;
|
||||
// ...so it should have been filtered out.
|
||||
expect(provider.getActions({
|
||||
key: "create",
|
||||
domainObject: {}
|
||||
}).length).toEqual(2);
|
||||
// Make sure it was creation which was used to check
|
||||
expect(mockTypes[1].hasFeature)
|
||||
.toHaveBeenCalledWith("creation");
|
||||
expect(mockPolicyService.allow)
|
||||
.toHaveBeenCalledWith("creation", mockTypes[0]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
53
platform/commonUI/browse/test/creation/CreationPolicySpec.js
Normal file
@ -0,0 +1,53 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define,describe,it,expect,beforeEach,jasmine*/
|
||||
|
||||
define(
|
||||
["../../src/creation/CreationPolicy"],
|
||||
function (CreationPolicy) {
|
||||
"use strict";
|
||||
|
||||
describe("The creation policy", function () {
|
||||
var mockType,
|
||||
policy;
|
||||
|
||||
beforeEach(function () {
|
||||
mockType = jasmine.createSpyObj(
|
||||
'type',
|
||||
['hasFeature']
|
||||
);
|
||||
|
||||
policy = new CreationPolicy();
|
||||
});
|
||||
|
||||
it("allows creation of types with the creation feature", function () {
|
||||
mockType.hasFeature.andReturn(true);
|
||||
expect(policy.allow(mockType)).toBeTruthy();
|
||||
});
|
||||
|
||||
it("disallows creation of types without the creation feature", function () {
|
||||
mockType.hasFeature.andReturn(false);
|
||||
expect(policy.allow(mockType)).toBeFalsy();
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
@ -30,9 +30,7 @@ define(
|
||||
"use strict";
|
||||
|
||||
describe("The creation service", function () {
|
||||
var mockPersistenceService,
|
||||
mockNow,
|
||||
mockQ,
|
||||
var mockQ,
|
||||
mockLog,
|
||||
mockParentObject,
|
||||
mockNewObject,
|
||||
@ -40,7 +38,9 @@ define(
|
||||
mockPersistenceCapability,
|
||||
mockCompositionCapability,
|
||||
mockContextCapability,
|
||||
mockCreationCapability,
|
||||
mockCapabilities,
|
||||
mockNewPersistenceCapability,
|
||||
creationService;
|
||||
|
||||
function mockPromise(value) {
|
||||
@ -60,11 +60,6 @@ define(
|
||||
}
|
||||
|
||||
beforeEach(function () {
|
||||
mockPersistenceService = jasmine.createSpyObj(
|
||||
"persistenceService",
|
||||
[ "createObject" ]
|
||||
);
|
||||
mockNow = jasmine.createSpy('now');
|
||||
mockQ = { when: mockPromise, reject: mockReject };
|
||||
mockLog = jasmine.createSpyObj(
|
||||
"$log",
|
||||
@ -76,7 +71,7 @@ define(
|
||||
);
|
||||
mockNewObject = jasmine.createSpyObj(
|
||||
"newObject",
|
||||
[ "getId" ]
|
||||
[ "getId", "getCapability", "useCapability" ]
|
||||
);
|
||||
mockMutationCapability = jasmine.createSpyObj(
|
||||
"mutation",
|
||||
@ -94,19 +89,22 @@ define(
|
||||
"context",
|
||||
["getPath"]
|
||||
);
|
||||
mockCreationCapability = jasmine.createSpyObj(
|
||||
"creation",
|
||||
["instantiate", "invoke"]
|
||||
);
|
||||
mockCapabilities = {
|
||||
mutation: mockMutationCapability,
|
||||
persistence: mockPersistenceCapability,
|
||||
composition: mockCompositionCapability,
|
||||
context: mockContextCapability
|
||||
context: mockContextCapability,
|
||||
instantiation: mockCreationCapability
|
||||
};
|
||||
|
||||
mockPersistenceService.createObject.andReturn(
|
||||
mockPromise(true)
|
||||
mockNewPersistenceCapability = jasmine.createSpyObj(
|
||||
"new-persistence",
|
||||
[ "persist", "getSpace" ]
|
||||
);
|
||||
|
||||
mockNow.andReturn(12321);
|
||||
|
||||
mockParentObject.getCapability.andCallFake(function (key) {
|
||||
return mockCapabilities[key];
|
||||
});
|
||||
@ -115,9 +113,16 @@ define(
|
||||
});
|
||||
mockParentObject.getId.andReturn('parentId');
|
||||
|
||||
mockPersistenceCapability.persist.andReturn(
|
||||
mockPromise(true)
|
||||
);
|
||||
mockNewObject.getId.andReturn('newId');
|
||||
mockNewObject.getCapability.andCallFake(function (c) {
|
||||
return c === 'persistence' ?
|
||||
mockNewPersistenceCapability : undefined;
|
||||
});
|
||||
|
||||
mockPersistenceCapability.persist
|
||||
.andReturn(mockPromise(true));
|
||||
mockNewPersistenceCapability.persist
|
||||
.andReturn(mockPromise(true));
|
||||
|
||||
mockMutationCapability.invoke.andReturn(mockPromise(true));
|
||||
mockPersistenceCapability.getSpace.andReturn("testSpace");
|
||||
@ -125,10 +130,12 @@ define(
|
||||
mockPromise([mockNewObject])
|
||||
);
|
||||
mockCompositionCapability.add.andReturn(mockPromise(true));
|
||||
mockCreationCapability.instantiate.andReturn(mockNewObject);
|
||||
mockCreationCapability.invoke.andCallFake(function (model) {
|
||||
return mockCreationCapability.instantiate(model);
|
||||
});
|
||||
|
||||
creationService = new CreationService(
|
||||
mockPersistenceService,
|
||||
mockNow,
|
||||
mockQ,
|
||||
mockLog
|
||||
);
|
||||
@ -137,21 +144,18 @@ define(
|
||||
it("allows new objects to be created", function () {
|
||||
var model = { someKey: "some value" };
|
||||
creationService.createObject(model, mockParentObject);
|
||||
expect(mockPersistenceService.createObject).toHaveBeenCalledWith(
|
||||
"testSpace",
|
||||
jasmine.any(String), // the object id; generated UUID
|
||||
model
|
||||
);
|
||||
expect(mockCreationCapability.instantiate)
|
||||
.toHaveBeenCalledWith(model);
|
||||
});
|
||||
|
||||
it("adds new id's to the parent's composition", function () {
|
||||
it("adds new objects to the parent's composition", function () {
|
||||
var model = { someKey: "some value" },
|
||||
parentModel = { composition: ["notAnyUUID"] };
|
||||
creationService.createObject(model, mockParentObject);
|
||||
|
||||
// Verify that a new ID was added
|
||||
expect(mockCompositionCapability.add)
|
||||
.toHaveBeenCalledWith(jasmine.any(String));
|
||||
.toHaveBeenCalledWith(mockNewObject);
|
||||
});
|
||||
|
||||
it("provides the newly-created object", function () {
|
||||
@ -207,11 +211,6 @@ define(
|
||||
expect(mockLog.error).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("attaches a 'persisted' timestamp", function () {
|
||||
var model = { someKey: "some value" };
|
||||
creationService.createObject(model, mockParentObject);
|
||||
expect(model.persisted).toEqual(mockNow());
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|