Compare commits

...

481 Commits

Author SHA1 Message Date
Victor Woeltjen
6b5528a4fc [API] Don't use new composition for legacy objects 2016-09-30 17:22:27 -07:00
Victor Woeltjen
2af993b0bc [API] Enable bundles from spec 2016-09-30 17:19:52 -07:00
Victor Woeltjen
c762d58b5a [API] No, don't enable bundles by default 2016-09-30 17:12:42 -07:00
Victor Woeltjen
219c9348d9 Merge remote-tracking branch 'origin/master' into api-1124b
Conflicts:
	bower.json
2016-09-30 17:11:05 -07:00
Victor Woeltjen
f8819ee946 [API] Fix failing specs 2016-09-30 17:05:40 -07:00
Victor Woeltjen
5b0fa90e39 Merge pull request #1220 from nasa/hasta-la-vista-jspdf
[export] remove pdf export
2016-09-30 17:01:23 -07:00
Victor Woeltjen
ce6c6385c3 [API] Remove failing spec 2016-09-30 16:55:58 -07:00
Pete Richards
ae6f6565fa [export] remove pdf export
Remove pdf export with extreme prejudice due to issues with build process.

Fixes https://github.com/nasa/openmct/issues/1217
2016-09-30 16:54:42 -07:00
Victor Woeltjen
ef0264d864 [API] Satisfy JSCS 2016-09-30 16:23:17 -07:00
Victor Woeltjen
044b1b627d [API] Run gulp fixstyle 2016-09-30 16:17:35 -07:00
Victor Woeltjen
5b6f13f521 [API] Satisfy JSLint 2016-09-30 16:15:30 -07:00
Victor Woeltjen
5b2c0e9aee [API] Adapt composition capability 2016-09-30 15:47:54 -07:00
Victor Woeltjen
dd7d8d2642 [API] Fix dependency issues with Composition 2016-09-30 15:18:51 -07:00
Victor Woeltjen
08e28018c1 [API] Don't instantiate Error 2016-09-30 15:09:09 -07:00
Victor Woeltjen
3b1fe93191 Merge remote-tracking branch 'origin/api-platform-updates' into api-1124b 2016-09-30 15:08:01 -07:00
Victor Woeltjen
2b66a4d604 [API] Wire in ObjectAPI appropriately 2016-09-30 15:06:50 -07:00
Victor Woeltjen
70c810b85d [API] Remove obsolete define parameter 2016-09-30 14:51:26 -07:00
Victor Woeltjen
c874ae7afd Merge remote-tracking branch 'origin/master' into api-platform-updates 2016-09-30 14:46:37 -07:00
Victor Woeltjen
c27c0c5b8c Merge pull request #1215 from nasa/fix-jspdf-version-1214
[Bower] specify jspdf minor version
2016-09-30 14:45:59 -07:00
Victor Woeltjen
fc5c07aeb6 Merge remote-tracking branch 'origin/fix-jspdf-version-1214' into api-1124b 2016-09-30 14:44:54 -07:00
Victor Woeltjen
2976c9e703 [API] Really fix EventEmitter import 2016-09-30 14:39:33 -07:00
Victor Woeltjen
54d2b00e67 [API] Update licenses correctly
Instead of double-documenting Zepto, document eventemitter3
2016-09-30 14:37:20 -07:00
Victor Woeltjen
061f9d6deb [API] Update EventEmitter dependency 2016-09-30 14:32:10 -07:00
Victor Woeltjen
1de9d182a7 [API] Add license info for new dependencies 2016-09-30 14:24:42 -07:00
Victor Woeltjen
810150d0d7 [API] Update documentation to reflect API status 2016-09-30 13:41:28 -07:00
Victor Woeltjen
1c0999b512 [API] Include revision info in minified openmct 2016-09-30 13:26:59 -07:00
Victor Woeltjen
774ae03c3e [API] Add license headers 2016-09-30 13:23:11 -07:00
Victor Woeltjen
1defee8953 [API] Decruft README.md for objects
...as this content is now in JSDoc
2016-09-30 13:16:36 -07:00
Victor Woeltjen
7b9ac3e7fb [API] Remove tutorial directories 2016-09-30 13:11:03 -07:00
Victor Woeltjen
f2178e2b43 [API] Decruft unused view
...from context menu prototyping
2016-09-30 13:08:33 -07:00
Victor Woeltjen
0094fea3f7 [API] Decruft unused gesture 2016-09-30 13:07:55 -07:00
Victor Woeltjen
7f79abe849 [API] Remove unused OverlayManager 2016-09-30 13:07:25 -07:00
Victor Woeltjen
f43bb6e03d [API] Decruft unused Region 2016-09-30 13:05:16 -07:00
Victor Woeltjen
8f3c3d910e [API] Decruft unused gesture 2016-09-30 13:04:23 -07:00
Victor Woeltjen
0956811adc [API] Remove obsolete Selection.js 2016-09-30 13:00:00 -07:00
Victor Woeltjen
bcc5a4e2ca [API] Remove README to decruft
Content is now provided in JSDoc
2016-09-30 12:57:55 -07:00
Victor Woeltjen
27b6a51887 [API] Remove README to decruft
Content is now provided in JSDoc
2016-09-30 12:56:16 -07:00
Victor Woeltjen
bb04d9db4a [API] Remove obsolete method to decruft 2016-09-30 12:55:38 -07:00
Victor Woeltjen
7c3bfae0a6 [API] Remove obsolete script to decruft 2016-09-30 12:53:26 -07:00
Victor Woeltjen
471fe7453b [API] Remove empty View script
...and move API docs to ViewRegistry
2016-09-30 12:52:51 -07:00
Victor Woeltjen
0d0526627b [API] Decruft unused AngularView 2016-09-30 12:50:37 -07:00
Victor Woeltjen
43e35179a3 [API] Continue decrufting 2016-09-30 12:49:08 -07:00
Pete Richards
ed102492e5 [Bower] specify jspdf minor version
Specify jsPDF minor version to avoid updating to v1.3.0, which appears to
have problems with requirejs bundling.

Fixes https://github.com/nasa/openmct/issues/1214
2016-09-30 12:49:02 -07:00
Victor Woeltjen
59634be565 [API] Decruft unused script 2016-09-30 12:46:36 -07:00
Victor Woeltjen
3bd8dd9928 [API] Decruft unused script 2016-09-30 12:45:20 -07:00
Victor Woeltjen
b5f1f98555 [API] Minimize logic in openmct module 2016-09-30 12:38:03 -07:00
Victor Woeltjen
11965304fb [API] Remove redundant openmct module 2016-09-30 12:35:15 -07:00
Victor Woeltjen
742d649d38 [API] Decruft unused dependency 2016-09-30 12:29:34 -07:00
Victor Woeltjen
6a47df095b [API] Remove gulp api task 2016-09-30 12:27:53 -07:00
Victor Woeltjen
0012ca48c1 [API] Simplify JSDoc build
...since extraneous documentation no longer needs to be
worked-around.
2016-09-30 12:27:39 -07:00
Victor Woeltjen
34e07b938d [API] Update StyleSheetLoaderSpec
...to reflect asset path details
2016-09-30 10:42:48 -07:00
Victor Woeltjen
230230aa94 [API] Remove js extension from import
...to avoid confusing RequireJS and breaking test suite
2016-09-30 10:37:31 -07:00
Victor Woeltjen
901846e6c1 [API] Use correct property for RT table template 2016-09-30 10:29:03 -07:00
Victor Woeltjen
04b8326900 Merge branch 'api-platform-updates' into api-1124b 2016-09-30 10:25:32 -07:00
Victor Woeltjen
a93f41f1c3 [API] Miscellaneous platform updates
Adds miscellaneous platform updates to include templates
via the RequireJS text plugin; to support modification of
asset paths; and to support priority order for gestures.

Supports integration of new API, #1124.
2016-09-30 10:25:22 -07:00
Victor Woeltjen
aed01d3a23 [API] Remove examples
...as these do not necessarily reflect API updates
2016-09-30 10:20:09 -07:00
Victor Woeltjen
09c73ef5f8 [API] Update MCT implementation 2016-09-30 10:09:42 -07:00
Victor Woeltjen
b1b6080161 [API] Rename types in api module 2016-09-30 09:56:50 -07:00
Victor Woeltjen
cb93da5e15 [API] Fix CompositionAPI module 2016-09-30 09:56:06 -07:00
Victor Woeltjen
d0e7eb29a9 [API] Mark MCT#selection as private 2016-09-30 09:51:35 -07:00
Victor Woeltjen
5e9e6099b0 [API] Update TelemetryAPI to match docs 2016-09-29 21:59:06 -07:00
Victor Woeltjen
6bd1af5c03 [API] Define LimitEvaluator interface 2016-09-29 21:42:09 -07:00
Victor Woeltjen
3f20c1bb94 [API] Update ViewRegistry to match docs 2016-09-29 17:34:41 -07:00
Victor Woeltjen
91214f2623 [API] Implement TypeRegistry methods 2016-09-29 17:26:27 -07:00
Victor Woeltjen
1fde82e673 [API] Mark Selection as private 2016-09-29 17:22:29 -07:00
Victor Woeltjen
0ae0abcfc3 [API] Update ObjectAPI to match docs 2016-09-29 17:20:27 -07:00
Victor Woeltjen
6fe1e775e0 [API] Update GestureAPI to match docs 2016-09-29 17:16:56 -07:00
Victor Woeltjen
d4d9f9c467 [API] Update CompositionCollection to match docs 2016-09-29 17:08:54 -07:00
Victor Woeltjen
0cb1ec9366 [API] Rewrite CompositionAPI to match docs 2016-09-29 17:04:15 -07:00
Victor Woeltjen
6ab27302f6 [API] Document remaining Dialog method 2016-09-29 16:49:42 -07:00
Victor Woeltjen
dfc5021e11 [API] Fix JSDoc for Dialog 2016-09-29 16:47:33 -07:00
Victor Woeltjen
9e3a3529e0 [API] Rename main module 2016-09-29 16:46:22 -07:00
Victor Woeltjen
434ea5487a Merge branch 'api-1110' into api-1124b 2016-09-29 16:43:47 -07:00
Victor Woeltjen
987d98b47e [API] Restore JSDoc for openmct module 2016-09-29 16:37:57 -07:00
Victor Woeltjen
53974bd69a Merge branch 'subobject-selection-1126' into api-1124b
Conflicts:
	bower.json
	index.html
	main.js
	src/openmct.js
2016-09-29 10:54:08 -07:00
Victor Woeltjen
ed8d331cd3 [API] Merge in latest from master 2016-09-29 10:47:52 -07:00
Pete Richards
7439d949c4 Merge pull request #1209 from nasa/jspdf-1208b
[Build] Fix jsPDF dependency
2016-09-28 09:30:50 -07:00
Victor Woeltjen
e1276e464d [Build] Restore version identifier 2016-09-27 16:49:09 -07:00
Victor Woeltjen
d248dfe346 [Build] Remove SNAPSHOT status
...to tag a build which addresses release blocker #1208
2016-09-27 16:48:38 -07:00
Victor Woeltjen
91b63f78eb [Build] Depend on non-minified jsPDF
Fixes #1208 (for some reason)
2016-09-27 16:47:42 -07:00
Victor Woeltjen
754d7b3cd7 [Build] Restore SNAPSHOT status
... for a patch build related to #1208
2016-09-27 16:47:35 -07:00
Victor Woeltjen
7d950d067c Merge pull request #1194 from hudsonfoo/open1184
[Frontend] Add notes property to all item types
2016-09-27 15:28:49 -07:00
Victor Woeltjen
d61f446002 [Selection] Add a click-elsewhere gesture 2016-09-26 15:21:43 -07:00
Victor Woeltjen
763f7dd021 [Selection] Begin adapting actions 2016-09-26 12:37:02 -07:00
Victor Woeltjen
cad255ce83 [Selection] Use variable name expected by template 2016-09-26 11:52:14 -07:00
Victor Woeltjen
3b4239fbd9 [Selection] Use AngularView for context menus 2016-09-26 11:43:38 -07:00
Victor Woeltjen
15ef89f455 [Selection] Bring over context menu template 2016-09-26 11:38:37 -07:00
Victor Woeltjen
c9a0a469f6 [Selection] Position context menus 2016-09-25 20:30:42 -07:00
Victor Woeltjen
f926bd9762 [Selection] Position overlays 2016-09-25 19:38:03 -07:00
Victor Woeltjen
d79392aeaa [Selection] Begin integrating OverlayManager 2016-09-25 18:26:00 -07:00
Victor Woeltjen
9a5bda4917 [Selection] Sketch in overlay manager 2016-09-25 18:22:07 -07:00
Victor Woeltjen
407550e6f4 [Selection] Inject actionRegistry 2016-09-23 15:48:43 -07:00
Victor Woeltjen
8b44b44e38 [Selection] Generalize Registry 2016-09-23 15:46:45 -07:00
Victor Woeltjen
8dfa8df28a [Selection] Allow providers to return array
...to allow one-to-many providers for actions, as is useful
for Create et al (and, in this specific case, to support
adapters.)
2016-09-23 15:45:46 -07:00
Victor Woeltjen
9e19296b14 [Selection] Add ActionRegistry 2016-09-23 15:35:40 -07:00
Victor Woeltjen
106632c21c [Selection] Remove unused import 2016-09-23 15:32:40 -07:00
Victor Woeltjen
235032a571 [Selection] Wire in new contextmenu 2016-09-23 15:27:39 -07:00
Victor Woeltjen
db41f6e64f [Selection] Obey priority order 2016-09-23 15:19:16 -07:00
Victor Woeltjen
e83e0da521 [Selection] Export openmct from main.js 2016-09-23 15:16:32 -07:00
Victor Woeltjen
c411f8fbe3 [Selection] Go through openmct API 2016-09-23 15:07:03 -07:00
Andrew Henry
e3e7bd27e9 Merge pull request #1203 from nasa/open1202
[Frontend] Removed Export buttons from objects when in a Layout
2016-09-23 10:20:47 -07:00
Andrew Henry
f6ed0e8ab6 Merge pull request #1178 from hudsonfoo/open1168
[Frontend] Delay visibility of progress bar
2016-09-23 10:10:09 -07:00
Henry
c179d9e759 Merge branch 'BogdanAlexandru-mct588comm' 2016-09-22 17:45:41 -07:00
Henry
98f387b605 [Edit Mode] Renamed function from EditAction.cancel() to EditAction.finish() 2016-09-22 17:34:53 -07:00
Henry
275dda820b Merge branch 'mct588comm' of https://github.com/BogdanAlexandru/openmct into BogdanAlexandru-mct588comm 2016-09-22 17:33:42 -07:00
Victor Woeltjen
43c32c2c7b Merge pull request #1201 from nasa/open1080
[Edit Mode] Fixed issue with save dialog not being displayed for new objects after mutation
2016-09-22 16:23:49 -07:00
Victor Woeltjen
3f5388c2e8 [Build] Restore SNAPSHOT status
...and bump version number to open sprint Rajaniemi,
https://github.com/nasa/openmct/milestone/18
2016-09-22 16:20:18 -07:00
Victor Woeltjen
bad24d6213 [Build] Remove SNAPSHOT status
...to close sprint Pratchett,
https://github.com/nasa/openmct/milestone/17
2016-09-22 15:48:48 -07:00
Victor Woeltjen
4ce952846c [Selection] Expose context menu adapter 2016-09-22 11:51:00 -07:00
Victor Woeltjen
fdab4a614f [Selection] Expose contextual gesture 2016-09-22 11:48:44 -07:00
Victor Woeltjen
152f55652f [Selection] Add adapter for context menu 2016-09-22 11:46:37 -07:00
Henry
7a94efccbf [Edit Mode] Fixed spelling mistake, moved variable declaration 2016-09-22 11:04:04 -07:00
Charles Hacskaylo
3c72eea9ef [Frontend] Removed export buttons from objects when in layout
Fixes #1202
CSS modded
2016-09-22 10:41:14 -07:00
Henry
3548cde9c4 [Edit Mode] Fixed issue with save dialog not being displayed for new objects after mutation. Fixes 1080 2016-09-21 16:12:09 -07:00
Victor Woeltjen
c46c42e576 [Selection] Sketch in AngularView
...for use in the adapter layer.
2016-09-21 15:39:56 -07:00
Victor Woeltjen
75bf956c3d [Selection] Use context typedef 2016-09-21 14:54:22 -07:00
Victor Woeltjen
0a44c48338 [Selection] Sketch in context menu gesture 2016-09-21 13:27:59 -07:00
Victor Woeltjen
e4c3412e8a [Selection] Sketch in context menu view 2016-09-21 13:16:24 -07:00
Victor Woeltjen
4e1cfac4b9 [Selection] Expose inspector registry 2016-09-21 12:30:36 -07:00
Victor Woeltjen
0a64e9f515 [Selection] Add ViewRegistry 2016-09-21 12:29:43 -07:00
Victor Woeltjen
7341ed9d03 [Selection] Handle selection changes
...from the InspectorRegion
2016-09-21 12:26:57 -07:00
Victor Woeltjen
e2631bdcfd [Selection] Listen/unlisten to selection
...from the inspector region
2016-09-21 11:27:24 -07:00
Victor Woeltjen
773a7c0c24 [Selection] Begin adding Inspector region 2016-09-21 11:25:21 -07:00
Alex M
0c27a5f361 [Edit] Remove CreationService dep from SaveAs 2016-09-19 23:52:30 +03:00
Alex M
abfabc85b5 [Edit] Fix edit-action-buttons indent 2016-09-19 20:41:50 +03:00
Alex M
e08704e6d3 [Edit] Make checkstyle happy 2016-09-19 20:39:54 +03:00
Alex M
f60fc2ebad [Edit] EditorCapability.finish returns domainObj 2016-09-19 20:33:12 +03:00
Alex M
b50278e92f [Edit] Remove mocked unused UrlService 2016-09-19 20:22:46 +03:00
Andrew Henry
e0b6986851 Merge pull request #1169 from smirecki/master
[Documentation] Typo corrections
2016-09-19 09:52:48 -07:00
David Hudson
56267095cb [Forms] Add style for small textareas
Issue #1184. This allows for a generically sized text area in forms. I am
anticipating some potential feedback on this given the approach and the sizing
I chose may or may not be ideal for your requirements.
2016-09-18 01:47:07 +09:00
David Hudson
f9ce27def3 [Frontend] Add attributes for storing notes
Issue #1184
2016-09-18 01:27:12 +09:00
David Hudson
127a7a62c1 Merge branch 'master' of github.com:nasa/openmct into open1184 2016-09-18 01:25:05 +09:00
David Hudson
4429e847e8 [Properties] Add notes field to all item types
Issue #1184
2016-09-18 01:18:26 +09:00
David Hudson
56e321f6d9 [Forms] Add textarea template
Issue #1184
2016-09-18 01:18:02 +09:00
David Hudson
e135ed26f0 [Frontend] Shorten overlay fade duration
Issue #1168
2016-09-17 16:36:55 +09:00
David Hudson
48b25fe842 [Formatting] Remove double negative logic
Issue #1168
2016-09-17 16:32:26 +09:00
David Hudson
85e57286ae Merge branch 'master' of github.com:nasa/openmct into open1168 2016-09-17 16:30:42 +09:00
Alex M
5ef6617062 [Edit] Rename action to Save and Finish Editing 2016-09-17 01:05:46 +03:00
Alex M
ae89dcd62d [Edit] Make single save button use mct-control 2016-09-17 00:39:49 +03:00
steven mirecki
f9597fe799 Merge branch 'master' of https://github.com/nasa/openmct 2016-09-16 17:16:35 -04:00
smirecki
0ec27350e0 Update TimelineTickController.js
One correction by @akhenry, "region, not reign".
2016-09-16 16:50:11 -04:00
Andrew Henry
156ba832f2 Merge pull request #1154 from nasa/root-build-note-1151
[README] Warn about root installation issues
2016-09-16 13:36:35 -07:00
Andrew Henry
c4f079dde2 Merge pull request #1191 from nasa/revert-1134-dep-vuln-1130
[Build] Revert check dependencies for vulnerabilities
2016-09-16 13:35:35 -07:00
Alex M
2a2e9ef99d [Edit] Make linter happy 2016-09-16 03:24:00 +03:00
Alex M
1446b16e77 [Edit] Using spy objects as save action mocks 2016-09-16 03:15:10 +03:00
Alex M
f03003b366 [Edit] Fix CreateActionSpec 2016-09-15 23:18:53 +03:00
Alex M
d3db26499c [Edit] CreateAction needs to perform("save-as") 2016-09-15 23:14:12 +03:00
Alex M
d1f67fd8b9 [Edit] Introduce dropdown Save menu
And fix style issues in SaveAsActionSpec
2016-09-15 22:40:02 +03:00
Alex M
31ee92b711 [Edit] Remove editor.cancel from SaveActionSpec 2016-09-15 20:39:02 +03:00
Alex M
1ea7fa3084 [Edit] SaveAsAction tests cover save and finish 2016-09-15 20:28:29 +03:00
Victor Woeltjen
fe217384aa Merge pull request #1192 from nasa/revert-1159-squashed_proxy_parameters
Revert "[proxyUrl] pass URL parameters to proxied URL"
2016-09-15 10:13:42 -07:00
Pete Richards
49d2d5500f Revert "[proxyUrl] pass URL parameters to proxied URL" 2016-09-15 09:37:11 -07:00
Victor Woeltjen
fdcba66558 [Selection] Add legacy bundle
...to act as an adapter to legacy registration API
2016-09-14 11:54:19 -07:00
Victor Woeltjen
3b1ed7821f [Selection] Add openmct module
...to expose selection APIs
2016-09-14 11:50:36 -07:00
Victor Woeltjen
1be517f3ea [Selection] Don't reuse old paths for new items 2016-09-14 11:46:06 -07:00
Victor Woeltjen
5e3dcadfa4 Merge remote-tracking branch 'origin/master' into subobject-selection-1126
Conflicts:
	bower.json
	main.js
	test-main.js
2016-09-14 11:06:05 -07:00
Victor Woeltjen
c1afc34cfc Revert "[Build] Check dependencies for vulnerabilities" 2016-09-14 10:16:33 -07:00
Alex M
d8dc3c8445 Merge branch 'master' into mct588comm 2016-09-14 19:50:19 +03:00
David Hudson
ea1855fc26 Merge branch 'master' of github.com:nasa/openmct into open1168 2016-09-14 17:00:06 +09:00
Alex M
0be84a4e51 [Edit] CreateAction closes editor after save 2016-09-13 23:59:28 +03:00
Alex M
d87ed1414e [Edit] Update EditorCapability comments 2016-09-13 22:36:27 +03:00
Alex M
4382745012 [Edit] Final two actions now use finish() 2016-09-13 22:35:11 +03:00
Pete Richards
f73238787d Merge pull request #1190 from nasa/build-promise-1183
[Build] Update to es6-promise 3.3.0
2016-09-13 12:08:42 -07:00
Victor Woeltjen
8c04596859 Merge pull request #1179 from BogdanAlexandru/controlsdocs
[Documentation] Add extra controls to developer guide
2016-09-13 11:29:28 -07:00
Alex M
79b16ddda6 [Edit] SaveAs now calls finish() 2016-09-13 21:24:20 +03:00
Victor Woeltjen
d490693bad [Build] Update to es6-promise 3.3.0
...including changes to filename associated with that version.

Fixes #1183
2016-09-13 11:20:58 -07:00
David Hudson
6c9bd0b510 Merge branch 'master' of github.com:nasa/openmct into open1168 2016-09-13 16:39:31 +09:00
David Hudson
2740b6f957 [Frontend] Add optional delay parameter to dialog service
Issue #1168
2016-09-13 16:36:25 +09:00
Alex M
37cf56a2b3 [Documentation] Add extra controls 2016-09-13 00:53:50 +03:00
Victor Woeltjen
e73bb4ff4a Merge pull request #1164 from hudsonfoo/open967
[Enhancement] Export plot as PDF, JPG, or PNG
2016-09-12 10:56:09 -07:00
David Hudson
ea35395d7e Merge branch 'master' of github.com:nasa/openmct into open1168 2016-09-13 02:47:16 +09:00
David Hudson
bad901a162 [Typo] Add reference to self
Issue #967
2016-09-12 17:06:23 +09:00
David Hudson
bb34528a86 [Testing] Add tests to ensure correct image type
Issue #967
2016-09-12 17:00:28 +09:00
David Hudson
487ec7907c [Formatting] Fix missing space
Issue #967
2016-09-12 16:59:39 +09:00
David Hudson
3093ab8067 [Testing] Convert blob to proper format. Inject FileReader.
Issue #967
2016-09-12 16:58:21 +09:00
David Hudson
0f1d685ae6 Merge branch 'master' of github.com:nasa/openmct into open967 2016-09-12 15:46:04 +09:00
David Hudson
24cb72e5b5 [Frontend] Delay visibility of progress bar
Resolves #1168
2016-09-12 15:28:04 +09:00
Andrew Henry
4c6ca58c95 Merge pull request #1157 from TypicalFooBar/843
[Context Menu] New Tab button available in edit mode. #843
2016-09-11 21:21:49 -07:00
David Hudson
d62989bc5d [Formatting] Rename export image service key
Issue #1164
2016-09-10 03:18:46 +09:00
David Hudson
8e39da6726 [Formatting] Rename export image service key
Issue #1164
2016-09-10 03:12:00 +09:00
David Hudson
98deac042e [Formatting] Reduce line length of gl declaration
Issue #1164
2016-09-10 02:56:23 +09:00
David Hudson
b51ffcada6 [Formatting] Add inline JSDoc
Issue #1164
2016-09-10 01:59:07 +09:00
David Hudson
a6386b1612 [Formatting] Rename export image service variables
Issue #1164
2016-09-10 01:45:50 +09:00
David Hudson
72ecbb0abc [Frontend] Fix typo 2016-09-09 12:07:02 +09:00
David Hudson
c6caae8647 [Frontend] Remove unnecessary export button styles 2016-09-09 12:06:42 +09:00
David Hudson
da23bba392 Merge branch 'master' of github.com:nasa/openmct into open967 2016-09-09 12:02:50 +09:00
Victor Woeltjen
32e7f57a7c [Build] Accept future phantomjs versions 2016-09-08 13:48:53 -07:00
Victor Woeltjen
f7dfccb096 [Build] Depend on phantomjs-prebuilt 2.1.11
...due to issues installing 2.1.12 on Linux. Fixes #1176.
2016-09-08 13:41:51 -07:00
David Hudson
990c653397 Merge branch 'open967' of github.com:hudsonfoo/openmct into open967 2016-09-08 11:06:05 +09:00
David Hudson
911ece7612 [Frontend] Remove styles that are no longer necessary
Issue #1164. Based on updates from 0457f7bee8 these styles
are no longer necessary and have been removed.
2016-09-08 11:05:19 +09:00
David Hudson
222b4421e5 [Frontend] Remove styles that are no longer necessary
Based on updates from 0457f7bee8 these styles
are no longer necessary and have been removed.
2016-09-08 11:03:36 +09:00
Charles Hacskaylo
4517bd1356 [Frontend] New markup for CSS from #1166
Fixes #967
Requires new styles implemented in #1166

(cherry picked from commit 0457f7bee8)
2016-09-08 11:02:42 +09:00
David Hudson
5984ae46fc Merge branch 'master' of github.com:nasa/openmct into open967 2016-09-08 10:50:08 +09:00
Victor Woeltjen
45ecc7bb2b [API] Ascending/descending order 2016-09-07 14:10:51 -07:00
Victor Woeltjen
5bde1de61b Merge pull request #1167 from nasa/open1166
Review and integrate generalized control-bar styling for views
2016-09-07 13:37:10 -07:00
Victor Woeltjen
a3c3f997cf [API] Move down TC example
...to come after telemetry usage example
2016-09-07 13:25:05 -07:00
Victor Woeltjen
1ae3ce57d0 [API] Telemetry registration example 2016-09-07 13:23:06 -07:00
Andrew Henry
06d229ea99 Merge pull request #1133 from charbelrami/markup
[Frontend] Tweak markup
2016-09-07 13:16:04 -07:00
Victor Woeltjen
616e2b4d77 [API] Exemplify mutate/observe 2016-09-07 13:10:48 -07:00
Victor Woeltjen
0e7d812db7 [API] Document ObjectAPI registration 2016-09-07 13:04:30 -07:00
Victor Woeltjen
c074f29a07 [API] Add gesture example 2016-09-07 11:26:13 -07:00
Victor Woeltjen
92118d353e [API] Add Time Conductor example 2016-09-07 11:24:01 -07:00
Victor Woeltjen
b111eeff07 [API] Update reference 2016-09-07 11:16:24 -07:00
Victor Woeltjen
8042e84911 [API] Add composition-related content 2016-09-07 11:15:26 -07:00
Victor Woeltjen
631c4b5dda [API] Describe composition property 2016-09-07 11:06:27 -07:00
Victor Woeltjen
c6baf2dc1f [API] Make CompositionCollection an interface 2016-09-07 10:58:00 -07:00
Victor Woeltjen
4db7e12d45 [API] Add example for views 2016-09-07 10:55:34 -07:00
Victor Woeltjen
b1799c695e [API] Add DomainObject 2016-09-07 10:46:49 -07:00
Victor Woeltjen
5761c889bc [API] Move MutableObject methods to ObjectAPI 2016-09-07 10:41:48 -07:00
Victor Woeltjen
97cf26d438 [API] Telemetry provider 2016-09-07 10:27:42 -07:00
Victor Woeltjen
c4b83b7589 [API] Account for provider strategies 2016-09-07 10:18:43 -07:00
Victor Woeltjen
d56f30c15a [API] TelemetryRequest 2016-09-07 10:15:57 -07:00
Victor Woeltjen
7279c5d857 [API] Mark properties as optional 2016-09-07 10:12:47 -07:00
Victor Woeltjen
5d53ab83a3 [API] More TelemetryProperty properties 2016-09-07 10:11:52 -07:00
Victor Woeltjen
4565e45b36 [API] Add TelemetryProperty for metadata 2016-09-07 10:08:07 -07:00
Victor Woeltjen
5950daa6cb [API] Move out composition policy 2016-09-07 09:33:21 -07:00
Victor Woeltjen
60800c913e [API] Gestures 2016-09-07 09:28:26 -07:00
Victor Woeltjen
649567176d [API] Notes on context 2016-09-07 09:21:18 -07:00
Victor Woeltjen
1df573b8c6 [API] Move types into registry 2016-09-07 08:50:20 -07:00
Victor Woeltjen
bc4ca10e53 [API] Separate out ViewRegistry 2016-09-07 08:45:18 -07:00
Victor Woeltjen
1338f02541 [API] Clean up telemetry API docs slightly 2016-09-07 08:32:21 -07:00
Victor Woeltjen
1cc6833c30 [API] Add request/subscribe JSDoc 2016-09-07 08:26:32 -07:00
Victor Woeltjen
a7a47a36d6 [API] Remove extraneous return jsdoc 2016-09-07 08:10:40 -07:00
Victor Woeltjen
851d0f0d63 [API] Clean up Composition API 2016-09-07 08:09:37 -07:00
Victor Woeltjen
5a129de73d [API] Clarify language 2016-09-06 16:32:54 -07:00
Victor Woeltjen
0cf634a412 [API] Add more front-page content 2016-09-06 16:30:05 -07:00
Victor Woeltjen
702d7acf64 [API] Begin adding front page content 2016-09-06 16:18:42 -07:00
Victor Woeltjen
69a500bf44 [API] Dedocument Selection
...and add a description to MCT#conductor
2016-09-06 16:07:49 -07:00
Victor Woeltjen
82e5b009e8 [API] Move Identifier typedef 2016-09-06 13:58:19 -07:00
Victor Woeltjen
aafd0731ec [API] Remove 'the API' section
...as this is now generated from JSDoc, more or less
2016-09-06 13:47:59 -07:00
Victor Woeltjen
c9705a5f2c [API] Normalize line length 2016-09-06 13:46:02 -07:00
Victor Woeltjen
7cc4a1262c [API] Proofread intro 2016-09-06 13:31:07 -07:00
Victor Woeltjen
02904a6081 [API] Link to openmct module in the preamble 2016-09-06 13:28:49 -07:00
Victor Woeltjen
7ce9bd969a [API] Telemetry JSdoc 2016-09-06 10:14:04 -07:00
Victor Woeltjen
8cafd2da7e Merge remote-tracking branch 'origin/api-tutorial/telemetry' into api-1110 2016-09-06 10:06:30 -07:00
Victor Woeltjen
6264ab75f3 Merge remote-tracking branch 'origin/api-tutorials' into api-1110
Conflicts:
	src/MCT.js
	src/api/composition/CompositionCollection.js
	src/api/composition/DefaultCompositionProvider.js
	src/api/objects/MutableObject.js
2016-09-06 10:03:59 -07:00
Victor Woeltjen
7a5cad20ec [API] Add JSDoc for Dialog 2016-09-06 09:58:08 -07:00
Victor Woeltjen
4de069b393 [API] JSDoc for Selection 2016-09-06 09:54:51 -07:00
Victor Woeltjen
70abd5c1f9 [API] Document start event 2016-09-06 09:47:06 -07:00
Victor Woeltjen
2a3a61da86 [API] Fix event memberofs in TimeConductor 2016-09-06 09:45:24 -07:00
Victor Woeltjen
018bd022cc [API] Document View API 2016-09-06 09:42:04 -07:00
Victor Woeltjen
4739b36bc3 [API] Add metadata to View jsdoc 2016-09-06 09:14:04 -07:00
Victor Woeltjen
c9b1035a6d [API] Document Type.check 2016-09-06 09:13:01 -07:00
Victor Woeltjen
6768328475 [API] Document MutableObject 2016-09-06 08:43:01 -07:00
Victor Woeltjen
60c179eac3 [API] Add missing parameter names 2016-09-06 08:32:18 -07:00
Victor Woeltjen
a20e8d69b5 [API] More Objects doc 2016-09-06 08:31:42 -07:00
Victor Woeltjen
1abcb248fe [API] Include API.md as main page 2016-09-06 08:13:26 -07:00
Victor Woeltjen
a8151f5f22 [API] Document CompositionProvider 2016-09-06 08:09:03 -07:00
Victor Woeltjen
cdf21f3763 [API] Mark Composition as instance method 2016-09-06 07:58:52 -07:00
Victor Woeltjen
341bceb4e2 [API] Document composition API 2016-09-06 07:57:44 -07:00
Andrew Henry
58391de007 Merge pull request #1150 from aterribili/patch-1
Add .swp to git ignore
2016-09-05 09:58:28 -07:00
David Hudson
ceb3e8e3dd [Enhancement] Add IE, Opera, Safari support for canvas.toBlob()
This is currently being used for exporting plots to PNG/JPG.
2016-09-05 19:40:22 +09:00
David Hudson
35a331f3fd [Frontend] Fix plot image cutoff on export
The images were being cutoff due to the "top" attribute of .gl-plot
not changing when the buttons were hidden. The buttons are now
hidden by CSS class rather than ng-show, which makes updating the
.gl-plot top attribute easier.
2016-09-05 17:02:04 +09:00
David Hudson
7d13ce0626 [Licenses] Add license information for html2canvas, jsPDF, saveAs 2016-09-05 01:22:43 +09:00
David Hudson
a49eebf9f5 [Testing] Add test spec for ExportImageService 2016-09-04 23:04:46 +09:00
David Hudson
989e4e1b75 [Testing] Add jsPDF, html2canvas, and saveAs as injectible dependencies
I would prefer this be passed in via the bundle, but it continues to fail
saying "Unknown Provider". I have chosen to require them into the module
the old-fashioned way, then allow an injectible dependency to override.
2016-09-04 23:02:23 +09:00
David Hudson
9bb647e275 [Testing] Add better dependency injection and error handling 2016-09-04 19:19:14 +09:00
Alex M
3dee082141 [Edit] Add reason for redundant mocks 2016-09-03 19:02:05 +03:00
Alex M
7d52d348b2 [Edit] Fix style issues 2016-09-03 18:33:27 +03:00
Alex M
ded52b8d19 [Edit] Rename cancel() to finish() 2016-09-03 17:55:05 +03:00
Alex M
ab4ce0caba [Edit] Introduced SaveAndStopEditingAction
It replaces SaveAction in the bundle.
2016-09-03 17:55:04 +03:00
Alex M
90c13a3959 [Edit] EditorCapability continues edit on save 2016-09-03 17:55:04 +03:00
Alex M
9847c40e34 [Edit] SaveAction not navigating anymore 2016-09-03 17:55:04 +03:00
steven mirecki
e751461194 Typo corrections, I avoided making changes to words that have regional spelling differences. 2016-09-03 09:16:54 -04:00
David Hudson
a566265a72 [Testing] Add ExportImageService mock 2016-09-03 14:45:09 +09:00
David Hudson
fecf419f83 [Testing] Move ExportImageController into constructor for dependency injection 2016-09-03 14:44:33 +09:00
David Hudson
26c14d2bca [Formatting] Fix styling errors 2016-09-03 14:02:19 +09:00
David Hudson
92bfea1773 [Tests] Mock new argument in PlotController 2016-09-03 13:51:37 +09:00
David Hudson
40ad9c47a8 [Tests] Add jsPDF and html2canvas 2016-09-03 13:51:16 +09:00
Victor Woeltjen
0470a02272 [API] Reference ObjectAPI 2016-09-02 16:04:38 -07:00
Victor Woeltjen
e3dc26c130 [API] Clean up docs 2016-09-02 15:25:28 -07:00
Victor Woeltjen
96c3d1cac2 [API] Use JSDoc config 2016-09-02 15:19:20 -07:00
Victor Woeltjen
2af778145d [API] Clean up JSDoc slightly 2016-09-02 15:16:11 -07:00
Victor Woeltjen
5743eeb33a [API] Reference EventEmitter 2016-09-02 15:03:12 -07:00
Victor Woeltjen
f06f714bdc [API] Document some public fields 2016-09-02 15:02:18 -07:00
Victor Woeltjen
d592bd1035 [API] Give up on borrows-style documentation 2016-09-02 14:58:06 -07:00
Victor Woeltjen
b5f62541ce [API] Add watch for API docs 2016-09-02 14:54:27 -07:00
David Hudson
de85f79ab6 [Enhancement] Hide export buttons during export
Buttons temporarily hide until export completes.
2016-09-02 20:41:38 +09:00
David Hudson
3736f84c12 [Frontend] Set plot export buttons to show/hide on hover
It's worth noting that I changed the .gl-plot position from relative to absolute
in an attempt to match the results to a similar requirement in MCT Table. Setting
to absolute caused no regressions as far as I could tell, but I have not attempted
browsers outside of Chrome.
2016-09-02 19:36:39 +09:00
Charles Hacskaylo
e7a7025961 [Frontend] Markup for #967
Fixes #967
WIP to be integrated with work
from hudsonfoo in PR #1164

(cherry picked from commit ebadad61c6)
2016-09-02 18:19:20 +09:00
David Hudson
e38cf1e2e8 Merge branch 'master' of github.com:nasa/openmct into open967 2016-09-02 18:17:46 +09:00
Andrew Henry
7b84febfde Merge pull request #1162 from ZachMoreno/patch-1
[Documentation] Updated from OpenMCTWeb to OpenMCT
2016-09-02 09:38:54 +01:00
Charles Hacskaylo
39dcb937d5 [Frontend] CSS and markup tweaks
Fixes #1166
New control-bar height constant
Removed font-size definition in .l-view-section
2016-09-01 20:09:38 -07:00
David Hudson
3e3d3ebcf9 [Formatting] Switched to double quote across the board for consistency 2016-09-02 11:58:15 +09:00
David Hudson
e370271093 [Code Review] Updates based on code review by @VWoeltjen
Set export functions on the ExportImageService prototype. Insantiated
ExportImageService in the PlotController for better dependcy injection.
2016-09-02 11:54:38 +09:00
Charles Hacskaylo
55603b927f [Frontend] Generalized markup and CSS for control-bar
Fixes #1166
New markup and CSS
MIgrated existing tabular views to use
new styles
2016-09-01 19:37:36 -07:00
Victor Woeltjen
33ced4bccf [API] Expose MCT on openmct 2016-09-01 15:51:25 -07:00
Victor Woeltjen
e37510dbab [API] Ignore internal API after processing 2016-09-01 15:13:52 -07:00
Victor Woeltjen
f27c41014d [API] JSDoc for openmct.start() 2016-09-01 14:50:18 -07:00
Victor Woeltjen
bd796f2beb [API] Simple constructor documentation 2016-09-01 14:44:24 -07:00
Victor Woeltjen
bcc32c76d0 [API] Module-level JSDoc 2016-09-01 14:42:55 -07:00
Victor Woeltjen
ff2ec6690a [API] Rename module to openmct 2016-09-01 14:35:52 -07:00
Victor Woeltjen
1e0fb3611d [API] Render API docs to HTML 2016-09-01 12:34:54 -07:00
Victor Woeltjen
e35666bcc6 Merge pull request #1165 from nasa/subobjects1161
Review and integrate initial styling for selectable sub-objects
2016-09-01 12:23:37 -07:00
David Hudson
3a19890be9 [Formatting] Linting 2016-09-02 03:11:26 +09:00
Charles Hacskaylo
725f8202ed Merge remote-tracking branch 'origin/master' into subobjects1161 2016-09-01 10:56:17 -07:00
Charles Hacskaylo
ee917b0e1d [Frontend] Initial styling for selectable styling
Fixes #1161
New .s-selectable, .s-hover, .s-selected and .s-moveable classes
New supporting color constants
Markup in layouts, fixed position/panels updated
Removed old commented code
2016-09-01 10:55:07 -07:00
David Hudson
a8900f3d6d Merge branch 'master' of github.com:nasa/openmct into open967 2016-09-02 02:44:01 +09:00
David Hudson
ea8f429902 [Enhancement] Add export functionality to PlotController
Extends PlotController by adding three new scoped methods:
exportPDF, exportPNG, exportJPG.

All three methods use basically the same steps. The HTML node
of the plot is passed through html2canvas which generates a canvas.
From the canvas we export a blob, PNG, or JPG then save the file.
2016-09-02 02:41:43 +09:00
David Hudson
219301a85b [Frontend] Add export plot buttons 2016-09-02 02:32:42 +09:00
David Hudson
06a453333a [Enhancement] Pass element to plot controller
This will be used for exporting an image of the plot.
2016-09-02 02:31:34 +09:00
David Hudson
5e0975ddfa [Formatting] Remove test code 2016-09-02 02:29:26 +09:00
Zachariah Moreno
76527b310d [Documentation] Revising to uphold standard naming convention of Open MCT
🐙

# Author Checklist:

Changes appear to address issue? Y
Appropriate unit tests included? N/A - No code changes
Code style and in-line documentation are appropriate? N/A
Commit messages meet standards? Y
2016-09-01 09:23:35 -07:00
Andrew Henry
73b4385578 Merge pull request #1160 from nasa/ksp1146
[README] Add link to KSP plugin
2016-09-01 15:59:16 +01:00
Zachariah Moreno
bb3af4eff7 🐙 Updated from OpenMCTWeb to OpenMCT
minor change & please let me know if I can help with anything else
2016-08-31 15:56:57 -07:00
Victor Woeltjen
68adea7b5a Merge pull request #1159 from raoulsullivan/squashed_proxy_parameters
[proxyUrl] pass URL parameters to proxied URL
2016-08-31 09:31:01 -07:00
David Hudson
4d3afb8efc Merge branch 'master' of github.com:nasa/openmct into open967 2016-08-31 23:04:56 +09:00
David Hudson
852ac3cd55 [Enhancement] Quick prototype of PDF export 2016-08-31 23:03:48 +09:00
Victor Woeltjen
40abd1ce6c Merge pull request #1153 from dhrubomoy/dhrubomoy-patch-1
[Documentation] Fixed typos, grammars
2016-08-30 15:19:26 -07:00
Victor Woeltjen
3a7e98ab84 Merge pull request #1155 from nasa/forms1118
Review and integrate improved dialog layout
2016-08-30 14:30:46 -07:00
Victor Woeltjen
6364bbc6b3 [Build] Restore SNAPSHOT status
...to begin sprint Pratchett,
https://github.com/nasa/openmct/milestones/Pratchett
2016-08-30 14:10:48 -07:00
Victor Woeltjen
fc7d2672db [Build] Remove SNAPSHOT status
...to close sprint Orwell,
https://github.com/nasa/openmct/milestones/Orwell
2016-08-30 14:01:28 -07:00
Victor Woeltjen
3a25704f41 [README] Add link to KSP plugin
Add link to David Hudson's Kerbal Space Program plugin from #1146,
along with other information about Examples relevant in that context.

Resolves #1064
2016-08-30 13:55:41 -07:00
raoulsullivan
98486f718b [proxyUrl] pass URL parameters to proxied URL
Addresses issue #1158

Passes query parameters on to proxyUrl proxied URL

remove the url parameter before passing

Naming convention for variables

Re-order code to reuse variable
2016-08-30 19:55:18 +01:00
Derek Webb
a7f830177a [Context Menu] New Tab button available in edit mode. #843 2016-08-29 18:33:48 -04:00
Charles Hacskaylo
2c2d9c1bfe [Frontend] Updated test specs
Fixes #1118
2016-08-29 14:26:27 -07:00
Charles Hacskaylo
cc6b9d4099 [Frontend] Revised mobile styles for form layout
Fixes #1118
2016-08-29 14:14:52 -07:00
Charles Hacskaylo
1a284ac9dc [Frontend] Proper classes added to text input configs
Fixes #1108
2016-08-29 14:14:51 -07:00
Charles Hacskaylo
b48ca99119 [Frontend] Sanding on larger locator control
Fixes #1118
2016-08-29 14:14:51 -07:00
Charles Hacskaylo
2e8d021a6a [Frontend] Improve layout of "locator"
Fixes #1118
Locator in Save In, Move, etc. dialog now
expands vertically to use as much vertical as
possible;
2016-08-29 14:14:51 -07:00
Victor Woeltjen
5409e3d203 Merge pull request #1147 from TypicalFooBar/101
[CommonUI] Info Bubbles allow user to copy text
2016-08-29 13:19:24 -07:00
Victor Woeltjen
f0064fd91f [README] Warn about root installation issues
Mitigates #1151.
2016-08-29 10:58:02 -07:00
Dhrubomoy Das Gupta
c3d158584b [Documentation] Update ../process/testing/plan.md
Clicking `Long-duration testing` was showing the right doc but wrong section due to typo in `procedures.md#long-duration-testng`. Fixed it, so now clicking `Long-duration testing` will take us to the right section.
2016-08-29 12:23:21 -04:00
Dhrubomoy Das Gupta
6b8a2a7770 [Documentation] Update /docs/src/guide/index.md
work flow -> workflow (one word)
domaiwn -> domain (typo)
pop up -> popup (one word)
2016-08-29 12:12:59 -04:00
Dhrubomoy Das Gupta
cbb7ada63c [Documentation] Update APIRedesign_PeteRichards.md
imperitive -> imperative
set up -> setup
compiliation -> compilation
2016-08-29 12:01:11 -04:00
Dhrubomoy Das Gupta
fe00d3e501 [Documentation] Updated APIRedesign.md
Contributer -> Contributor
effects -> affects (Effect is usually used as a noun. When an "s" is added, "effects" means personal belongings)
2016-08-29 11:54:14 -04:00
Dhrubomoy Das Gupta
b8eeeaeede [Documentation] Updated /architecture/platform.md
Changing following two words makes them a bit easier to read:
look­and­feel ->  look-­and-­feel
userfacing -> user-facing
2016-08-29 11:41:38 -04:00
Dhrubomoy Das Gupta
dd4e20cfb5 [Documentation] Updated /architecture/index.md
maintaing -> maintaining
2016-08-29 11:30:36 -04:00
Andrew Henry
597d66782e Merge pull request #1135 from vankessel/open1117
[Search] 'All' checked upon no filters. Fixes #1117
2016-08-29 14:17:07 +01:00
Andrew Henry
01031de074 Merge pull request #1148 from dhrubomoy/patch-1
[Documentation] Fixed typo
2016-08-29 13:36:46 +01:00
Andrew Henry
1cc29be3d6 Merge pull request #1149 from BogdanAlexandru/tutorial-diff-fix
[Documentation] Fix added lines in tutorial
2016-08-29 13:29:04 +01:00
Kevin Van Kessel
6cbdaa442b [Search] Repurposed checkAll test. #1117
Changed test to ensure checkAll and it's appropriate filter string are 
set whenever checkAll is changed.
Removed redundant line checking for a filter string of 'NONE' as this 
is no longer a possibility.
2016-08-28 12:01:42 -07:00
Andrew Henry
ab9d92a01a Merge pull request #1145 from nasa/remove-protractor-348
[Testing] Remove protractor hierarchy
2016-08-28 17:50:38 +01:00
Andrew Henry
8aa3000fb1 Merge pull request #1134 from nasa/dep-vuln-1130
[Build] Check dependencies for vulnerabilities
2016-08-28 17:45:25 +01:00
Victor Woeltjen
64d8b5fcd1 [Build] Incluse NSP in verify tasks 2016-08-28 17:37:22 +01:00
Victor Woeltjen
05e88e5dcf [Build] Add NSP task
...to check dependencies for known vulnerabilities.
2016-08-28 17:37:21 +01:00
Victor Woeltjen
5a819a96de [Build] Add gulp-nsp dependency
...to begin integrating checks for vulnerabilities in dependencies,
fixes #1130.
2016-08-28 17:37:21 +01:00
Andrew Henry
7998a3fc98 Merge pull request #1132 from nasa/locator-collapse-1008
[Locator] Don't reset root unnecessarily
2016-08-28 17:29:18 +01:00
Andrew Henry
9063996e84 Merge pull request #1127 from nasa/console-warning-1114
[Tree] Check for change before scope.$apply
2016-08-28 16:49:59 +01:00
Andrew Henry
76e62ae199 Merge pull request #1095 from nasa/build-reports
[Build] Normalize reporting for QA tasks
2016-08-28 16:36:09 +01:00
Abner Terribili
0e24de2b69 Add .swp to git ignore 2016-08-28 09:33:23 -03:00
Alex M
542dea69a1 [Documentation] Fix added lines in tutorial 2016-08-28 14:50:15 +03:00
Dhrubomoy Das Gupta
89f2e0943c [Documentation] Fixed typo
"Framework.md" was showing a 404 error. Changed it to "framework.md", which is the actual file name.
2016-08-28 02:02:18 -04:00
Derek Webb
08eaa822fe Removing use of bubble-container class (issue #101) 2016-08-27 21:29:30 -04:00
Derek Webb
39f2f94a53 Info bubbles now allow the user to copy text from them (issue #101) 2016-08-27 21:00:37 -04:00
Victor Woeltjen
b02de171f1 [Testing] Remove protractor hierarchy
Remove protractor test hierarchy; until work is completed on #348,
this is not useful and will be impractical to maintain.
2016-08-26 12:39:24 -07:00
Victor Woeltjen
1d4f36a7d9 [API] Include JSDoc for mct namespace only 2016-08-26 11:48:27 -07:00
Victor Woeltjen
0f96fbdd62 [API] Treat mct as a namespace 2016-08-26 11:31:56 -07:00
Victor Woeltjen
e05fb57fe4 [API] Quasi-sensible JSDoc starting point 2016-08-26 09:47:50 -07:00
Victor Woeltjen
185cdcab08 [API] Begin adding mct.js
...which will provide an instance of OpenMCT at startup,
as well as house documentation for entry point to public API.
2016-08-26 09:31:12 -07:00
Victor Woeltjen
50ccad5aaa [API] Rename MCT to OpenMCT 2016-08-26 09:26:12 -07:00
Victor Woeltjen
6a23df9454 [API] Add JSDoc for MCT 2016-08-25 14:54:07 -07:00
Victor Woeltjen
ab5b1d3754 [API] Add JSDoc task 2016-08-25 13:49:21 -07:00
Victor Woeltjen
b309f26b56 [API] Add gulp-jsdoc-to-markdown dep
...to aid in generating API docs as a measure of API completeness
and consistency, for #1110 and #1111
2016-08-25 13:38:44 -07:00
Victor Woeltjen
b4dc50295c Merge pull request #1131 from nasa/open1094
Resolve synchronization issues with MutableObject
2016-08-25 13:26:50 -07:00
Victor Woeltjen
382dde300a Merge remote-tracking branch 'origin/api-tutorials' into open1094
Conflicts:
	index.html
	tutorials/todo/todo.js
2016-08-25 13:25:54 -07:00
Victor Woeltjen
02aa08a3ef Merge pull request #1121 from nasa/api-containment
[API] Containment
2016-08-25 13:19:14 -07:00
Victor Woeltjen
c95d9c7956 Merge pull request #1107 from nasa/api-type-forms
[API] Handle forms with a "properties" region
2016-08-25 13:17:26 -07:00
Victor Woeltjen
fd97f4db41 [Selection] Begin implementing Hover gesture 2016-08-25 13:15:37 -07:00
Andrew Henry
4091e9cdf4 Merge pull request #1125 from medinae/patch-1
Suppress commented code on the github repository
2016-08-25 15:22:39 +01:00
Victor Woeltjen
b165322ba3 Merge pull request #1142 from BogdanAlexandru/tutorial-formatting-fix
[Documentation] Fix code formatting
2016-08-24 16:04:44 -07:00
Alex M
30750e63aa [Documentation] Code block spacing now consistent 2016-08-24 23:23:57 +03:00
Alex M
2cb636b050 [Documentation] Switch Step 2 to fenced 2016-08-24 22:56:43 +03:00
Alex M
5161205a06 [Documentation] Switch Step 1 to fenced 2016-08-24 22:45:55 +03:00
Alex M
79c5895f2f [Documentation] Fix code formatting 2016-08-24 21:07:11 +03:00
Andrew Henry
b1b8df4d87 Use MutationCapability 2016-08-23 13:57:12 +01:00
Victor Woeltjen
3228a83802 [Selection] Begin adding hover gesture 2016-08-22 16:32:48 -07:00
Victor Woeltjen
1dba551fc6 [Selection] Force single select
...as a simplifying assumption for the initial prototype.
2016-08-22 16:07:01 -07:00
Victor Woeltjen
44f8c2f49f Merge pull request #1106 from nasa/search1093-b
Minor Search enhancements
2016-08-22 15:27:12 -07:00
Victor Woeltjen
20f3b57ddd [Selection] Release listeners 2016-08-22 14:20:34 -07:00
Victor Woeltjen
58787c4436 [Selection] Remove obsolete include 2016-08-22 14:13:46 -07:00
Victor Woeltjen
2a45893602 [Selection] Begin adding context management 2016-08-22 13:22:17 -07:00
Kevin Van Kessel
702ebbd557 [Search] Update test for #1117 fix.
Changed test to work properly with #1117 fix.
Checks if checkAll gets checked when no options are checked.
Checks if changing checkAll updates the filter string to ''
2016-08-22 13:19:47 -07:00
Kevin Van Kessel
e29efbbcdf [Search] 'All' selected upon no filters. Fixes #1117
Upon deselecting every filter, the search returns nothing. This serves 
no useful purpose as discussed in #1117. Now deselecting every filter 
automatically selects 'All'.
2016-08-22 12:52:34 -07:00
Victor Woeltjen
a94ab44431 [Selection] Toggle selected class 2016-08-22 12:24:40 -07:00
Victor Woeltjen
cc9efdff31 [Selection] At Path.toArray 2016-08-22 12:17:29 -07:00
Charbel
44504feeb9 [Frontend] Tweak markup 2016-08-22 15:38:17 -03:00
Andrew Henry
bd3c6665fb Added bridge between old and new event models 2016-08-22 16:14:01 +01:00
Pete Richards
10e90519c0 Tidy todo views, remove unnecessary code 2016-08-22 16:10:45 +01:00
Pete Richards
d341a8be97 Selection changes include new selection 2016-08-22 16:10:45 +01:00
Andrew Henry
8c439d8109 Adding compatibility between old and new style mutation events 2016-08-22 07:59:17 +01:00
Victor Woeltjen
fdbe31cb76 [Locator] Remove redundant assignment
10d2794bb7 (r75547548)
2016-08-19 14:26:03 -07:00
Henry
9c88b7ce1d Removed setters from MutableObject and fixed non-working todo list tutorial
Refactoring MutableObject

Fixed non-working todo example
2016-08-19 13:39:23 -07:00
Victor Woeltjen
10d2794bb7 [Locator] Don't reset root unnecessarily
...as this will trigger a refresh of the mct-representation for
the tree, which will in turn create a new mct-tree instance,
resulting in any expanded/collapsed state being lost.

Fixes #1008.
2016-08-19 13:28:56 -07:00
Victor Woeltjen
eb3b6e5eca Merge pull request #1129 from nasa/open1128
[Documentation] Updated docs build script to push documentation to the correct directory on the website
2016-08-19 12:44:11 -07:00
Victor Woeltjen
6e664003e3 [Sub-object] Sketch in SelectGesture 2016-08-18 13:11:09 -07:00
Victor Woeltjen
70d804fc49 [Sub-object] Emit change events 2016-08-18 11:54:05 -07:00
Victor Woeltjen
06c184821e [Sub-object] Add Path.append 2016-08-18 11:51:09 -07:00
Victor Woeltjen
b76be3d2e5 [Sub-object] Basic Path/Selection implementation 2016-08-18 11:45:13 -07:00
Victor Woeltjen
8934ba96f7 [Sub-object] Add empty Selection class 2016-08-18 10:33:34 -07:00
Victor Woeltjen
3fb4ce7819 [Sub-object] Add EventEmitter dependency
Selection state will be represented in #1126 by an EventEmitter.
2016-08-17 16:32:44 -07:00
Henry
ccc32096ea [Documentation] Updated docs build script to push documentation to the correct directory on the website 2016-08-16 18:57:18 -07:00
Victor Woeltjen
4e5887d9ec [Tree] Check for change before scope.$apply
TreeView's observers will be called when the selected domain object
changes, which can occur for one of two reasons:

1. Because a new value was set externally, from mct-tree.
2. Because a new value was selected, by the user.

In the latter case a $apply is needed, but in the former it is not
(and causes an error.) However, when that case occurs, the value in
scope will be up to date already (it was a watch that triggered the
call to treeView.value) so no assignment or $apply is necessary.

Fixes #1114.
2016-08-15 16:04:14 -07:00
AbdelKader Bouadjadja
2167c061a2 No commented code on the github repository 2016-08-13 14:25:41 +04:00
Victor Woeltjen
2100c5717e [Build] Restore SNAPSHOT status
...to open sprint Orwell,
https://github.com/nasa/openmct/milestones/Orwell
2016-08-12 16:06:09 -07:00
Victor Woeltjen
acc1b8e207 [Build] Remove SNAPSHOT status
...to close sprint Niven,
https://github.com/nasa/openmct/milestones/Niven
2016-08-12 16:01:43 -07:00
Victor Woeltjen
2463e4d59f [API] Update Dialog API usage 2016-08-12 12:54:39 -07:00
Victor Woeltjen
d73c505bea [API] Fix typo, add missing this 2016-08-12 11:17:00 -07:00
Victor Woeltjen
831ecc59d9 [API] Wire in canContain via policy 2016-08-12 10:24:59 -07:00
Victor Woeltjen
1de26d3c5d [API] Throw error on containment violation 2016-08-12 09:30:02 -07:00
Victor Woeltjen
11409ce509 [API] Add containment methods 2016-08-12 09:27:46 -07:00
Victor Woeltjen
93872ce074 [API] Expose Dialog as constructor
...and use it that way from todo plugin
2016-08-11 16:04:26 -07:00
Victor Woeltjen
8861644f2d [API] Adjust Dialog API
...to allow OK button to be enabled/disabled.
2016-08-11 16:02:04 -07:00
Victor Woeltjen
d4948f771b Merge branch 'api-todo-update' into api-type-forms 2016-08-11 15:31:11 -07:00
Victor Woeltjen
8295a0bed1 [API] Update todo tutorial
...to expect new domain object API (instead of explicitly
wrapping it.)
2016-08-11 15:29:46 -07:00
Charles Hacskaylo
f3bd88837f Merge remote-tracking branch 'origin/master' into search1093-b
Conflicts:
	platform/search/res/templates/search.html
2016-08-08 17:51:39 -07:00
Charles Hacskaylo
8105a7edb8 Merge remote-tracking branch 'origin/master' into search1093-b
Conflicts:
	platform/search/res/templates/search.html
2016-08-08 17:51:25 -07:00
Victor Woeltjen
0656a298da [API] Remove test usage of properties region 2016-08-04 14:00:48 -07:00
Charles Hacskaylo
06f2c74444 [Frontend] Minor search enhancements
Fixes #1093
Finessed and cleaned up filters display
element; added '# results found' element;
2016-08-02 15:57:43 -07:00
Charles Hacskaylo
2d50a63ca4 Merge remote-tracking branch 'origin/search1093' into search1093-b
Conflicts:
	platform/search/res/templates/search.html
2016-08-02 15:03:48 -07:00
Victor Woeltjen
fe2ce91d50 [API] Show a custom view in dialog 2016-07-28 16:16:23 -07:00
Victor Woeltjen
14f30b2489 [API] Restrict dialog overrides
...to those domain objects which have some view for the
properties region registered.
2016-07-28 16:05:02 -07:00
Victor Woeltjen
62d90a8114 [API] Show dialog via mct 2016-07-28 15:57:15 -07:00
Victor Woeltjen
87682607a5 [API] Rename dependency in adapter layer 2016-07-28 15:53:07 -07:00
Victor Woeltjen
7bf265b478 [API] Move mct service up 2016-07-28 15:52:52 -07:00
Victor Woeltjen
1d31fe8d02 [API] Override dialogService in actions
An ugly hack to allow dialogs to be shown for Save As
and Edit Properties, without requiring form generation.
This will permit views to be shown instead in certain
cases, https://github.com/nasa/openmct/pull/999#issuecomment-236045158
2016-07-28 15:48:30 -07:00
Victor Woeltjen
bfdbc71e40 [API] Define a properties region 2016-07-28 15:34:03 -07:00
Pete Richards
1147f3aa47 tutorials: support arbitrary hosting directory (#1097)
* Include all bundles in artifact

change bundle registry such that all bundles are immediately registered,
but must be specifically enabled.  A default registry class enables bundles
that make sense for demonstration purposes.

Added methods to the registry to allow enabling and disabling of bundles
without having to load additional files.

* support alternate asset/worker paths

Change the gulp glob for assets to copy over a more minimal
set of files-- only css, fonts, and images.  Results in a
smaller distributable archive.

Update stylesheet loader to use a constant for the assets path.

This can be customized at run time via MCT.setAssetPath() to
allow MCT to be hosted in various locations.

Update worker loader to support loading workers from blobs to
support packaging as standalone file.

* Load templates via requirejs

* [gulp] lazy-require where reasonable

Require things right before starting tasks to reduce gulp start up time.

* document setAssetPath
2016-07-25 14:38:44 -07:00
Victor Woeltjen
719f9f45e8 [API] Add documentation for selection state (#1096) 2016-07-22 14:09:31 -07:00
Victor Woeltjen
95ef70a24c [API] Use selection state from toolbar (#1070)
* [API] Allow selection

* [API] Keep in sync using model

* [API] Add selection as EventEmitter

* [API] Use selection from ToDo tutorial

* [API] Restore selection functionality
2016-07-22 13:56:45 -07:00
Pete Richards
d5aa998b4c [API] Draft Composition API (#1068)
* [Objects] util for equality checking

Add a method for checking object equality, useful for other services.

* [Composition] Draft Composition API

Draft composition API.  Composition collections provide an observable
for watching and mutating the composition of an object.

Composition providers implement the loading and modification of composition.

The default composition provider uses the composition attribute of
domain objects, while allowing other providers to implement their
own loading and mutation behavior.

* add todo about event listener bindings

* [Type] Add form property for defining form fields

* [tutorial] Add Composition tutorial

* provider doesn't have to implement events, load returns array of children

* use new composition in old api

* correct key name

* Override instantiate to provide model ids

Override instantiate in public API adapter to prevent making changes to
platform code.  Instantiate now passes the id of the domain object with the
model so that capabilities can convert to a new-style domain object and use
that to detect functionality.

* Implement mutation capability with decorator

Implementation mutation capability override with decorator to adapter code
outside of platform.  Capability override ensures that models are kept in
sync even though they are no longer shared objects.

* override composition cleanly

Override composition capability without making changes inside platform.

* cleanup after temporary collections

* remove unused try/catch
2016-07-22 13:53:03 -07:00
Pete Richards
7890fcae69 tutorial consistency . (#1079)
* [API] use new-style objects consistently

* rewrite todo tutorial in test-api.html

* [API] Add API doc, update object API

* [Tutorials] Rename tutorials, remove old

* Fix Links

* updates

* initial

* hope this works

* Object Utils always return new objects instead of mutating existing objects

* keep domain object model in-sync when listening

Keep the domain object model in sync with the latest version when
listening for mutation events.

* Remove old-style plugins

* Update views to use new API

* Tidy Code

* Update API Docs

* Add Plugin API and Example
2016-07-21 14:39:02 -07:00
Victor Woeltjen
41156cec7c [Build] Normalize reporting for QA tasks
https://developer.nasa.gov/ResourceProspector/warp/issues/191
2016-07-21 12:11:05 -07:00
Victor Woeltjen
18843cee48 [API] Change approach to applies-to checking (#1072)
* [API] Allow selection

* [API] Keep in sync using model

* [API] Add selection as EventEmitter

* [API] Use selection from ToDo tutorial

* [API] Add appliesTo-style method

* [API] Remove destroy method, simplify show

* [View] Return a no-op

* [API] Use new applies-to checking

* [API] Rename TodoView to TodoRenderer

* [API] Rewire views

* [API] Wire up so that things work

* [API] Begin adding container

...to attempt to give views something to listen to for destroy-like
events

* [API] Begin using regions...

* [API] Begin working through Region stuff

* [API] Revise Region API

...for similarity with Marionette,
https://github.com/nasa/openmct/pull/1072#issuecomment-230902986

* [API] Begin separating View, ViewDefinition

* [API] Finish separating View/ViewDefinition

* [API] Update MCTView

...to reflect updates to Region/View/ViewDefinition APIs

* [API] Simplify View API

...merging closely-related populate/show methods, and restoring
compatibility with todo tutorial

* [API] Wire in from todo tutorial plugin

* [API] Switch back to region constants

* [API] Update method signature, add JSDoc

* [API] Update variable name

* [API] Remove unnecessary separate regions file

* [API] Relocate Region; not external api

* [API] Revert changes to api.js

...as these ended up becoming entirely superficial
2016-07-20 13:46:03 -07:00
Charles Hacskaylo
9fa6184b0a [Frontend] Markup / Angular mods to Search
Fixes #1093
WIP: markup changes. Needs CSS mods effected in
#1047 as well.
2016-07-19 15:23:22 -07:00
Andrew Henry
1879c122c7 Mutation API (#1074)
* [API] Allow selection

* [API] Keep in sync using model

* [API] Add selection as EventEmitter

* [API] Use selection from ToDo tutorial

* Object events prototype

* Added examples

* Transitional API

* Modified todo list code to work with new setters

* [API] Removed emitting of events on container when property changes value to remove ambiguity. Listeners must be listening to the same path used in the setter to catch changes
2016-07-07 14:30:45 -07:00
Pete Richards
d7ddb96c4e [API] UMD Packaging (#1078)
* [Bundle] load filter with requirejs

* [Build] Use almond, wrap in UMD

Use almond for built version of application and wrap in UMD so that
it supports requirejs, commonjs, and basic browser loading.

* [Main] Can choose where to load app

MCT.run allows you to specify a dom element to load application
within.  If element is not specified, will use body.

* [MCT] set class on injected div

Set class on injected div so extra markup is not required.

* [Build] Re-enable optimize

* Add minimal bootstrap example
2016-07-07 14:25:23 -07:00
Pete Richards
bccd018d97 Telemetry Draft 2016-07-01 10:26:49 -07:00
Andrew Henry
b55668426d Merge pull request #1062 from nasa/tc-redux
[Time Conductor] V2 Public API
2016-07-01 10:22:16 -07:00
Henry
5b656faa9d Added tests 2016-07-01 10:22:44 -07:00
Pete Richards
8d2c489fa9 [TimeConductor] Set bounds on timeSystem Change
Always set bounds on timeSystem change as not having valid bounds would
put views in inconsistent states.
2016-07-01 10:22:44 -07:00
Henry
4366b0870d [Time Conductor] API redesign. Initial commit of V2 public API. Addresses #933 2016-07-01 10:22:44 -07:00
Victor Woeltjen
47a543beb7 Merge pull request #1067 from nasa/api-css
[API] Remove stylesheet from example
2016-07-01 10:17:36 -07:00
Victor Woeltjen
06f87c1472 Merge pull request #1029 from nasa/api-toolbar-add-only
[API Prototype] Add toolbar
2016-07-01 10:13:29 -07:00
Victor Woeltjen
c9c41cdcc8 Merge remote-tracking branch 'origin/api-tutorials' into api-toolbar-add-only
Conflicts:
	src/MCT.js
2016-07-01 10:10:33 -07:00
Victor Woeltjen
14a56ea17e Merge pull request #1028 from nasa/api-view
[API Prototype] Support imperative view registration
2016-07-01 10:09:29 -07:00
Victor Woeltjen
b2e7db71cc Merge remote-tracking branch 'origin/api-tutorials' into api-view
Conflicts:
	src/MCT.js
	src/api/api.js
2016-07-01 10:08:05 -07:00
Victor Woeltjen
d51e6bfd92 Merge pull request #1030 from nasa/api-tutorial/objects
Api tutorial/objects
2016-07-01 10:03:42 -07:00
Pete Richards
d475d767d5 add grootprovider 2016-06-17 17:05:05 -07:00
Pete Richards
a63e053399 [ObjectAPI] Draft new Object API
Rought prototype of new object API.
2016-06-17 16:59:35 -07:00
Victor Woeltjen
370b515c23 [API] Synchronize view to model 2016-06-17 14:21:37 -07:00
Victor Woeltjen
4a50f325cb [API] Allow tasks to be added 2016-06-17 14:18:51 -07:00
Victor Woeltjen
dbe6a4efc1 [API] Title dialog 2016-06-17 14:05:00 -07:00
Victor Woeltjen
13920d8802 [API] Resolve/reject from dialog 2016-06-17 14:00:45 -07:00
Victor Woeltjen
b6a8c514aa [API] Show dialog from toolbar 2016-06-17 13:51:15 -07:00
Victor Woeltjen
e4a4704baa [API] Listen to add/remove buttons 2016-06-17 13:41:59 -07:00
Victor Woeltjen
be0029e59a [API] Get todo toolbar to look right 2016-06-17 13:38:54 -07:00
Victor Woeltjen
9cb273ef0a [API] Get registered toolbar to appear 2016-06-17 13:30:08 -07:00
Victor Woeltjen
eec9b1cf4c [API] Support distinct region registration 2016-06-17 13:10:24 -07:00
Victor Woeltjen
1f96e84542 [API] Override template to allow toolbar injection 2016-06-17 12:16:46 -07:00
Victor Woeltjen
c289a27305 [API] Begin adding toolbar 2016-06-17 11:43:49 -07:00
Victor Woeltjen
c944080790 [API] Remove stylesheet from example
No need to provide custom API for this.
2016-06-17 11:27:04 -07:00
Victor Woeltjen
96316de6e4 [API] Update view API 2016-06-17 11:16:08 -07:00
Victor Woeltjen
2240a87ddc [API] Move view off of type 2016-06-17 10:53:56 -07:00
Victor Woeltjen
d891affe48 [API] Move view off of type 2016-06-17 10:21:00 -07:00
Victor Woeltjen
21a618d1ce Merge branch 'api-type-proto' into api-view 2016-06-17 10:19:44 -07:00
Victor Woeltjen
5de7a96ccc Merge pull request #1010 from nasa/api-type-proto
[API Prototype] Type registration
2016-06-17 10:18:42 -07:00
Victor Woeltjen
09a833f524 Merge branch 'api-tutorials' into api-type-proto 2016-06-10 13:28:09 -07:00
Victor Woeltjen
580a4e52b5 Merge branch 'api-tutorials' into api-type-driven 2016-06-07 14:01:08 -07:00
Victor Woeltjen
9c4e17bfab [Tutorials] Add telemetry tutorial 2016-06-07 13:14:36 -07:00
Victor Woeltjen
d3e5d95d6b [Tutorials] Add example server 2016-06-07 13:00:38 -07:00
Victor Woeltjen
c70793ac2d [Tutorials] Add remainder of bargraph 2016-06-07 12:55:29 -07:00
Victor Woeltjen
a6ef1d3423 [Tutorials] Add Bar Graph tutorial 2016-06-07 12:49:38 -07:00
Victor Woeltjen
4ca2f51d5e [API] Use subclass style 2016-05-27 17:08:25 -07:00
Victor Woeltjen
86ac80ddbd [API] Persist mutations 2016-05-27 16:56:08 -07:00
Victor Woeltjen
0525ba6b0b [API] Check/uncheck todos 2016-05-27 16:55:10 -07:00
Victor Woeltjen
a79e958ffc [API] Show tasks from todo 2016-05-27 16:46:06 -07:00
Victor Woeltjen
03cb0ccb57 [API] Get View to render 2016-05-27 16:36:55 -07:00
Victor Woeltjen
7205faa6bb [API] Add adapter bundle 2016-05-27 16:27:47 -07:00
Victor Woeltjen
136f2ae785 [API] Add MCTView directive as an adapter 2016-05-27 16:19:20 -07:00
Victor Woeltjen
a07e2fb8e5 [API] Implement View 2016-05-27 16:08:43 -07:00
Victor Woeltjen
55b531bdeb [API] Sketch in view instantiation 2016-05-27 15:49:16 -07:00
Victor Woeltjen
7ece5897e8 [API] Begin adding View 2016-05-27 15:31:54 -07:00
Victor Woeltjen
a29c7a6eab [API] Deangularize todo templates 2016-05-27 13:46:30 -07:00
Victor Woeltjen
c4fec1af6a [API] Move type toward a newer API 2016-05-27 13:31:30 -07:00
Victor Woeltjen
a6996df3df [API] Begin moving out type 2016-05-27 13:17:16 -07:00
Victor Woeltjen
0c660238f2 [API] Add MCT class 2016-05-27 11:49:43 -07:00
Victor Woeltjen
b73b824e55 [API] Add EventEmitter dep 2016-05-27 11:45:59 -07:00
Victor Woeltjen
1954d98628 [Tutorials] Remove diff markings in TodoController 2016-05-27 11:30:53 -07:00
Victor Woeltjen
7aa034ce23 Add todo tutorial 2016-05-26 16:05:38 -07:00
Victor Woeltjen
385dc5d298 Begin adding tutorials 2016-05-26 15:36:09 -07:00
224 changed files with 5811 additions and 3425 deletions

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@
*.gzip
*.tgz
*.DS_Store
*.swp
# Compiled CSS, unless directly added
*.sass-cache

285
API.md Normal file
View File

@@ -0,0 +1,285 @@
# Open MCT API
The Open MCT framework public api can be utilized by building the application
(`gulp install`) and then copying the file from `dist/main.js` to your
directory of choice.
Open MCT supports AMD, CommonJS, and loading via a script tag; it's easy to use
in your project. The [`openmct`]{@link module:openmct} module is exported
via AMD and CommonJS, and is also exposed as `openmct` in the global scope
if loaded via a script tag.
## Overview
Open MCT's goal is to allow you to browse, create, edit, and visualize all of
the domain knowledge you need on a daily basis.
To do this, the main building block provided by Open MCT is the _domain object_.
The temperature sensor on the starboard solar panel,
an overlay plot comparing the results of all temperature sensor,
the command dictionary for a spacecraft,
the individual commands in that dictionary, your "my documents" folder:
All of these things are domain objects.
Domain objects have Types, so a specific instrument temperature sensor is a
"Telemetry Point," and turning on a drill for a certain duration of time is
an "Activity". Types allow you to form an ontology of knowledge and provide
an abstraction for grouping, visualizing, and interpreting data.
And then we have Views. Views allow you to visualize domain objects. Views can
apply to specific domain objects; they may also apply to certain types of
domain objects, or they may apply to everything. Views are simply a method
of visualizing domain objects.
Regions allow you to specify what views are displayed for specific types of
domain objects in response to different user actions. For instance, you may
want to display a different view while editing, or you may want to update the
toolbar display when objects are selected. Regions allow you to map views to
specific user actions.
Domain objects can be mutated and persisted, developers can create custom
actions and apply them to domain objects, and many more things can be done.
For more information, read on!
## Running Open MCT
Once the [`openmct`](@link module:openmct) module has been loaded, you can
simply invoke [`start`]{@link module:openmct.MCT#start} to run Open MCT:
```
openmct.start();
```
Generally, however, you will want to configure Open MCT by adding plugins
before starting it. It is important to install plugins and configure Open MCT
_before_ calling [`start`]{@link module:openmct.MCT#start}; Open MCT is not
designed to be reconfigured once started.
## Configuring Open MCT
The [`openmct`]{@link module:openmct} module (more specifically, the
[`MCT`]{@link module:openmct.MCT} class, of which `openmct` is an instance)
exposes a variety of methods to allow the application to be configured,
extended, and customized before running.
Short examples follow; see the linked documentation for further details.
### Adding Domain Object Types
Custom types may be registered via
[`openmct.types`]{@link module:openmct.MCT#types}:
```
openmct.types.addType('my-type', new openmct.Type({
label: "My Type",
description: "This is a type that I added!"
});
```
### Adding Views
Custom views may be registered based on the region in the application
where they should appear:
* [`openmct.mainViews`]{@link module:openmct.MCT#mainViews} is a registry
of views of domain objects which should appear in the main viewing area.
* [`openmct.inspectors`]{@link module:openmct.MCT#inspectors} is a registry
of views of domain objects and/or active selections, which should appear in
the Inspector.
* [`openmct.toolbars`]{@link module:openmct.MCT#toolbars} is a registry
of views of domain objects and/or active selections, which should appear in
the toolbar area while editing.
* [`openmct.indicators`]{@link module:openmct.MCT#inspectors} is a registry
of views which should appear in the status area of the application.
Example:
```
openmct.mainViews.addProvider({
canView: function (domainObject) {
return domainObject.type === 'my-type';
},
view: function (domainObject) {
return new MyView(domainObject);
}
});
```
### Adding a Root-level Object
In many cases, you'd like a certain object (or a certain hierarchy of
objects) to be accessible from the top level of the application (the
tree on the left-hand side of Open MCT.) It is typical to expose a telemetry
dictionary as a hierarchy of telemetry-providing domain objects in this
fashion.
To do so, use the [`addRoot`]{@link module:openmct.ObjectAPI#addRoot} method
of the [object API]{@link module:openmct.ObjectAPI}:
```
openmct.objects.addRoot({
identifier: { key: "my-key", namespace: "my-namespace" }
name: "My Root-level Object",
type: "my-type"
});
```
You can also remove this root-level object via its identifier:
```
openmct.objects.removeRoot({ key: "my-key", namespace: "my-namespace" });
```
### Adding Composition Providers
The "composition" of a domain object is the list of objects it contains,
as shown (for example) in the tree for browsing. Open MCT provides a
default solution for composition, but there may be cases where you want
to provide the composition of a certain object (or type of object) dynamically.
For instance, you may want to populate a hierarchy under a custom root-level
object based on the contents of a telemetry dictionary.
To do this, you can add a new CompositionProvider:
```
openmct.composition.addProvider({
appliesTo: function (domainObject) {
return domainObject.type === 'my-type';
},
load: function (domainObject) {
return Promise.resolve(myDomainObjects);
}
});
```
### Adding Telemetry Providers
When connecting to a new telemetry source, you will want to register a new
[telemetry provider]{@link module:openmct.TelemetryAPI~TelemetryProvider}
with the [telemetry API]{@link module:openmct.TelemetryAPI#addProvider}:
```
openmct.telemetry.addProvider({
canProvideTelemetry: function (domainObject) {
return domainObject.type === 'my-type';
},
properties: function (domainObject) {
return [
{ key: 'value', name: "Temperature", units: "degC" },
{ key: 'time', name: "UTC" }
];
},
request: function (domainObject, options) {
var telemetryId = domainObject.myTelemetryId;
return myAdapter.request(telemetryId, options.start, options.end);
},
subscribe: function (domainObject, callback) {
var telemetryId = domainObject.myTelemetryId;
myAdapter.subscribe(telemetryId, callback);
return myAdapter.unsubscribe.bind(myAdapter, telemetryId, callback);
}
});
```
The implementations for `request` and `subscribe` can vary depending on the
nature of the endpoint which will provide telemetry. In the example above,
it is assumed that `myAdapter` contains the specific implementations
(HTTP requests, WebSocket connections, etc.) associated with some telemetry
source.
## Using Open MCT
When implementing new features, it is useful and sometimes necessary to
utilize functionality exposed by Open MCT.
### Retrieving Composition
To limit which objects are loaded at any given time, the composition of
a domain object must be requested asynchronously:
```
openmct.composition(myObject).load().then(function (childObjects) {
childObjects.forEach(doSomething);
});
```
### Support Common Gestures
Custom views may also want to support common gestures using the
[gesture API]{@link module:openmct.GestureAPI}. For instance, to make
a view (or part of a view) selectable:
```
openmct.gestures.selectable(myHtmlElement, myDomainObject);
```
### Working with Domain Objects
The [object API]{@link module:openmct.ObjectAPI} provides useful methods
for working with domain objects.
To make changes to a domain object, use the
[`mutate`]{@link module:openmct.ObjectAPI#mutate} method:
```
openmct.objects.mutate(myDomainObject, "name", "New name!");
```
Making modifications in this fashion allows other usages of the domain
object to remain up to date using the
[`observe`]{@link module:openmct.ObjectAPI#observe} method:
```
openmct.objects.observe(myDomainObject, "name", function (newName) {
myLabel.textContent = newName;
});
```
### Using Telemetry
Very often in Open MCT, you wish to work with telemetry data (for instance,
to display it in a custom visualization.)
### Synchronizing with the Time Conductor
Views which wish to remain synchronized with the state of Open MCT's
time conductor should utilize
[`openmct.conductor`]{@link module:openmct.TimeConductor}:
```
openmct.conductor.on('bounds', function (newBounds) {
requestTelemetry(newBounds.start, newBounds.end).then(displayTelemetry);
});
```
## Plugins
While you can register new features with Open MCT directly, it is generally
more useful to package these as a plugin. A plugin is a function that takes
[`openmct`]{@link module:openmct} as an argument, and performs configuration
upon `openmct` when invoked.
### Installing Plugins
To install plugins, use the [`install`]{@link module:openmct.MCT#install}
method:
```
openmct.install(myPlugin);
```
The plugin will be invoked to configure Open MCT before it is started.
### Writing Plugins
Plugins configure Open MCT, and should utilize the
[`openmct`]{@link module:openmct} module to do so, as summarized above in
"Configuring Open MCT" and "Using Open MCT" above.
### Distributing Plugins
Hosting or downloading plugins is outside of the scope of this documentation.
We recommend distributing plugins as UMD modules which export a single
function.

View File

@@ -560,3 +560,132 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---
### Almond
* Link: https://github.com/requirejs/almond
* Version: 0.3.3
* Author: jQuery Foundation
* Description: Lightweight RequireJS replacement for builds
#### License
Copyright jQuery Foundation and other contributors, https://jquery.org/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/requirejs/almond
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
Copyright and related rights for sample code are waived via CC0. Sample
code is defined as all source code displayed within the prose of the
documentation.
CC0: http://creativecommons.org/publicdomain/zero/1.0/
====
Files located in the node_modules directory, and certain utilities used
to build or test the software in the test and dist directories, are
externally maintained libraries used by this software which have their own
licenses; we recommend you read them, as their terms may differ from the
terms above.
### Lodash
* Link: https://lodash.com
* Version: 3.10.1
* Author: Dojo Foundation
* Description: Utility functions
#### License
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
### EventEmitter3
* Link: https://github.com/primus/eventemitter3
* Version: 1.2.0
* Author: Arnout Kazemier
* Description: Event-driven programming support
#### License
The MIT License (MIT)
Copyright (c) 2014 Arnout Kazemier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -10,13 +10,29 @@ Try Open MCT now with our [live demo](https://openmct-demo.herokuapp.com/).
![Demo](https://nasa.github.io/openmct/static/res/images/Open-MCT.Browse.Layout.Mars-Weather-1.jpg)
## New API
A new API is currently under development that will deprecate a lot of the documentation currently in the docs directory, however Open MCT will remain compatible with the currently documented API. An updated set of tutorials is being developed with the new API, and progress on this task can be followed in the [associated pull request](https://github.com/nasa/openmct/pull/999). Any code in this branch should be considered experimental, and we welcome any feedback.
Differences between the two APIs include a move away from a declarative system of JSON configuration files towards an imperative system based on function calls. Developers will be able to extend and build on Open MCT by making direct function calls to a public API. Open MCT is also being refactored to minimize the dependencies that using Open MCT imposes on developers, such as the current requirement to use Angular JS.
A simpler, [easier-to-use API](https://nasa.github.io/openmct/docs/api/)
has been added to Open MCT. Changes in this
API include a move away from a declarative system of JSON configuration files
towards an imperative system based on function calls. Developers will be able
to extend and build on Open MCT by making direct function calls to a public
API. Open MCT is also being refactored to minimize the dependencies that using
Open MCT imposes on developers, such as the current requirement to use
AngularJS.
This new API has not yet been heavily used and is likely to contain defects.
You can help by trying it out, and reporting any issues you encounter
using our GitHub issue tracker. Such issues may include bugs, suggestions,
missing documentation, or even just requests for help if you're having
trouble.
We want Open MCT to be as easy to use, install, run, and develop for as
possible, and your feedback will help us get there!
## Building and Running Open MCT Locally
Building and running Open MCT in your local dev environment is very easy. Be sure you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed, then follow the directions below. Need additional information? Check out the [Getting Started](https://nasa.github.io/openmct/getting-started/) page on our website.
(These instructions assume you are installing as a non-root user; developers have [reported issues](https://github.com/nasa/openmct/issues/1151) running these steps with root privileges.)
1. Clone the source code
@@ -36,6 +52,22 @@ Open MCT is now running, and can be accessed by pointing a web browser at [http:
Documentation is available on the [Open MCT website](https://nasa.github.io/openmct/documentation/). The documentation can also be built locally.
### Examples
The clearest examples for developing Open MCT plugins are in the
[tutorials](https://nasa.github.io/openmct/docs/tutorials/) provided in
our documentation.
For a practical example of a telemetry adapter, see David Hudson's
[Kerbal Space Program plugin](https://github.com/hudsonfoo/kerbal-openmct),
which allows [Kerbal Space Program](https://kerbalspaceprogram.com) players
to build and use displays for their own missions in Open MCT.
Additional examples are available in the `examples` hierarchy of this
repository; however, be aware that these examples are
[not fully-documented](https://github.com/nasa/openmct/issues/846), so
the tutorials will likely serve as a better starting point.
### Building the Open MCT Documentation Locally
Open MCT's documentation is generated by an
[npm](https://www.npmjs.com/)-based build. It has additional dependencies that

View File

@@ -13,11 +13,15 @@
"moment-duration-format": "^1.3.0",
"requirejs": "~2.1.22",
"text": "requirejs-text#^2.0.14",
"es6-promise": "^3.0.2",
"es6-promise": "^3.3.0",
"screenfull": "^3.0.0",
"node-uuid": "^1.4.7",
"comma-separated-values": "^3.6.4",
"FileSaver.js": "^0.0.2",
"zepto": "^1.1.6"
"zepto": "^1.1.6",
"eventemitter3": "^1.2.0",
"lodash": "3.10.1",
"almond": "~0.3.2",
"html2canvas": "^0.4.1"
}
}

View File

@@ -32,7 +32,7 @@ WEBSITE_DIRECTORY="website"
BUILD_SHA=`git rev-parse HEAD`
# A remote will be created for the git repository we are pushing to.
# Don't worry, as this entire directory will get trashed inbetween builds.
# Don't worry, as this entire directory will get trashed in between builds.
REMOTE_NAME="documentation"
WEBSITE_BRANCH="master"
@@ -45,8 +45,8 @@ npm run docs
echo "git clone $REPOSITORY_URL website"
git clone $REPOSITORY_URL website || exit 1
echo "cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY/docs"
cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY/docs
echo "cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY"
cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY
echo "cd $WEBSITE_DIRECTORY"
cd $WEBSITE_DIRECTORY || exit 1

View File

@@ -6,7 +6,7 @@ overall architecture of Open MCT.
The target audience includes:
* _Platform maintainers_: Individuals involved in developing,
extending, and maintaing capabilities of the platform.
extending, and maintaining capabilities of the platform.
* _Integration developers_: Individuals tasked with integrated
Open MCT into a larger system, who need to understand
its inner workings sufficiently to complete this integration.
@@ -63,7 +63,7 @@ These layers are:
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,
* [_Platform_](platform.md): The platform layer defines the general look,
feel, and behavior of Open MCT. 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.
@@ -74,5 +74,3 @@ These layers are:
typically consists of a mix of custom plug-ins to Open MCT,
as well as optional features (such as Plot view) included alongside
the platform.

View File

@@ -1,6 +1,6 @@
# Overview
The Open MCT platform utilizes the [framework layer](Framework.md)
The Open MCT platform utilizes the [framework layer](framework.md)
to provide an extensible baseline for applications which includes:
* A common user interface (and user interface paradigm) for dealing with
@@ -38,7 +38,7 @@ in __any of these tiers__.
are initiated from here and invoke behavior in the presentation layer. HTML 
templates are written in Angulars template syntax; see the [Angular documentation on templates](https://docs.angularjs.org/guide/templates). 
These describe the page as actually seen by the user. Conceptually, 
stylesheets (controlling the look­and­feel of the rendered templates) belong 
stylesheets (controlling the look-and-feel of the rendered templates) belong 
in this grouping as well. 
* [_Presentation layer_](#presentation-layer): The presentation layer
is responsible for updating (and providing information to update)
@@ -48,7 +48,7 @@ in __any of these tiers__.
display.
* [_Information model_](#information-model): Provides a common (within Open MCT 
Web) set of interfaces for dealing with “things” ­ domain objects ­ within the 
system. User­facing concerns in a Open MCT Web application are expressed as 
system. User-facing concerns in a Open MCT Web application are expressed as 
domain objects; examples include folders (used to organize other domain 
objects), layouts (used to build displays), or telemetry points (used as 
handles for streams of remote measurements.) These domain objects expose a 
@@ -616,7 +616,7 @@ follows:
part of an action's extension definition.
* `CreateActionProvider` provides the various Create actions which
populate the Create menu. These are driven by the available types,
so do not map easily ot extension category `actions`; instead, these
so do not map easily to extension category `actions`; instead, these
are generated after looking up which actions are available from the
[`TypeService`](#type-service).
* `ActionAggregator` merges together actions from multiple providers.

View File

@@ -98,7 +98,7 @@ Worked on bug fixes in the platform and a plugin for search.
It is hard to figure out what the difference between the various ways of
dealing with telemetry are. e.g., what is the difference between just
"Telemetry" and the "Telemetry Service"? There are many
"Telemetry Thing"s which seem related, but in an unclear way.
"Telemetry Things" which seem related, but in an unclear way.
### Developer Intern 2
@@ -180,7 +180,7 @@ to develop a tabular visualization plugin.
* Add a model property to the bundle.json to take in "Hello World"
as a parameter and pass through to the controller/view
### Open Source Contributer
### Open Source Contributor
* [Failures are non-graceful when services are missing.](
https://github.com/nasa/openmctweb/issues/79)
@@ -214,7 +214,7 @@ to an entirely different framework.
We can expect AngularJS 1.x to reach end-of-life reasonably soon thereafter.
Our API is currently a superset of Angular's API, so this directly effects
Our API is currently a superset of Angular's API, so this directly affects
our API. Specifically, API changes should be oriented towards removing
or reducing the Angular dependency.
@@ -456,7 +456,7 @@ Instead, propose that:
For parity with actions, a `View` would be a constructor which
takes an `ActionContext` as a parameter (with similarly-defined
properties) and exposes a method to retrieve the HTML elements
associateed with it.
associated with it.
The platform would then additionally expose an `AngularView`
implementation to improve compatibility with existing

View File

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

View File

@@ -643,7 +643,7 @@ to be passed along by other services.
## Domain Objects
Domain objects are the most fundamental component of Open MCT's information
model. A domain object is some distinct thing relevant to a user's work flow,
model. A domain object is some distinct thing relevant to a user's workflow,
such as a telemetry channel, display, or similar. Open MCT is a tool for
viewing, browsing, manipulating, and otherwise interacting with a graph of
domain objects.
@@ -933,7 +933,7 @@ Note that `templateUrl` is not supported for `containers`.
Controls provide options for the `mct-control` directive.
Six standard control types are included in the forms bundle:
Ten standard control types are included in the forms bundle:
* `textfield`: An area to enter plain text.
* `select`: A drop-down list of options.
@@ -941,7 +941,13 @@ Six standard control types are included in the forms bundle:
* `color`: A color picker.
* `button`: A button.
* `datetime`: An input for UTC date/time entry; gives result as a UNIX
timestamp, in milliseconds since start of 1970, UTC.
timestamp, in milliseconds since start of 1970, UTC.
* `composite`: A control parenting an array of other controls.
* `menu-button`: A drop-down list of items supporting custom behavior
on click.
* `dialog-button`: A button which opens a dialog allowing a single property
to be edited.
* `radio`: A radio button.
New controls may be added as extensions of the controls category. Extensions of
this category have two properties:
@@ -981,7 +987,7 @@ Examples of gestures included in the platform are:
composition.
* `drop`: For representations that can be drop targets for drag-and-drop
composition.
* `menu`: For representations that can be used to pop up a context menu.
* `menu`: For representations that can be used to popup a context menu.
Gesture definitions have a property `key` which is used as a machine-readable
identifier for the gesture (e.g. `drag`, `drop`, `menu` above.)
@@ -1153,7 +1159,7 @@ For example, the _My Items_ folder is added as an extension of this category.
Extensions of this category should have the following properties:
* `id`: The machine-readable identifier for the domaiwn object being exposed.
* `id`: The machine-readable identifier for the domain object being exposed.
* `model`: The model, as a JSON object, for the domain object being exposed.
## Stylesheets Category

View File

@@ -9,26 +9,30 @@
Open MCT 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
The platform is configured by plugins which 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, 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
* The [Development Process](process/) document describes the
Open MCT software development cycle.
## Legacy Documentation
As we transition to a new API, the following documentation for the old API
(which is supported during the transtion) may be useful as well:
* The [Architecture Overview](architecture/) describes the concepts used
throughout Open MCT, and gives a high level overview of the platform's design.
* The [Developer's Guide](guide/) goes into more detail about how to use the
platform and the functionality that it provides.
* The [Tutorials](tutorials/) give examples of extending the platform to add
functionality,
and integrate with data sources.

View File

@@ -102,7 +102,7 @@ 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)
* [_Long-duration testing_](procedures.md#long-duration-testing)
(specifically, for 24 hours.)
Issues are reported as a product of both forms of testing.

View File

@@ -48,17 +48,17 @@ for a more general overview of how to run and deploy a Open MCT application.
First step is to check out Open MCT from the source repository.
`git clone https://github.com/nasa/openmctweb.git openmctweb`
`git clone https://github.com/nasa/openmct.git openmct`
This will create a copy of the Open MCT source code repository in the folder
`openmctweb` (relative to the path from which you ran the command.)
`openmct` (relative to the path from which you ran the command.)
If you have a repository URL, use that as the "path to repo" above. Alternately,
if you received Open MCT as a git bundle, the path to that bundle on the
local filesystem can be used instead.
At this point, it will also be useful to branch off of Open MCT v0.6.2
(which was used when writing these tutorials) to begin adding plugins.
cd openmctweb
cd openmct
git branch <my branch name> open-v0.6.2
git checkout <my branch name>
@@ -79,7 +79,7 @@ changes to stylesheets, or you are running the minified version of the app
The next step is to run a web server so that you can view the Open MCT
client (including the plugins you add to it) in browser. Any web server can
be used for hosting OpenMCTWeb, and a trivial web server is provided in this
be used for hosting Open MCT, and a trivial web server is provided in this
package for the purposes of running the tutorials. The provided web server
should not be used in a production environment
@@ -91,7 +91,7 @@ To run the tutorial web server
Once running, you should be able to view Open MCT from your browser at
http://localhost:8080/ (assuming the web server is running on port 8080,
and OpenMCTWeb is installed at the server's root path).
and Open MCT is installed at the server's root path).
[Google Chrome](https://www.google.com/chrome/) is recommended for these
tutorials, as Chrome is Open MCT's "test-to" browser. The browser cache
can sometimes interfere with development (masking changes by
@@ -130,7 +130,6 @@ to this plugin as tutorials/todo as well.) We will start with an "empty bundle",
one which exposes no extensions - which looks like:
```diff
define([
'legacyRegistry'
], function (
@@ -144,7 +143,6 @@ define([
}
});
});
```
__tutorials/todo/bundle.js__
@@ -348,7 +346,8 @@ deeper explanation of domain objects, see the Open MCT Developer Guide.)
In the case of our to-do list feature, the to-do list itself is the thing we'll
want users to be able to create and edit. So, we will add that as a new type in
our bundle definition:
```diff
```diff
define([
'legacyRegistry'
], function (
@@ -370,7 +369,6 @@ define([
+ ]}
});
});
```
__tutorials/todo/bundle.js__
@@ -427,7 +425,6 @@ are stored by convention.)
</li>
</ul>
```
__tutorials/todo/res/templates/todo.html__
A summary of what's included:
@@ -573,6 +570,7 @@ We will define that in an AMD module (see http://requirejs.org/docs/whyamd.html)
in the directory `tutorials/todo/src/controllers` (`src` is, by default, the
directory where bundle-related source code is kept, and controllers is where
Angular controllers are stored by convention.)
```diff
define(function () {
function TodoController($scope) {
@@ -971,6 +969,7 @@ by the tool bar we've defined.
Additionally, we need to make changes to our template to select specific tasks
in response to some user gesture. Here, we will select tasks when a user clicks
the description.
```diff
<div ng-controller="TodoController">
<div>
@@ -996,6 +995,7 @@ __tutorials/todo/res/templates/todo.html__
Finally, the `TodoController` uses the `dialogService` now, so we need to
declare that dependency in its extension definition:
```diff
define([
'legacyRegistry',
@@ -1248,7 +1248,6 @@ another file to the res directory of our bundle; this time, it is `css/todo.css`
font-style: italic;
}
```
__tutorials/todo/res/css/todo.css__
Here, we have defined classes and appearances for:
@@ -1261,6 +1260,7 @@ Here, we have defined classes and appearances for:
To include this CSS file in our running instance of Open MCT, we need to
declare it in our bundle definition, this time as an extension of category
`stylesheets`:
```diff
define([
'legacyRegistry',
@@ -1430,7 +1430,6 @@ define([
});
});
```
__tutorials/bargraph/bundle.js__
The view definition should look familiar after the To-Do List tutorial, with
@@ -1499,6 +1498,7 @@ The third is for labels along the horizontal axis, which will indicate which
bar corresponds to which telemetry point. Inline `style` attributes are used
wherever dynamic positioning (handled by a script) is anticipated.
The corresponding CSS file which styles and positions these elements:
```diff
.example-bargraph {
position: absolute;
@@ -1596,6 +1596,7 @@ actual telemetry data in subsequent steps.)
Notably, we will not try to show telemetry data after this step.
To support this, we will add a new controller which supports our Bar Graph view:
```diff
define(function () {
function BarGraphController($scope, telemetryHandler) {
@@ -1647,6 +1648,7 @@ Whenever the telemetry handler invokes its callbacks, we update the set of
telemetry objects in view, as well as the width for each bar.
We will also utilize this from our template:
```diff
+ <div class="example-bargraph" ng-controller="BarGraphController">
<div class="example-tick-labels">
@@ -2346,6 +2348,7 @@ add a top-level object which will serve as a container; in the next step, we
will populate this with the contents of the telemetry dictionary (which we
will retrieve from the server.)
```diff
define([
'legacyRegistry'
], function (
@@ -2375,6 +2378,7 @@ define([
}
});
});
```
__tutorials/telemetry/bundle.js__
Here, we've created our initial telemetry plugin. This exposes a new domain
@@ -2469,7 +2473,6 @@ define([
};
});
```
__main.js__
...we will be able to reload Open MCT and see that it is present:
@@ -2486,43 +2489,45 @@ server. Our first step will be to add a service that will handle interactions
with the server; this will not be used by Open MCT directly, but will be
used by subsequent components we add.
/*global define,WebSocket*/
define(
[],
function () {
"use strict";
function ExampleTelemetryServerAdapter($q, wsUrl) {
var ws = new WebSocket(wsUrl),
dictionary = $q.defer();
// Handle an incoming message from the server
ws.onmessage = function (event) {
var message = JSON.parse(event.data);
switch (message.type) {
case "dictionary":
dictionary.resolve(message.value);
break;
}
};
// Request dictionary once connection is established
ws.onopen = function () {
ws.send("dictionary");
};
return {
dictionary: function () {
return dictionary.promise;
}
};
}
return ExampleTelemetryServerAdapter;
```diff
/*global define,WebSocket*/
define(
[],
function () {
"use strict";
function ExampleTelemetryServerAdapter($q, wsUrl) {
var ws = new WebSocket(wsUrl),
dictionary = $q.defer();
// Handle an incoming message from the server
ws.onmessage = function (event) {
var message = JSON.parse(event.data);
switch (message.type) {
case "dictionary":
dictionary.resolve(message.value);
break;
}
};
// Request dictionary once connection is established
ws.onopen = function () {
ws.send("dictionary");
};
return {
dictionary: function () {
return dictionary.promise;
}
};
}
);
return ExampleTelemetryServerAdapter;
}
);
```
__tutorials/telemetry/src/ExampleTelemetryServerAdapter.js__
When created, this service initiates a connection to the server, and begins
@@ -2539,86 +2544,88 @@ subsystems. This means that we need to convert the data from the dictionary
into domain object models, and expose these to Open MCT via a
`modelService`.
/*global define*/
define(
function () {
"use strict";
var PREFIX = "example_tlm:",
FORMAT_MAPPINGS = {
float: "number",
integer: "number",
string: "string"
};
function ExampleTelemetryModelProvider(adapter, $q) {
var modelPromise, empty = $q.when({});
// Check if this model is in our dictionary (by prefix)
function isRelevant(id) {
return id.indexOf(PREFIX) === 0;
}
// Build a domain object identifier by adding a prefix
function makeId(element) {
return PREFIX + element.identifier;
}
// Create domain object models from this dictionary
function buildTaxonomy(dictionary) {
var models = {};
// Create & store a domain object model for a measurement
function addMeasurement(measurement) {
var format = FORMAT_MAPPINGS[measurement.type];
models[makeId(measurement)] = {
type: "example.measurement",
name: measurement.name,
telemetry: {
key: measurement.identifier,
ranges: [{
key: "value",
name: "Value",
units: measurement.units,
format: format
}]
}
};
}
// Create & store a domain object model for a subsystem
function addSubsystem(subsystem) {
var measurements =
(subsystem.measurements || []);
models[makeId(subsystem)] = {
type: "example.subsystem",
name: subsystem.name,
composition: measurements.map(makeId)
};
measurements.forEach(addMeasurement);
}
(dictionary.subsystems || []).forEach(addSubsystem);
return models;
}
// Begin generating models once the dictionary is available
modelPromise = adapter.dictionary().then(buildTaxonomy);
return {
getModels: function (ids) {
// Return models for the dictionary only when they
// are relevant to the request.
return ids.some(isRelevant) ? modelPromise : empty;
}
};
```diff
/*global define*/
define(
function () {
"use strict";
var PREFIX = "example_tlm:",
FORMAT_MAPPINGS = {
float: "number",
integer: "number",
string: "string"
};
function ExampleTelemetryModelProvider(adapter, $q) {
var modelPromise, empty = $q.when({});
// Check if this model is in our dictionary (by prefix)
function isRelevant(id) {
return id.indexOf(PREFIX) === 0;
}
return ExampleTelemetryModelProvider;
// Build a domain object identifier by adding a prefix
function makeId(element) {
return PREFIX + element.identifier;
}
// Create domain object models from this dictionary
function buildTaxonomy(dictionary) {
var models = {};
// Create & store a domain object model for a measurement
function addMeasurement(measurement) {
var format = FORMAT_MAPPINGS[measurement.type];
models[makeId(measurement)] = {
type: "example.measurement",
name: measurement.name,
telemetry: {
key: measurement.identifier,
ranges: [{
key: "value",
name: "Value",
units: measurement.units,
format: format
}]
}
};
}
// Create & store a domain object model for a subsystem
function addSubsystem(subsystem) {
var measurements =
(subsystem.measurements || []);
models[makeId(subsystem)] = {
type: "example.subsystem",
name: subsystem.name,
composition: measurements.map(makeId)
};
measurements.forEach(addMeasurement);
}
(dictionary.subsystems || []).forEach(addSubsystem);
return models;
}
// Begin generating models once the dictionary is available
modelPromise = adapter.dictionary().then(buildTaxonomy);
return {
getModels: function (ids) {
// Return models for the dictionary only when they
// are relevant to the request.
return ids.some(isRelevant) ? modelPromise : empty;
}
};
}
);
return ExampleTelemetryModelProvider;
}
);
```
__tutorials/telemetry/src/ExampleTelemetryModelProvider.js__
This script implements a `provider` for `modelService`; the `modelService` is a
@@ -2671,55 +2678,57 @@ This allows our telemetry dictionary to be expressed as domain object models
fix this, we will need another script which will add these subsystems to the
root-level object we added in Step 1.
/*global define*/
define(
function () {
"use strict";
var TAXONOMY_ID = "example:sc",
PREFIX = "example_tlm:";
function ExampleTelemetryInitializer(adapter, objectService) {
// Generate a domain object identifier for a dictionary element
function makeId(element) {
return PREFIX + element.identifier;
}
// When the dictionary is available, add all subsystems
// to the composition of My Spacecraft
function initializeTaxonomy(dictionary) {
// Get the top-level container for dictionary objects
// from a group of domain objects.
function getTaxonomyObject(domainObjects) {
return domainObjects[TAXONOMY_ID];
}
// Populate
function populateModel(taxonomyObject) {
return taxonomyObject.useCapability(
"mutation",
function (model) {
model.name =
dictionary.name;
model.composition =
dictionary.subsystems.map(makeId);
}
);
}
// Look up My Spacecraft, and populate it accordingly.
objectService.getObjects([TAXONOMY_ID])
.then(getTaxonomyObject)
.then(populateModel);
}
adapter.dictionary().then(initializeTaxonomy);
```diff
/*global define*/
define(
function () {
"use strict";
var TAXONOMY_ID = "example:sc",
PREFIX = "example_tlm:";
function ExampleTelemetryInitializer(adapter, objectService) {
// Generate a domain object identifier for a dictionary element
function makeId(element) {
return PREFIX + element.identifier;
}
return ExampleTelemetryInitializer;
// When the dictionary is available, add all subsystems
// to the composition of My Spacecraft
function initializeTaxonomy(dictionary) {
// Get the top-level container for dictionary objects
// from a group of domain objects.
function getTaxonomyObject(domainObjects) {
return domainObjects[TAXONOMY_ID];
}
// Populate
function populateModel(taxonomyObject) {
return taxonomyObject.useCapability(
"mutation",
function (model) {
model.name =
dictionary.name;
model.composition =
dictionary.subsystems.map(makeId);
}
);
}
// Look up My Spacecraft, and populate it accordingly.
objectService.getObjects([TAXONOMY_ID])
.then(getTaxonomyObject)
.then(populateModel);
}
adapter.dictionary().then(initializeTaxonomy);
}
);
return ExampleTelemetryInitializer;
}
);
```
__tutorials/telemetry/src/ExampleTelemetryInitializer.js__
At the conclusion of Step 1, the top-level My Spacecraft object was empty. This
@@ -2737,14 +2746,14 @@ with the platform):
```diff
define([
'legacyRegistry',
'./src/ExampleTelemetryServerAdapter',
'./src/ExampleTelemetryInitializer',
'./src/ExampleTelemetryModelProvider'
+ './src/ExampleTelemetryServerAdapter',
+ './src/ExampleTelemetryInitializer',
+ './src/ExampleTelemetryModelProvider'
], function (
legacyRegistry,
ExampleTelemetryServerAdapter,
ExampleTelemetryInitializer,
ExampleTelemetryModelProvider
+ ExampleTelemetryServerAdapter,
+ ExampleTelemetryInitializer,
+ ExampleTelemetryModelProvider
) {
legacyRegistry.register("tutorials/telemetry", {
"name": "Example Telemetry Adapter",
@@ -2755,7 +2764,7 @@ define([
"key": "example.spacecraft",
"glyph": "o"
},
{
+ {
+ "name": "Subsystem",
+ "key": "example.subsystem",
+ "glyph": "o",
@@ -2934,6 +2943,7 @@ identifier, the pending promise is resolved.
This `history` method will be used by a `telemetryService` provider which we
will implement:
```diff
/*global define*/
@@ -3019,6 +3029,7 @@ Finally, note that we also have a `subscribe` method, to satisfy the interface o
`telemetryService`, but this `subscribe` method currently does nothing.
This script uses an `ExampleTelemetrySeries` class, which looks like:
```diff
/*global define*/
@@ -3050,6 +3061,7 @@ This takes the array of telemetry values (as returned by the server) and wraps
it with the interface expected by the platform (the methods shown.)
Finally, we expose this `telemetryService` provider declaratively:
```diff
define([
'legacyRegistry',
@@ -3226,7 +3238,7 @@ define(
__tutorials/telemetry/src/ExampleTelemetryServerAdapter.js__
Here, we have added `subscribe` and `unsubscribe` methods which issue the
corresponding requests to the server. Seperately, we introduce the ability to
corresponding requests to the server. Separately, we introduce the ability to
listen for `data` messages as they come in: These will contain the data associated
with these subscriptions.
@@ -3316,7 +3328,6 @@ define(
}
);
```
__tutorials/telemetry/src/ExampleTelemetryProvider.js__
A quick summary of these changes:

View File

@@ -10,7 +10,7 @@
"LMP: 47 degrees.",
"CC: Eagle, looking great. You're GO.",
"CC: Roger. 1202. We copy it.",
"O1: LMP 35 degrees. 35 degrees. 750. Coming aown to 23.fl",
"O1: LMP 35 degrees. 35 degrees. 750. Coming down to 23.fl",
"LMP: 700 feet, 21 down, 33 degrees.",
"LMP: 600 feet, down at 19.",
"LMP: 540 feet, down at - 30. Down at 15.",

View File

@@ -36,7 +36,7 @@ define([
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/notifications", {
legacyRegistry.register("example/msl-adapter", {
"name" : "Mars Science Laboratory Data Adapter",
"extensions" : {
"types": [

View File

@@ -129,7 +129,7 @@ define([
{
"name": "Period",
"control": "textfield",
"cssclass": "l-small l-numeric",
"cssclass": "l-input-sm l-numeric",
"key": "period",
"required": true,
"property": [

View File

@@ -21,40 +21,34 @@
*****************************************************************************/
/*global require,__dirname*/
var gulp = require('gulp'),
requirejsOptimize = require('gulp-requirejs-optimize'),
sourcemaps = require('gulp-sourcemaps'),
rename = require('gulp-rename'),
sass = require('gulp-sass'),
bourbon = require('node-bourbon'),
jshint = require('gulp-jshint'),
jscs = require('gulp-jscs'),
replace = require('gulp-replace-task'),
karma = require('karma'),
path = require('path'),
fs = require('fs'),
git = require('git-rev-sync'),
moment = require('moment'),
merge = require('merge-stream'),
project = require('./package.json'),
_ = require('lodash'),
paths = {
main: 'main.js',
main: 'openmct.js',
dist: 'dist',
assets: 'dist/assets',
reports: 'dist/reports',
scss: ['./platform/**/*.scss', './example/**/*.scss'],
scripts: [ 'main.js', 'platform/**/*.js', 'src/**/*.js' ],
assets: [
'./{example,platform}/**/*.{css,css.map,png,svg,ico,woff,eot,ttf}'
],
scripts: [ 'openmct.js', 'platform/**/*.js', 'src/**/*.js' ],
specs: [ 'platform/**/*Spec.js', 'src/**/*Spec.js' ],
static: [
'index.html',
'platform/**/*',
'example/**/*',
'bower_components/**/*'
]
},
options = {
requirejsOptimize: {
name: paths.main.replace(/\.js$/, ''),
name: 'bower_components/almond/almond.js',
include: paths.main.replace('.js', ''),
wrap: {
startFile: "src/start.frag",
endFile: "src/end.frag"
},
mainConfigFile: paths.main,
wrapShim: true
},
@@ -63,7 +57,6 @@ var gulp = require('gulp'),
singleRun: true
},
sass: {
includePaths: bourbon.includePaths,
sourceComments: true
},
replace: {
@@ -77,6 +70,8 @@ var gulp = require('gulp'),
};
gulp.task('scripts', function () {
var requirejsOptimize = require('gulp-requirejs-optimize');
var replace = require('gulp-replace-task');
return gulp.src(paths.main)
.pipe(sourcemaps.init())
.pipe(requirejsOptimize(options.requirejsOptimize))
@@ -86,10 +81,16 @@ gulp.task('scripts', function () {
});
gulp.task('test', function (done) {
var karma = require('karma');
new karma.Server(options.karma, done).start();
});
gulp.task('stylesheets', function () {
var sass = require('gulp-sass');
var rename = require('gulp-rename');
var bourbon = require('node-bourbon');
options.sass.includePaths = bourbon.includePaths;
return gulp.src(paths.scss, {base: '.'})
.pipe(sourcemaps.init())
.pipe(sass(options.sass).on('error', sass.logError))
@@ -103,6 +104,9 @@ gulp.task('stylesheets', function () {
});
gulp.task('lint', function () {
var jshint = require('gulp-jshint');
var merge = require('merge-stream');
var nonspecs = paths.specs.map(function (glob) {
return "!" + glob;
}),
@@ -112,11 +116,17 @@ gulp.task('lint', function () {
.pipe(jshint({ jasmine: true }));
return merge(scriptLint, specLint)
.pipe(jshint.reporter('gulp-jshint-html-reporter', {
filename: paths.reports + '/lint/jshint-report.html',
createMissingFolders : true
}))
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter('fail'));
});
gulp.task('checkstyle', function () {
var jscs = require('gulp-jscs');
return gulp.src(paths.scripts)
.pipe(jscs())
.pipe(jscs.reporter())
@@ -124,18 +134,20 @@ gulp.task('checkstyle', function () {
});
gulp.task('fixstyle', function () {
var jscs = require('gulp-jscs');
return gulp.src(paths.scripts, { base: '.' })
.pipe(jscs({ fix: true }))
.pipe(gulp.dest('.'));
});
gulp.task('static', ['stylesheets'], function () {
return gulp.src(paths.static, { base: '.' })
gulp.task('assets', ['stylesheets'], function () {
return gulp.src(paths.assets)
.pipe(gulp.dest(paths.dist));
});
gulp.task('watch', function () {
gulp.watch(paths.scss, ['stylesheets']);
return gulp.watch(paths.scss, ['stylesheets', 'assets']);
});
gulp.task('serve', function () {
@@ -143,9 +155,9 @@ gulp.task('serve', function () {
var app = require('./app.js');
});
gulp.task('develop', ['serve', 'stylesheets', 'watch']);
gulp.task('develop', ['serve', 'install', 'watch']);
gulp.task('install', [ 'static', 'scripts' ]);
gulp.task('install', [ 'assets', 'scripts' ]);
gulp.task('verify', [ 'lint', 'test', 'checkstyle' ]);

View File

@@ -19,36 +19,33 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title></title>
<script type="text/javascript"
src="bower_components/requirejs/require.js">
<script src="bower_components/requirejs/require.js">
</script>
<script type="text/javascript">
require(['main'], function (mct) {
<script>
require(['openmct'], function (openmct) {
require([
'./example/imagery/bundle',
'./example/eventGenerator/bundle',
'./example/generator/bundle'
], mct.run.bind(mct));
], openmct.start.bind(openmct));
});
</script>
<link rel="stylesheet" href="platform/commonUI/general/res/css/startup-base.css">
<link rel="stylesheet" href="platform/commonUI/general/res/css/openmct.css">
<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">
<link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-16x16.png" sizes="16x16">
<link rel="shortcut icon" href="platform/commonUI/general/res/images/favicons/favicon.ico">
<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">
<link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-16x16.png" sizes="16x16">
<link rel="shortcut icon" href="platform/commonUI/general/res/images/favicons/favicon.ico">
</head>
<body class="user-environ">
<div class="l-splash-holder s-splash-holder">
<div class="l-splash s-splash"></div>
</div>
<div ng-view></div>
</body>
</html>

View File

@@ -1,9 +1,9 @@
{
"source": {
"include": [
"platform/"
"src/"
],
"includePattern": "platform/.+\\.js$",
"includePattern": "src/.+\\.js$",
"excludePattern": ".+\\Spec\\.js$|lib/.+"
},
"plugins": [

View File

@@ -37,9 +37,11 @@ module.exports = function(config) {
{pattern: 'bower_components/**/*.js', included: false},
{pattern: 'src/**/*.js', included: false},
{pattern: 'example/**/*.js', included: false},
{pattern: 'example/**/*.json', included: false},
{pattern: 'platform/**/*.js', included: false},
{pattern: 'warp/**/*.js', included: false},
{pattern: 'platform/**/*.html', included: false},
{pattern: 'src/**/*.html', included: false},
'test-main.js'
],
@@ -81,7 +83,7 @@ module.exports = function(config) {
coverageReporter: {
dir: process.env.CIRCLE_ARTIFACTS ?
process.env.CIRCLE_ARTIFACTS + '/coverage' :
"dist/coverage",
"dist/reports/coverage",
check: {
global: {
lines: 80
@@ -91,13 +93,13 @@ module.exports = function(config) {
// HTML test reporting.
htmlReporter: {
outputDir: "target/tests",
outputDir: "dist/reports/tests",
preserveDescribeNesting: true,
foldAll: false
},
junitReporter: {
outputDir: process.env.CIRCLE_TEST_REPORTS || 'target/junit'
outputDir: process.env.CIRCLE_TEST_REPORTS || 'dist/reports/junit'
},
// Continuous Integration mode.

View File

@@ -27,14 +27,17 @@ requirejs.config({
"angular": "bower_components/angular/angular.min",
"angular-route": "bower_components/angular-route/angular-route.min",
"csv": "bower_components/comma-separated-values/csv.min",
"es6-promise": "bower_components/es6-promise/promise.min",
"EventEmitter": "bower_components/eventemitter3/index",
"es6-promise": "bower_components/es6-promise/es6-promise.min",
"html2canvas": "bower_components/html2canvas/build/html2canvas.min",
"moment": "bower_components/moment/moment",
"moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format",
"saveAs": "bower_components/FileSaver.js/FileSaver.min",
"screenfull": "bower_components/screenfull/dist/screenfull.min",
"text": "bower_components/text/text",
"uuid": "bower_components/node-uuid/uuid",
"zepto": "bower_components/zepto/zepto.min"
"zepto": "bower_components/zepto/zepto.min",
"lodash": "bower_components/lodash/lodash"
},
"shim": {
"angular": {
@@ -43,6 +46,12 @@ requirejs.config({
"angular-route": {
"deps": ["angular"]
},
"EventEmitter": {
"exports": "EventEmitter"
},
"html2canvas": {
"exports": "html2canvas"
},
"moment-duration-format": {
"deps": ["moment"]
},
@@ -51,54 +60,25 @@ requirejs.config({
},
"zepto": {
"exports": "Zepto"
},
"lodash": {
"exports": "lodash"
}
}
});
define([
'./platform/framework/src/Main',
'legacyRegistry',
'./src/defaultRegistry',
'./src/MCT'
], function (Main, defaultRegistry, MCT) {
var openmct = new MCT();
'./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/exporters/bundle',
'./platform/telemetry/bundle',
'./platform/features/clock/bundle',
'./platform/features/fixed/bundle',
'./platform/features/imagery/bundle',
'./platform/features/layout/bundle',
'./platform/features/pages/bundle',
'./platform/features/plot/bundle',
'./platform/features/timeline/bundle',
'./platform/features/table/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',
'./platform/commonUI/regions/bundle'
], function (Main, legacyRegistry) {
return {
legacyRegistry: legacyRegistry,
run: function () {
return new Main().run(legacyRegistry);
}
};
openmct.legacyRegistry = defaultRegistry;
openmct.on('start', function () {
return new Main().run(defaultRegistry);
});
return openmct;
});

View File

@@ -1,6 +1,6 @@
{
"name": "openmct",
"version": "0.11.1-SNAPSHOT",
"version": "0.12.0-SNAPSHOT",
"description": "The Open MCT core platform",
"dependencies": {
"express": "^4.13.1",
@@ -14,6 +14,7 @@
"gulp": "^3.9.0",
"gulp-jscs": "^3.0.2",
"gulp-jshint": "^2.0.0",
"gulp-jshint-html-reporter": "^0.1.3",
"gulp-rename": "^1.2.2",
"gulp-replace-task": "^0.11.0",
"gulp-requirejs-optimize": "^0.3.1",
@@ -38,7 +39,7 @@
"mkdirp": "^0.5.1",
"moment": "^2.11.1",
"node-bourbon": "^4.2.3",
"phantomjs-prebuilt": "^2.1.0",
"phantomjs-prebuilt": "2.1.11 || >2.1.12 <3.0.0",
"requirejs": "2.1.x",
"split": "^1.0.0"
},
@@ -47,7 +48,7 @@
"test": "karma start --single-run",
"jshint": "jshint platform example",
"watch": "karma start",
"jsdoc": "jsdoc -c jsdoc.json -r -d target/docs/api",
"jsdoc": "jsdoc -c jsdoc.json -R API.md -r -d dist/docs/api",
"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",
"prepublish": "node ./node_modules/bower/bin/bower install && node ./node_modules/gulp/bin/gulp.js install"

View File

@@ -41,6 +41,7 @@ define([
"text!./res/templates/items/items.html",
"text!./res/templates/browse/object-properties.html",
"text!./res/templates/browse/inspector-region.html",
"text!./res/templates/view-object.html",
'legacyRegistry'
], function (
BrowseController,
@@ -63,6 +64,7 @@ define([
itemsTemplate,
objectPropertiesTemplate,
inspectorRegionTemplate,
viewObjectTemplate,
legacyRegistry
) {
@@ -142,7 +144,7 @@ define([
"representations": [
{
"key": "view-object",
"templateUrl": "templates/view-object.html"
"template": viewObjectTemplate
},
{
"key": "browse-object",

View File

@@ -48,20 +48,35 @@ define(
*/
NavigateAction.prototype.perform = function () {
var self = this,
navigationAllowed = true;
navigateTo = this.domainObject,
currentObject = self.navigationService.getNavigation();
function allow() {
self.policyService.allow("navigation", self.navigationService.getNavigation(), self.domainObject, function (message) {
var navigationAllowed = true;
self.policyService.allow("navigation", currentObject, navigateTo, function (message) {
navigationAllowed = self.$window.confirm(message + "\r\n\r\n" +
" Are you sure you want to continue?");
});
return navigationAllowed;
}
// Set navigation, and wrap like a promise
return this.$q.when(
allow() && this.navigationService.setNavigation(this.domainObject)
);
function cancelIfEditing() {
var editing = currentObject.hasCapability('editor') &&
currentObject.getCapability('editor').isEditContextRoot();
return self.$q.when(editing && currentObject.getCapability("editor").finish());
}
function navigate() {
return self.navigationService.setNavigation(navigateTo);
}
if (allow()) {
return cancelIfEditing().then(navigate);
} else {
return this.$q.when(false);
}
};
/**

View File

@@ -32,7 +32,9 @@ define(
mockQ,
mockDomainObject,
mockPolicyService,
mockNavigatedObject,
mockWindow,
capabilities,
action;
function mockPromise(value) {
@@ -44,6 +46,29 @@ define(
}
beforeEach(function () {
capabilities = {};
mockQ = { when: mockPromise };
mockNavigatedObject = jasmine.createSpyObj(
"domainObject",
[
"getId",
"getModel",
"hasCapability",
"getCapability"
]
);
capabilities.editor = jasmine.createSpyObj("editorCapability", [
"isEditContextRoot",
"finish"
]);
mockNavigatedObject.getCapability.andCallFake(function (capability) {
return capabilities[capability];
});
mockNavigatedObject.hasCapability.andReturn(false);
mockNavigationService = jasmine.createSpyObj(
"navigationService",
[
@@ -51,11 +76,14 @@ define(
"getNavigation"
]
);
mockNavigationService.getNavigation.andReturn({});
mockQ = { when: mockPromise };
mockNavigationService.getNavigation.andReturn(mockNavigatedObject);
mockDomainObject = jasmine.createSpyObj(
"domainObject",
["getId", "getModel", "getCapability"]
[
"getId",
"getModel"
]
);
mockPolicyService = jasmine.createSpyObj("policyService",
@@ -112,6 +140,21 @@ define(
});
});
describe("in edit mode", function () {
beforeEach(function () {
mockNavigatedObject.hasCapability.andCallFake(function (capability) {
return capability === "editor";
});
capabilities.editor.isEditContextRoot.andReturn(true);
});
it("finishes editing if in edit mode", function () {
action.perform();
expect(capabilities.editor.finish)
.toHaveBeenCalled();
});
});
it("is only applicable when a domain object is in context", function () {
expect(NavigateAction.appliesTo({})).toBeFalsy();
expect(NavigateAction.appliesTo({

View File

@@ -19,7 +19,7 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<div class="abs overlay">
<div class="abs overlay" ng-class="{'delayEntry100ms' : ngModel.delay}">
<div class="abs blocker"></div>
<div class="abs holder">
<a ng-click="ngModel.cancel()"

View File

@@ -187,7 +187,7 @@ define(
/**
* A description of the model options that may be passed to the
* showBlockingMessage method. Note that the DialogModel desribed
* showBlockingMessage method. Note that the DialogModel described
* here is shared with the Notifications framework.
* @see NotificationService
*
@@ -200,6 +200,9 @@ define(
* shown above a progress bar to indicate what's happening.
* @property {number} progress a percentage value (1-100)
* indicating the completion of the blocking task
* @property {boolean} delay adds a brief delay before loading
* the dialog. Useful for removing the dialog flicker when the
* conditions for displaying the dialog change rapidly.
* @property {string} progressText the message to show below a
* progress bar to indicate progress. For example, this might be
* used to indicate time remaining, or items still to process.

View File

@@ -31,6 +31,7 @@ define([
"./src/actions/PropertiesAction",
"./src/actions/RemoveAction",
"./src/actions/SaveAction",
"./src/actions/SaveAndStopEditingAction",
"./src/actions/SaveAsAction",
"./src/actions/CancelAction",
"./src/policies/EditActionPolicy",
@@ -70,6 +71,7 @@ define([
PropertiesAction,
RemoveAction,
SaveAction,
SaveAndStopEditingAction,
SaveAsAction,
CancelAction,
EditActionPolicy,
@@ -203,20 +205,30 @@ define([
]
},
{
"key": "save",
"category": "conclude-editing",
"implementation": SaveAction,
"name": "Save",
"key": "save-and-stop-editing",
"category": "save",
"implementation": SaveAndStopEditingAction,
"name": "Save and Finish Editing",
"cssclass": "icon-save labeled",
"description": "Save changes made to these objects.",
"depends": [
"dialogService"
],
"priority": "mandatory"
]
},
{
"key": "save",
"category": "conclude-editing",
"category": "save",
"implementation": SaveAction,
"name": "Save and Continue Editing",
"cssclass": "icon-save labeled",
"description": "Save changes made to these objects.",
"depends": [
"dialogService"
]
},
{
"key": "save-as",
"category": "save",
"implementation": SaveAsAction,
"name": "Save As...",
"cssclass": "icon-save labeled",
@@ -225,7 +237,6 @@ define([
"$injector",
"policyService",
"dialogService",
"creationService",
"copyService"
],
"priority": "mandatory"
@@ -387,7 +398,7 @@ define([
"constants": [
{
"key": "editModeBlacklist",
"value": ["copy", "follow", "window", "link", "locate"]
"value": ["copy", "follow", "link", "locate"]
},
{
"key": "nonEditContextBlacklist",

View File

@@ -20,11 +20,32 @@
at runtime from the About dialog for additional information.
-->
<span ng-controller="EditActionController">
<span ng-repeat="currentAction in editActions">
<!-- If there's a single save action show a button, otherwise show a dropdown with all save actions. -->
<span ng-if="saveActions.length === 1">
<mct-control key="'button'"
structure="{
text: saveActions[0].getMetadata().name,
click: saveActions[0].perform,
cssclass: 'major ' + saveActions[0].getMetadata().cssclass
}">
</mct-control>
</span>
<span ng-if="saveActions.length > 1">
<mct-control key="'menu-button'"
structure="{
options: saveActionsAsMenuOptions,
click: saveActionMenuClickHandler,
cssclass: 'btn-bar right icon-save no-label major'
}">
</mct-control>
</span>
<span ng-repeat="currentAction in otherEditActions">
<a class='s-button {{currentAction.getMetadata().cssclass}}'
title='{{currentAction.getMetadata().name}}'
ng-click="currentAction.perform()"
ng-class="{ major: $index === 0 }">
ng-class="{ major: $index === 0 && saveActions.length === 0 }">
<span class="title-label">{{currentAction.getMetadata().name}}</span>
</a>
</span>

View File

@@ -62,7 +62,7 @@ define(
}
function cancel(allowed) {
return allowed && domainObject.getCapability("editor").cancel();
return allowed && domainObject.getCapability("editor").finish();
}
//Do navigation first in order to trigger unsaved changes dialog

View File

@@ -69,18 +69,13 @@ define(
* Enter edit mode.
*/
EditAction.prototype.perform = function () {
var self = this;
function cancelEditing() {
self.domainObject.getCapability('editor').cancel();
self.navigationService.removeListener(cancelEditing);
}
//If this is not the currently navigated object, then navigate
// to it.
if (this.navigationService.getNavigation() !== this.domainObject) {
this.navigationService.setNavigation(this.domainObject);
}
this.navigationService.addListener(cancelEditing);
this.domainObject.useCapability("editor");
};

View File

@@ -25,9 +25,8 @@ define(
function (SaveInProgressDialog) {
/**
* The "Save" action; the action triggered by clicking Save from
* Edit Mode. Exits the editing user interface and invokes object
* capabilities to persist the changes that have been made.
* The "Save" action; it invokes object capabilities to persist
* the changes that have been made.
* @constructor
* @implements {Action}
* @memberof platform/commonUI/edit
@@ -41,7 +40,7 @@ define(
}
/**
* Save changes and conclude editing.
* Save changes.
*
* @returns {Promise} a promise that will be fulfilled when
* cancellation has completed
@@ -51,40 +50,22 @@ define(
var domainObject = this.domainObject,
dialog = new SaveInProgressDialog(this.dialogService);
function resolveWith(object) {
return function () {
return object;
};
}
// Invoke any save behavior introduced by the editor capability;
// this is introduced by EditableDomainObject which is
// used to insulate underlying objects from changes made
// during editing.
function doSave() {
return domainObject.getCapability("editor").save()
.then(resolveWith(domainObject));
return domainObject.getCapability("editor").save();
}
// Discard the current root view (which will be the editing
// UI, which will have been pushed atop the Browse UI.)
function returnToBrowse(object) {
if (object) {
object.getCapability("action").perform("navigate");
}
return object;
}
function hideBlockingDialog(object) {
function hideBlockingDialog() {
dialog.hide();
return object;
}
dialog.show();
return doSave()
.then(hideBlockingDialog)
.then(returnToBrowse)
.catch(hideBlockingDialog);
};

View File

@@ -0,0 +1,73 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2016, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
define(
["./SaveAction"],
function (SaveAction) {
/**
* The "Save and Stop Editing" action performs a [Save action]{@link SaveAction}
* on the object under edit followed by exiting the edit user interface.
* @constructor
* @implements {Action}
* @memberof platform/commonUI/edit
*/
function SaveAndStopEditingAction(
dialogService,
context
) {
this.context = context;
this.domainObject = (context || {}).domainObject;
this.dialogService = dialogService;
}
/**
* Trigger a save operation and exit edit mode.
*
* @returns {Promise} a promise that will be fulfilled when
* cancellation has completed
* @memberof platform/commonUI/edit.SaveAndStopEditingAction#
*/
SaveAndStopEditingAction.prototype.perform = function () {
var domainObject = this.domainObject,
saveAction = new SaveAction(this.dialogService, this.context);
function closeEditor() {
return domainObject.getCapability("editor").finish();
}
return saveAction.perform()
.then(closeEditor)
.catch(closeEditor);
};
/**
* Check if this action is applicable in a given context.
* This will ensure that a domain object is present in the context,
* and that this domain object is in Edit mode.
* @returns true if applicable
*/
SaveAndStopEditingAction.appliesTo = SaveAction.appliesTo;
return SaveAndStopEditingAction;
}
);

View File

@@ -42,7 +42,6 @@ define([
$injector,
policyService,
dialogService,
creationService,
copyService,
context
) {
@@ -52,7 +51,6 @@ define([
};
this.policyService = policyService;
this.dialogService = dialogService;
this.creationService = creationService;
this.copyService = copyService;
}
@@ -166,11 +164,16 @@ define([
.then(resolveWith(object));
}
function commitEditingAfterClone(clonedObject) {
function saveAfterClone(clonedObject) {
return domainObject.getCapability("editor").save()
.then(resolveWith(clonedObject));
}
function finishEditing(clonedObject) {
return domainObject.getCapability("editor").finish()
.then(resolveWith(clonedObject));
}
function onFailure() {
hideBlockingDialog();
return false;
@@ -182,7 +185,8 @@ define([
.then(getParent)
.then(cloneIntoParent)
.then(undirtyOriginals)
.then(commitEditingAfterClone)
.then(saveAfterClone)
.then(finishEditing)
.then(hideBlockingDialog)
.catch(onFailure);
};

View File

@@ -9,7 +9,8 @@ define([], function () {
title: "Saving...",
hint: "Do not navigate away from this page or close this browser tab while this message is displayed.",
unknownProgress: true,
severity: "info"
severity: "info",
delay: true
});
};

View File

@@ -28,8 +28,8 @@ define(
* A capability that implements an editing 'session' for a domain
* object. An editing session is initiated via a call to .edit().
* Once initiated, any persist operations will be queued pending a
* subsequent call to [.save()](@link #save) or [.cancel()](@link
* #cancel).
* subsequent call to [.save()](@link #save) or [.finish()](@link
* #finish).
* @param transactionService
* @param domainObject
* @constructor
@@ -45,7 +45,7 @@ define(
/**
* Initiate an editing session. This will start a transaction during
* which any persist operations will be deferred until either save()
* or cancel() are called.
* or finish() are called.
*/
EditorCapability.prototype.edit = function () {
this.transactionService.startTransaction();
@@ -81,25 +81,25 @@ define(
};
/**
* Save any changes from this editing session. This will flush all
* pending persists and end the current transaction
* Save any unsaved changes from this editing session. This will
* end the current transaction and continue with a new one.
* @returns {*}
*/
EditorCapability.prototype.save = function () {
var domainObject = this.domainObject;
return this.transactionService.commit().then(function () {
domainObject.getCapability('status').set('editing', false);
var transactionService = this.transactionService;
return transactionService.commit().then(function () {
transactionService.startTransaction();
});
};
EditorCapability.prototype.invoke = EditorCapability.prototype.edit;
/**
* Cancel the current editing session. This will discard any pending
* Finish the current editing session. This will discard any pending
* persist operations
* @returns {*}
*/
EditorCapability.prototype.cancel = function () {
EditorCapability.prototype.finish = function () {
var domainObject = this.domainObject;
return this.transactionService.cancel().then(function () {
domainObject.getCapability("status").set("editing", false);

View File

@@ -27,7 +27,8 @@ define(
[],
function () {
var ACTION_CONTEXT = { category: 'conclude-editing' };
var SAVE_ACTION_CONTEXT = { category: 'save' };
var OTHERS_ACTION_CONTEXT = { category: 'conclude-editing' };
/**
* Controller which supplies action instances for Save/Cancel.
@@ -35,11 +36,30 @@ define(
* @constructor
*/
function EditActionController($scope) {
// Maintain all "conclude-editing" actions in the present
// context.
function actionToMenuOption(action) {
return {
key: action,
name: action.getMetadata().name,
cssclass: action.getMetadata().cssclass
};
}
// Maintain all "conclude-editing" and "save" actions in the
// present context.
function updateActions() {
$scope.editActions = $scope.action ?
$scope.action.getActions(ACTION_CONTEXT) :
$scope.saveActions = $scope.action ?
$scope.action.getActions(SAVE_ACTION_CONTEXT) :
[];
$scope.saveActionsAsMenuOptions = $scope.saveActions.map(actionToMenuOption);
$scope.saveActionMenuClickHandler = function (clickedAction) {
clickedAction.perform();
};
$scope.otherEditActions = $scope.action ?
$scope.action.getActions(OTHERS_ACTION_CONTEXT) :
[];
}

View File

@@ -67,12 +67,17 @@ define(
editAction,
editorCapability;
function closeEditor() {
return editorCapability.finish();
}
function onSave() {
return editorCapability.save();
return editorCapability.save()
.then(closeEditor);
}
function onCancel() {
return editorCapability.cancel();
return closeEditor();
}
newModel.type = this.type.getKey();
@@ -85,9 +90,9 @@ define(
if (editAction) {
return editAction.perform();
} else if (editorCapability) {
//otherwise, use the save action
//otherwise, use the save as action
editorCapability.edit();
return newObject.getCapability("action").perform("save").then(onSave, onCancel);
return newObject.getCapability("action").perform("save-as").then(onSave, onCancel);
}
};

View File

@@ -90,7 +90,9 @@ define(
// Ensure there is always a "save in" section
if (includeLocation) {
sections.push({
name: 'Location', rows: [{
name: 'Location',
cssclass: "grows",
rows: [{
name: "Save In",
control: "locator",
validate: validateLocation,

View File

@@ -50,10 +50,7 @@ define(
$scope.rootObject =
(context && context.getRoot()) || $scope.rootObject;
}, 0);
} else if (!contextRoot) {
//If no context root is available, default to the root
// object
$scope.rootObject = undefined;
} else if (!contextRoot && !$scope.rootObject) {
// Update the displayed tree on a timeout to avoid
// an infinite digest exception.
objectService.getObjects(['ROOT'])

View File

@@ -138,7 +138,7 @@ define(
try {
results.push(onCancel());
} catch (error) {
this.$log.error("Error committing transaction.");
this.$log.error("Error cancelling transaction.");
}
}
return this.$q.all(results).then(function () {

View File

@@ -63,7 +63,7 @@ define(
capabilities.editor = jasmine.createSpyObj(
"editor",
["save", "cancel", "isEditContextRoot"]
["save", "finish", "isEditContextRoot"]
);
capabilities.action = jasmine.createSpyObj(
"actionCapability",
@@ -105,7 +105,7 @@ define(
return !!capabilities[name];
});
capabilities.editor.cancel.andReturn(mockPromise(true));
capabilities.editor.finish.andReturn(mockPromise(true));
action = new CancelAction(actionContext);
@@ -130,8 +130,8 @@ define(
capabilities.action.perform.andReturn(mockPromise(true));
action.perform();
// Should have called cancel
expect(capabilities.editor.cancel).toHaveBeenCalled();
// Should have called finish
expect(capabilities.editor.finish).toHaveBeenCalled();
// Definitely shouldn't call save!
expect(capabilities.editor.save).not.toHaveBeenCalled();

View File

@@ -58,7 +58,7 @@ define(
);
mockEditor = jasmine.createSpyObj(
"editorCapability",
["edit", "isEditContextRoot", "cancel"]
["edit", "isEditContextRoot"]
);
capabilities = {
@@ -98,13 +98,6 @@ define(
expect(EditAction.appliesTo(actionContext)).toBe(false);
});
it ("cancels editing when user navigates away", function () {
action.perform();
expect(mockNavigationService.addListener).toHaveBeenCalled();
mockNavigationService.addListener.mostRecentCall.args[0]();
expect(mockEditor.cancel).toHaveBeenCalled();
});
it ("invokes the Edit capability on the object", function () {
action.perform();
expect(mockDomainObject.useCapability).toHaveBeenCalledWith("editor");

View File

@@ -56,7 +56,7 @@ define(
);
mockEditorCapability = jasmine.createSpyObj(
"editor",
["save", "cancel", "isEditContextRoot"]
["save", "isEditContextRoot"]
);
mockActionCapability = jasmine.createSpyObj(
"actionCapability",
@@ -105,12 +105,6 @@ define(
expect(mockEditorCapability.save).toHaveBeenCalled();
});
it("navigates to the object after saving",
function () {
action.perform();
expect(mockActionCapability.perform).toHaveBeenCalledWith("navigate");
});
describe("a blocking dialog", function () {
var mockDialogHandle;

View File

@@ -0,0 +1,123 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2016, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
define(
["../../src/actions/SaveAndStopEditingAction"],
function (SaveAndStopEditingAction) {
describe("The Save and Stop Editing action", function () {
// Some mocks appear unused because the
// underlying SaveAction that this action
// depends on is not mocked, so we mock some
// of SaveAction's own dependencies to make
// it run.
var mockDomainObject,
mockEditorCapability,
actionContext,
dialogService,
mockActionCapability,
capabilities = {},
action;
function mockPromise(value) {
return {
then: function (callback) {
return mockPromise(callback(value));
},
catch: function (callback) {
return mockPromise(callback(value));
}
};
}
beforeEach(function () {
mockDomainObject = jasmine.createSpyObj(
"domainObject",
[
"getCapability",
"hasCapability",
"getModel",
"getOriginalObject"
]
);
mockEditorCapability = jasmine.createSpyObj(
"editor",
["save", "finish", "isEditContextRoot"]
);
mockActionCapability = jasmine.createSpyObj(
"actionCapability",
["perform"]
);
capabilities.editor = mockEditorCapability;
capabilities.action = mockActionCapability;
actionContext = {
domainObject: mockDomainObject
};
dialogService = jasmine.createSpyObj(
"dialogService",
["showBlockingMessage"]
);
mockDomainObject.hasCapability.andReturn(true);
mockDomainObject.getCapability.andCallFake(function (capability) {
return capabilities[capability];
});
mockDomainObject.getModel.andReturn({ persisted: 0 });
mockEditorCapability.save.andReturn(mockPromise(true));
mockEditorCapability.isEditContextRoot.andReturn(true);
action = new SaveAndStopEditingAction(dialogService, actionContext);
});
it("only applies to domain object with an editor capability", function () {
expect(SaveAndStopEditingAction.appliesTo(actionContext)).toBe(true);
expect(mockDomainObject.hasCapability).toHaveBeenCalledWith("editor");
mockDomainObject.hasCapability.andReturn(false);
mockDomainObject.getCapability.andReturn(undefined);
expect(SaveAndStopEditingAction.appliesTo(actionContext)).toBe(false);
});
it("only applies to domain object that has already been persisted", function () {
mockDomainObject.getModel.andReturn({ persisted: undefined });
expect(SaveAndStopEditingAction.appliesTo(actionContext)).toBe(false);
});
it("does not close the editor before completing the save", function () {
mockEditorCapability.save.andReturn(new Promise(function () {
}));
action.perform();
expect(mockEditorCapability.save).toHaveBeenCalled();
expect(mockEditorCapability.finish).not.toHaveBeenCalled();
});
it("closes the editor after saving", function () {
action.perform();
expect(mockEditorCapability.save).toHaveBeenCalled();
expect(mockEditorCapability.finish).toHaveBeenCalled();
});
});
}
);

View File

@@ -19,7 +19,7 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global describe,it,expect,beforeEach,jasmine*/
/*global describe,it,expect,beforeEach,jasmine,runs,waitsFor,spyOn*/
define(
["../../src/actions/SaveAsAction"],
@@ -33,7 +33,6 @@ define(
mockDialogService,
mockCopyService,
mockParent,
mockUrlService,
actionContext,
capabilities = {},
action;
@@ -78,10 +77,10 @@ define(
mockEditorCapability = jasmine.createSpyObj(
"editor",
["save", "cancel", "isEditContextRoot"]
["save", "finish", "isEditContextRoot"]
);
mockEditorCapability.cancel.andReturn(mockPromise(undefined));
mockEditorCapability.save.andReturn(mockPromise(true));
mockEditorCapability.finish.andReturn(mockPromise(true));
mockEditorCapability.isEditContextRoot.andReturn(true);
capabilities.editor = mockEditorCapability;
@@ -113,16 +112,11 @@ define(
]
);
mockUrlService = jasmine.createSpyObj(
"urlService",
["urlForLocation"]
);
actionContext = {
domainObject: mockDomainObject
};
action = new SaveAsAction(undefined, undefined, mockDialogService, undefined, mockCopyService, actionContext);
action = new SaveAsAction(undefined, undefined, mockDialogService, mockCopyService, actionContext);
spyOn(action, "getObjectService");
action.getObjectService.andReturn(mockObjectService);
@@ -156,6 +150,28 @@ define(
expect(SaveAsAction.appliesTo(actionContext)).toBe(false);
});
it("uses the editor capability to save the object", function () {
mockEditorCapability.save.andReturn(new Promise(function () {}));
runs(function () {
action.perform();
});
waitsFor(function () {
return mockEditorCapability.save.calls.length > 0;
}, "perform() should call EditorCapability.save");
runs(function () {
expect(mockEditorCapability.finish).not.toHaveBeenCalled();
});
});
it("uses the editor capability to finish editing the object", function () {
runs(function () {
action.perform();
});
waitsFor(function () {
return mockEditorCapability.finish.calls.length > 0;
}, "perform() should call EditorCapability.finish");
});
it("returns to browse after save", function () {
spyOn(action, "save");
action.save.andReturn(mockPromise(mockDomainObject));

View File

@@ -134,15 +134,15 @@ define(
it("commits the transaction", function () {
expect(mockTransactionService.commit).toHaveBeenCalled();
});
it("resets the edit state", function () {
expect(mockStatusCapability.set).toHaveBeenCalledWith('editing', false);
it("begins a new transaction", function () {
expect(mockTransactionService.startTransaction).toHaveBeenCalled();
});
});
describe("cancel", function () {
describe("finish", function () {
beforeEach(function () {
capability.edit();
capability.cancel();
capability.finish();
});
it("cancels the transaction", function () {
expect(mockTransactionService.cancel).toHaveBeenCalled();
@@ -158,7 +158,7 @@ define(
beforeEach(function () {
mockDomainObject.getModel.andReturn(model);
capability.edit();
capability.cancel();
capability.finish();
});
it("returns true if the object has been modified since it" +
" was last persisted", function () {

View File

@@ -19,22 +19,51 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global describe,it,expect,beforeEach,jasmine*/
define(
["../../src/controllers/EditActionController"],
function (EditActionController) {
describe("The Edit Action controller", function () {
var mockSaveActionMetadata = {
name: "mocked-save-action",
cssclass: "mocked-save-action-css"
};
function fakeGetActions(actionContext) {
if (actionContext.category === "save") {
var mockedSaveActions = [
jasmine.createSpyObj("mockSaveAction", ["getMetadata", "perform"]),
jasmine.createSpyObj("mockSaveAction", ["getMetadata", "perform"])
];
mockedSaveActions.forEach(function (action) {
action.getMetadata.andReturn(mockSaveActionMetadata);
});
return mockedSaveActions;
} else if (actionContext.category === "conclude-editing") {
return ["a", "b", "c"];
} else {
throw "EditActionController uses a context that's not covered by tests.";
}
}
var mockScope,
mockActions,
controller;
beforeEach(function () {
mockActions = jasmine.createSpyObj("action", ["getActions"]);
mockActions.getActions.andCallFake(fakeGetActions);
mockScope = jasmine.createSpyObj("$scope", ["$watch"]);
mockScope.action = mockActions;
controller = new EditActionController(mockScope);
});
function makeControllerUpdateActions() {
mockScope.$watch.mostRecentCall.args[1]();
}
it("watches scope that may change applicable actions", function () {
// The action capability
expect(mockScope.$watch).toHaveBeenCalledWith(
@@ -43,16 +72,34 @@ define(
);
});
it("populates the scope with grouped and ungrouped actions", function () {
mockScope.action = mockActions;
it("populates the scope with 'save' actions", function () {
makeControllerUpdateActions();
expect(mockScope.saveActions.length).toEqual(2);
});
mockActions.getActions.andReturn(["a", "b", "c"]);
it("converts 'save' actions to their menu counterparts", function () {
makeControllerUpdateActions();
var menuOptions = mockScope.saveActionsAsMenuOptions;
// Call the watch
mockScope.$watch.mostRecentCall.args[1]();
expect(menuOptions.length).toEqual(2);
expect(menuOptions[0].key).toEqual(mockScope.saveActions[0]);
expect(menuOptions[1].key).toEqual(mockScope.saveActions[1]);
menuOptions.forEach(function (option) {
expect(option.name).toEqual(mockSaveActionMetadata.name);
expect(option.cssclass).toEqual(mockSaveActionMetadata.cssclass);
});
});
// Should have grouped and ungrouped actions in scope now
expect(mockScope.editActions.length).toEqual(3);
it("uses a click handler to perform the clicked action", function () {
makeControllerUpdateActions();
var sampleSaveAction = mockScope.saveActions[0];
mockScope.saveActionMenuClickHandler(sampleSaveAction);
expect(sampleSaveAction.perform).toHaveBeenCalled();
});
it("populates the scope with other editing actions", function () {
makeControllerUpdateActions();
expect(mockScope.otherEditActions).toEqual(["a", "b", "c"]);
});
});
}

View File

@@ -103,7 +103,7 @@ define(
[
"edit",
"save",
"cancel"
"finish"
]
);
@@ -142,6 +142,7 @@ define(
});
describe("the perform function", function () {
var promise = jasmine.createSpyObj("promise", ["then"]);
beforeEach(function () {
capabilities.action.getActions.andReturn([mockEditAction]);
});
@@ -156,19 +157,20 @@ define(
expect(mockEditAction.perform).toHaveBeenCalled();
});
it("uses the save action if object does not have an edit action" +
it("uses the save-as action if object does not have an edit action" +
" available", function () {
capabilities.action.getActions.andReturn([]);
capabilities.action.perform.andReturn(mockPromise(undefined));
capabilities.editor.save.andReturn(promise);
action.perform();
expect(capabilities.action.perform).toHaveBeenCalledWith("save");
expect(capabilities.action.perform).toHaveBeenCalledWith("save-as");
});
describe("uses to editor capability", function () {
var promise = jasmine.createSpyObj("promise", ["then"]);
beforeEach(function () {
capabilities.action.getActions.andReturn([]);
capabilities.action.perform.andReturn(promise);
capabilities.editor.save.andReturn(promise);
});
it("to save the edit if user saves dialog", function () {
@@ -178,10 +180,10 @@ define(
expect(capabilities.editor.save).toHaveBeenCalled();
});
it("to cancel the edit if user cancels dialog", function () {
it("to finish the edit if user cancels dialog", function () {
action.perform();
promise.then.mostRecentCall.args[1]();
expect(capabilities.editor.cancel).toHaveBeenCalled();
expect(capabilities.editor.finish).toHaveBeenCalled();
});
});
});

View File

@@ -195,7 +195,7 @@ define(
expect(failure).toHaveBeenCalled();
});
it("logs an error when mutaton fails", function () {
it("logs an error when mutation fails", function () {
// If mutation of the parent fails, we've lost the
// created object - this is an error.
var model = { someKey: "some value" };

View File

@@ -138,23 +138,34 @@ define(
});
});
describe("when no context is available", function () {
var defaultRoot = "DEFAULT_ROOT";
beforeEach(function () {
mockContext.getRoot.andReturn(undefined);
getObjectsPromise.then.andCallFake(function (callback) {
callback({'ROOT': defaultRoot});
});
controller = new LocatorController(mockScope, mockTimeout, mockObjectService);
});
it("provides a default context where none is available", function () {
mockScope.$watch.mostRecentCall.args[1](mockDomainObject);
mockTimeout.mostRecentCall.args[0]();
expect(mockScope.rootObject).toBe(defaultRoot);
var defaultRoot = "DEFAULT_ROOT";
beforeEach(function () {
mockContext.getRoot.andReturn(undefined);
getObjectsPromise.then.andCallFake(function (callback) {
callback({'ROOT': defaultRoot});
});
controller = new LocatorController(mockScope, mockTimeout, mockObjectService);
});
it("provides a default context where none is available", function () {
mockScope.$watch.mostRecentCall.args[1](mockDomainObject);
mockTimeout.mostRecentCall.args[0]();
expect(mockScope.rootObject).toBe(defaultRoot);
});
it("does not issue redundant requests for the root object", function () {
mockScope.$watch.mostRecentCall.args[1](mockDomainObject);
mockTimeout.mostRecentCall.args[0]();
mockScope.$watch.mostRecentCall.args[1](undefined);
mockTimeout.mostRecentCall.args[0]();
mockScope.$watch.mostRecentCall.args[1](mockDomainObject);
mockTimeout.mostRecentCall.args[0]();
expect(mockObjectService.getObjects.calls.length)
.toEqual(1);
});
});
});
}
);

View File

@@ -112,7 +112,7 @@ define(
expect(mockPersistence.persist).toHaveBeenCalled();
// Finally, check that the provided mutation function
// includes both model and configuratioon
// includes both model and configuration
expect(
mockDomainObject.useCapability.mostRecentCall.args[1]()
).toEqual({

View File

@@ -79,7 +79,7 @@ define(
it("removes state from parent scope on destroy", function () {
// Verify precondition
expect(mockScope.$parent.testToolbar).toBeDefined();
// Destroy the represeter
// Destroy the representer
representer.destroy();
// Should have removed toolbar state from view
expect(mockScope.$parent.testToolbar).toBeUndefined();

View File

@@ -48,6 +48,7 @@ define([
"./src/directives/MCTSplitPane",
"./src/directives/MCTSplitter",
"./src/directives/MCTTree",
"./src/filters/ReverseFilter",
"text!./res/templates/bottombar.html",
"text!./res/templates/controls/action-button.html",
"text!./res/templates/controls/input-filter.html",
@@ -96,6 +97,7 @@ define([
MCTSplitPane,
MCTSplitter,
MCTTree,
ReverseFilter,
bottombarTemplate,
actionButtonTemplate,
inputFilterTemplate,
@@ -146,7 +148,8 @@ define([
"depends": [
"stylesheets[]",
"$document",
"THEME"
"THEME",
"ASSETS_PATH"
]
},
{
@@ -158,7 +161,7 @@ define([
],
"filters": [
{
"implementation": "filters/ReverseFilter.js",
"implementation": ReverseFilter,
"key": "reverse"
}
],
@@ -405,6 +408,11 @@ define([
"key": "THEME",
"value": "unspecified",
"priority": "fallback"
},
{
"key": "ASSETS_PATH",
"value": ".",
"priority": "fallback"
}
],
"containers": [

View File

@@ -62,6 +62,9 @@ $ueDesktopMinW: 600px;
$ovrTopBarH: 45px;
$ovrFooterH: 24px;
$overlayMargin: 25px;
/*************** Progress Overlay */
$durEntryMs: 50ms;
$delayEntryMs: 100ms;
/*************** Items */
$ueBrowseGridItemLg: 200px;
$ueBrowseGridItemTopBarH: 20px;
@@ -126,6 +129,7 @@ $menuLineH: 1.5rem;
$menuLineHPx: 24px;
$btnStdH: 25px;
$btnToolbarH: $btnStdH;
$controlBarH: $btnStdH;
$btnFrameH: 16px;
/************************** PATHS */

View File

@@ -21,7 +21,6 @@
*****************************************************************************/
.t-fixed-position {
&.l-fixed-position {
// @include test(red);
position: absolute;
top: 0;
right: 0;
@@ -35,7 +34,6 @@
height: 100%;
width: 100%;
.l-grid {
// @include test(orange);
position: absolute;
height: 100%;
width: 100%;
@@ -49,11 +47,6 @@
position: absolute;
border: 1px solid transparent;
&.s-selected {
@include boxShdwLarge();
border-color: $colorKey;
cursor: move;
}
&.s-not-selected {
opacity: 0.8;
}
@@ -76,26 +69,19 @@
}
.l-fixed-position-text {
//@include txtShdwSubtle();
border: 1px solid transparent;
font-size: 0.8rem;
$p: 1px; //$interiorMarginSm;
$p: 1px;
line-height: 100%;
&.l-static-text {
// overflow: auto;
padding: $p;
}
&.l-telemetry {
.l-elem {
//@include absPosDefault($p);
//@include absPosDefault(0);
box-sizing: border-box;
display: block;
padding: 2px;
//width: 50%;
&.l-title {
//right: auto;
//left: $p;
float: none;
overflow: hidden;
text-overflow: ellipsis;
@@ -103,9 +89,6 @@
width: auto;
}
&.l-value {
// @include test(blue);
// right: $p;
// left: auto;
border-radius: $smallCr;
$valPad: 5px;
float: right;
@@ -125,7 +108,6 @@
.l-fixed-position-item-handle {
$brd: 1px solid $colorKey;
// border-radius: $controlCr;
background: rgba($colorKey, 0.5);
cursor: crosshair;
border: $brd;

View File

@@ -71,7 +71,7 @@
.form {
margin-bottom: $interiorMarginSm;
padding-bottom: $interiorMarginLg;
.form-section {
.l-section-body {
margin-bottom: 0;
&:not(.first) {
border-top: 1px solid $colorFormLines;

View File

@@ -65,6 +65,7 @@
@import "user-environ/frame";
@import "user-environ/top-bar";
@import "user-environ/tool-bar";
@import "user-environ/selecting";
/********************************* VIEWS */
@import "fixed-position";

View File

@@ -1,8 +1,11 @@
/* Styles for sub-dividing views generically */
.l-control-bar {
// Element that can be placed above l-view-section, holds controls, buttons, etc.
height: $controlBarH;
}
.l-view-section {
@include absPosDefault(0);
font-size: 0.8rem;
h2 {
color: #fff;
margin-bottom: $interiorMargin;
@@ -15,4 +18,23 @@
.inline-block {
display: inline-block;
}
}
.has-control-bar {
.l-view-section {
top: $controlBarH + $interiorMargin;
}
}
.child-frame {
.has-control-bar {
$btnExportH: $btnFrameH;
.l-control-bar {
display: none;
}
.l-view-section {
top: 0;
}
}
}

View File

@@ -216,6 +216,7 @@ input[type="search"] {
.l-input-lg input[type="text"] { width: 100% !important; }
.l-input-med input[type="text"] { width: 200px !important; }
.l-input-sm input[type="text"] { width: 50px !important; }
.l-textarea-sm textarea { position: relative; height: 50px; }
.l-numeric input[type="text"] { text-align: right; }
.input-labeled {

View File

@@ -97,7 +97,7 @@
.frame.child-frame.panel {
&:hover {
@include boxShdwLarge();
border-color: $colorKey;
border-color: $colorSelectableSelectedPrimary;
.view-switcher {
opacity: 1;
}

View File

@@ -25,11 +25,21 @@
.form {
color: $colorFormText;
height: 100%;
width: 100%;
.form-section {
position: relative;
margin-bottom: $interiorMarginLg * 2;
}
.l-form-section {
position: relative;
&.grows {
.l-section-body,
.form-row {
@include flex(1 1 auto);
.wrapper {
height: 100%;
}
}
}
}
.section-header {
border-radius: $basicCr;
@@ -43,10 +53,14 @@
.form-row {
$m: $interiorMargin;
box-sizing: border-box;
@include clearfix;
border-top: 1px solid $colorFormLines;
margin-bottom: $interiorMarginLg * 2;
padding: $formTBPad 0;
position: relative;
//&ng-form {
// display: block;
//}
&.first {
border-top: none;
}
@@ -92,17 +106,14 @@
.selector-list {
// Used in create overlay to display tree view
@include nice-input();
$h: 150px;
padding: $interiorMargin;
position: relative;
height: $h;
min-height: 150px;
height: 100%;
>.wrapper {
$p: $interiorMargin;
box-sizing: border-box;
overflow: auto;
position: absolute;
top: $p;
right: $p;
bottom: $p;
left: $p;
}
}
}

View File

@@ -21,9 +21,6 @@
*****************************************************************************/
//************************************************* GENERAL
.bubble-container {
pointer-events: none;
}
//************************************************* LAYOUT

View File

@@ -160,39 +160,3 @@ table {
}
}
}
/********************************************************** SPECIFIC TABULAR VIEWS */
.tabular-holder {
&.t-exportable {
$btnExportH: 25px;
.l-view-section {
top: $btnExportH + $interiorMargin;
}
}
}
.child-frame {
.tabular-holder {
&.t-exportable {
$btnExportH: $btnFrameH;
.s-button.t-export {
@include trans-prop-nice(opacity, $dur: 50ms);
opacity: 0;
}
.l-view-section {
@include trans-prop-nice(top, $dur: 150ms, $delay: 50ms);
top: 0;
}
&:hover {
.s-button.t-export {
@include trans-prop-nice(opacity, 150ms, 100ms);
opacity: 1;
}
.l-view-section {
@include trans-prop-nice(top, $dur: 150ms);
top: $btnExportH + $interiorMargin;
}
}
}
}
}

View File

@@ -25,7 +25,6 @@
@include phone {
.overlay > .holder {
//@include test(orange); // This works!
$m: 0;
border-radius: $m;
top: $m;
@@ -38,36 +37,30 @@
overflow: auto;
@include transform(none);
.editor .form .form-row {
> .label,
> .controls {
//@include test(blue);
display: block;
float: none;
width: 100%;
}
> .label {
&:after {
float: none;
.editor .form .form-row.l-flex-row {
// Display elements in a columnar view
@include flex-direction(column);
> .flex-elem {
&:not(:first-child) {
margin-top: $interiorMargin;
}
&.label {
width: 100%;
}
&.controls {
overflow: auto;
}
}
}
.contents {
.abs.top-bar,
.abs.editor,
.abs.message-body,
.abs.bottom-bar {
//@include test(orange);
top: auto; right: auto; bottom: auto; left: auto;
height: auto; width: auto;
margin-bottom: $interiorMarginLg * 2;
&.validates > .label:before {
position: relative;
right: auto;
line-height: inherit;
margin-right: $interiorMargin;
}
}
}
.t-dialog-sm .overlay > .holder {
//@include test(blue);
height: auto; max-height: 100%;
}
}

View File

@@ -19,8 +19,17 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
.overlay {
font-size: 90%;
&.delayEntry100ms {
@include keyframes(fadeInFromNone) {
0% { display: none; opacity: 0; }
100% { display: block; opacity: 1; }
}
@include animation-delay($delayEntryMs);
@include animation(fadeInFromNone $durEntryMs ease-in);
}
.blocker {
background: $colorOvrBlocker;
z-index: 100;

View File

@@ -126,16 +126,15 @@
$p: $interiorMargin;
box-sizing: border-box;
line-height: 130%;
//padding-left: $s * 2.25;
padding-left: $s * 2;
font-size: $s;
.clear-filters {
color: $colorInputIcon;
opacity: 1;
font-size: 0.9em;
margin-right: $interiorMarginSm;
//position: absolute;
//left: 1px;
position: absolute;
left: 1px;
cursor: pointer;
}
}

View File

@@ -19,20 +19,21 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
var right_click = require("../common/RightMenu.js");
var Create = require("../common/CreateItem")
describe('Delete Timer', function() {
var clickClass = new right_click();
var createClass = new Create();
var ITEM_NAME = "Timer";
var ITEM_TYPE = "timer";
var ITEM_MENU_GLYPH = 'õ\nTimer';
var ITEM_GRID_SELECT = 'P\nõ\nTimer';
var ITEM_SIDE_SELECT = "õ\nTimer"
beforeEach(require('../common/Launch'));
it('should delete the Timer', function(){
clickClass.delete(ITEM_SIDE_SELECT);
browser.sleep(1000);
});
.s-selectable {
border: 1px solid transparent;
});
&.s-hover {
// Styles when hovering over a selectable object
border-color: $colorSelectableHov !important;
}
&.s-selected {
// Styles for a selected object. Also used by legacy Fixed Position/Panel objects.
border-color: $colorSelectableSelectedPrimary !important;
}
&.s-moveable {
@include boxShdwLarge();
cursor: move;
}
}

View File

@@ -37,8 +37,10 @@ define(
* @param {object[]} stylesheets stylesheet extension definitions
* @param $document Angular's jqLite-wrapped document element
* @param {string} activeTheme the theme in use
* @param {string} [assetPath] the directory relative to which
* stylesheets will be found
*/
function StyleSheetLoader(stylesheets, $document, activeTheme) {
function StyleSheetLoader(stylesheets, $document, activeTheme, assetPath) {
var head = $document.find('head'),
document = $document[0];
@@ -47,6 +49,7 @@ define(
// Create a link element, and construct full path
var link = document.createElement('link'),
path = [
assetPath,
stylesheet.bundle.path,
stylesheet.bundle.resources,
stylesheet.stylesheetUrl
@@ -68,6 +71,8 @@ define(
stylesheet.theme === activeTheme;
}
assetPath = assetPath || ".";
// Add all stylesheets from extensions
stylesheets.filter(matchesTheme).forEach(addStyleSheet);
}

View File

@@ -38,7 +38,7 @@ define(
$scope.contextutalParents = [];
//$scope.isLink = false;
// Gets an array of the contextual parents/anscestors of the selected object
// Gets an array of the contextual parents/ancestors of the selected object
function getContextualPath() {
var currentObj = $scope.ngModel.selectedObject,
currentParent,
@@ -61,7 +61,7 @@ define(
$scope.contextutalParents = parents;
}
// Gets an array of the parents/anscestors of the selected object's
// Gets an array of the parents/ancestors of the selected object's
// primary location (locational of original non-link)
function getPrimaryPath(current) {
var location;

View File

@@ -28,8 +28,10 @@ define([
function link(scope, element) {
var treeView = new TreeView(gestureService),
unobserve = treeView.observe(function (domainObject) {
scope.mctModel = domainObject;
scope.$apply();
if (scope.mctModel !== domainObject) {
scope.mctModel = domainObject;
scope.$apply();
}
});
element.append(angular.element(treeView.elements()));

View File

@@ -25,7 +25,7 @@ define(function () {
/**
* Implements the `reverse` filter, which reverses text strings.
* Useful in cases where text should be reversed for presentational
* reasons (e.g. in conjunction with CSS tricks involing text direction),
* reasons (e.g. in conjunction with CSS tricks involving text direction),
* allowing such behavior to be handled independently from the controller
* layer.
*

View File

@@ -35,7 +35,7 @@ define(
}
/**
* Options controlling how the popup is displaed.
* Options controlling how the popup is displayed.
*
* @typedef PopupOptions
* @memberof platform/commonUI/general

View File

@@ -69,7 +69,7 @@ define(
it("adjusts link locations", function () {
expect(mockElement.setAttribute)
.toHaveBeenCalledWith('href', "a/b/c/d.css");
.toHaveBeenCalledWith('href', "./a/b/c/d.css");
});
describe("for themed stylesheets", function () {
@@ -95,12 +95,13 @@ define(
it("includes matching themes", function () {
expect(mockElement.setAttribute)
.toHaveBeenCalledWith('href', "a/b/c/themed.css");
.toHaveBeenCalledWith('href', "./a/b/c/themed.css");
});
it("excludes mismatching themes", function () {
expect(mockElement.setAttribute)
.not.toHaveBeenCalledWith('href', "a/b/c/bad-theme.css");
.not
.toHaveBeenCalledWith('href', "./a/b/c/bad-theme.css");
});
});

View File

@@ -60,7 +60,7 @@ define(
expect(controller.isActive()).toBe(false);
});
it("allows active state to be explictly specified", function () {
it("allows active state to be explicitly specified", function () {
controller.setState(true);
expect(controller.isActive()).toBe(true);
controller.setState(true);

View File

@@ -46,7 +46,7 @@ define(
expect(controller.isActive()).toBe(false);
});
it("allows active state to be explictly specified", function () {
it("allows active state to be explicitly specified", function () {
controller.setState(true);
expect(controller.isActive()).toBe(true);
controller.setState(true);

View File

@@ -29,6 +29,18 @@ define([
mockExpr,
mctTree;
function makeMockDomainObject(id) {
var mockDomainObject = jasmine.createSpyObj('domainObject-' + id, [
'getId',
'getModel',
'getCapability',
'hasCapability'
]);
mockDomainObject.getId.andReturn(id);
mockDomainObject.getModel.andReturn({});
return mockDomainObject;
}
beforeEach(function () {
mockGestureService = jasmine.createSpyObj(
'gestureService',
@@ -56,7 +68,8 @@ define([
testAttrs;
beforeEach(function () {
mockScope = jasmine.createSpyObj('$scope', ['$watch', '$on']);
mockScope =
jasmine.createSpyObj('$scope', ['$watch', '$on', '$apply']);
mockElement = jasmine.createSpyObj('element', ['append']);
testAttrs = { mctModel: "some-expression" };
mockScope.$parent =
@@ -88,6 +101,27 @@ define([
jasmine.any(Function)
);
});
// https://github.com/nasa/openmct/issues/1114
it("does not trigger $apply during $watches", function () {
mockScope.mctObject = makeMockDomainObject('root');
mockScope.mctMode = makeMockDomainObject('selection');
mockScope.$watch.calls.forEach(function (call) {
call.args[1](mockScope[call.args[0]]);
});
expect(mockScope.$apply).not.toHaveBeenCalled();
});
it("does trigger $apply from other value changes", function () {
// White-boxy; we know this is the setter for the tree's value
var treeValueFn = mockScope.$watch.calls[0].args[1];
mockScope.mctObject = makeMockDomainObject('root');
mockScope.mctMode = makeMockDomainObject('selection');
treeValueFn(makeMockDomainObject('other'));
expect(mockScope.$apply).toHaveBeenCalled();
});
});
});

View File

@@ -29,8 +29,7 @@
define({
BUBBLE_TEMPLATE: "<mct-container key=\"bubble\" " +
"bubble-title=\"{{bubbleTitle}}\" " +
"bubble-layout=\"{{bubbleLayout}}\" " +
"class=\"bubble-container\">" +
"bubble-layout=\"{{bubbleLayout}}\">" +
"<mct-include key=\"bubbleTemplate\" " +
"ng-model=\"bubbleModel\">" +
"</mct-include>" +

View File

@@ -72,7 +72,7 @@ define(
expect(directive.restrict).toEqual("A");
});
it("transcludes at the elmeent level", function () {
it("transcludes at the element level", function () {
expect(directive.transclude).toEqual('element');
});

View File

@@ -361,7 +361,7 @@ define(
autodismiss specified), leave it to run. Otherwise force a
timeout.
This notifcation has been added to queue and will be
This notification has been added to queue and will be
serviced as soon as possible.
*/
this.active.timeout = this.$timeout(function () {

View File

@@ -63,6 +63,9 @@ $colorInvokeMenu: #fff;
$colorObjHdrTxt: $colorBodyFg;
$colorObjHdrIc: pullForward($colorObjHdrTxt, 20%);
$colorTick: rgba(white, 0.2);
$colorSelectableSelectedPrimary: $colorKey;
$colorSelectableSelectedSecondary: pushBack($colorSelectableSelectedPrimary, 20%);
$colorSelectableHov: $colorSelectableSelectedSecondary;
// Menu colors
$colorMenuBg: pullForward($colorBodyBg, 23%);

View File

@@ -63,6 +63,9 @@ $colorInvokeMenu: #fff;
$colorObjHdrTxt: $colorBodyFg;
$colorObjHdrIc: pushBack($colorObjHdrTxt, 30%);
$colorTick: rgba(black, 0.2);
$colorSelectableSelectedPrimary: $colorKey;
$colorSelectableSelectedSecondary: pushBack($colorSelectableSelectedPrimary, 20%);
$colorSelectableHov: $colorSelectableSelectedSecondary;
// Menu colors
$colorMenuBg: pushBack($colorBodyBg, 10%);

View File

@@ -45,7 +45,7 @@ define(
['getKey', 'getDefinition', 'getInitialModel']
);
mockType.getKey.andReturn(type);
// Return a model to drive apparant capabilities
// Return a model to drive apparent capabilities
mockType.getInitialModel.andReturn({ id: type });
return mockType;
});

View File

@@ -50,7 +50,7 @@ define(
// third one defines no containership rules
contains: (index < 2) ? [{ has: 'b' }] : undefined
});
// Return a model to drive apparant capabilities
// Return a model to drive apparent capabilities
mockType.getInitialModel.andReturn({ id: type });
return mockType;
});

View File

@@ -252,6 +252,14 @@ define([
"pattern": "\\S+",
"required": true,
"cssclass": "l-input-lg"
},
{
"name": "Notes",
"key": "notes",
"property": "notes",
"control": "textarea",
"required": false,
"cssclass": "l-textarea-sm"
}
]
},

View File

@@ -24,7 +24,7 @@ define([], function () {
/**
* Provides a cache for domain object models which exist in memory,
* but may or may not exist in backing persistene stores.
* but may or may not exist in backing persistence stores.
* @constructor
* @memberof platform/core
*/

View File

@@ -42,7 +42,7 @@ define(
* @implements {ModelService}
* @param {Array} roots all `roots[]` extensions
* @param $q Angular's $q, for promises
* @param $log Anuglar's $log, for logging
* @param $log Angular's $log, for logging
*/
function RootModelProvider(roots, $q, $log) {
// Pull out identifiers to used as ROOT's

View File

@@ -49,7 +49,7 @@ define(
}
}
// Prepoulate maps with models to make subsequent lookup faster.
// Prepopulate maps with models to make subsequent lookup faster.
models.forEach(addModelToMap);
this.modelMap = modelMap;

View File

@@ -43,7 +43,7 @@ define(
},
ARRAY_SUFFIX = '[]';
// Utility function to handle arrays of conversiions
// Utility function to handle arrays of conversions
function ArrayConversion(conversion) {
return {
toModelValue: function (formValue) {

View File

@@ -68,7 +68,7 @@ define(
}) : array;
}
// Reduce an array of type definitions to a single type definiton,
// Reduce an array of type definitions to a single type definition,
// which has merged all properties in order.
function collapse(typeDefs) {
var collapsed = typeDefs.reduce(function (a, b) {

View File

@@ -3,7 +3,7 @@
Entanglement is the process of moving, copying, and linking domain objects
in such a way that their relationships are impossible to discern.
This bundle provides move, copy, and link functionality. Acheiving a state of
This bundle provides move, copy, and link functionality. Achieving a state of
entanglement is left up to the end user.

View File

@@ -95,7 +95,7 @@ define(
this.locationService = locationService;
this.composeService = composeService;
this.verb = verb || "Compose";
this.suffix = suffix || "to a new location";
this.suffix = suffix || "To a New Location";
}
AbstractComposeAction.prototype.cloneContext = function () {

View File

@@ -54,7 +54,7 @@ define(
copyService,
context,
"Duplicate",
"to a location"
"To a Location"
);
}

View File

@@ -58,6 +58,7 @@ define(
sections: [
{
name: 'Location',
cssclass: "grows",
rows: [
{
name: label,

View File

@@ -150,7 +150,7 @@ define(
it("prompts for location", function () {
expect(locationService.getLocationFromUser)
.toHaveBeenCalledWith(
"Compose selectedObject to a new location",
"Compose selectedObject To a New Location",
"Compose To",
jasmine.any(Function),
currentParent

View File

@@ -173,7 +173,7 @@ define(
it("prompts for location", function () {
expect(locationService.getLocationFromUser)
.toHaveBeenCalledWith(
"Duplicate selectedObject to a location",
"Duplicate selectedObject To a Location",
"Duplicate To",
jasmine.any(Function),
currentParent

View File

@@ -126,7 +126,7 @@ define(
it("prompts for location", function () {
expect(locationService.getLocationFromUser)
.toHaveBeenCalledWith(
"Link selectedObject to a new location",
"Link selectedObject To a New Location",
"Link To",
jasmine.any(Function),
currentParent

View File

@@ -126,7 +126,7 @@ define(
it("prompts for location", function () {
expect(locationService.getLocationFromUser)
.toHaveBeenCalledWith(
"Move selectedObject to a new location",
"Move selectedObject To a New Location",
"Move To",
jasmine.any(Function),
currentParent

View File

@@ -42,11 +42,19 @@ define(
function addWorker(worker) {
var key = worker.key;
if (!workerUrls[key]) {
workerUrls[key] = [
worker.bundle.path,
worker.bundle.sources,
worker.scriptUrl
].join("/");
if (worker.scriptUrl) {
workerUrls[key] = [
worker.bundle.path,
worker.bundle.sources,
worker.scriptUrl
].join("/");
} else if (worker.scriptText) {
var blob = new Blob(
[worker.scriptText],
{type: 'application/javascript'}
);
workerUrls[key] = URL.createObjectURL(blob);
}
sharedWorkers[key] = worker.shared;
}
}

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