Compare commits

..

1023 Commits

Author SHA1 Message Date
5013646e89 Edit mode button works 2015-10-21 17:31:04 -07:00
9925b91405 Fixed 'insta-persist' feature 2015-10-21 15:36:20 -07:00
fdfb524eef Fixed scope of editMode variable 2015-10-21 12:06:11 -07:00
ef250f58de Marged style updates 2015-10-21 12:01:59 -07:00
15ed91f651 Added save buttons 2015-10-21 11:54:35 -07:00
074254a513 Frontend] Styling for New Edit Mode
open #198
Minor tweak to placeholder init content;
2015-10-21 11:38:03 -07:00
4c84789d5d Frontend] Styling for New Edit Mode
open #198
.l-flex styles refined;
Animation refinement;
.s-btn default vertical-align = top;
.tool-bar style tweaked;
Added title-label back into edit-action-buttons.html;
2015-10-21 11:35:36 -07:00
92573b817f Added drag to enable edit mode 2015-10-20 21:03:36 -07:00
5382cca435 [Frontend] Styling for New Edit Mode
open #198
In-progress styling of toolbar elements;
Revamped edit-action-buttons.html to use only icons;
2015-10-20 15:43:53 -07:00
15c1bf20ab [Frontend] Styling for New Edit Mode
open #198
Refined CSS classing and animation timing;
2015-10-20 14:41:02 -07:00
685dd2114d [Frontend] Styling for New Edit Mode
open #198
Added Save and Cancel buttons;
Additional transition styling;
tool-bar styles refined;
2015-10-20 14:11:59 -07:00
6e30a25a6f [Frontend] Added new glyph
prod-uisymbols
Added e612 Save icon;
2015-10-20 12:44:09 -07:00
42fa5bfd7e [Frontend] Initial styles for New Edit Mode
open #198
Refactored elems in browse-object.html to use
flex layout;
New flex-row and flex-col general CSS classes;
New pulseBorder animation mixin;
2015-10-20 11:39:28 -07:00
fb0ce1eca8 [Frontend] New .loading class
open #190
Removed old .loading styles previously
commented out;
2015-10-19 11:13:50 -07:00
d7bd793bf3 [Frontend] New .loading class
open #190
CSS for revised .loading class;
Commented out/removed old .loading styles;
Theme constants for loading colors added
to theme files;
2015-10-15 16:23:42 -07:00
9cc0c0b06f [Frontend] Polishing of styles for time-controller
open #179
open #180
Font-size normalized for time-controller and domain selector;
Layout of object-holder and time-controller fixed;
2015-10-14 10:25:05 -07:00
c703714cb3 Merge remote-tracking branch 'github-open/open115b' into open-master 2015-10-09 13:50:27 -07:00
b48a07cd3e Merge pull request #168 from nasa/mct80
[Plot] Dates show 1970 when there is no data
2015-10-09 13:40:04 -07:00
8c29c8ed0e Merge remote-tracking branch 'github-open/open151' into open-master 2015-10-09 13:38:20 -07:00
5763511ec8 [Time Conductor] Update specs
Update specs to reflect merge of latest from master into
topic branch for nasa/openmctweb#115, domain selector.
2015-10-09 11:17:57 -07:00
2accf21518 [Time Conductor] Add missing semicolon
...to pass code style checks.
2015-10-09 11:08:02 -07:00
28c42fcd4c [Time Conductor] Fix merge issues
Fix merge issues not addressed during conflict resolution.
2015-10-09 11:06:41 -07:00
1efa97e6f5 Merge remote-tracking branch 'github/master' into open115b
Conflicts:
	platform/features/conductor/src/ConductorRepresenter.js
2015-10-09 10:32:43 -07:00
756f728865 Merge remote-tracking branch 'github/open1515' into open-master 2015-10-09 10:11:11 -07:00
d8276c532b Merge remote-tracking branch 'github/master' into open115b
Merge in latest from master into topic branch for
nasa/openmctweb#115

Conflicts:
	platform/features/conductor/src/ConductorRepresenter.js
	platform/features/conductor/src/ConductorTelemetrySeries.js
	platform/features/conductor/src/TimeConductor.js
	platform/features/conductor/test/ConductorRepresenterSpec.js
	platform/features/conductor/test/ConductorTelemetrySeriesSpec.js
2015-10-09 10:04:15 -07:00
fc0bfa77db Merge remote-tracking branch 'github-open/open141' into open141-integration 2015-10-09 09:52:35 -07:00
12c6e53939 Merge remote-tracking branch 'github-open/open157' into open-master 2015-10-09 09:47:23 -07:00
4f716ad5c5 Merge pull request #162 from nasa/open117
Review and integrate open117
2015-10-09 09:44:48 -07:00
8093fcbda1 Merge remote-tracking branch 'github-open/open139c' into open-master 2015-10-09 09:42:22 -07:00
0ea5721f76 Merge remote-tracking branch 'github-open/open-readme-cairo' into open-master 2015-10-09 09:38:32 -07:00
d902943552 [Time Conductor] Satisfy JSLint
...in preparation to merge pull request nasa/openmctweb#162
2015-10-09 09:36:57 -07:00
5f7c8ccadb Merge remote-tracking branch 'github/master' into open117b 2015-10-09 09:35:07 -07:00
520d17f9db [Time Conductor] Test span constraints
Verify that inner and outer spans do not become zero when
user input might otherwise cause this.
2015-10-09 09:29:01 -07:00
7532db5f49 [Time Conductor] Add test cases
Add test cases to TimeRangeController; testing existing functionality
in the context of nasa/openmctweb#151
2015-10-09 07:58:10 -07:00
ebd8fdeee3 [Time Conductor] Enforce inner minimums on outer changes 2015-10-09 07:32:46 -07:00
f738f84075 [Time Conductor] Enforce minimum outer span 2015-10-08 16:02:47 -07:00
cc19a0acba [Time Conductor] Enforce minimum inner span
nasa/openmctweb#151.
2015-10-08 15:51:23 -07:00
134b749bbf [Generic Search] Track pending indexes
Track domain objects which have indexing operations pending,
to avoid redundantly indexing in cases where a broader
indexed check is insufficient.
2015-10-05 10:11:38 -07:00
36d06e8b54 [Generic Search] Reduce flush interval
Per discussion from nasa/openmctweb#141, minimize the
interval at which new objects get indexed, instead of
presuming requirements for CPU utilization.
2015-10-05 10:06:55 -07:00
5520d90984 [Generic Search] Remove comments
Per code review, nasa/openmctweb#165
2015-10-05 09:57:46 -07:00
77b0086d18 [Generic Search] Use appropriate data structure
Per code review, nasa/openmctweb#165
2015-10-05 09:54:57 -07:00
146e948097 [Time Conductor] Remove telemetry series wrapper
WTD-1515
2015-10-02 16:47:13 -07:00
669b434c36 [Time Conductor] Test broadcast throttling 2015-10-02 16:38:32 -07:00
431c74ca49 [Time Conductor] Only update bounds when stable 2015-10-02 16:28:58 -07:00
cd0c0f77cc [Time Conductor] Throttle display bounds broadcasting 2015-10-02 16:20:31 -07:00
8cba321886 [Plot] Move throttling out of plot
Move throttling associated with display bounds changes out
of Plot.
2015-10-02 16:11:12 -07:00
dd83816035 [Time Conductor] Remove queryStart, queryEnd
...per feedback from code review, nasa/openmctweb#104
2015-10-02 16:08:44 -07:00
1ca2b769d9 [Common UI] Test popupService 2015-10-02 15:44:36 -07:00
a1d1261179 [Common UI] Test Popup 2015-10-02 14:58:20 -07:00
99048a4ee3 [Info Service] Update spec
...to reflect usage of popupService.
2015-10-02 14:49:27 -07:00
553b17fafe [Common UI] Update mct-popup spec
...to reflect usage of popupService.
2015-10-02 14:36:04 -07:00
c4aff95341 [Common UI] Add empty specs for popupService 2015-10-02 14:15:31 -07:00
13095b4135 [Context Menu] Update specs
Update specs to reflect refactoring-out of popup elements
performed in the context of adding time conductor, WTD-1515.
2015-10-02 14:14:34 -07:00
fd927d4c03 Merge remote-tracking branch 'github/master' into open1515 2015-10-02 12:31:00 -07:00
445f22ccb0 [Context Menu] Use popupService to display menus 2015-10-02 11:01:49 -07:00
1ad0bf337c [Common UI] Use popupService from mct-popup 2015-10-02 10:48:45 -07:00
73dc16d398 [Info Service] Render info bubble after positioning
Render info bubble after positioning with the popupService,
to apply arrow classes appropriately.
2015-10-02 10:21:42 -07:00
bebe53820f [Info Service] Choose arrow direction 2015-10-02 09:36:27 -07:00
dfe909d6b5 [Time Conductor] Show appropriate arrow
...on info bubbles, when using bubbles shown via the
popupService.
2015-10-01 16:59:12 -07:00
3cf62ded08 Plot axes do not show labels when no data
Added semicolon

Added test for hasDomainData()

Added test for negative case on domain data check

Removed label test due to mocked telemetry formatter

Uncommented test commented by accident

Removed extra space
2015-10-01 16:35:14 -07:00
6cbd3e5fae [Time Conductor] Use popupService from infoService 2015-10-01 16:25:33 -07:00
3050b265fb [Time Conductor] Expose popupService 2015-10-01 15:27:36 -07:00
5104a7990a [Time Conductor] Add popupService
...to consolidate positioning of popups, based on
commonality between InfoService and MCTPopup.
nasa/openmctweb#104.
2015-10-01 15:26:00 -07:00
571beb8df2 [Time Conductor] Add JSDoc to mct-popup
Based on feedback from code review; WTD-1515
2015-10-01 14:34:52 -07:00
bea5002752 [Search] Add test cases
Add test cases related to throttled loading of domain
objects to index, nasa/openmctweb#141.
2015-09-30 17:23:52 -07:00
d04c5e6858 [Search] Update GenericSearch spec
nasa/openmctweb#141.
2015-09-30 17:08:47 -07:00
0d1f3bf87a [Throttle] Update spec
Conflicts:
	platform/features/layout/test/FixedControllerSpec.js
2015-09-30 15:48:17 -07:00
b632926d8e [Search] Fix mutation.listen
Update mutation.listen to match previous variable
names changes related to nasa/openmctweb#141.
2015-09-30 13:09:55 -07:00
78f3f8367e [Search] Vary batch size
When indexing for generic search, issue new batches of
requests as individual requests finish (instead of waiting
for whole batches to finish) varying size to keep the
number of outstanding requests below some maximum.

nasa/openmctweb#141
2015-09-29 18:37:44 -07:00
85ac4a9a32 [Search] Log indexing time
...to aid in tuning of generic search parameters.
2015-09-29 18:37:44 -07:00
ef527df381 [Time Conductor] Fix throttle bug
Fix a timing/ordering issue in throttle which
allowed some throttled invocations to be ignored.
WTD-1515
2015-09-29 18:37:44 -07:00
c2868a4573 [Time Conductor] Allow arguments for throttled functions
WTD-1515. Ensures that bounds passed in from
the time controller get appropriately captured.
2015-09-29 18:37:44 -07:00
77c66053f3 [Search] Change indexing approach
Change indexing approach to more carefully control the
rate at which objects are loaded to be indexed, to improve
performance. nasa/openmctweb#141.
2015-09-29 18:37:44 -07:00
0891e15936 [Search] Add digest indicator
Add digest indicator to example/profiling to aid in diagnosing
digest-related performance issues (or ruling out excessive digest
cycles as a cause of performance issues.)
2015-09-29 18:37:44 -07:00
2979ee90a3 Revert "[Search] Don't trigger digest cycles while indexing"
This reverts commit 4b8a5ac0b257737ee33effc966816afca6c11b94.
Performance measurements indicates this is harmful for performance,
although this is not well-explained.
2015-09-29 18:37:44 -07:00
77c399f2a2 [Search] Don't trigger digest cycles while indexing
Avoid triggering digest cycles while indexing;
remove extra call to $timeout
2015-09-29 18:37:44 -07:00
fe8543158e [Search] Fix reindexing
Flag domain objects as non-indexed on mutation to ensure
reindexing. Done in the context of nasa/openmctweb#141.
2015-09-29 18:37:44 -07:00
a4f3e0d776 Plot domain labels showing 1970 if no data 2015-09-29 15:28:55 -07:00
866c8882ca [Search] Listen on a global mutation topic
Listen on a global mutation topic to remove the need to retain
listeners per domain object.
2015-09-29 11:50:30 -07:00
ad7d3d642e [Search] Move reindex function
Move function used to listen for mutation changes (to trigger
reindexing) up in scope, to avoid retaining references to
domain objects via closure. nasa/openmctweb#141

Also, includes misc. whitespace normalization (provided by
code editor.)
2015-09-29 10:54:20 -07:00
333f7cb848 [Frontend] Time controller-related styling
open #1515
open #117
Markup changed to utilize mct-representation via CSS;
time-controller now uses list-based _constants values;
ConductorRepresenter.js modded to remove inline styling
and to add CSS classes to enclosing mct-representation;
2015-09-29 08:43:34 -07:00
f198c281bc [Mobile] Suppress Create button on mobile
nasa/openmctweb#157
2015-09-28 15:57:55 -07:00
d6fe543c16 [Build] Bump version number
Bump version number to start sprint Asimov, WTD-827.
2015-09-28 15:25:37 -07:00
581dbacc9f [Build] Remove SNAPSHOT status
Remove SNAPSHOT status to tag end of sprint,
WTD-827.
2015-09-28 15:20:18 -07:00
23de3917bb [Frontend] Time Controller Markup and Styling
open #1515
open #117
Animation added to .knob and .range;
2015-09-27 16:24:43 -07:00
badaca53d3 [Frontend] Time Controller Markup and Styling
open #1515
open #117
Significant mods to slider scss;
Added toi-line element and hover styles;
2015-09-25 18:12:36 -07:00
00ac249ee2 [Time Conductor] Position domain selector
nasa/openmtweb#115
2015-09-25 16:06:11 -07:00
00aa6821d1 Merge remote-tracking branch 'github/open117' into open115b 2015-09-25 15:31:27 -07:00
e33485ec59 [Frontend] Time controller-related styling (CP > open117)
open #1515
open #117
Further refinements to slider knob and range look;
(cherry picked from commit 63a1239)
2015-09-25 13:57:57 -07:00
afb1202865 [Frontend] Time controller-related styling (CP > open117)
open #1515
open #117
Layout styling in datetime picker;
Modded picker to hide time selects area
when time options are null;
(cherry picked from commit 6721093)
2015-09-25 13:57:43 -07:00
5b02bc8104 Merge pull request #145 from nasa/open-commit-standards
[Process] Loosen commit message standards
2015-09-25 13:28:11 -07:00
f5a4a370f9 [Persistence] Add persisted timestamp
...to any domain object models loaded from persistence
which do not have one. The presence of this timestamp
is necessary for the persistence capability to determine
whether an object should be created or updated when a
request to persist is made. nasa/openmctweb#139.
2015-09-25 11:47:59 -07:00
2848a8458b [Time Conductor] Avoid exception
Avoid exception when trying to generate a single datum in
cases where there is no data yet available.
2015-09-25 11:05:18 -07:00
4f0e8ada2f [Process] Loosen commit message standards
Loosen commit message standards, to minimize clutter in GitHub
issues. nasa/openmctweb#145.
2015-09-25 10:47:41 -07:00
cbaf45afe9 [Time Conductor] Update specs
nasa/openmctweb#115
2015-09-25 10:40:19 -07:00
7a677062e4 [Frontend] Time controller-related styling (CP > open117)
open #1515
open #117
Fixing selects;
Tweaks to constants and mixins to better
handle button dropshadowing across
themes;
(cherry picked from commit 3e34d06)
2015-09-25 09:50:36 -07:00
a7153f320f [Frontend] Time controller-related styling (CP > open117)
open #1515
open #117
Fixing selects;
Minor tweak to normalize espresso/.../mixins.scss;
(cherry picked from commit 2866d56)
2015-09-25 09:50:02 -07:00
b3da6edd0c [Frontend] Time Controller Markup and Styling
open #1515
open #117
Significant new vals added to constants files
for datetime picker/calendar;
Styling for calendar, hover and selected states;
Modded DateTimePickerController.js and markup
to allow selection of out-of-month cells;
2015-09-24 18:36:56 -07:00
ff1fd26efc [Time Conductor] Change method name
Prefer simpler method names for public API.
2015-09-24 17:09:06 -07:00
4ced6c44a6 [Time Conductor] Ignore empty series
...when updating Fixed Position view.
2015-09-24 17:01:50 -07:00
67f627b51f [Frontend] Time Controller Markup and Styling
open #1515
open #117
Commit prior to redoing markup of picker to use flex instead of table;
Styling in picker; tabular styles fixed somewhat;
2015-09-24 16:42:45 -07:00
1d83516982 [Frontend] Time Controller Markup and Styling
open #1515
open #117
Significant re-org in menus.scss continued:
Refactored s-menu to s-menu-btn;
moved look-related style def's into .s-menu;
.menu now extends .s-menu;
2015-09-24 15:38:52 -07:00
9e64dfe3b9 [Frontend] Time Controller Markup and Styling
open #1515
open #117
Tweaks to tick spacing;
2015-09-24 14:31:26 -07:00
09f5fa42ab Merge branch 'open1515' of https://github.com/nasa/openmctweb into open117 2015-09-24 14:21:38 -07:00
54a077a4e2 [Frontend] Time Controller Markup and Styling
open #1515
open #117
Tweak to mixin "test";
2015-09-24 14:20:25 -07:00
13525a67c2 [Time Conductor] Fix domain-based calculations
...in example telemetry, to support development work
on time conductor.
2015-09-24 13:21:51 -07:00
cc6b6538d5 Merge branch 'open1515' into open115 2015-09-24 12:19:08 -07:00
0c7de98195 [Time Conductor] Use active domain in binary search 2015-09-24 12:18:47 -07:00
404d1e7801 [Frontend] Time Controller Markup and Styling
open #1515
open #117
Begin work on styling the datetime picker;
2015-09-24 11:29:28 -07:00
1214a32c26 [Common UI] Avoid apply-in-a-digest
Don't invoke  from mct-resize when first observing
an element's size during linking; observed issue in the
context of adding domain selector to time conductor.
2015-09-24 11:20:07 -07:00
6bd8e7a47c Merge remote-tracking branch 'github/master' into open1515 2015-09-24 11:17:13 -07:00
825d93cee3 [Frontend] Time Controller Markup and Styling
open #1515
open #117
Changed slider elements layout from relative to
absolute positioning;
Refined layout in input-holder;
Tweaks to hover classes;
2015-09-24 10:34:32 -07:00
9f7dc1da9b [Frontend] Time Controller Markup and Styling
open #1515
open #117
Styling for boundary inputs and
slider;
2015-09-23 18:59:36 -07:00
3d8aec2d01 [Time Conductor] Pass domain with events 2015-09-23 17:26:56 -07:00
928e31b548 [Common UI] Avoid apply-in-a-digest
Don't invoke  from mct-resize when first observing
an element's size during linking; observed issue in the
context of adding domain selector to time conductor.
2015-09-23 17:22:32 -07:00
f182d1f2c4 [Time Conductor] Include domain selection in requests
...as well as use as default in a telemetry series.
2015-09-23 17:14:40 -07:00
d238b669a5 [Time Conductor] Show domain options 2015-09-23 17:09:38 -07:00
5d5a7c26c5 [Time Conductor] Maintain domain state
Maintain domain state in the time conductor; add a default list of
domains to choose from.
2015-09-23 16:53:12 -07:00
0b0cee3afb [Example] Add domain
Add a second domain to example telemetry, to support
addition of a domain selector to the time conductor;
nasa/openmctweb#115
2015-09-23 16:43:58 -07:00
0260e6fff4 Merge branch 'open1515' into open115 2015-09-23 16:05:09 -07:00
9811443c71 Merge branch 'master' into open117 2015-09-23 15:54:48 -07:00
7dc13dab66 [Readme] Add link to node-canvas 2015-09-23 14:37:49 -07:00
e67a2e63cf [Readme] Add notes on building documentation
Add notes to README about building documentation; in
particular, document the need to install libcairo.
2015-09-23 13:59:05 -07:00
6ce4ce6ada Merge remote-tracking branch 'github-open/open139-1' into open-master 2015-09-23 13:51:55 -07:00
70bc17c79f Merge remote-tracking branch 'github-open/open97' into open-master 2015-09-23 13:44:48 -07:00
f3aceb1644 Merge pull request #118 from nasa/open95b
Review and integrate open95b into master
2015-09-23 13:06:42 -07:00
056b0c8c5b [Fixed Position] Use spaces instead of tabs
...to satisfy code style checker and pass build,
in preparation for merge. nasa/openmctweb#118
2015-09-23 12:59:04 -07:00
fa60d62039 [Entanglement] Simplify test case
...per review feedback from nasa/openmctweb#98
2015-09-23 12:49:04 -07:00
082122ddec [Entanglement] Move policyService.allow.andReturn
...to locations where the specified return value
can be more closely correlated to the relevant
test cases. nasa/openmctweb#98
2015-09-23 12:46:23 -07:00
6dbccd5000 [Entanglement] Update test cases around error-throwing
...per code review feedback, nasa/openmctweb#97
2015-09-23 12:43:03 -07:00
fb0861f256 [Config] Fixed image URLs in ImageTelemetry.js;
open #95b
2015-09-23 09:57:19 -07:00
dbe1875e70 [Themes] Resolve conflicts
Resolve conflicts in preparation for merge, nasa/openmctweb#118
2015-09-22 16:12:44 -07:00
97892869ae [Entanglement] Move composition check up
Move check for composition up higher in the sequence of
if-blocks in the validation step of linking; remove
fallback to [] for undefined composition, which is no
longer necessary as a consequence of this.

nasa/openmctweb#98
2015-09-22 15:53:27 -07:00
8db334e45b Revert "[LinkService] Reorder/refactor validation"
This reverts commit c17269ba8b.
2015-09-22 15:51:15 -07:00
4743833f7c [Entanglement] Verify revalidation
Verify that move/copy/link revalidate when performed and
throw errors when moving/copying/linking would be invalid.
nasa/openmctweb#98
2015-09-22 15:49:22 -07:00
6996883b85 [Entanglement] Update specs
Update specs for move/copy/link services to account
for re-validation at time an action is performed.
nasa/openmctweb#98
2015-09-22 15:42:39 -07:00
119403e71c [Entanglement] Throw errors if validation is skipped
...per feedback from nasa/openmctweb#98
2015-09-22 14:39:15 -07:00
ff24f06475 [Entanglement] Add JSDoc
...per feedback from nasa/openmctweb#98
2015-09-22 14:10:06 -07:00
597b18af1c [LinkService] Amend test cases
Remove redundant test case; modify composition-checking
test case to expose correct capability information.
In response to feedback from nasa/openmctweb#98
2015-09-22 14:07:46 -07:00
aba0969312 Merge branch 'mobile-integration' into open-master 2015-09-22 13:53:22 -07:00
b4a2bfd727 [LinkService] Change variable name
...based on feedback from nasa/openmctweb#98
2015-09-22 13:50:10 -07:00
2040304980 Merge remote-tracking branch 'github-open/open19' into open-master 2015-09-22 13:49:41 -07:00
55362f6b26 [LinkService] Clarify comment
Clarify comment, based on feedback from nasa/openmctweb#98
2015-09-22 13:48:11 -07:00
8611926533 Merge remote-tracking branch 'github-open/open113' into open-master 2015-09-22 13:45:04 -07:00
c17269ba8b [LinkService] Reorder/refactor validation
Reoder validation to consider the composition capability
first; refactor to express as a single expression to clarify
validation logic (explicitly say 'and' instead of implying
it with control flow.)

Based on feedback from nasa/openmctweb#98
2015-09-22 13:37:56 -07:00
56ccf29cfe [Persistence] Include timestamp on creation
Include a persisted timestamp when an object is first
created. nasa/openmctweb#139
2015-09-22 11:32:18 -07:00
8b7a94dcf8 [Style] Remove unused variables, excess whitespace
Clean up unused variables and excess whitespace to match style guide.
2015-09-22 11:14:55 -07:00
3e5d294a28 [SCSS] Fixed typo
Changed tmpBorder mixin to specify '@include' instead of '@iclude'.  This
does not change the output CSS which means the tmpBorder mixin is not
used anywhere and could be removed.
2015-09-22 10:57:30 -07:00
480da3476e Merge branch 'mobile' into mobile-integration 2015-09-22 10:55:43 -07:00
54334a8906 [Frontend] Setting default theme for open back to espresso
open #95b
Also removed unused COMPILE.scss file;
2015-09-21 14:26:50 -07:00
c9b2f5804d [Frontend] Minor tweaks to sizing of controls
open #95b
View switcher and plot control buttons now made small
when object is in a frame context in a Layout;
2015-09-21 14:24:19 -07:00
0c1f77cfab [Mobile] Collapse tree on click
Collapse tree any time a user does an action in the
tree that would select an object; don't only do this
on navigation changes, because this fails to detect
occasions where user clicks the already-navigated-to
object.
2015-09-21 10:53:45 -07:00
ae4313253c [Mobile] Test mct-device 2015-09-18 16:47:50 -07:00
1e6c4732f1 [Mobile] Consolidate BrowseTreeController
Make mobile variant of BrowseTreeController the regular version
of that controller; Browse mode has a dependency on mobile by
way of the mct-device directive anyway.
2015-09-18 15:55:58 -07:00
884d36ad6d [Mobile] Test BrowseTreeController variants 2015-09-18 15:49:55 -07:00
24586ae378 [Mobile] Remove BackArrowController
Remove BackArrowController; behavior can be implemented
in template.
2015-09-18 15:29:55 -07:00
cf97b30084 [Mobile] Add empty specs 2015-09-18 15:21:23 -07:00
e86e61c2ac [Mobile] Fix test setup error
Use correct user agent strings for iPhone/iPad
(these had been reversed in the spec.)
2015-09-18 15:12:48 -07:00
b163b45a5e [Framework] Update spec
Update spec to verify that app.controller et al
are not called multiple times with the same key.
2015-09-18 15:10:21 -07:00
d236fd10c3 [Framework] Move registration-tracking
Move registration-tracking for Angular built-ins such that
these are correctly tracked at the instance level.
2015-09-18 15:02:32 -07:00
befa66a9e2 [Mobile] Remove obsolete test cases
...for functionality that has been moved out of TreeNodeController.
2015-09-18 14:54:37 -07:00
5a1c83fca8 [Mobile] Update spec for AgentService 2015-09-18 14:53:14 -07:00
88bb213162 [Mobile] Move spec for AgentService 2015-09-18 14:34:14 -07:00
ad552511c1 Merge pull request #134 from nasa/open124
Review and integrate open124
2015-09-18 13:49:06 -07:00
65368ed0c3 [Config] Removed non-functional config options from Create dialogs;
open #124
Removed "Default view" and "Display title by default" from
Panel configs;
2015-09-18 13:43:29 -07:00
bf05e55d02 [Mobile] Use mct-device in tree nodes 2015-09-18 12:25:51 -07:00
c057ba38a5 [Mobile] Add mct-device directive
Add directive which can be used to include certain elements
only on specific devices.
2015-09-18 12:13:37 -07:00
70bcb723ef [Mobile] Small tweaks/bug fixes
Small tweaks/fixes (use appropriate variable names etc) for
refactoring mobile support classes.
2015-09-18 12:13:05 -07:00
4c5808c8c9 [Mobile] Move mobile-specific behavior to template 2015-09-18 11:01:54 -07:00
fa186a1556 [Mobile] Update agentService usages 2015-09-18 10:07:27 -07:00
0b4f44f00d [Mobile] Remove leading slash, redundant declaration 2015-09-18 09:18:19 -07:00
dce7253b27 [Mobile] Move mobile bundle 2015-09-18 09:17:01 -07:00
158fbf5365 [Mobile] Check orientation dynamically
Check orientation dynamically from the AgentService
(more specifically, recheck when called - this may
change as a user rotates a device.)
2015-09-18 09:15:08 -07:00
1d1589da68 [Mobile] Move agentService to mobile bundle
...and make API tweaks.
2015-09-17 18:05:48 -07:00
6aba34dd5a [Mobile] Override browse behavior
Override browse tree behavior such that tree collapses upon
navigation change in mobile.
2015-09-17 17:54:01 -07:00
733a282f3f [Framework] Obey priority order for controllers et al
Support overriding of controllers between bundles.
2015-09-17 17:51:06 -07:00
19500c2704 [Mobile] Restore browse controller from master 2015-09-17 17:42:38 -07:00
2090b1a958 [Browse] Separate tree expand/collapser 2015-09-17 17:03:35 -07:00
411a4ebfbf Merge remote-tracking branch 'github/master' into mobile 2015-09-17 16:41:13 -07:00
cc3b0ecfca Merge branch 'open-master' into mobile
Merge in latest from master branch into mobile branch
2015-09-17 16:40:48 -07:00
ac48039b90 [Mobile] Create empty bundle for mobile 2015-09-17 16:40:18 -07:00
411f0d904d [Entanglement] Test LocatingObjectDecorator 2015-09-17 14:45:05 -07:00
d92ae4d508 [Core] Add tests for 'contextualize' 2015-09-17 14:06:22 -07:00
bc4c7feb6c [Core] Update spec for CompositionCapability
...to reflect changes to separate out contextualization
of domain objects
2015-09-17 13:57:20 -07:00
c4aed57165 [Entanglement] Refactor LocatingObjectDecorator
Rearrange code in LocatingObjectDecorator to make it easier to
follow; add comments.
2015-09-17 13:51:50 -07:00
88b8528aaf [Entanglement] Log a warning on cycle detection
nasa/openmctweb#84
2015-09-17 13:42:08 -07:00
d1c0d81120 [Entanglement] Contextualize objects by location
Add a context capability to domain objects based
on their location at the time they are loaded.
nasa/openmctweb#84
2015-09-17 13:37:57 -07:00
a233856bac [Core] Separate out contextualize
Separate out contextualize function to facilitate
reuse from entanglement bundle. nasa/openmctweb#84
2015-09-17 13:15:42 -07:00
9a7f435b61 [Frontend] Minor color tweaks in Snow theme
open #95
vista #65
(cherry picked from commit 98c5334)
2015-09-17 09:58:13 -07:00
f4e53a946d [Time Conductor] Remove from active bundles
Remove time conductor from set of active bundles pending
clean up of markup/CSS.
2015-09-16 18:14:30 -07:00
9fdb9f0170 [Frontend/PLATFORM] Cherry picking from platform changes in vista65
open #95
vista #65
Style mods for selects;
(cherry picked from commit 8b2c4c6)
2015-09-16 17:18:58 -07:00
f28d2f19d0 [Frontend/PLATFORM] Cherry picking from platform changes in vista65
open #95
vista #65
scss and html mods for VISTA-related elements;
(cherry picked from commit 6ef3987)
2015-09-16 17:17:54 -07:00
de71bde62f [Test Conductor] Add test case for requery
WTD-1515
2015-09-16 17:00:56 -07:00
8f24e014e0 [Time Conductor] Add skeleton specs
Add skeleton specs to new classes added for date-time
picker in time conductor. WTD-1515
2015-09-16 16:51:28 -07:00
190f5fd0ea [Time Conductor] Update failing specs
WTD-1515
2015-09-16 15:23:08 -07:00
ad29fb0f92 [Time Conductor] Populate FP from historical
Populate fixed position view from historical
telemetry when first loaded. WTD-1515
2015-09-16 13:38:47 -07:00
acdd35cf65 [Forms] Fix select control
Use ng-show instead of ng-if to suppress the
'Select One' option after user has chosen something
in a select box; the latter appears to be incompatible
with Angular 1.4.x. nasa/openmct#113
2015-09-16 12:23:26 -07:00
fcd073c010 [Time Conductor] Tweak plot requery
Tweak approach to requerying in plot, and track
pending state so there is a visual indication
that plotted data may be incomplete during
panning with time conductor. WTD-1515
2015-09-16 11:05:41 -07:00
071368c3b9 [Time Conductor] Fix throttle bug
Fix a timing/ordering issue in throttle which
allowed some throttled invocations to be ignored.
WTD-1515
2015-09-16 11:04:07 -07:00
4f5a1115d2 [Frontend] Themes final on open prior to VISTA integration
open #95
Branch open95b now replaces open95;
Fix to status indicator to only
display when title length > 0;
2015-09-16 10:45:22 -07:00
7a97588aa5 [Time Conductor] Remove debugging statement
WTD-1515
2015-09-16 10:30:45 -07:00
f776561303 [Time Conductor] Allow arguments for throttled functions
WTD-1515. Ensures that bounds passed in from
the time controller get appropriately captured.
2015-09-16 10:18:57 -07:00
e34fe1a289 [Time Conductor] Tweak position, appearance
...of datetime picker popups. WTD-1515
2015-09-15 18:51:44 -07:00
70d9587c9b [Time Conductor] Wire in datetime pickers
WTD-1515
2015-09-15 18:48:00 -07:00
9a78b63065 [Time Conductor] Try to rewrite datetime picker as control 2015-09-15 18:37:36 -07:00
6c497f3c36 [Time Conductor] Start adding datetime picker
WTD-1515
2015-09-15 18:09:46 -07:00
d951b794e3 [Time Conductor] Support date choice
...from date-time picker. WTD-1515
2015-09-15 15:55:13 -07:00
797046aca4 [Time Conductor] Populate datetime picker
WTD-1515
2015-09-15 15:24:54 -07:00
cf76583ed7 [Time Conductor] Add inline styles to datetime-picker 2015-09-15 14:50:05 -07:00
6f28ab0145 [Time Conductor] Begin adding custom date picker
WTD-1515
2015-09-15 13:08:05 -07:00
d981e7bb1d [Browse] Separate out back-arrow behavior
Supports integration of changes for mobile, nasa/openmct#95
2015-09-15 12:18:57 -07:00
a3a6706869 [Browse] Separate out back-arrow behavior
Supports integration of changes for mobile, nasa/openmct#95
2015-09-15 12:13:11 -07:00
72c122e0ee Merge remote-tracking branch 'github/master' into open95b
Conflicts:
	platform/commonUI/edit/src/actions/RemoveAction.js
2015-09-15 11:35:25 -07:00
9ebf157ec0 [Time Conductor] Test telemetry service decorator
WTD-1515
2015-09-15 11:18:28 -07:00
493c63be44 [Time Conductor] Test series wrapping
WTD-1515
2015-09-15 10:58:10 -07:00
f29951140f [Time Conductor] Add license header, JSDoc
WTD-1515
2015-09-15 10:22:43 -07:00
d0b5bb2d21 [Time Conductor] Begin using date-time controls
WTD-1515
2015-09-15 10:00:41 -07:00
cd98886a43 [Time Conductor] Add license header
WTD-1515
2015-09-15 08:59:57 -07:00
4549828cae Merge remote-tracking branch 'github/master' into open1515 2015-09-15 08:57:49 -07:00
d0478c3433 [Scrolling List] Check for existence of limit
Check for existence of limit capability while evaluating
limits in a scrolling list view. WTD-1515
2015-09-14 16:37:29 -07:00
53369ec0dc [Time Conductor] Avoid searching outside of series
Don't look up domain values while subsetting a
telemetry series until after checking to ensure
that there is some segment of the series left
to search. WTD-1515
2015-09-14 16:36:41 -07:00
de99969f0a [Time Controller] Return range values
Delegate retrieval of range values appropriately in
conductor-driven telemetry series subset. WTD-1515
2015-09-14 14:39:19 -07:00
24449d2dcc [Time Controller] Fix series subsetting
Fix binary search implementation used to subset
telemetry series for time conductor. WTD-1515
2015-09-14 11:44:50 -07:00
f42c5ca1e5 [Time Conductor] Subset to display bounds
WTD-1515
2015-09-14 11:25:42 -07:00
8c1b70f085 Merge remote-tracking branch 'github-open/open53' into open-master 2015-09-14 11:00:56 -07:00
c010011798 Merge remote-tracking branch 'github-open/open1252' into open-master 2015-09-14 10:51:30 -07:00
890aafc203 [Time Controller] Filter out realtime updates
Filter out realtime updates that are outside of the time
controller's range. WTD-1515
2015-09-14 10:02:59 -07:00
ecf7f4b235 [Info Bubble] Remove ID
Don't show domain object id in info bubble; this is not
useful information to non-developers. (For developers,
this information can be retrieved from the URL by
navigating to a domain object.) WTD-1252
2015-09-11 16:29:20 -07:00
3e5d46a62b [Frontend] IN-PROGRESS Theme changes continuing
open #95
Limits, plots, etc.;
Misc sanding and shimming;
Updated  symbols font to replace missing
Info symbol;
2015-09-11 16:25:19 -07:00
01045e6ee1 [Persistence] Add local storage indicator 2015-09-11 14:48:17 -07:00
febb0edede [Persistence] Add spec for local storage persistence 2015-09-11 14:31:57 -07:00
048eb20450 [Persistence] Update code style
Update code style for local storage based persistence.
2015-09-11 14:05:01 -07:00
36e38b9454 [Persistence] Add local storage to active bundles 2015-09-11 13:54:33 -07:00
215b4a154b [Persistence] Move local storage to platform
#79
2015-09-11 13:53:47 -07:00
47bfe40294 [Common UI] Remove unused variable
...from mct-splitter directive.
2015-09-11 13:40:25 -07:00
3a3829682c [Common UI] Only trigger digest on change
...from mct-split-pane.
2015-09-11 13:33:17 -07:00
861ea8bab7 [Common UI] Poll split pane position
Poll to position the splitter in an mct-split-pane, in
order to detect later style changes. #53.
2015-09-11 13:12:24 -07:00
f17410a85b [Capabilities] Avoid erroneous logging
Fix logic error which caused an inaccurate warning to
be logged when capabilities are overridden by priority.
Addresses #49.
2015-09-11 11:38:22 -07:00
2a14cf2dfc [Time Controller] Only listen for display-bounds changes
...from plot. WTD-1515
2015-09-11 11:31:12 -07:00
62962e119e [Time Controller] Decorate telemetry service
Decorate telemetry service instead of capability service
to enforce time conductor bounds. WTD-1515.
2015-09-10 16:17:48 -07:00
a840b59044 [Frontend] IN-PROGRESS Theming continues, sanding
open #95
Fixed grid icon hover color;
Various color normalization;
2015-09-10 15:58:00 -07:00
d14c4e08b8 [Frontend] IN-PROGRESS Theming continues
open #95
Shadow and color normalization: fixed-position, tabular;
Updated paint bucket and icon-box in symbols font;
Custom checkboxes now use inset shdw;
2015-09-10 15:01:51 -07:00
de6dfe1fdc Merge remote-tracking branch 'github/master' into mobile
Merge in latest from master into mobile branch
to reconcile conflicts

Conflicts:
	platform/commonUI/edit/src/actions/RemoveAction.js
2015-09-10 15:01:38 -07:00
2229e868ce [Time Conductor] Fix logic around end times
Fix logic for updating end times after refactoring
to clarify variable/property naming, WTD-1515
2015-09-10 13:24:50 -07:00
3b2454c6a9 [Frontend] IN-PROGRESS Theming continues
open #95
Search, plots;
Minor tweaks to add shdw to items and buttons;
2015-09-10 11:43:39 -07:00
8d209f4d19 [Time Controller] Fix middle-drag bug
Fix bug in middle-drag introduced by refactoring,
WTD-1515.
2015-09-10 11:34:31 -07:00
86bb89a162 [Time Controller] Update spec
Update spec for ConductorRepresenter to reflect changes
to model properties expected by TimeRangeController.
WTD-1515
2015-09-10 11:31:40 -07:00
2758250833 [Time Conductor] Fix JSDoc
Fix copy-paste error. WTD-1515
2015-09-10 11:27:50 -07:00
7d20351a6a [Time Conductor] Clean up code style
Clean up code style in TelemetrySubscription, for
changes associated with WTD-1515.
2015-09-10 11:20:09 -07:00
78fae345da [Time Conductor] Rename TimeConductorController
Rename TimeConductorController to TimeRangeController, to
reflect that this is intended to serve as a more general
control. Additionally, stop using arrays for inner and
outer bounds and instead use explicit start/end properties,
for clarity. WTD-1515
2015-09-10 10:58:47 -07:00
4c79c9a1b1 [Time Conductor] Clarify start/end naming
WTD-1515
2015-09-10 10:21:21 -07:00
2ec9956d44 [Time Conductor] Incorporate feedback from code review
Retain reference to scope in ConductorRepresenter
directly via this, instead of revealing via
a closure-bound function. This approach is not necessary
to avoid https://docs.angularjs.org/error/ng/cpws in
this circumstance.  WTD-1515
2015-09-10 10:16:28 -07:00
426ab44d93 [Angular] Update Locator specs
Update locator specs to provide expected functionality
of .
2015-09-09 18:17:07 -07:00
3792dab0f9 [Frontend] IN-PROGRESS Theme changes continuing
open #95
Menus sanded and normalized;
2015-09-09 17:25:10 -07:00
c6df7cebe5 [Angular] Check for context capability
Check for existence of context capability from Remove action
during navigation check. This avoids an exception that
appears to have been swallowed in earlier versions of
Angular.
2015-09-09 17:25:02 -07:00
52df7fe1e2 [Angular] Avoid infinite digest
Avoid infinite digest loop from LocatorController associated
with upgrade to Angular 1.4.4
2015-09-09 17:15:35 -07:00
e3b191b5dc [Time Controller] Update failing specs
Update failing specs to reflect support for time conductor,
WTD-1515
2015-09-09 16:52:46 -07:00
32b895ba62 [Frontend] IN-PROGRESS Theme changes continuing
open #95
Refactored btnSubtle and containerSubtle mixins
to simplify;
2015-09-09 16:49:59 -07:00
a4dda695dd [Time Controller] Get conductor working with fixed pos.
WTD-1515
2015-09-09 16:46:00 -07:00
4db48afab0 [Frontend] IN-PROGRESS Theme changes continuing
open #95
Mostly about the overlay and forms;
Buttons, menus, selects tweaks continued;
Initial check and tweaks in mobile;
2015-09-09 15:55:12 -07:00
0d710209b1 Merge remote-tracking branch 'github/master' into open1515 2015-09-09 10:05:21 -07:00
52c471bd3a [Angular] Clean up InfoGesture workaround
...and add comment pointing back to the Angular issue
which motivates the workaround.
2015-09-08 21:14:46 -07:00
560c8612bd [Angular] Amend InfoGesture for compatibility
Update the info gesture so that it does not schedule
multiple bubbles to be shown when multiple events fire,
for AngularJS 1.4.4 compatibility.
2015-09-08 19:53:38 -07:00
6a917f5393 Merge branch 'open-master' into angular-1.4.4 2015-09-08 19:26:46 -07:00
fdbc91131b [Time Controller] Update bundle definition
...for Fixed Position view to reflect changes to dependencies,
WTD-1515.
2015-09-08 17:18:39 -07:00
d2dfec3ce7 [Time Controller] Simplify retrieval of datum objects
...for historical data. Supports WTD-1515
2015-09-08 17:03:58 -07:00
351181d38e [Time Controller] Allow datum retrieval from histories
WTD-1515
2015-09-08 16:58:15 -07:00
760f4b818f [Time Conductor] Update fixed position from history
WTD-1515
2015-09-08 16:53:06 -07:00
c026bfa17d [Time Conductor] Begin adding support to fixed position
Begin adding support for universal time controller to
fixed position view, WTD-1515.
2015-09-08 16:37:10 -07:00
47b97a504e [Telemetry] Document TelemetryRequest
Document TelemetryRequest to record new parameters in
support of the time conductor, WTD-1515
2015-09-08 16:28:01 -07:00
86deec6364 [Frontend] IN-PROGRESS Theme changes continuing
open #95
Grid items;
2015-09-04 18:06:18 -07:00
ac41ed7d64 [Frontend] IN-PROGRESS Theme changes continuing
open #95
Splitter styles updated;
Tree styles updated;
2015-09-04 16:39:16 -07:00
dafcda281a Merge pull request #100 from nasa/open99
[Identity] Provide an undefined identity
2015-09-04 16:05:00 -07:00
29c460556a [Representers] Destroy representers
Invoke the destroy methods of any active representers when
a scope is destroyed; supports time controller, which needs
to accurately track when it has or hasn't been attached to
a view. WTD-1515
2015-09-04 16:00:43 -07:00
4d276888e1 [Plot] Update failining spec
WTD-1515
2015-09-04 15:53:55 -07:00
142af3db77 [Time Controller] Add JSDoc
WTD-1515
2015-09-04 15:51:46 -07:00
b66759e519 [Plot] Initially establish bounds
Initially establish domain bounds with time controller,
WTD-1515
2015-09-04 15:31:47 -07:00
c58ffb4a52 [Time Controller] Update inner span
Update inner span when outer dates change (if needed),
WTD-1515
2015-09-04 15:15:09 -07:00
600ff1a3ee [Plot] Requery on event
Requery on a query change event from a time conductor,
WTD-1515
2015-09-04 15:07:46 -07:00
77d11e1bcf [Time Controller] Fix sine wave generation
Generate sine wave correctly when start time has been specified,
WTD-1515
2015-09-04 14:24:45 -07:00
d158aa6028 [Plot] Follow time conductor more smoothly
WTD-1515
2015-09-04 14:04:09 -07:00
c2985d61b7 [Plot] Follow universal time controller
Follow displayable area of universal time controller,
WTD-1515
2015-09-04 13:57:26 -07:00
3ce40ab870 [Time Controller] Fix capability decoration
WTD-1515
2015-09-04 13:02:36 -07:00
bfb19dea74 [Time Controller] Use start time in example
WTD-1515
2015-09-04 12:52:02 -07:00
01a6d2e6a7 [Time Controller] Test ConductorRepresenter
WTD-1515
2015-09-04 12:44:49 -07:00
cc5908d26f [Identity] Provide an undefined identity
Provide an undefined identity by default, instead of
an Unknown User. This suppresses display of identity-related
features (such as the identity indicator) while still
providing a default implementation of the identityService
for platform components to utilize. nasa/openmctweb#99
2015-09-04 12:17:02 -07:00
af462ff3ee [Time Controller] Begin adding mocks
Begin adding/configuring mocks to support testing
ConductorRepresenter, WTD-1515
2015-09-04 12:12:21 -07:00
5c1d209eff [Time Controller] Simplify ConductorRepresenter
WTD-1515
2015-09-04 11:53:51 -07:00
8a76c3a425 [Time Controller] Test conductor's telemetry capability
WTD-1515
2015-09-04 10:57:50 -07:00
9ccd0b9188 [Time Conductor] Test capability decorator
WTD-1515
2015-09-04 10:47:38 -07:00
f83588d980 [Time Controller] Begin adding test cases
WTD-1515
2015-09-04 10:32:01 -07:00
a481b377cb [Time Conductor] Add terminology note to readme
WTD-1515
2015-09-04 10:24:18 -07:00
35ff4efbca [Time Conductor] Add placeholder specs
Add empty specs for classes related to time conductor, WTD-1515
2015-09-04 09:44:08 -07:00
436e010738 [Time Conductor] Broadcast changes
WTD-1515
2015-09-03 15:59:46 -07:00
37c34c668c [Frontend] IN-PROGRESS Major restructuring of /platform/commonUI/ to add themes structure
open #95
New themes bundle files, .scss and directories;
Moved constants definitions (mainly colors) from commonUI/.../_constants
to individual themes _constants files;
tweaks to mixins files;
changed pathways to font and images in commonUI/.../_constants;
2015-09-03 15:34:39 -07:00
bf4765fcb6 [Time Controller] Bind displayed control to state
Bind changes to the displayed time controller to
changes to the underlying state of the time conductor,
WTD-1515.
2015-09-03 15:13:03 -07:00
dbfb8b9861 [Time Controller] Add capability decorator
WTD-1515
2015-09-03 14:58:49 -07:00
681cd0bb9c [Time Controller] Add conductor service
WTD-1515.
2015-09-03 14:53:23 -07:00
b668fb58fb [Time Controller] Show only outermost controller
WTD-1515
2015-09-03 11:44:11 -07:00
f74da6b935 [Time Controller] Add overflow hidden
Add overflow: hidden so that time controller does not exceed
edges of the screen. WTD-1515
2015-09-03 11:40:40 -07:00
e4dec21ceb [Time Controller] Add telemetry capability wrapper
WTD-1515
2015-09-03 11:38:06 -07:00
fc2860810b [Time Controller] Allow manual date entry
WTD-1515
2015-09-03 11:03:17 -07:00
62898c921f Merge branch 'open95' of https://github.com/nasa/openmctweb into open95 2015-09-03 10:37:10 -07:00
4997fc1417 Merge branch 'mobile' of https://github.com/nasa/openmctweb into open95 2015-09-03 10:36:23 -07:00
bb1a02c8bd [Frontend] Significant re-factoring of CSS and markup
open #95
IN-PROGRESS!;
Mostly buttons and menus classes (s-btn and s-menu);
Removed unused templates and .css files;
Normalized some button containers;
2015-09-02 18:02:58 -07:00
9d6b70f433 [Time Conductor] Handle middle drag
WTD-1515
2015-09-02 17:25:41 -07:00
57a947eaef [Time Conductor] Accept drag gestures
WTD-1515
2015-09-02 17:19:20 -07:00
a18cc50a43 [Time Conductor] Begin binding control to data 2015-09-02 16:53:10 -07:00
91fe3d798f [Time Conductor] Begin adding controller
WTD-1515
2015-09-02 16:31:58 -07:00
e873389655 [Conductor] Add time conductor widget
Add widget for the time conductor using a representer,
WTD-1515.
2015-09-02 15:57:52 -07:00
678d11832c Merge remote-tracking branch 'upstream/master' into mobile 2015-09-02 15:48:44 -07:00
3310016264 [Properties] Hide rows without controls
Hide rows for domain object properties that do not have
associated controls from the Edit Properties dialog;
follow up for nasa/openmctweb#92
2015-09-02 12:01:43 -07:00
17e9e87a2b [Composition] Test composition.add
Add test case to verify the behavior of the add method
of the composition capability.
2015-09-02 11:56:37 -07:00
b2649de649 [Composition] Update specs
Update specs for changes to the return value of
composition.add, nasa/openmctweb#97
2015-09-02 11:45:52 -07:00
b1238b0c96 [Composition] Return newly-contextualized object
After adding to composition, return the newly-contextualized
object; this is regularly used by other services.
2015-09-02 11:37:47 -07:00
ba6e542d08 [Persistence] Load models from multiple spaces 2015-09-02 11:28:15 -07:00
8759fdbd95 [Composition] Update specs
Update specs to reflect usage of the add method in
the composition capability.
2015-09-02 09:37:26 -07:00
d3d94d67ea [Composition] Use composition.add from LinkService 2015-09-02 09:16:58 -07:00
b9d8b124ff [Composition] Use composition.add from link action 2015-09-02 09:08:47 -07:00
8e995eba8f [Composition] Use composition.add during creation 2015-09-01 17:11:09 -07:00
194bc41322 [Composition] Add an add method
Add a method to add new objects to the composition of
another domain object. nasa/openmctweb#97
2015-09-01 17:10:54 -07:00
2f57f47234 Merge pull request #78 from danielpacak/ignore-intellij-project-config-files
[Build] Ignore Intellij *.iml configuration files
2015-09-01 16:17:17 -07:00
59e181c0e5 Merge pull request #65 from danielpacak/tomcat-maven-plugin
[Build] Start the WAR in an embedded Tomcat Servlet Container
2015-09-01 16:15:56 -07:00
8a5c61e2e6 Merge remote-tracking branch 'upstream/master' into mobile 2015-09-01 14:50:45 -07:00
199be71f8f Merge pull request #96 from nasa/open92
[Identity] Add identity service

1. Changes appear to address issue? Y
2. Appropriate unit tests included? Y
3. Code style and in-line documentation are appropriate? Y
4. Commit messages meet standards? Y
2015-09-01 14:49:04 -07:00
ac2144d5c5 [Identity] Satisfy JSLint 2015-09-01 12:04:36 -07:00
01f2fab70f [Create] Filter out control-less properties
When properties have no control defined, don't show them
in the create dialog (but do show them in metadata, e.g.
info bubble.) For nasa/openmctweb#92
2015-09-01 11:48:15 -07:00
7562c82369 [Identity] Add default identity provider
nasa/openmctweb#92
2015-09-01 11:43:07 -07:00
c3efb29dfc [Metadata] Fix whitespace 2015-09-01 11:31:42 -07:00
bb738f9a93 [Identity] Decorate domain objects with creator
nasa/openmctweb#92
2015-09-01 11:19:53 -07:00
97071fc72c [Identity] Remove unnecessary escapement
JSLint does not like unnecessary use of unicode escapement.
2015-09-01 11:01:08 -07:00
b39753d0a6 [Entanglement] Separate out location
Separate out location property from the CreationService,
instead handle in the entanglement bundle; this is
consistent with changes for identity management (attaching
a creator to newly-created domain object models).
for nasa/openmctweb#92
2015-09-01 10:57:56 -07:00
e3eda5112c [Identity] Expose creation service as provider
Expose creation service as a provider of a composite service;
this allows it to be decorated by the identity bundle to
attach a creator, for nasa/openmct#92
2015-09-01 10:41:27 -07:00
2cbe686732 [Frontend] IN-PROGRESS Refactoring to cleanup SASS file structure
open #95
Moved styles from initialization.scss to user-environ/_layout;
forms.scss, items.scss, tree.scss includes moved into main.scss;

Removed forms.css, items.css, tree.css,
Removed initialization.scss, tree.scss
2015-08-31 14:11:42 -07:00
021d105fd0 Merge remote-tracking branch 'upstream/open95' into mobile 2015-08-31 13:37:43 -07:00
7ffbc9ad2f [Remove Action] Check
Added check for traverseObject
context because prior to this,
was not checked.
2015-08-31 13:37:22 -07:00
90f62b92a5 [Frontend] Super-minor cleanups in .scss files
open #93
2015-08-31 12:54:52 -07:00
5a991076ea [Frontend] CSS and markup tweaks to enable flex layout
open #93
Layout frame and imagery markup modified;
2015-08-31 12:34:34 -07:00
eb4ea8f2d4 [Identity] Clean up JSDoc
nasa/openmctweb#92
2015-08-28 16:41:41 -07:00
9692596859 [Identity] Change type name
Change type name for identity metadata to make it easier
to correlate back to the identity service. nasa/openmctweb#92
2015-08-28 16:38:36 -07:00
ce152881cc [Identity] Add example identity service
nasa/openmctweb#92
2015-08-28 16:36:57 -07:00
f40e7d7105 [Identity] Add identity indicator
nasa/openmctweb#92
2015-08-28 16:36:41 -07:00
a8fc5ee8ed [Identity] Add license headers 2015-08-28 15:49:30 -07:00
5400f51204 [Identity] Include identity bundle
...in list of active bundle, nasa/openmctweb#92
2015-08-28 15:47:30 -07:00
29c9b2a08f [Identity] Add identity aggregator
Add an aggregator to handle exposing the user's identity,
nasa/openmctweb#92
2015-08-28 15:46:15 -07:00
e4d136d345 [Persistence] Update spec
Update spec for persistence capability to reflect changes for
nasa/openmctweb#92
2015-08-28 15:46:06 -07:00
620c0415cf [Persistence] Use create from persistence capability
...when an object hasn't been previously persisted. This allows
for compatibility with persistence services which disallow
updates for nonexistent objects (which is not abnomal behavior.)
nasa/openmctweb#92
2015-08-28 15:45:48 -07:00
54bf39344a [Mobile] Multiple mobile Safari fixes
open #74
New mixins to prefix '-webkit-' to props and vals;
'flex' classes use new webkit mixins;
Fixed flex layout of .object-browse-bar and
.context-available element;
Migrated CSS to remove small .scss include files;
2015-08-27 17:05:50 -07:00
683b3f7511 Merge remote-tracking branch 'github/mobile' into open74-m-master 2015-08-27 12:56:47 -07:00
510e7d1261 [Mobile] Merge
Merged with master, getting the
RemoveAction changes.
2015-08-27 12:15:48 -07:00
63b41d796a [Mobile] Clean Up
Cleaned up context menu gesture
comments with spacing.
2015-08-27 12:06:25 -07:00
80a91970f6 Merge remote-tracking branch 'github/mobile' into open74-m-mobile 2015-08-27 11:34:14 -07:00
f0c64b6b92 [Browse] Back Arrow
Refactored Back Arrow to work same as prior
commit, however with less if else statements.
Returns if not at root, otherwise root is set to
true.
2015-08-27 10:45:48 -07:00
48136c2265 [Context] Back Arrow
Checks the Back Arrow in both checkRoot and
navigateToParent, also checks grandparent in both.
This allows the back arrow to hide in search when
context is unavailable.
2015-08-27 10:42:11 -07:00
1961adf8d6 [Mobile] Fixed font-size and line-height problem in tree
open #74
2015-08-27 10:33:32 -07:00
5230bdfc6b Merge pull request #86 from nasa/open51
Addresses nasa/openmct#51
2015-08-27 10:02:24 -07:00
97acf2012a Merge pull request #87 from nasa/open84
[Search] Hide link icons in search results
2015-08-27 10:00:34 -07:00
687d86790e [Action] RemoveAction
Added comments regarding change in
checking of traversed objects.
2015-08-27 09:49:26 -07:00
3ec4cc099b [Action] RemoveAction
Adjusted unit tests for checking if
traverseObject is undefined. Also removed
unnecessary ROOT_ID variable.
2015-08-27 09:41:00 -07:00
dadbf3f6dc [Action] RemoveAction
Checks if the object exists, instead of
checking if the ROOT is specifically reached,
when traversing up to ancestors.
2015-08-27 09:17:11 -07:00
c4c4c42415 [Elastic] Elastic Bundle
Elasticsearch bundle.json reverted back to
original.
2015-08-27 09:11:20 -07:00
8c4c65241a [Mobile] Tree
WHen selecting a leaf node on phone-portrait,
now the left menu will close if you select the
object name or the arrow.
2015-08-27 09:02:55 -07:00
67cb5f8077 [Mobile] Tests
Completed test for the BrowseController
Spec that takes in an undefined context.
2015-08-26 21:08:33 -07:00
bb2f086623 [Mobile] Leaf Node of Folder/Layout
Domainobjects that can hold an array of
domain objects return '[]' instead of
undefined, when checking for model.composition.
Now checks for empty array and navigates to layout/
folder that has no children.
2015-08-26 20:21:36 -07:00
a0169ad158 [Mobile] Browse Controller
Adjusted BrowseController to hide the
back button if current object represented/
selected has no context.
2015-08-26 20:20:16 -07:00
6e172359b4 [Mobile] IN PROGRESS: Significant re-org of search results styling
open #74
Removed all styles for search-result-item
in search/_search.scss and significantly re-orged .tree-item in
_tree.scss and mobile/_tree.scss to control
search-result-item styles;
2015-08-26 18:15:29 -07:00
d33678276c [Mobile] IN PROGRESS: Re-orgs after merge of Shivam's mobile branch
open #74
Re-applied changes to browse.html;
Added mobile/.../_search.scss;
Removed unused mobile/search/layout.scss;
Moved inclusion of search/_search.scss from tree.scss to main.scss;
2015-08-26 17:49:40 -07:00
1cbca41c53 Merge remote-tracking branch 'github/mobile' into open74-merge-mobile 2015-08-26 16:55:15 -07:00
a27083c28c [Mobile] IN PROGRESS: tweaked padding in form-row
open #74
2015-08-26 16:54:13 -07:00
def5e17bb8 [Mobile] Merge
Merged open73 into mobile. Search bar is currently
covering the create button slightly.
2015-08-26 14:07:52 -07:00
2cd1907b71 [Search] Temporarily hide link icons
Hide link icons in search results to temporarily
fix issue #84.
2015-08-26 13:40:28 -07:00
b8b9721ddc [Mobile] IN PROGRESS: Hide name in view-switcher in mobile
open #74
2015-08-26 13:04:09 -07:00
f80266b23f [Mobile] IN PROGRESS: Styling in forms, overlay and tree
open #74
.section-header and form-row styles changed in forms/_elems.scss;
significant changes to overlay in mobile: full-screen, close button, more;
tree hover bg changed to use rgba(#fff, 0.1);
removed "Hide title by default" in core/bundle.json;
2015-08-26 12:34:45 -07:00
9a3009f327 [Mobile] IN PROGRESS: Styling on Create menu
open #74
2015-08-26 10:50:14 -07:00
2542255342 [Mobile] AgentService call
window referred to in TreeNodeController added as
keyword to skip in top comment.
2015-08-26 10:16:22 -07:00
e7563ff4e9 [Action] Merge
Merged with master.
2015-08-26 10:11:23 -07:00
89bfa54563 [Mobile] IN PROGRESS: Misc layout tweaks; treeview pane styling
open #74
Treeview pane darkened;
Spacing in frame tweaked;
#content-area in right pane hidden
when treeview expanded for
phone portrait only;
Removed mobile-pane and
desktop-browse classes from markup;
2015-08-26 10:08:57 -07:00
a507557cec [Remove] Remove Action
Tweaked remove action to return
on finding the object that is being removed and
checking if it can be navigated to. Also completed
tests for RemoveAction.
2015-08-26 10:07:51 -07:00
793c99ac2f [Remove] Tests
RemoveActionSpec test complete, tests if
parent is object is removed. Also tests if
object not in object path is removed.
2015-08-26 10:02:16 -07:00
39bd292886 [Mobile] IN PROGRESS: Overlay and form cleanups
open #74
Widths and layout strategy fixed for label and
controls in form when appearing in mobile;
Overlay margins adjusted;
Cleaned up font size, line-height in tree items;
2015-08-26 09:43:51 -07:00
e8bc9ecc1a [Search, Mobile] Merge
Merged search/master into mobile. Adjusted the
search bar to work on branch and fit accordingly.
2015-08-25 15:27:21 -07:00
0fa330adff [Mobile] Tests
Adjusted TreeNodeControllerSpec to
test setObject prototype.
2015-08-25 14:49:38 -07:00
509badb225 Merge pull request #55 from nasa/search
[Search] Create search UI
2015-08-25 14:41:19 -07:00
9cd57614e4 [Mobile] AgentService & Tests
Adjusted the getOrientation of agentService to
inject the window instead of calling for it in
agentService. Also adjusted treeNodeController
for this. Added tests for the agentService's
getOrientation function.
2015-08-25 14:33:48 -07:00
d80c359a86 [Mobile] Tests
Fixed BrowseControllerSpec test
to account for new  call. Now
expects destroy and select-obj calls.
2015-08-25 14:20:36 -07:00
07d0706cd1 [Mobile] IN PROGRESS:
open #74
Added name for "base" (unknown) type in core/bundle.json;
Fixes to grid-item .details element:
- ellipsize,
- type now displayed properly;
- number of items with correct plural syntax;
2015-08-25 14:17:34 -07:00
fd5a911d50 [Mobile] IN PROGRESS: Fixed object-browse-bar flex
open #74
Also set left position of .object-browse-bar;
2015-08-25 13:51:02 -07:00
c71f1fe447 [Mobile] IN PROGRESS: Significant refactor in mobile/_layout.scss
open #74
Made view-switcher visible when browsing via mobile;
Fixed class in browse.html markup from left-menu to left;
Moved object-browse-bar, top-bar classes from _controls into _layout;
Renamed and simplified menu widths in mobile _constants;
Really significant refactor of mobiles/_layout;
Tweaks in user-environ/_layout;
TO-DO: figure out why object-browse-bar flex styles not
working in mobile;
2015-08-25 13:34:37 -07:00
cd46dab5c1 [Mobile] Merge
Merged with master and resolved conflicts.
2015-08-25 12:36:50 -07:00
e1858bf0ae [Mobile] IN PROGRESS: Moved position of view-switcher
open #74
view-switcher in object browse and edit moved to precede
action buttons, with margin;
Re-located CSS for .btn, etc. from _controls.scss to _layout.scss;
Cleaned up line-spacing in object-header in .frame;
2015-08-25 10:15:14 -07:00
7542c6d49a [Mobile] IN PROGRESS: Cleanups on .btn for line-height, sizing, etc.
open #74
2015-08-25 09:41:38 -07:00
6571da922d [Search] Update style for link icons
Added styling to correctly position and color
link icons within the search resutls list.
2015-08-25 08:56:32 -07:00
13b66cd215 [Mobile] IN PROGRESS: Only display custom scrollbars in desktop mode
open #74
2015-08-24 17:04:38 -07:00
aca06c6007 [Action] Remove Action Merged
Remove Action merged to allow removal of
parent or current selected object, then
navigation to lowest existing parent if
currently located in deleted object.
2015-08-24 16:46:48 -07:00
5184e08a5b [Mobile] IN PROGRESS: Tweak to TypeImpl to return glyph for unknown types
open #74
Thanks Victor!;
2015-08-24 16:45:55 -07:00
69c6d4bd26 [Mobile] IN PROGRESS: Tweaks to labels;
open #74
Cleaned up layout of bottom-bar;
Fixed class selector for ue-bottom-bar;
2015-08-24 16:31:38 -07:00
6a2bdd103b [Mobile] Hide Tree
On selecting a node in the tree, if the
user is on phone and in portrait, than
emit up to the browse controller to call
treeSlide(), which will hide the tree menu.
Also adjusted the agent service to properly
check for orientation using window.innerHeight/
Width. Also created function for the selection
of an object in BrowseController.
2015-08-24 16:17:58 -07:00
76c4b96683 [Mobile] IN PROGRESS: Menu hide/show fixes; font-size tweaking
open #74
Changed .right-repr to use translateX in phone portrait mode;
font-size tweaking;
Refactored css organization in mobile/_layout.scss;
2015-08-24 15:24:35 -07:00
c81e2dbb4a Merge branch 'master' of https://github.com/nasa/openmctweb into search
Conflicts:
	platform/commonUI/general/src/controllers/TreeNodeController.js
	platform/persistence/elastic/src/ElasticSearchProvider.js
2015-08-24 13:14:43 -07:00
44ed4e0e0d [Mobile] IN PROGRESS: Minor tweak for line-height in top-bar
open #74
2015-08-24 12:39:50 -07:00
b860db302c [Framework] Bump angular to 1.4.4
Upgrade angular to latest version, also update angular-route.
2015-08-24 12:39:48 -07:00
e96d3e3738 [Mobile] IN PROGRESS: Significant redo of object-header
open #74
Added .bar .l-flex using display: flex in object header;
2015-08-24 12:22:08 -07:00
f1ca9ff15e Merge remote-tracking branch 'origin/open1334' into open1416 2015-08-24 11:55:27 -07:00
9eb23a62bc Merge branch 'open75' into open-master 2015-08-24 10:42:19 -07:00
9b6a839c06 Merge branch 'open-jpl48' into open-master 2015-08-24 10:39:17 -07:00
6aaa887e65 [Imagery] Start off with empty timestamp
Show nothing in the timestamp area when there is no
data yet available for image telemetry, WTD-1170.
2015-08-24 09:39:42 -07:00
1e332da11b [Docs] ElasticSearch is not Couch 2015-08-24 09:04:03 -07:00
3a050cc5b8 [Style] space after operator 2015-08-24 09:03:31 -07:00
039d692e4c Forgot to add new .scss file
open #74
2015-08-21 15:10:19 -07:00
ee608cc4a4 [Mobile] IN PROGRESS: General fixes, spurred by mobile, for object-header
open #74
Attempting to layout using flex - not working;
See http://jsfiddle.net/charlesh88/cpf9zjts/9/ for working example;
New _flex.scss added;
This commit is changed elements that are mostly solid;
2015-08-21 15:09:23 -07:00
d0183d44c9 [Actions] Remove Action
When an ascendant or parent or currently
selected object is removed the user is navigated
to the parent of the object being removed. Added variables
to RemoveAction test to test removing currently selected
domainObject.
2015-08-21 13:04:47 -07:00
a7cc06a28b Merge remote-tracking branch 'upstream/master' 2015-08-21 09:08:00 -07:00
da8eb334e3 [Mobile] Sanding of mobile styles continues, in progress
open #74
CSS and markup changes for split pane holders;
drop shadow added to tree area;
Tree item cleanups;
This or earlier commit broke treeview nav action;
TO-DO: fix treeview nav action to hide menu;
2015-08-20 18:36:44 -07:00
67592def90 [Mobile] Sanding of mobile styles, in progress
open #74
CSS and markup changes for mobile,
particularly on grid-item;
Mod to behavior in tree for mobile nav:
leaf node grid-item click now navs to item;
Fixed info-button to work properly with mod to
infoButtonGesture.js;
2015-08-20 16:11:45 -07:00
3484b315cf [Mobile] Sanding of mobile styles, cherry-pick to master
open #74
CSS and markup changes for mobile
that are good for master now;
2015-08-20 16:09:35 -07:00
b1e1e85bbd Merging in latest openmctweb master
open74
Had to resolve conflicts
2015-08-20 10:36:41 -07:00
1e79c507c8 [Build] Ignore Intellij *.iml configuration files 2015-08-20 09:25:27 +02:00
249a9b2eb2 [Frontend] Better sorting indicators added to styles
JPL #48
Simplified styles to indicate sort by asc and desc in table th elements;
(cherry picked from commit 15a2416)
2015-08-19 18:17:15 -07:00
02abbdf4fe Resolving conflict in platform/.../theme-espresso.css
#75
Merged in master branch;
Re-rendered platform/.../theme-espresso.css;
2015-08-19 16:22:21 -07:00
08d68f99a5 [Frontend] Fix word wrapping issues in hover bubble
#75
CSS modified to utilize word-break property;
2015-08-19 16:09:55 -07:00
f27e4d6e06 Merge branch 'open-master' into open1482c
Merge in latest in preparation to merge; WTD-1482

Conflicts:
	platform/commonUI/browse/src/creation/CreationService.js
	platform/core/src/models/RootModelProvider.js
	platform/entanglement/src/services/LinkService.js
	platform/entanglement/src/services/MoveService.js
2015-08-19 15:00:52 -07:00
9c578c53db Merge pull request #64 from nasa/open-965
[Location] track location of objects and distinguish links from originals

WTD-965
2015-08-19 14:28:00 -07:00
a4a9acd2ea Merge branch 'open-master' into open-965
Merge in latest into topic branch for WTD-965 to
resolve conflicts.

Conflicts:
	platform/commonUI/general/res/css/theme-espresso.css
2015-08-19 14:16:56 -07:00
c118234bbf [Style] Brace after if criteria 2015-08-19 13:55:02 -07:00
a94763041e [Move] correct logic and specification 2015-08-19 13:16:36 -07:00
26892e7104 [Location] isLink/isOriginal are antonyms
Simplify implementation of isLink/isOriginal for better maintainability.
2015-08-19 11:49:45 -07:00
5c74365f4b [Root] Root model provider sets location
Root model provider sets the location of roods so that the location
capability does not need special handling for this.
2015-08-19 11:49:03 -07:00
94854e5965 [Location] can retrieve contextual location
Clarify naming of method for retrieving contextual location of a domain
object.

Default behavior for objects that do not have a context is to return
undefined.  Note that default behavior is not specified and could change
if needed.
2015-08-19 11:33:45 -07:00
9cf30f4213 [Location] setPrimaryLocation takes location.
Rename "persistLocation" to be more clearly named, and make it take an
argument to allow for greater control outside the capability.
2015-08-19 11:25:41 -07:00
eb776e69c0 [JSDoc] Document LocationCapability constructor 2015-08-19 11:13:24 -07:00
c4dd4f5c45 [Mobile] Merge
Merged with master.
2015-08-19 11:01:58 -07:00
33a63947e5 Merge branch 'open70' into search 2015-08-19 10:06:32 -07:00
432ec519b6 Merge branch 'search' into open70
Conflicts:
	platform/commonUI/browse/res/templates/browse.html
2015-08-19 10:05:38 -07:00
7f65ba236c [Frontend] Tweaks to Load More results button
#70
2015-08-19 09:44:23 -07:00
3a86f5e746 [Frontend] Tweak to Load More button label
#70
2015-08-18 19:54:50 -07:00
4e3e3653a3 [Frontend] Styling for search elements
#70
Significant .scss and markup changes across search;
New symbols font (v2.2) char for clear icon;
To-do: style "load more" element;
2015-08-18 19:51:47 -07:00
d3ea67fbd9 [Search] Templates vs representations
Made the search and search-menu templates into
representations, to be more consistent.
2015-08-18 16:54:36 -07:00
9ebc04ef14 [Search] Cleanup and documentation 2015-08-18 16:08:16 -07:00
e426e0e5ec Merging in latest from master
#70
2015-08-18 15:23:42 -07:00
3d1e1659c2 [Search] Update tests
for 100% coverage.
2015-08-18 12:37:47 -07:00
17f2bb966b [Search] Update tests and remove redundancy
Updated the generic provider test. Removed index
checking from the generic search worker, because
that checking is already done (more efficiently)
in the generic search provider.
2015-08-18 12:27:04 -07:00
158f549df2 [Search] Change back bundles.json 2015-08-18 11:48:07 -07:00
a98b65286f [Search] Update tests
Updated the SearchController tests for more coverage,
due to additions to the controller. Fixed a small
logic error in controller.areMore()
2015-08-18 11:28:12 -07:00
17aa666519 [Search] Remove unnecsissary controller
Removed the SearchItemController, as the logic was simple
enough to be done in one line in the search item
representation html.
2015-08-18 10:19:20 -07:00
f6cf4c3215 [Code Style] Fix error in persistence
Fix typo in persistence provider for ElasticSearch related
to refactoring to use prototypes, WTD-1482.
2015-08-17 17:00:21 -07:00
86f0a9100f [Code Style] Fix merge error
Fix merge error in ContextMenuAction which caused
test failure. WTD-1482.
2015-08-17 16:57:46 -07:00
f4b87cf70d [Project source] Updated icomoon.io symbols font project file 2015-08-17 15:47:28 -07:00
841273edf6 [Code Style] Add CONTRIBUTING.md
Add CONTRIBUTING.md to formalize changes to code style
requirements for WTD-1482.
2015-08-17 15:22:26 -07:00
366ec3d516 [Frontend] Styles for tabular views and view sections
Original issue: https://github.jpl.nasa.gov/MissionControl/vista/issues/30

New CSS and symbols to support tabular views;
Required by JPL branch vista30 (https://github.jpl.nasa.gov/MissionControl/vista/tree/vista30)
2015-08-17 15:11:27 -07:00
a4e2aba6dc [Code Style] Add trailing newline
WTD-1482.
2015-08-17 15:07:47 -07:00
f4ae86eb53 Merge remote-tracking branch 'github/master' into open1482c
Conflicts:
	platform/representation/src/actions/ContextMenuAction.js
2015-08-17 15:05:34 -07:00
3a932f5443 [Search] No searching root
Removed the root type from the search menu
types, so searches through the current UI
will not reutrn root objects.
2015-08-17 14:32:25 -07:00
ce58aff18a [Search] Remove unused code 2015-08-17 14:31:43 -07:00
24ee8ec063 [Search] Remove old files
Remove old search view files from before
the left tree bar search.
2015-08-17 13:53:37 -07:00
eee8790682 [Search] Add tests
Added tests for SearchMenuController.
2015-08-17 13:46:28 -07:00
083932e902 [Search] Moved search menu to a template
Created a search-menu template and corresponding controller.
Moved functions out of SearchController to SearchMenuController.
The two controllers share information through ngModel.
2015-08-17 12:34:50 -07:00
9ab06cfdd2 Merge remote-tracking branch 'github-open/open1506' into open-master 2015-08-17 11:48:23 -07:00
e159b7a15d [Search] mct-control textfield breaks focus
Set up bundle.json so that the search bar could
be a mct-control, but left the control itself
commented out because then CSS styling would not
work due to lack of access to parent elements.
2015-08-17 11:47:40 -07:00
4481c44c4b [Code Style] Refactor search to use prototypes
WTD-1482.
2015-08-17 11:20:23 -07:00
6d660d48ca [Search] Change default search menu
The search menu now opens to having none of the types
checked, but 'ALL' checked. Checking anything besides
'ALL' unchecks 'ALL' and begins filtering search by
type.
2015-08-17 11:17:02 -07:00
bf417a14e0 Merge remote-tracking branch 'origin/open-master' into open1482c
Merge latest into topic branch for WTD-1482
2015-08-17 11:01:39 -07:00
4495c5b64a [Build] Restore snapshot status
Bump version number and restore snapshot status to
begin sprint Umbriel, WTD-825.
2015-08-17 10:54:30 -07:00
0cee5ad380 Merge remote-tracking branch 'upstream/master' 2015-08-17 10:50:19 -07:00
f22c0a7ee4 [Search] Remove unused dependency
Remove unused dependency from generic search worker,
avoids WTD-1511.
2015-08-17 10:50:12 -07:00
83fce6ad77 [Search] Remove unused dependency
Remove unused dependency from generic search worker,
avoids WTD-1511.
2015-08-17 10:45:02 -07:00
7b4934ec55 [Search] Shorter menu transition 2015-08-17 10:33:26 -07:00
2ef0c2a8cb [Search] Documentation
More specific descriptions of angular scope
variables in searchcontroller.
2015-08-17 10:33:10 -07:00
80c99d2eb6 Merge branch 'master' into search 2015-08-17 09:35:30 -07:00
2ccca016a5 [Code Style] Use prototypes in telemetry bundle
WTD-1482
2015-08-14 16:55:17 -07:00
cb0f72052f [Search] Update tests
Changed references to isLoading to
mockScope.loading
2015-08-14 16:46:22 -07:00
1030eff943 [Search] Documentation 2015-08-14 16:44:34 -07:00
5e3caf6252 [Search] Shorter menu transition 2015-08-14 16:35:14 -07:00
aa67489404 [Search] Remove unnecissary funtions
Removed isLoading, hasInput, and clear
functions in favor of having the logic
within the search template.
2015-08-14 16:33:23 -07:00
1ea6f7620e [Code Style] Begin refactoring telemetry bundle
Begin refactoring telemetry bundle to use prototype
for methods, WTD-1482.
2015-08-14 16:14:15 -07:00
365134b085 [Code Style] Use prototypes in representation bundle
WTD-1482
2015-08-14 16:13:46 -07:00
07a2065c11 [Code Style] Use prototypes in policy bundle
WTD-1482.
2015-08-14 15:49:47 -07:00
f8cb3f464c [Code Style] Use prototypes in persistence queue
WTD-1482
2015-08-14 15:43:37 -07:00
31337eaf4f [Search] Text clear size & hover
The search bar clear button now gets
highlighted when hovered over, and the
click area is slightly larger.
2015-08-14 15:38:02 -07:00
3e8ea972c2 [Code Style] Use prototypes in persistence bundles
WTD-1482
2015-08-14 15:26:24 -07:00
0f6287e715 [Search] Fix overflow
Fixed the text positioning in the filter
options display so that the text does not
overflow the bottom.
2015-08-14 15:22:53 -07:00
0cfd881510 [Search] Menu transition and highlights
The search menu fades in and out when open
and closed. Hovering over 'ALL' in the
menu now highlights it.
2015-08-14 15:05:54 -07:00
edca2a9f03 [Code Style] Use prototypes in framework layer
WTD-1482
2015-08-14 14:50:48 -07:00
cc05c50769 [Search] Smaller checkbox size
in the search menu.
2015-08-14 14:11:26 -07:00
adbb3486c5 [Search] Added ClickAwayController test
Added a test for the click away controller. Because
the controller was copied from
platform/commonUI/general, so was the test.
2015-08-14 13:56:27 -07:00
ced1609e51 [Search] Update tests
Updated SearchController test for the addition of the
controller's dependency on types[].
2015-08-14 13:52:57 -07:00
7fe866060b [Code Style] Use prototypes in forms bundle
WTD-1482.
2015-08-14 13:44:08 -07:00
7bc9b83aac [Search] Remove unused watch 2015-08-14 13:35:49 -07:00
d6d16f8f1c [Search] Font and spacing
Use em for filter options positioning. Cursor
as pointer for menu. Results list padding fix.
2015-08-14 11:58:32 -07:00
bcea3832ed [Search] Search menu & display tweaks
Clicking on names of options in the search
menu will now toggle the checkboxes. The
filter options display now says when no
filters are selected. Slightly moved the
search menu to the left.
2015-08-14 11:06:40 -07:00
94662cb904 [Search] Search filter options display style
Created a box around the options display.
2015-08-14 10:52:03 -07:00
26ab9af911 [Search] Dynamic positioning and height
The scroll bar for the search results changes
height according to how many filter options
are displayed above it, without dissapearing
below the bottom of the page.
2015-08-14 10:19:13 -07:00
f38b89a582 [Search] style 2015-08-13 16:56:58 -07:00
c17ec19f97 [Search] Filter options display styling 2015-08-13 16:54:15 -07:00
2ca7a175bd [Search] Relative positioning
Search results list now displays below the
filter options display dynamically.
2015-08-13 16:40:51 -07:00
371b690072 [Search] Fix filter display names
Changed form type keys to names
2015-08-13 16:23:13 -07:00
c62e73f863 [Search] Checkbox style
Changed the checkboxes to be not blue.
2015-08-13 16:06:10 -07:00
5726dd0e0c [Search] Filter display
Added display below the search bar of what
search filters are currently active.
Not yet correctly aligned wrt search
results list.
2015-08-13 15:11:22 -07:00
1c187c3914 [Code Style] Begin refactoring forms bundle
WTD-1482
2015-08-13 14:44:27 -07:00
74cf4d73d5 [Search] Hover transitions 2015-08-13 14:22:07 -07:00
c8694f182a [Search] Menu opening
Menu opens when icon is pressed. Closes when
cliked away from, but not when clicked on.
2015-08-13 13:59:56 -07:00
2e767c94c4 [Search] Update load-more, add check-all
Make the 'Load more' button work with the
new filtered results. Added 'ALL' to the top
of the search menu which allows the user to
toggle all of the filtering options easily.
2015-08-13 13:19:25 -07:00
6302eee17e [Code Style] Use prototypes in Scrolling List bundle
WTD-1482.
2015-08-13 12:35:48 -07:00
820c15d74c [Code Style] Use prototypes in Plot bundle
WTD-1482.
2015-08-13 12:12:15 -07:00
b26aa3cab7 [Search] Filter search
Filtering search using the search menu works.
Load more does not work with this yet.
2015-08-13 11:45:46 -07:00
c51856522c [Search] Menu checkboxes and labels
Added checkboxes with styling to the menu. Set
up a types list for the menu.
2015-08-13 10:59:12 -07:00
aefad6fdd3 [Code Style] Continue refactor of Plot bundle
Continue refactoring Plot bundle to use prototypes,
WTD-1482
2015-08-13 10:26:04 -07:00
8371b1b25b Merge pull request #59 from slhale/searchservice
[Search] Created search service
2015-08-12 17:05:50 -07:00
a9c85d5241 [Search] Search menu style
Added caret to top of menu.
2015-08-12 16:38:38 -07:00
edf52f32ad [Search] Search menu
Creating a search menu which will allow for
more specific search options.
So far have started top-down with styling.
In progress.
2015-08-12 16:13:36 -07:00
18bc7d3637 [Code Style] Begin using prototypes in Plot bundle
WTD-1482
2015-08-12 14:49:03 -07:00
175490e1f7 [Code Style] Use prototypes in Web Page bundle
WTD-1482
2015-08-12 14:32:05 -07:00
3492cd3942 [Code Style] Fix bug introduced by refactor
Do some extra checking, since capabilities may have
properties which are note methods. WTD-1482.
2015-08-12 13:57:17 -07:00
ed53808556 [Code Style] Use prototypes in Layout bundle
WTD-1482
2015-08-12 13:45:48 -07:00
41ddb76385 [Search] Remove unnecissary line 2015-08-12 13:24:39 -07:00
94531a39d0 Merge branch 'master' of https://github.com/nasa/openmctweb into searchservice 2015-08-12 13:17:17 -07:00
55dd8cb1a8 Merge branch 'master' of https://github.com/nasa/openmctweb into search 2015-08-12 13:17:01 -07:00
eefc746567 [Search] Fix results display
Search results are now properly displayed again.
2015-08-12 13:05:30 -07:00
0218bad9e8 [Search] Clear icon padding and transition 2015-08-12 12:58:22 -07:00
dd993c81a7 [Search] Clear icon working
Clicking on the clear icon now clears
the input text in the search bar.
2015-08-12 12:46:01 -07:00
3db62edf59 Merge remote-tracking branch 'github/master' into open-master
Conflicts:
	README.md
2015-08-12 12:19:53 -07:00
914c823675 [Tests] Comment out failing tests
Comment out tests which relate to object types not
yet in open source, WTD-1505
2015-08-12 11:57:56 -07:00
a76e54483a [Search] Clear icon tweaks
Comments and CSS. Still not clickable.
2015-08-12 11:20:02 -07:00
515470fa6a [Search] Timeout length & indexed check
Changed timeout to 0 ms. Changed check for
already indexed to an empty return.
2015-08-12 11:03:10 -07:00
cab675c8ca [Search] Timeout length & indexed check
Changed timeout to 0 ms. Changed check for
already indexed to an empty return.
2015-08-12 10:57:37 -07:00
deb9e3e2ee [Tests] Change Chrome binary env variable
Use CHROME_BIN as the environment variable for nonstandard
Google Chrome binary locations; this is the same variable
used by Karma, so configuration is simplified. WTD-1505.
2015-08-12 10:28:20 -07:00
3555f41f3e [Search] Adding clear text button
It is in place, but clicking on it does nothing yet.
2015-08-12 10:27:34 -07:00
b6b716b767 [Tests] Update protractor instructions
WTD-1505
2015-08-12 10:27:24 -07:00
7aea1647a2 [Tests] Ensure local storage is used
Ensure local storage is used for Protractor tests,
WTD-1505.
2015-08-12 10:24:49 -07:00
b74cbf1969 Added Window/Unix Freindly String Compare functions 2015-08-12 10:24:49 -07:00
eb10cbf87c Cleaned Up Directory 2015-08-12 10:24:49 -07:00
7918d7b287 Updated README and Renamed Tests 2015-08-12 10:24:49 -07:00
fde0dc2a35 Added start.js Creates 'log' folder 2015-08-12 10:24:10 -07:00
85f9d5a2da Added Start Run Stop Scripts 2015-08-12 10:23:58 -07:00
ef7c1bd025 Added Fix for Protractor Test 2015-08-12 10:23:50 -07:00
9dd520f17b [Search] Break up item indexing
Use timeouts to make the generic search's item
indexing not block up the page.
Updated tests accordingly.
2015-08-12 10:06:27 -07:00
a9e2d48036 [Code Style] Use prototypes in Imagery bundle
WTD-1482
2015-08-12 09:57:05 -07:00
0520f1c70c [Search] Update tests
Test creation of the generic search provider
provides mock timeout argument. Slight change to
tree indexing test due to use of useCapability
function.
2015-08-12 09:53:23 -07:00
3b62f1a979 [Search] Break up item indexing
Use timeouts to make the generic search's item
indexing not block up the page.
2015-08-12 09:42:21 -07:00
d701567b70 [Code Style] Use prototypes for Events bundle
WTD-1482
2015-08-11 16:01:16 -07:00
7911909c5f [Code Style] Use prototypes for execution bundle
WTD-1482.
2015-08-11 15:02:52 -07:00
b93d752c88 [Code Style] Use prototypes in entanglement bundle
WTD-1482
2015-08-11 14:58:31 -07:00
5e4dcc1e35 [Code Style] Fix typo
Fix typo in JSDoc annotation, WTD-1482
2015-08-11 14:53:45 -07:00
9939c809be [Search] Adjust result list padding 2015-08-11 14:43:06 -07:00
89cb6867bd Merge branch 'master' of https://github.com/nasa/openmctweb into search 2015-08-11 14:32:39 -07:00
98801cb5d6 [Search] Remove unnecissary 2015-08-11 14:31:12 -07:00
48693df51f [Search] Input checks
More checks to see if the input is empty
before doing search computations.
2015-08-11 13:52:23 -07:00
23bc246a48 [Search] Search icon
Search icon now is not visible when text is
entered in the search bar, even when the bar
is not in focus.
2015-08-11 13:18:05 -07:00
11a45e4db0 [Search] Input checks
More checks to see if the input is empty
before doing search computations.
2015-08-11 13:08:58 -07:00
c450c22ddd [Code Style] Satisfy JSLint
Add missing semicolons etc. to satisfy JSLint after
changes for WTD-1482.
2015-08-11 13:03:06 -07:00
c19b3384ca [Code Style] Remove JSDoc script
Remove script which added extra JSDoc annotations,
WTD-1482.
2015-08-11 12:58:51 -07:00
b7765ff388 [Code Style] Use prototypes in platform
WTD-1482
2015-08-11 12:57:31 -07:00
f377c7cb71 [Code Style] Use prototypes in containment bundle
WTD-1482.
2015-08-11 11:01:13 -07:00
aa08db1050 [Code Style] Avoid copying window/scope
Avoids Angular errors; WTD-1482.
2015-08-11 11:00:56 -07:00
a48a0820ad [Search] Search icon transition 2015-08-11 10:56:31 -07:00
109d933945 [Search] Fix test file path 2015-08-11 10:42:10 -07:00
7b471e5379 [Search] Search icon
Moved the search icon to appear within the
text input area, and dissapears when the
input area is focused.
2015-08-11 10:35:08 -07:00
de291ad3b1 [Code Style] Use prototypes in inspection bundle
WTD-1482
2015-08-11 10:00:56 -07:00
140d767026 [Code Style] Use prototypes in general UI bundle
WTD-1482.
2015-08-11 09:47:54 -07:00
be5cad212a [Code Style] Use prototypes in Edit bundle
WTD-1482.
2015-08-10 16:38:13 -07:00
efc42aa8f2 [Code Style] Use prototypes in Dialog bundle
WTD-1482.
2015-08-10 12:53:55 -07:00
f8a0ddb484 [Code Style] Avoid retaining reference to window
Avoid https://docs.angularjs.org/error/ng/cpws
by changing way reference to  is retained.
WTD-1482.
2015-08-10 12:39:56 -07:00
3a0ba4f5a6 [Framework] Allow prototype-style constructors
WTD-1482.
2015-08-10 12:31:44 -07:00
a77920bd18 [Code Style] Use prototypes in Browse bundle
WTD-1482.
2015-08-10 11:52:23 -07:00
78146d97f8 [Code Style] Use prototypes in About bundle
WTD-1482.
2015-08-10 10:19:02 -07:00
2d5ec97dc3 [Menu] Listen to element directly
Add listener to menu element directly instead of
using ng-click to aid in testing (and for consistency
with related listeners.) WTD-1506.
2015-08-07 14:39:59 -07:00
87aa0cfce2 [Menus] Dismiss menu when clicked
Addresses WTD-1506 (context menu does not disappear after
action is chosen); listen for click events on the menu
itself and dismiss the menu when these occur.
2015-08-07 14:34:27 -07:00
afddca510c [Documentation] Fix markdown
Fix markdown typo in README.md
2015-08-07 13:47:32 -07:00
0b9b936368 [JSDoc] Add missing class doc
WTD-1482.
2015-08-07 13:35:07 -07:00
23f18c799d [JSDoc] Enable markdown processing
WTD-1482.
2015-08-07 12:19:32 -07:00
a7a1ac70e5 [JSDoc] Remove obsolete module references
WTD-1482.
2015-08-07 12:14:40 -07:00
31eb366e7f [JSDoc] Add namespace docs
WTD-1482.
2015-08-07 12:13:15 -07:00
eaaa1a19ca [JSDoc] Remove obsolete module references
WTD-1482
2015-08-07 11:55:38 -07:00
c08a460d30 [JSDoc] Add annotations
Bulk-add JSDoc annotations, WTD-1482.
2015-08-07 11:44:54 -07:00
14f97eae9c [JSDoc] Exclude examples
WTD-1482
2015-08-07 11:43:47 -07:00
2f79323264 [JSDoc] Handle missing @constructor
WTD-1482
2015-08-07 11:41:02 -07:00
1558c9d1bd [JSDoc] Add script to add annotations
WTD-1482
2015-08-07 11:31:06 -07:00
03aba8bbf7 [Build] Start the WAR in an embedded Tomcat Servlet Container 2015-08-07 10:16:59 +02:00
7141c2818a [Search] Search icon near input
Added a search icon next to the search bar
input.
2015-08-06 16:59:09 -07:00
058a0d393d [Compatibility] Store reference instead of binding 2015-08-06 16:55:15 -07:00
b0a23590d4 Revert "[Build] Bump PhantomJS Version"
This reverts commit 62f335573a.
2015-08-06 16:53:42 -07:00
48a9eef924 Merge branch 'open-master' into open-965 2015-08-06 16:13:37 -07:00
62f335573a [Build] Bump PhantomJS Version
Bump PhantomJS version to latest (for ES5 support) and upgrade
dependencies as necessary.
2015-08-06 16:04:58 -07:00
c80e9bfa26 [Style] JSLint Compliance 2015-08-06 15:21:28 -07:00
ec62c27f36 [Representations] grid-item and label display links
grid-item and label representations now use the "location" capability
to determine whether or not to show a link indicator.
2015-08-06 15:12:02 -07:00
19b80ded16 Merge remote-tracking branch 'origin/open1423' into open-965 2015-08-06 15:10:52 -07:00
f72f88adfa [Location] Use parent id as location
Use the parent id as the location for a model.

This greatly reduces the recursive work that must be done
during move operations to keep the location accurate.

Additionally, the locationService now implements a method
`persistLocation` which can be used to persist the current object
location as it's original location.
2015-08-06 15:05:47 -07:00
f083d019a3 [Entanglement] Move service recursively updates locations
When moving an object that supports composition, child objects which
are originals must have their location updated as well.  Children which
are links should not have their location updated, nor should any of
their children be updated.
2015-08-06 15:05:47 -07:00
10ec30ba76 [Entanglement] MoveService updates the location of moved objects
The move service updates the location of moved objects when those
objects are originals.
2015-08-06 15:05:46 -07:00
3fb4296d23 [Testing] MockLinkService returns linked object
MockLinkService.perform returns a promise for the linked domainObject.

When resolving the promise and not specifying an object to resolve it
with, it will resolve it with the domainObject that was originally
passed to it.
2015-08-06 15:05:46 -07:00
197ec0eb2c [Tests] Update Link Service Tests 2015-08-06 15:05:42 -07:00
1d162888dd [Tests] Fix location capability tests 2015-08-06 15:05:00 -07:00
5ab26df4c9 [Scripts] Add script to run karma continuously
Add a script (to be executed with `npm run-script watch`) that
runs karma and watches for changes; rerunning tests whenever a
file is changed.  Useful for local development.
2015-08-06 15:04:05 -07:00
3783ed69d7 [Entanglement] Move updates location of originals
When moving original objects, the location is updated to match the new
location.
2015-08-06 15:03:08 -07:00
1d2cd4745c [Search] Update tests
Updated generic provider test for more general
mock capability object.
2015-08-06 15:01:45 -07:00
ee2d7efae2 [Search] Index checks for changes
When indexing items initially, the generic
provider listens for mutations in case an
item's composition changes, so it can then
index the new children.
2015-08-06 15:01:17 -07:00
4a755e259f [Entanglement] Link service returns object in new context
The link service return the object in the new context.
2015-08-06 14:55:50 -07:00
4c56e4ffdc [Test] add a synchronous controlled promise for testing
Add ControlledPromise, a synchronous promise that can be controlled,
allowing for easier testing of promise resolution flow.
2015-08-06 14:53:59 -07:00
7cad3ba0bc [Search] Update tests
Updated generic provider test for more general
mock capability object.
2015-08-06 14:52:54 -07:00
449db4f3a9 [Templates] Add stubs for link indicator
Update templates to use the location capability to show an indicator.
2015-08-06 14:52:42 -07:00
168a805e8e [Search] Index checks for changes
When indexing items initially, the generic
provider listens for mutations in case an
item's composition changes, so it can then
index the new children.
2015-08-06 14:41:47 -07:00
7ded288154 Merge pull request #63 from nasa/open21-diagrams
[Documentation] Add architecture documentation
2015-08-06 14:24:04 -07:00
63a99f26f6 Merge branch 'mobile_3' into mobile 2015-08-06 14:13:13 -07:00
7ca15a9de2 [Mobile] Representation
Edited grid item to center
shared button.
2015-08-06 14:11:59 -07:00
7ac1d2458a Merge remote-tracking branch 'origin/mobile_3' into mobile 2015-08-06 13:45:45 -07:00
0bc4f2dc6e Merge remote-tracking branch 'upstream/master' into mobile 2015-08-06 13:45:37 -07:00
6802484ad8 Merge remote-tracking branch 'upstream/master' 2015-08-06 13:45:24 -07:00
dcd7d61c9a [Mobile] Tests
Completed ContextMenu and InfoButton
Gesture tests where elements/body
touch events occur.
2015-08-06 13:43:56 -07:00
3e94eba0d1 Merge pull request #62 from nasa/bigger-create-clicktarget
[Template] Move ng-click to parent node
2015-08-06 13:21:10 -07:00
ddae7823f9 [Documentation] Satisfy JSLint
MissionControl/vista#21
2015-08-06 13:02:33 -07:00
633c00f161 [Documentation] Minor cleanup
Minor cleanup around placeholder sections of
documentation, MissionControl/vista#21
2015-08-06 11:53:04 -07:00
be5253b9d3 [Documentation] Update doc build/deployer
MissionControl/vista#21
2015-08-06 11:46:50 -07:00
320be34798 [Documentation] Add clarifying comments
Add clarifying comments to doc generator,
MissionControl/vista#21.
2015-08-06 11:44:28 -07:00
3dace28eb3 [Documentation] Finish platform architecture
MissionControl/vista#21
2015-08-06 11:39:01 -07:00
19db1c9c2b [Documentation] Add narrative about tiers
MissionControl/vista#21
2015-08-06 11:12:02 -07:00
935360e2eb [Documentation] Document remaining services
MissionControl/vista#21
2015-08-06 11:02:12 -07:00
e0a0d293fa [Search] Update test
Fully calls through the controller's search().
2015-08-06 10:35:57 -07:00
1a4d7618c1 [Search] Infinite cycle check
in indexItems in the generic provider.
2015-08-06 10:33:17 -07:00
a2eabc1b08 [Search] Infinite cycle check
in indexItems in the generic provider.
2015-08-06 10:25:02 -07:00
f76f6548a5 [Search] Type checking
Added type checking for arrays to indexItems.
2015-08-06 10:13:32 -07:00
44dce05ec5 [Search] Correct test file paths 2015-08-06 10:12:44 -07:00
e729a966c7 [Search] Type checking
Added type checking for arrays to indexItems.
2015-08-06 10:12:34 -07:00
836c508698 [Search] Style compliance 2015-08-06 09:55:08 -07:00
1fe492cc3d [Search] New item indexer
This one (hopefully) doesn't fill up the
call stack when there are lots of items.
2015-08-06 09:51:09 -07:00
8923f23f70 [Search] New item indexer
This one (hopefully) doesn't fill up the
call stack when there are lots of items.
2015-08-06 09:49:29 -07:00
4c8d07bba8 [Documentation] Telemetry service architecture
MissionControl/vista#21
2015-08-05 17:24:36 -07:00
37cd73c6e8 [Template] Move ng-click to parent node
Move the ng-click directive to the li element to match the element that receives
hover styles.

Fixes nasa/openmctweb#60.
2015-08-05 17:11:30 -07:00
096dce1fe0 [Documentation] Clarify terminology
MissionControl/vista#21
2015-08-05 16:35:58 -07:00
7c17581659 Merge remote-tracking branch 'origin/mobile_3' into mobile
Merged fixes regarding circleci check failure
2015-08-05 12:27:20 -07:00
0a39984c4f [Mobile] Clean Up
Fixed InfoService having 0 in
wrong spot. Also correctly compared
the UserAgent device to iPhone for
isMobile function in AgentService.
2015-08-05 12:26:09 -07:00
ae763d000c [Search] Remove ES provider from bundle
Removed the ElasticSearch search provider from its
bundle definition, but left its file in.
2015-08-05 12:23:40 -07:00
a146185bd2 Merge remote-tracking branch 'origin/mobile_3' into mobile 2015-08-05 12:17:49 -07:00
0b635afcf7 [Mobile] Tests
ContextMenu and InfoButton Gesture
tests remain.
2015-08-05 12:14:16 -07:00
6407a66d30 [Search] Worker test correction
Removed unused parameter. Made path to worker
not relative.
2015-08-05 10:26:16 -07:00
4533262b4a Merge branch 'searchservice' of https://github.com/slhale/openmctweb into searchservice 2015-08-05 10:20:14 -07:00
6a0bd10d5b [Search] Worker test correction
Removed unused parameter. Made path to worker
not relative.
2015-08-05 10:18:10 -07:00
3f2a23c93b [Search] Worker test correction
Removed unused parameter. Made path to worker
not relative.
2015-08-05 10:15:21 -07:00
96f738b6b6 [Documentation] Diagram service infrastructure
MissionControl/vista#21
2015-08-04 17:10:04 -07:00
f46a0853b9 [Mobile] Tests
Removed mockMenu from ContextMenuGestureSpec.
2015-08-04 16:58:37 -07:00
3c325b8870 [Documentation] Add more high-level platform information
MissionControl/vista#21
2015-08-04 16:55:29 -07:00
7f486f739d Merge remote-tracking branch 'upstream/master' 2015-08-04 16:54:14 -07:00
66c81ce3d6 Merge remote-tracking branch 'upstream/master' into mobile 2015-08-04 16:53:45 -07:00
5fa6db72d2 [Search] More controller tweaking 2015-08-04 16:50:50 -07:00
6b65ae77e7 [Mobile] Tests
Completed tests for AgentService,
InfoService, and ContextMenuAction.
ContextMenu and InfoButton Gesture
tests remain. Also resized info button
icon.
2015-08-04 16:48:41 -07:00
e43e14ec00 [Search] Remove unused dependency
Removed the generic search worker's dependency on
the object service, which it does not use.
2015-08-04 16:45:23 -07:00
c9acfc9f89 [Search] Tweak controller loading
Changed the controller to update the tree
display status when the search result
promise is fufilled, not before making the
search query.
Also chagned the loading increment from
5 to 20.
2015-08-04 16:40:31 -07:00
0bf510ca08 [Documentation] Add more useful patterns
MissionControl/vista#21
2015-08-04 16:31:01 -07:00
fc0c902886 [Documentation] More service infrastructure
MissionControl/vista#21
2015-08-04 16:11:13 -07:00
f8dd69bbfa [Documentation] Complete framework arch
MissionControl/vista#21
2015-08-04 14:55:52 -07:00
926ee14546 [Documentation] Add composite services notes
MissionControl/vista#21
2015-08-04 14:23:23 -07:00
66408eeec8 [Mobile] Gestures
Now to dismiss bubble, touch anywhere
the touch will not fire other gestures
(such as the pressing of another object).
2015-08-04 13:41:48 -07:00
aea286779e [Documentation] Add custom renderer
MissionControl/vista#21
2015-08-04 13:37:45 -07:00
55d52d060a [Documentation] Switch to marked
Switch markdown generator to something more up-to-date,
MissionControl/vista#21.
2015-08-04 13:20:19 -07:00
d23f4de36a [Search] Cleanup
Variable names, and unused parameters.
2015-08-04 13:16:29 -07:00
503bae661c [Documentation] Add more description to framework
MissionControl/vista#21
2015-08-04 13:15:19 -07:00
d82be0deef [Search] Remove unused parameter 2015-08-04 13:14:20 -07:00
eab140df48 [Search] Generic search roots constant
Made a constant for the generic search roots,
rather than depending on roots[].
2015-08-04 13:10:29 -07:00
15e39e00c2 [Search] Search aggregator return type
The search service returns objects containing
searchResult objects.
2015-08-04 13:07:47 -07:00
077a0ce3e3 [Search] Changed array to dictionary
for faster lookup times in the search aggregator's
filterDuplicated function.
2015-08-04 13:06:04 -07:00
5711b2b241 [Search] Fixed file paths 2015-08-04 13:04:52 -07:00
d9a1b9d530 [Search] Moving files
Moved the elasticsearch provider to
platform/persistence/elastic. Then moved
the search aggregator and the generic
provider into a services folder within
the search folder.
2015-08-04 13:03:34 -07:00
b6c1eadb91 [Search] Generic search roots constant
Made a constant for the generic search roots,
rather than depending on roots[].
2015-08-04 11:48:28 -07:00
56265c2277 [Search] Search aggregator return type
The search service returns objects containing
searchResult objects.
2015-08-04 11:39:09 -07:00
9ea1d24121 [Entanglement] Add LocationCapability
DomainObjects with a context capability also gain a LocationCapability.

This capability allows you to determine the location of the current
instance of a domain object, and also provides methods for determining
if the current instance of a domain object is a link, or if it is an
original.
2015-08-04 11:24:50 -07:00
40e85b718d [Creation] Store location of new objects
The creation service stores the location (the full path) to
the domain object as "model.location"
2015-08-04 11:24:50 -07:00
bbce5c3154 [Search] Changed array to dictionary
for faster lookup times in the search aggregator's
filterDuplicated function.
2015-08-04 11:19:34 -07:00
c869aaf91a [Search] Fix file paths 2015-08-04 11:10:49 -07:00
5b0bf0a0ba [Search] Moving files
Moved the elasticsearch provider to
platform/persistence/elastic. Then moved
the generic provider out of its folder.
2015-08-04 11:05:32 -07:00
ec87ac7652 [Search] Comments 2015-08-04 10:37:47 -07:00
8f65c73c8a [Search] Recompile CSS
To make changes to the Sass reflected.
2015-08-04 10:36:46 -07:00
35316dc31c [Search] Clean up
Removed additional reference to searhc UI, as well
as correct persistence provider.
2015-08-04 10:35:15 -07:00
b6bb689ccc [Search] Remove search UI files
Leaving only search service related files.
2015-08-04 10:31:52 -07:00
3d524d7572 [Mobile] AgentService
Replaced name queryService with agentService.
2015-08-04 10:11:25 -07:00
45bedb20c1 [Search] Comments and style 2015-08-04 10:01:54 -07:00
2ca3c6ea93 [Layout] Use consistent whitespace
Use consistent whitespace in array literals, WTD-1424.
2015-08-04 10:00:44 -07:00
9b922913a0 [Mobile] Gestures
Added styling to back and selection
arrow (tree). Also increased the space
allowed for selection arrow on tree item.
Info Button created on grid items for mobile.
Info bubble appears on tablet like desktop.
Also on mobile, info bubble fits to width.
New QueryService that returns if on iPhone.
Also formatted dialog box so that their is no
margin and takes up fullscreen on mobile.
2015-08-04 09:59:08 -07:00
4803eef907 [Documentation] Add initial arch. docs
Add initial architecture docs; remove docs folder
from gitignore, as the generated docs (which should
be ignored) have been moved to target/docs.
MissionControl/vista#21.
2015-08-04 09:55:15 -07:00
4240e8843b [Documentation] Begin adding arch diagrams
MissionControl/vista#21
2015-08-04 09:52:09 -07:00
4439e1680d [Search] Update CSS
Scrolling now does not move the search input
field. Load more text always stays on one line.
2015-08-03 13:49:53 -07:00
5569ef8b2d Revert "[Search] Update CSS"
This reverts commit e05f16d780.
2015-08-03 13:39:22 -07:00
e05f16d780 [Search] Update CSS
Slight tweak to the padding of the search view,
which affects where the top of the scroll bar
appears. Also removed the search scroll div
because it was unused.
2015-08-03 13:26:29 -07:00
ae7fc27c9e [Documentation] Copy over css, png files
...in addition to .html files. MissionControl/vista#21
2015-08-03 12:49:35 -07:00
ff5e7486bc [Documentation] Move doc sources
Move doc sources to docs/src MissionControl/vista#21
2015-08-03 12:46:47 -07:00
867b5f726a [Documentation] Changes doc output directory
MissionControl/vista#21
2015-08-03 12:34:12 -07:00
a4c704a5a2 [Layout] Ensure minimum frame size
Ensure default frame size in a layout is not small,
even if the grid size for the layout is very small.
WTD-1424.
2015-08-03 12:18:49 -07:00
e928e02b1c [Search] Update tests
Updated the search controller test to work with
the changes to loadMore
2015-08-03 11:48:50 -07:00
1cd6685b36 [Search] Update loadMore
The controller's loadMore function now sends
new queries to the search service if the
controller's full results list does not have
enough results in it to load more.
2015-08-03 11:44:56 -07:00
695582b30f [Search] Clean up 2015-08-03 11:38:47 -07:00
d0bad46627 [Search] Style
Removed use of the keyword 'catch' when dealing
with promises, and instead used the second
parameter of then.
2015-08-03 10:46:34 -07:00
eb0bdba666 [Search] Moved isLoading
Moved the isLoading function away from
the aggregator. It is now the controller's
responsibility. Corresponding tests
updated.
2015-08-03 10:45:30 -07:00
19b9668190 [Search] Restoring web worker tests 2015-08-03 10:21:50 -07:00
59d4c362f6 [Search] Temporarily remove web worker test 2015-08-03 10:13:00 -07:00
9be646f1e7 [Search] Moved search folder location
Moved search from platform/features/search to
platform/search. Added more style corrections.
2015-08-03 09:51:36 -07:00
164d5485e9 [Search] Wrote provider test
Completed tests for GenericSearchProvider.
Also fixed style in other tests.
2015-08-03 09:36:13 -07:00
7678289ead [Search] Wrote worker test
Completed tests for GenericSearchWorker.
2015-07-31 16:37:11 -07:00
2a62494296 [Search] Wrote provider test
Completed tests for ElasticsearchSearchProvider.
2015-07-31 15:27:02 -07:00
ae94ba73d7 [Search] Wrote aggregator test
Completed tests for SearchAggregator.
2015-07-31 11:33:58 -07:00
560a2e035e [Mobile] Info Button
Added info button to grid/list items
on mobile. When the button is pressed,
info bubble appears for 750ms or the
same infobutton is pressed to dismiss
immediately.
2015-07-31 11:13:52 -07:00
5b3f78287e [Search] Wrote controller tests
Completed tests for SearchController and
SearchItemController.
2015-07-31 10:40:16 -07:00
4bb000dd93 [Search] Writing tests
Created files for all the tests to write.
2015-07-31 09:38:45 -07:00
06d9b68406 [Search] Comments 2015-07-31 09:38:05 -07:00
eca52a8ca6 Merge remote-tracking branch 'upstream/master' into mobile_3 2015-07-31 09:09:31 -07:00
64e2de7aa6 [Documentation] Add a build step
Support generation of non-API docs using
npm run docs. Supports MissionControl/vista#21
2015-07-30 16:36:17 -07:00
3a3e98cc48 [Search] Update provider timeout
Added a timedOut property to the provider's
return object. Changed the generic search
worker to stop if it reaches timeout.
2015-07-30 16:35:26 -07:00
ee64ef5fc1 [Documentation] Generate docs with diagram
Convert Markdown+nomnoml -> HTML+PNG for
MissionControl/vista#21
2015-07-30 16:16:33 -07:00
6e11941ae9 [Search] ES Provider error checks
The elasticsearch provider returns an empty
result when elasticsearch throws an error
(probably a bad request). This prevents the
aggregator from thinking that ES is loading
infinitely.
2015-07-30 15:47:09 -07:00
ad482600de [Documentation] Begin adding doc generator
Begin adding Markdown->HTML documentation generation
with nomnoml embedded diagram support.

MissionControl/vista#21
2015-07-30 15:40:43 -07:00
7c89e4aa4a Merge branch 'master' of https://github.com/slhale/openmctweb into search 2015-07-30 15:08:33 -07:00
f8471bc944 [Search] Comments 2015-07-30 15:04:42 -07:00
15b7e3ac9b [Search] Aggregator returns result object
The aggregator now returns a result object similar
to that of the providers, but the hits array contains
domain objects rather than searchResult objects.
Also removed overly complicated filterRepeats
function from the aggregator and replaced it with a
simpler one.
2015-07-30 14:57:15 -07:00
2983ebb2c6 Merge branch 'mobile_3' into mobile 2015-07-30 14:11:08 -07:00
25e8bb44d2 [Mobile] Item Height
Adjusted item height in
folder/layout list to be
automatically same as the
list object, not flowing over.
Applied to both phones and tablets.
2015-07-30 14:10:43 -07:00
51bc7c6a7f [Search] Generic tracks total hits
The generic search worker keeps track of the total
number of search hits before truncating to match
the max results.
2015-07-30 14:06:35 -07:00
60dad014cc [Search] Changed provider return type
The provider now returns an object that has
a hits property which contains what it
previously returned, and also a total property
which contains the total number of results.
2015-07-30 13:54:56 -07:00
1a8eece90f Merge branch 'mobile_3' into mobile 2015-07-30 13:35:40 -07:00
85658d3d1f [Mobile] Tests
Removed tests causing incomplete
build.
2015-07-30 13:33:59 -07:00
a7cd6d8807 [Search] Removed name field form ES provider
Removed the name field from the ElasticSearch provider
search query string, so now it will check all of the
fields of the domain object (such as type).
2015-07-30 13:32:34 -07:00
ddce0f371d [Mobile] Test
Removed extra mockEvent from test.
2015-07-30 13:32:24 -07:00
495cd06ed5 [Mobile] Tests
adjusted test to fill empty
functions.
2015-07-30 13:30:03 -07:00
1624866656 [Mobile/Bug] RemoveAction
When removing object you have
openned, now compares the currentObj
id with the removed obj id, resulting
in navigating to parent if they are the
same.
2015-07-30 13:27:56 -07:00
bce56c53ed [Search] Clean up
Updated comments and documentation. Changed the generic
worker to return results as {id: score} key value pairs
rather than {id: {score: score}} format. Removed unused
getLatestResults and getLatestTimestamps functions from
the providers.
2015-07-30 13:27:45 -07:00
0b3170d2ef [Tests] Remove logs
Remove protractor logs, WTD-1489
2015-07-30 12:54:26 -07:00
2d1aa65d63 [Mobile] Test
BrowseController test adjusted to
repeat less code.
2015-07-30 12:50:39 -07:00
7e7754f9aa [Tests] Add license headers
Add license headers to protractor test scripts,
WTD-1489.
2015-07-30 12:50:13 -07:00
3a96a246a4 [Tests] Ignore protractor in build
Ignore protractor test folder from command line build,
WTD-1489
2015-07-30 12:44:49 -07:00
24682c5f7a [Tests] Add protractor instructions
Add protractor instructions to top-level README, WTD-1489.
2015-07-30 12:42:50 -07:00
28365602f0 [Tests] Comment out failing tests
WTD-1489.
2015-07-30 12:39:05 -07:00
2c5da44e5e [Search] Clean up
Removed the timestamp as an optional parameter
of the search aggregator's query(), and now it
instead automattically generates one before
querying the providers.
Also attempted to fix loading, but did not
complete (commented out).
2015-07-30 12:38:03 -07:00
a03046400c [Tests] Separate out page launcher
WTD-1287
2015-07-30 12:29:02 -07:00
d5c835e777 Fixed Delete not working in protractor 2015-07-30 12:28:40 -07:00
af630d1b3e Add Protractor Directory 2015-07-30 12:28:29 -07:00
c333a2e70a [Mobile] Test
Repeat of test variable deleted.
2015-07-29 16:31:38 -07:00
6b613f234b [Search] Clean up comments 2015-07-29 15:22:46 -07:00
1619f236cf [Search] Updated search service interface
The search service's interface now just consists
of the two functions query() and isLoading().
query() returns a promise for an array or results,
which eliminates the need for timeout polling like
was previously done. The search providers
have also been changed to reutrn promises.
2015-07-29 15:07:13 -07:00
906354764b [Mobile] Tests
Has way to make isMobile call
true or false for mobile/nonmobile
devices.
2015-07-29 15:06:39 -07:00
12ec293f3d [Mobile] Tests
Changed BrowseController and RemoveActionSpec to account
for grandparent and navigation usage. Also changed
RemoveAction variable name.
2015-07-29 13:57:11 -07:00
bdf8b4d3f1 [Mobile] Test for Back Arrow
Added tests for the backarrow and
when it appears/disappears.
2015-07-29 13:22:47 -07:00
5ee8dd239b [Search] Comments 2015-07-29 13:17:50 -07:00
6e60088b11 [Mobile] RemoveAction
Removed console and added
navigationService (mock) to the
spec version.
2015-07-29 11:58:53 -07:00
97bf530b1d [Mobile] BackArrow
Removed the BackArrow console log
that was getting called in the
BrowseController.
2015-07-29 11:41:10 -07:00
18348476c6 [Mobile] RemoveAction Tweak
If you remove an object you are
currently within/opened, then on
removal of it you navigate to the
parent of whatever you removed.
2015-07-29 11:38:47 -07:00
7e35e55f0b [Mobile] Hide Back Button
When you are at the highest level the
back button fades out and is unclickable.
When you are able to go up a level the
back button appears/fades in and is
pressable. Also removed the object type
name from the header.
2015-07-29 11:13:09 -07:00
f2cd55d6cd [Search] Cleaning up
Cleaning up code in generic serach provider. Removed
unnecissary return statements. Moved indexing via web
worker from getItems() loop to within itemsHelper().
Commented out timeout, becuase seems unnecissary.
Changed all date.getTime() to Date.now(). Indexing
has undefined checking.
2015-07-29 11:01:38 -07:00
28a2a5b92a [Mobile] Tweaks to layout
Removed the user-select option
for the context menu and bottom bar
on mobile. Also edited the folder
grid item so that its icon rep
size is not overly large.
2015-07-29 10:39:17 -07:00
639cf1cf59 [Search] Generic indexes once
Changed the generic search provider to index the
file tree only once when it is initially called.
This assumes that the contents of the file tree
will not change significantly within the course
of a use session (and some changes may be caught
by other search providers).
2015-07-29 10:28:07 -07:00
d262520594 [Mobile] Tree menu Open
Tree menu select arrow button's width
is now size of full button. Prior to this
the pressable area was less and therefore
less responsive.
2015-07-29 10:25:09 -07:00
7cc14a195b [Mobile] Tests/Header
Removes back arrow on desktops.
Also added queryService to tests
for the context menu action and
gesture.
2015-07-29 10:00:03 -07:00
84b9e4d781 [Mobile] Context Menu
Context menu next to object header
now dismisses when touching away
from it. Also, when long touching
an object, the context menu appears.
Set on 500ms timeout.
2015-07-28 17:09:15 -07:00
ce433a01b2 Merge branch 'master' of https://github.com/nasa/openmctweb into search 2015-07-28 17:04:44 -07:00
495d8c9830 [Search] Search term processing
The search term processor for ElasticSearch now
removes extra spaces from inside of the search
term (to avoid some ES errors).
2015-07-28 17:04:29 -07:00
52e0476d24 Merge branch 'mobile_3' into mobile 2015-07-28 15:57:02 -07:00
86340623f7 Merge remote-tracking branch 'upstream/master' into mobile 2015-07-28 15:56:43 -07:00
356fa73c91 [Mobile] Tests
Test created for backArrow
that spies on all objects
used to find parent.
2015-07-28 15:55:22 -07:00
a073ef69ac [Mobile] Back Arrow
Shifted Back Arrow down to
align with header.
2015-07-28 15:15:42 -07:00
3c6c420023 [Mobile] Back Arrow
Back Arrow implemented
by getting parent and then
navigating to it.
2015-07-28 15:08:14 -07:00
2ffe1cdff9 [Build] Bump version number
Bump version number, add snapshot status to begin sprint
Triton, WTD-824.
2015-07-28 13:30:39 -07:00
32b58715c6 [Search] Fixed scrolling and layout edit
Changed the CSS so that scrolling for the tree and
search results works again. Additionally, layout
editing works again.
2015-07-28 12:33:22 -07:00
1a9dd2f144 [Search] Comments
Updated documentation. Removed unnecissary dependency
fom generic provider.
2015-07-28 11:33:29 -07:00
21964fe68e [Mobile] Demo Setup
Added lines to circle.yml
for mobile demo branch.
2015-07-28 11:08:10 -07:00
62714bb97c [Continuous] Deploy to staging-un 2015-07-28 11:04:09 -07:00
2a4943f584 [Mobile] Console
Removed call to console so
mvn clean install would compile.
2015-07-28 10:58:22 -07:00
e32403a75f [Mobile] Clean-Up
Cleaned the unused code for the
backArrow and long touch gestures.
Commented out functions for later use
Currently shows the back arrow, however,
only will print to console on press.
Edited tests where mobile checks were breaking
and fixed.
2015-07-28 10:56:29 -07:00
d6a7dc9820 Merge branch 'search' of https://github.com/slhale/openmctweb into search 2015-07-28 10:17:15 -07:00
dc53cf60d1 [Search] Style
Made style compliance changes.
2015-07-28 10:15:05 -07:00
e0e5ad1347 [Search] Removed console output
Accidentally left in a console.log statement
2015-07-28 10:04:31 -07:00
a6b11354cd [Search] Removed console output
Accidentally left in a console.log statement
2015-07-28 10:03:22 -07:00
f7c0cb6214 Merge branch 'search' of https://github.com/nasa/openmctweb into search 2015-07-28 09:51:17 -07:00
561d671181 [Search] Fix to pass test
Changing TreeNodeController's isSelected function
back to original, so that it doesn't break tests.
2015-07-28 09:50:50 -07:00
d569b13101 [Continuous] Deploy to staging-un 2015-07-28 09:40:16 -07:00
b0c42c12b7 [Mobile] Back Arrow
Changes URL correctly that
is printed to the console. Is the
url to up one level of objects.
However not navigating to that
object.
2015-07-27 17:01:30 -07:00
621ccc25ec [Mobile] Back Arrow HTML
Created HTMl for back arrow,
next neew to hook up a click.
2015-07-27 15:31:47 -07:00
617df739ee [Mobile] persistence
Removed elasticsearch.
2015-07-27 15:26:09 -07:00
6e43a92191 [Mobile] Merge
Fix Conflicts.
2015-07-27 15:21:59 -07:00
84486f2086 [Search] Fixed empty search
Pressing enter on the searchbar before putting
any input would before hide the filtree when
it shouldn't. Now it does not.
2015-07-27 14:12:49 -07:00
dc79f460e5 [Search] Fixing conflicts 2015-07-27 13:34:12 -07:00
7cac858697 [Search] Cleanup
Updated documentation. Removed most unused funtions.
Removed references to the search service in the
search template -- necissary functions added to
the search controller.
(Search in a 'working' state again.)
2015-07-27 13:25:35 -07:00
a3977a18f0 [Search] Results polling in aggregator
Moved the polling for most recent results
from the search controller to the search
aggregator.
Also changed ng-change back to ng-keyup
in the search template.
2015-07-27 12:59:32 -07:00
5e858f73d5 [Search] Changed ng-keyup to ng-change
In the search template. Also small comment change.
2015-07-27 11:55:42 -07:00
a9418fd2c7 Merge remote-tracking branch 'upstream/master' 2015-07-27 11:32:41 -07:00
1d7a0fa48d [Mobile] Removed InfoGesture
Commented out infogesture.
2015-07-27 11:30:29 -07:00
30c530178a [Mobile] No ContextMenu
Removed context menu code
started to be used for the
long hold gesture.
2015-07-27 11:01:03 -07:00
3d0795cde3 [Mobile] Starting Context
Added check to make sure
user is touching only one object.
Started contextmenugesture to be
long touch, however currently long
touch is still infogesture.
2015-07-27 10:20:08 -07:00
181fb32a2a [Search] Responsibility change (in progress)
Attempting to move some responsibility from
the search controller to the aggregator.
(Committing for save before possible revert.)
2015-07-27 10:04:09 -07:00
232a648fbd Merge branch 'master' of https://github.com/nasa/openmctweb into search 2015-07-27 09:14:52 -07:00
d35a149108 [Search] Remove unused controll
Removed searchbar controll, as the control to
use would be the provided textfield control.
2015-07-24 16:52:55 -07:00
c85a3787c0 [Mobile] User-Select
Edited user-select used in
panes' layout to only
happen on phones and tablets
(just to be safe).
2015-07-24 16:46:45 -07:00
066258ab83 [Mobile] User-Select
Removes the copy/define
mobile safari menu that
appears during some touch events.
Only apply to left and right panes.
2015-07-24 16:19:15 -07:00
ddc2295ec3 [Mobile] Touch Hold Gesture
Rough touch hold gesture added
to the info gesture. Currently
if you hold on an item (that you
would normally hover over) for
500ms, you get the info gesture pop
up.
2015-07-24 16:02:06 -07:00
011e6fc512 [Mobile] Clean Up
Moved Mobile check in InfoGesture to
call on mouseEnter.
2015-07-24 15:27:33 -07:00
dca0014862 [Search] Removed unused
Removed incorrect 'uses' statements from
bundle.json. Also removed unused controller
ToggleController. Edited some comments.
2015-07-24 15:08:43 -07:00
6b02295bf4 Merge branch 'master' of https://github.com/nasa/openmctweb into search 2015-07-24 14:20:27 -07:00
05c43db6fe [Search] Search input using the model
Made the search bar text input go to ngModel.input,
rather than getting the text manually from the DOM
element. Additionally, removed the search service
from the search controller's scope.
2015-07-24 13:04:48 -07:00
9143f5febd [Search] Comments and errors
Changed TreeNodeController slightly to do error
checking. Also updated some comments.
2015-07-24 13:03:18 -07:00
91bd58215a [Mobile] Size Adjustment
Moved hamburger icon slightly up
using the padding instead of
margin.
2015-07-24 12:38:01 -07:00
b37ee19fbc [Mobile] Size Adjustment
Adjusted indentation size
on the tree. Also change size of the
hamburger icon to match the
object icon and moved it slightly
down.
2015-07-24 12:35:19 -07:00
2355d354b3 [Mobile] Items List
Flushes items left and
vertically centers the
title/details. Also cleaned
up the items classes in sass
files.
2015-07-24 11:46:58 -07:00
300280e03e [Search] Moving responsibility
Moving the responsibility of polling for updates
from the search controller to the search aggregator.

In progress. Previously this prototype was what
could be called semi-stable, but now it is no longer.
2015-07-23 16:58:25 -07:00
200c6e49fc [Mobile] Test
QueryService (mock) added to the
ContextMenuGestureSpec to account
for isMobile call that allows/
disallows use of contextmenu
gesture.
2015-07-23 16:55:45 -07:00
a89f9eed42 [Mobile] Grid List/Gestures
Context menu only shown with contextmenu
click on desktops (non-mobile devices). Also
edited items list in a folder's representation
to show the icon on the left side, with text
centered horizontally (only mobile).
2015-07-23 16:47:57 -07:00
341218e8f6 [Search] Tree hide change
The tree is now hidden whenever there is
text in the search bar. (This allows for
the case when there are no search results,
but text in the search bar.)
2015-07-23 16:24:38 -07:00
33e8084852 [Search] Getting input text
The controller now gets the input text from the
DOM element ID, then passes that string along
to the search service, instead of passing the
raw ID.
2015-07-23 16:13:26 -07:00
7d495f6389 [Search] Hide tree
The tree is hidden when there are
search results.
2015-07-23 15:55:20 -07:00
f4d34a2a9c [Search] mctControl for searchbar
Attempting to generalize the searchbar using
mct-control. In progress.
2015-07-23 15:29:19 -07:00
0feab1965c [Search] Attempt at scroll bars
Attempted to make the search results scroll,
but failed for now. Created a div for the
search results, load icon, and load more
button, which are the elements desired to
be scrolled. Did not work because search
result labels have absolute position text.
2015-07-23 15:12:13 -07:00
7993e4c03f [Mobile] Gestures
Removed the hover coloring on
the tree menu on mobile by changing
original** scss code. Also added
check in ContextMenuGesture that
will only allow context menu to appear
in non-mobile browser.
2015-07-23 15:01:14 -07:00
b592b89dc8 [Mobile] Clean Up
Removed unnecessary transitions.:
2015-07-23 14:15:01 -07:00
d115166dde [Mobile] Comments
Added comments and removed
unwanted spec test code for
BrowseController.
2015-07-23 13:48:21 -07:00
d176f9f811 [Mobile] Test
Fixed BrowseControllerSpec.js to
account for the .treeslide
call and added a new test for thatasds
2015-07-23 13:46:46 -07:00
aa17d3034e [Search] Fixed excessive calls to setSelection
There were excessive calls to TreeNodeController's
setSelection() due to a modification for search
compatibility. Changed to not call as often.
2015-07-23 13:32:15 -07:00
52a9fcf5d6 [Search] Changed highlight size
The search item highlight when selected or
hovered over is now talled, and the margin
between search items is reduced to
counteract any effect to spacing.
2015-07-23 13:29:11 -07:00
143e3eeb6c [Mobile] CleanUp/Tests
Added tests inside spec files
for the QueryService, TreeNodeController,
and InfoGesture. Also cleaned up the
tree so that padding is used between
buttons instead of margins.
2015-07-23 13:19:58 -07:00
7b271dcb6b [Search] Highlight transitions
Added transitions for when objects get
highlighted from selection or hover.
2015-07-23 13:14:20 -07:00
2680e466fa [Search] Tree selection syncs
Selecting something in the search results now
also makes it selected in the filetree. It
remains selected even when the search results
are cleared. (The filetree does not
automatically expand to that position though.)
2015-07-23 12:47:21 -07:00
29d5535e7c [Search] Changed search load time
Changed how frequently the search controller
checks for updates. This makes the load icon
dissapear faster, and looks more natural. But,
may affect performance.
Also changed the point at which the loading
status becomes 'true'. Made it earlier, at
the beginning of the controller's update().
2015-07-23 11:48:19 -07:00
ebb5474b34 [Search] Hover and loading
Added styling to result items when they are
hovered over.
Also added a loading icon.
2015-07-23 11:41:17 -07:00
4759162bb7 [Search] Added right padding
Added padding to the right side of the
search holder to match the tree holder's
padding.
2015-07-23 11:08:31 -07:00
deba184103 [Search] Selection remains across queries
The selected object in the search results now
remains selected even after a new search is made.
It also will remain selected if it is clicked
on the file tree, but the file tree version is
not yet selected if it is clicked on the search
results list.
2015-07-23 10:56:38 -07:00
c65a278fcf [Search] Selecting results works
Can now click on search results. The view will
be updated, as well as the selected object
being higlighted.
2015-07-23 10:50:00 -07:00
50ce800c2a Merge branch 'master' of https://github.com/shivamndave/openmctweb 2015-07-23 09:51:33 -07:00
1a1eecb4c3 Merge remote-tracking branch 'upstream/master' 2015-07-23 09:51:10 -07:00
b3bc8b6876 [Mobile[ Tests
Added jasmine test for

QUerySerivce and adjusted
the InfoGestureSpec to
account for use of
QueryService.
2015-07-23 09:28:36 -07:00
8c08f7b93e [Search] Less space above tree
Removed the awkward spacing between the filetree
and the search bar. Now 'My Items' appears just
below the search bar.
Also added .search-holder to the sass, but haven't
done anything with it yet.
2015-07-23 09:25:10 -07:00
501e426868 [Search] Centered load more button
More correctly centered the load more button,
so that when the left panel is resized,
the button remains in the middle.
Additionally, added more comments to the sass.
2015-07-22 16:35:41 -07:00
8f1f4eb177 [Search] Generic search gets all roots
Generic search now automatically finds all
the roots before searching.
2015-07-22 16:21:38 -07:00
b0e7dca985 [Search] Empty search resets results
When there is no input into the search bar
no results are displayed/displayed results
are removed. This is because the search
providers were changed to return empty
arrays for empty search strings.
2015-07-22 16:09:14 -07:00
b16af5fe3e [Search] Renaming search and searchbar
Changed what was previously just 'search' and
renamed to 'search view'. Then, took what was
previously 'searchbar' and renamed to
'search'.
2015-07-22 15:43:28 -07:00
1f7ba70ad7 [Mobile] Scroll Bug
Removed scrollbar that appears in landscape
mode in tree menu.
2015-07-22 15:21:34 -07:00
1dbe039be8 [Search] Load more button style
Styled the load more button to match
the general theme.
2015-07-22 15:17:27 -07:00
d82538a799 [Search] Item background highlight
Each result item now has a highlighted
background, with correct rounding of
edges. Need to now detect when to
highlight (on selection).
2015-07-22 14:48:14 -07:00
57d45b24be [Search] Removed Search View
Removed the search view from bundle.json because
the search in the left panel is the actualy
UI for searching. The search view is temporary.
2015-07-22 13:46:40 -07:00
dcd4006017 [Search] Positioning fixed
Fixed the search results so that they
now display correctly, with overflow
hidden, and no unusual positioning.
Also changed font size to 0.8em.
2015-07-22 13:43:54 -07:00
7aba3b6672 [Mobile] Clean Up
Removed gap below bottom bar. Moved
around constants for the resizing
of the tree. Also added comments in
layout and reformatted that slightly.
2015-07-22 12:53:49 -07:00
3ae681c79c [Search] Colors and positioning
Corrected the colors back to the normal
style. Also made the text on the same
line as the icon, but this fix is a
temporary one.
2015-07-22 12:33:20 -07:00
ab3d3ec45b [Search] Overflow text
Overflow text on the search item labels
is now hidden, with ellipses.
New problem: Text is  on a different
line than the icon.
2015-07-22 11:48:13 -07:00
ff3770c9ee [Search] Added css classes
Added classes to the HTML so that CSS and
Sass could get access to style the
searchbar items. The structure for styling
is now mostly set up.
2015-07-22 11:21:14 -07:00
bcc1e2e26f [Search] Starting front-end
Starting to modify the front-end so that
the searchbar appears in the tree view
area. Made the tree holder have relative
position so that the searchbar is visibile
for now. (Later will be different.)
2015-07-22 10:38:56 -07:00
926b3d075c [Mobile] Clean Up
Cleaned up scss files. Removed
repeated statements and added
comments. Also commented js files
like QueryService and InfoGesture.
2015-07-22 10:25:21 -07:00
b5f8e6d90c [Search] Updating searchbar
Updating the searchbar to be again more
similar to the search view. It now has
a 'load more' button, but it is not
clickable for some reason. In progress.
2015-07-21 16:21:23 -07:00
827cb27f28 [Mobile] Menu
Added margin to top of tree list items.
Also removed hovering Info coming
up on mobile devices.
2015-07-21 16:19:59 -07:00
739fa423c5 [Search] Added wildcards to generic
Added wildcard support to the generic
search provider. In this case, wildcards
behave just like spaces.
2015-07-21 16:10:35 -07:00
5f30249065 [Search] Load more option
Made the search view have a 'Load more'
button. Added functionalty to allow this
to happen.
2015-07-21 15:56:28 -07:00
4191bc1ac3 [Search] Comments
Updated the documentation.
2015-07-21 15:31:23 -07:00
92df11acc1 [Search] Readded ElasticSearch provider
Previously had removed the elasticsearch provider
from bundle.json so could work on the generic
search web worker. Now have modified the
elasticsearch provider to match the new interface
with the aggregator, and it works.

At this point, search is 'working'
2015-07-21 15:14:07 -07:00
416bd82589 [Search] Cleanup
Removed a couple of unnecissary things, and fixed
up the comments.
2015-07-21 15:05:08 -07:00
7934e8d425 [Search] Changed worker result implementation
The interface remains the same, but the web worker
returns a pseudo dictionary (actually an object)
after being told the search. The key value pairs
for this dictionary are ids and scores.
2015-07-21 14:55:44 -07:00
0842f464db [Mobile] Menu Adjustment
Makes highlight go all the way to right.
Also makes the arrow be absolute on the
right side, making it aligned to right.
2015-07-21 14:29:13 -07:00
5a93e5a2bc [Search] Correct search updating
The search controller now updates the display
results list, then repeatedly asks the
aggregator to update until the timestamps
all are at least as new as the one that the
controller originally gave for the query.
Basically, the search now updates correctly
without having to press enter again.
2015-07-21 14:24:37 -07:00
56e51ea32a [Mobile] Reformat of menu
Reformats menu to move the
arrow to the right and now
that is what selects an object.
Pressing the actual menu item will
enact the dropdown menu. This
only happens on mobile platforms.
2015-07-21 13:29:45 -07:00
41c38f202d [Search] Comments
Removed extra commented out code.
2015-07-21 13:04:03 -07:00
f0f396f656 [Search] Needs more updating
The search aggregator now correctly gets
from the providers, but because of not
sync, the display is effectively one press
behind the correct search results.
Still, working to some extent.
2015-07-21 12:59:52 -07:00
a5febf8f0f [Search] Removed paging
Removed the paging from the search view,
because later instead of paging there will
be a 'view more' option.
Also made the generic search provider
return searchResult objects instead of
raw domain objects.
2015-07-21 12:44:14 -07:00
4f4af87285 [Search] Added timestamp to queries
(Temporariliy removed the elasticsearch provider
from bundle.json)
Added a timestamp parameter to the query so that
the aggregator can tell when the results were last
updated. Created a separate function for getting
the results list. GenericSearch now converts back
from models to domain objects after the web worker
does its work.
2015-07-21 12:34:08 -07:00
1b5fbccc06 [Search] Removed validType function
Removed the validType function which previously
was a paraemter to the search providers. It
was no longer used, and is not necissary.
2015-07-21 11:17:45 -07:00
fc123cd367 [Search] In progress webworker
Connecting GenericSearch to the web worker is still
in progress. The aggregator currently gets the
results before the web worker is finished. In process
of fixing sync issue.
2015-07-21 11:14:13 -07:00
a0f4b98eed [Search] Webworker search
The web worker's search() appears to work. Now
we just need to link it in to the GenericSearch
as the primary means of searching.
2015-07-21 10:35:33 -07:00
7adcfc221a [Serach] Webworker indexes items
The indexItem() part of the web worker seems
to be working at this point.
2015-07-21 10:10:34 -07:00
c1dcd8ea5b [Search] Framework of webworker implementation
Made a basic outline of the desired web worker
implementation. (Functions present, now need to
implement them.)
2015-07-21 09:58:19 -07:00
74961e1106 [Search] Starting on workers
Starting to work on using web workers to
do some of the work of GenericSearch.
Changed bundle.json accordingly.
2015-07-21 09:44:14 -07:00
c79d1f2648 [Search] Choose higher score & optional parameters
Changed the search aggregator's filterRepeats
function to choose the version of the searchResult
object that has the higher score, when it
encounters multiple searchResult objects
corresponding to a domain object ID.
Also changed the search providers and aggregator
such that the validType parameter is now optional,
with a function that always returns true as the
defualt.
2015-07-21 09:41:52 -07:00
f4bd7d7a44 [Search] Revert to earlier commit
Reverted to before implementing next(). May re add
back some changes, such as removing validType and
then adding web workers.
2015-07-20 17:02:08 -07:00
1891b24bde [Search] Dump before revert
Commtting changes so far before revering
to a previous commit. Most changes to make
next() have been unneccsiary. We no longer
want next().
2015-07-20 16:56:39 -07:00
5520037908 [Search] Partial loading
Changed the providers to return only the first
search result. Each searchResult object has a
function next() which returns the next search
result. This allows the search aggregator to
load more results without making a whole new
search query. (Still requuires some cleaning
up.)
2015-07-20 14:30:22 -07:00
c0c0371451 [Search] Timeout passed from SearchAggregator
The timeout value is now an optional
parameter of the providers, and
the search aggregator now passes a
common default value to all of them.
2015-07-20 11:21:55 -07:00
ed956d351d [Search] Elasticsearch timeout
Added a term to the elasticsearch query
that should make it time out. Apparently
this only works sometimes, as ES uses a
'best effort' timeout.
2015-07-20 11:08:43 -07:00
e9e9ca146b [Search] Generic search timeout
Added a time limit for generic search's indexing
of the filetree, at which point it will just
return the portion of the filetree it has
indexed.
Additioanlly attempted to move this part of
the functionality to a webworker, but is not
working because of unclonability of the
objects. (Commented out)
Also updated some documentation comments.
2015-07-20 10:59:02 -07:00
dcdafbaebf [Mobile] Fix Shift
Shifting occurring during transition
fixed by making transition backface-
visibility hidden during the
transition.
2015-07-20 10:25:27 -07:00
f98915cddd [Mobile] Comments
Added comments to the mixin list.
2015-07-20 09:51:37 -07:00
4e6c307684 [Mobile] Transition
Adjusts transition time on fade.
2015-07-20 09:48:12 -07:00
ce6d74390e [Mobile] Clean-Up
Removed unnecessary classes. Also added
comments and adjusted menu sizes.
2015-07-20 09:39:06 -07:00
6e406fd060 [Mobile] Right Pane sets
Right pane sets the size of itself,
causing the left pane to re-adjust
to fit the screen based on it. Also
transitions work on the slide and the
fade in.
2015-07-20 09:16:28 -07:00
2614427e0e [Mobile] Fix
Fixed to open menu fully.
2015-07-17 14:32:33 -07:00
e8b662571b [Search] Not case sensitive
Made sure that generic search's matching is
not case sensitive.
2015-07-17 14:06:48 -07:00
2a784115d5 Merge branch 'master' of https://github.com/nasa/openmctweb into search 2015-07-17 13:49:19 -07:00
9f5f14826b [Search] Changed generic's matching implementation
Changed how the generic search provider determines
search matches. It now splits the search input into
search terms by spliting at spaces, and then scores
the results by how many of the terms appear as
substrings in the result.
2015-07-17 13:49:09 -07:00
c75d94289b [Serach] Callbacks and renaming
Added validType() as a callback parameter to the search
providers. It is defined in the search aggregator, and
is used to put any restrictions on object type in the
displayed search results.
Renamed EverythingSearchProvider to GenericSearchProvider.
2015-07-17 11:26:44 -07:00
272c6bca97 [Mobile] Create Menu
Create menu's is specified/overwritten
with 1000% (change) to fit on mobile).
Also gets rid of the right bar in that view.
2015-07-17 10:50:02 -07:00
0d7387080d [Mobile] Create Menu
Create menu text has ellipsis
attribute now, so if text is cut off
it will have a '...' appended to it.
Also added comments to mixins.
2015-07-17 10:28:19 -07:00
492dbcbc51 [Search] Comments and keypress
Changed the controller for the search input
to respond on keypress rather than keyup.
Added comments better explaining searchResult
objects to the search aggregator.
2015-07-17 09:33:10 -07:00
1e2e20b145 [Mobile] Comments
Added comments to the mixins.
2015-07-17 09:04:39 -07:00
c82163fa7b [Search] Comments and style 2015-07-16 16:54:53 -07:00
cf3169dd68 [Search] More generalized restrictions
Moved the EverythingSearchProvider's term to item
matching to new functions, so that they can be
more easily modified later.
2015-07-16 16:50:11 -07:00
c1ebd50e4c [Search] Result paging
The search view now can page the
results when there are many.
2015-07-16 16:31:54 -07:00
488829a20c [Mobile] Header
Removed type from header
along with the right side buttons.
2015-07-16 16:13:58 -07:00
85c7a36e25 [Mobile] Cleaned up
Set the width of the create menu
text/components to fit the menu
however it gets cuttoff sometimes.
Next steps are to Clean up screen,
change the create menu to fit the left side,
and fix bottom space.
2015-07-16 15:21:17 -07:00
442a1979e7 [Search] Rudimentary scroing for manual
Created a rudimentary scoring function for
the EverythingSearchProvider. Also corrected
the sorting by score function.
2015-07-16 14:36:02 -07:00
d99b4d75d8 [Mobile] Fix
Fixed the desktop version breaking.
CUrrent issue is hte menu is getting cut off.
2015-07-16 14:07:25 -07:00
922a724e36 [Search] Removed unused file
Removed SearchService.js, as now the searchService
is implemented using the aggregator and providers.
2015-07-16 13:26:23 -07:00
15a88967d0 [Mobile] Transition/Create Fix
Fix the create button to work and
also transition well. Added transition mixin
to stay DRY.
2015-07-16 13:22:07 -07:00
15a9d2380c [Search] Removed unnecissary dependency
Removed an unnecissary parameter from the
search aggregator ($q).
2015-07-16 13:11:00 -07:00
80e0bd875a [Search] Aggregator merges results
The search aggregator now merges search
results from different providers better.
It removed duplicate results, and orders
the list of results from highest to
lowest score.
2015-07-16 13:08:05 -07:00
6e6fbe0d65 [Mobile] Transitions
Made transitions properly work for
create button.
2015-07-16 12:54:10 -07:00
180e5f14ae [Mobile] Cleaned up
Made pane sass code more DRY by
using the phoneandtablet mixin
on repeated conditions.
2015-07-16 12:25:06 -07:00
e9314898d2 [Mobile] Portrait & Landsc.
Specifies amounts based on phone and tablet's
orientation. Not tested for the actual device,
but emulator. Also currently makes the create
button appear/disappear instead of smoothly sliding.
2015-07-16 11:50:55 -07:00
bc2072b8c6 [Search] Removed unused search provider
WARP search provider should not be
implemented here. And was not yet
implemented or used at all anyway.
2015-07-16 11:33:36 -07:00
25208a9074 [Search] Aggregator aggregates
The search aggregator now combines the search
results from each search provider and returns
that. Objects may appear in the list more
than once.
2015-07-16 11:31:30 -07:00
ce75d19480 [Mobile] Desktop
Cleans up the _layout by making the different
pane sizes device specific. Also adds a new
sass class just for desktop versions.
2015-07-16 10:44:20 -07:00
cd3c2312a5 [Search] Basic aggregator works
The search view now behaves as it
previously did. The search aggregator
is set to just use ElasticSearch, but
it works.
2015-07-16 10:35:26 -07:00
6f2ad0dadc [Search] Renaming and adding files
Renamed QueryService as SearchService and changed
the corresponding references to it. Added a
SearchAggregator file and related files. Not
yet begun with the implementation.
2015-07-16 10:10:07 -07:00
1e05ebbfd7 [Search] Modified default input funct
Renamed isDefaultInput() to isDefaultFormat(). It
currently just checks for 'name' or 'type' tags,
but it may be completely unneeded.
2015-07-16 09:56:55 -07:00
c5c3546b92 [Search] Relaxed quote rules
Allowed quotes more often in search terms.
When there are quotes, that space-separated
term will not get the fuzzy identifier.
2015-07-15 17:02:51 -07:00
a9dd1f9828 [Mobile] Transistions
Cleaned up and added transitions.
2015-07-15 16:57:36 -07:00
4b5540830b [Mobile] Slide menu
Rouch menu using important to
overwrite splitter setting of
amounts. Also has default values
for now for all devices.
2015-07-15 16:49:16 -07:00
672fa74321 [Search] Changed default max results
Changed the default number of max results to
be 100 results.
2015-07-15 16:46:38 -07:00
3fcf061679 Merge branch 'master' of https://github.com/nasa/openmctweb into search-explore 2015-07-15 16:15:25 -07:00
ee35976c92 [Mobile] Tree Mobile
Added mobile/_tree.scss and edited
normal tree.scss to accomodate for
future sass that adjusts the tree
menu.
2015-07-15 13:30:06 -07:00
b94ef695e2 [Search] Creating searchbar
Starting to create a search bar which lives
in the same side of the divder as the file
tree does.
2015-07-15 13:29:45 -07:00
54b6cd1100 [Mobile] Debug
Added debug statement to print
to console.
2015-07-15 13:28:42 -07:00
759eaa3b35 [Search] Comments 2015-07-15 12:39:22 -07:00
eee9309650 [Search] Fuzziness operator
Insead of wildcards, adding the fuzziness
operator to searches to ensure completeness
of the search results.
2015-07-15 12:14:30 -07:00
e634d77a8e [Search] Add wildcards
Added wildcards to most searches at the
front and end of each word that is separated
by spaces.
2015-07-15 11:39:02 -07:00
06b26b799e [Search] Comments 2015-07-15 11:10:04 -07:00
d6720884f1 [Search] Elasticsearch search options
Changed the search term processor to allow
the name and type options again (for
elasticsearch).
2015-07-15 10:52:27 -07:00
eb5946c1c1 [Search] Documentation
Gave more verbose descriptions of queryManual
and queryElasticsearch.
2015-07-15 10:49:24 -07:00
227cb42ba7 [Search] Comments 2015-07-15 10:24:43 -07:00
3420eb69d3 [Search] Manual max results option
Manual search now takes a max number of
results option, just like the elasticsearch
version.
2015-07-15 10:17:59 -07:00
6b3088f241 [Search] Manual search works
Manual search which does not use elasticsearch
implemented. It matches based on if the name
contains the search term as a substring.
2015-07-15 10:13:14 -07:00
fdcc6432f1 [Search] Reduced term processing
Term processing may be unnecissary. Now it
is limited to removed spcaes from the front
and end.
2015-07-15 09:25:10 -07:00
f8e028a5d1 [Search] Outlined new function
Started a new search function which manually
indexes all of the items in the tree. Still
not fully functional.
2015-07-14 17:06:55 -07:00
5e6f1214fb [Search] Live search
As the user types, search happens with each
new keypress, so the user does not need to
press enter. (But can press enter as well.)
2015-07-14 15:24:51 -07:00
0371e2e314 [Search] Made maxResults bigger
Made it so that the default maximum
number of results is a larger number.
2015-07-14 14:26:45 -07:00
0f89e98a71 [Mobile] Clean up
Cleaned up layout and added phone only hider.
Also added tree.scss file, where all tree
node classes will be placed.
2015-07-14 14:14:12 -07:00
6f07a21bb8 [Mobile] Clean-up
Cleaned up scss and also, the
edit/new tab/full screen buttons are
hidden in mobile, temporarily.
2015-07-14 13:10:28 -07:00
dcb5af87a7 [Search] Moved result processing
Moved result processing to its own function.
2015-07-14 13:09:06 -07:00
f3678d9d52 Merge remote-tracking branch 'origin' into mobile_1 2015-07-14 13:08:54 -07:00
35d038e826 [Search] Processing as separate function
Moved the search term processing to be its
own separate function.
2015-07-14 12:55:00 -07:00
27c7410318 [Search] Moved hard coding
Moved where the search type is
prepended to the search term, to
allow future changes to it.
2015-07-14 12:39:00 -07:00
7c627fae8f [Search] More search options
If the user searches with quotes (" or ') around
the search term, then the term processor will
not put wildcards around the search term.
2015-07-14 12:32:56 -07:00
bf0e6692f5 [Search] Comments
Added comments to better explain how
input processing works.
2015-07-14 11:41:23 -07:00
1d0d2302d8 [Search] Moved functionality into QueryService
Moved the actual searching implementation
into the query service. The search view
controller now just calls the query service.
2015-07-14 11:31:53 -07:00
1a8fd38430 [Search] Max results
Changed the default number of results to be
a max of 25, and added a parameter to allow
the user to set this. (May be used in an
advaned search later?) Because folders are
filtered out, the number displayed is not
necissarily exact.
2015-07-14 10:56:52 -07:00
503811f69c [Search] Search behaves as expected
Seaching any substring of a domain
object title now will give the domian
object as a search result. Still not
case sensitive. Empty string will
return all results. Special characters
do not search correctly. Still has
result number cap.
2015-07-14 10:51:03 -07:00
5892594668 [Search] More robust search
Seach now searches using terms, which
are the domain objects' names split
at the spaces. Still does not work with
any substring, must be space separated.
Not case sensitive.
2015-07-14 10:37:57 -07:00
b9f8f6e33d [Search] Code style 2015-07-14 10:02:27 -07:00
457193657f [Search] Added input ID parameter
Added a parameter to the controller's search
function so that the html side can clearly
see/choose which input ID is being used as
the search input.
2015-07-14 09:59:48 -07:00
c92d15ba42 [Search] Cleanup
Added and removed some comments, for clarity
2015-07-14 09:55:26 -07:00
d7dd53c2da [Search] Checks for folders
Search now (again) checks to not add
folders to the results list. This later
should be made into a policy.
2015-07-14 09:45:31 -07:00
b35fddefc0 [Search] Removed getObjectByID
Was no longer necissary with the current
method of search() getting objects.
2015-07-14 09:38:44 -07:00
07e08c283a [Search] Partway works
The search function now returns actual
objects are results. They may not be the
correct results though.
2015-07-14 09:36:58 -07:00
89d0ea6506 [Search] Fixed uninitialized array bug 2015-07-14 09:17:14 -07:00
75ce5cd0e9 [Search] Changed variable names
Because of the async funtion, changed
variable names in serach2 to make more clear.
2015-07-13 17:05:23 -07:00
9a7bbd92bd [Mobile] Cleaned up
Cleaned up the transistion css to
be more DRY.
2015-07-13 17:04:14 -07:00
b994b2a862 [Search] Style 2015-07-13 16:57:27 -07:00
3cb0b41b22 [Search] Poking around EasticSearch
Sucessfully queries elasticsearch, but displaying the
results poses problems because of asych things.
2015-07-13 16:53:48 -07:00
edcafc5835 [Mobile] Remove Bar
Remove the splitter bar on mobile
and tablets.
2015-07-13 13:56:44 -07:00
7d09df9a85 [Mobile] Constants
Re-edited media query constants
to be cleaner and consistent.
2015-07-13 13:11:27 -07:00
b00eee00fc [Mobile] Redefine
Renames variables to be clearer.
Breaks up constants into parts to be
cleaners and straightforward. Also
removed the ratio.
2015-07-13 13:02:57 -07:00
c0d83f9395 [Mobile] Format
Reformatted the rwd media
query rules.
2015-07-13 12:39:09 -07:00
be757066f5 [Mobile] Desktop adjusted
Adjusted the desktop to accomodate browser
orientation changes. Done so by forgoing
checking the orientation because the
actual device can be in landscape, but it
reads orientation based on the viewport.
2015-07-13 11:18:51 -07:00
5980575918 [Search] Fixed results display problem
Fixed problem with search results not
properly being displayed in the search
view. (Checked that things were defined
before calling them.)
2015-07-13 11:14:02 -07:00
409d12aa75 [Search] Created QueryService
Created a query service which handles the
creation of the searchable list of items.
This has partially broken the search view.
2015-07-13 10:34:06 -07:00
885433390e [Mobile] Fix for emu and act
Adds 2 landscape conditions for tablets and
phones to check if they are in landscape, in
the actual tablet, or in an emulate of the tablet,
then it displays.
2015-07-13 10:32:58 -07:00
687f810475 [Mobile] Constants
Fixed width constant to work for laptop.
2015-07-13 10:23:28 -07:00
137a60f510 [Mobile] Constants
Fixed constants to work for laptop.
2015-07-13 10:16:52 -07:00
2432e9c2aa [Search] Using ElasticSearch 2015-07-13 10:13:46 -07:00
46d5a1431f [Mobile] Added Constants
Rixed mis-initialized desktop
constant
2015-07-13 09:24:01 -07:00
404d02ec23 [Mobile] Added Constants
Re-edited constants to set min
ones for the desktop screen, that
is based on the device size.
2015-07-13 09:17:59 -07:00
03c0678cbe [Search] Syle modifications
Changed 'i += 1' in for loops to 'i++'
2015-07-10 16:54:42 -07:00
04257aedae [Search] Gets user input
Now sucessfully gets user input for the
search term.
2015-07-10 16:52:00 -07:00
33b30f7583 [Search] Removed unnecissary variable
Removed $scope.items, because it was unnecissary.
2015-07-10 15:16:50 -07:00
8eda495aa7 [Search] Results without folders
Folders are now no longer included in
the results list.
2015-07-10 15:06:19 -07:00
a337e04fae [Search] Removed unnecessary file
Removed search-item.html, as it was the same as
grid-item.html. Now search.html uses grid-item.html.
2015-07-10 14:51:18 -07:00
2e7f23a766 [Search] Results list displayed
After searching, a results list is displayed.
The list is composed of grid-items.
2015-07-10 14:48:15 -07:00
6d1cb85a07 [Search] Not case sensitive
Search is no longer case sensitive.
2015-07-10 14:20:04 -07:00
b5756d2b99 [Search] Items list updating
The search results now updates the items
list when called to make sure that it gets
all of the recently added items.
2015-07-10 12:53:12 -07:00
eec955317a revert back to
4d9dc3624b
2015-07-10 12:47:00 -07:00
efba0f0236 [Search] Search results by name
doSearch() does search by getting each
object's name. Still buggy.
2015-07-10 12:44:07 -07:00
67890a7298 [Mobile] Test 2015-07-10 12:38:04 -07:00
dd457f26c6 [Mobile] Device
Added max width to tablet check.
2015-07-10 12:32:34 -07:00
85c6bda5c9 [Mobile] Device
Adjusted Tablet slide Constant.
2015-07-10 12:21:13 -07:00
b7b5f87002 [Mobile] Device
Adjusted Comp Constant.
2015-07-10 12:16:43 -07:00
b0c5d807e7 [Mobile] Device
Removes splits desktop
settings into 2, one
for landscape and another
for portrait.
2015-07-10 11:51:56 -07:00
4d4776e0ef [Mobile] Device
Removes desktop mixin settings
that do not use device width and
height.
2015-07-10 11:40:57 -07:00
61e1aeb1d8 [Mobile] Device
Removes desktop mixin settings
that do not use device width and
height.
2015-07-10 11:40:14 -07:00
9caa603a65 [Mobile] Device
Removes desktop mixin settings
that do not use device width and
height.
2015-07-10 11:36:45 -07:00
5c99e469d5 [Mobile] Device Change
Now instead of min-width, max-width,
... etc, uses the device-width/height.
This allows the devices to use the slide
menu while the browser on a desktop
consistently stays as desktop mode, no
matter if it is resized. As a result of this
the rwd is clear on phones/tablets, but not if
user resizes browser super small.
2015-07-10 11:29:30 -07:00
4d9dc3624b [Mobile] Items
Item icons disappear now on
tablets and mobile devices.
Adjusted _items.scss to adjust the
icon class display for phones and
tablets.
2015-07-10 11:12:09 -07:00
d3ae4b729f [Mobile] More consistent
More consistent when moving from
landscape to portrait and
vice-versa on devices. However
still encountering issue with
the browser being resized.
2015-07-10 10:56:48 -07:00
4e39c4f900 [Search] Finds root folder
The search controller will now search from
the root folder (My Items) even when the view
is initiated from a folder inside of the tree.
2015-07-10 10:32:58 -07:00
30bed434fe [Mobile] Moved variables
Moved variables used for amount of
side bar and slide amount into the
mobile/_constants.scss file.
2015-07-10 09:02:46 -07:00
3e4ae4d38d [Mobile]
Reverted changes to original controller file.
2015-07-09 15:38:53 -07:00
7414275a85 [Mobile]
Reverted changes to original scss file.
2015-07-09 15:37:03 -07:00
fcb0033864 [Mobile]
Reverted changes to css file.
2015-07-09 15:32:41 -07:00
f079471a18 [Mobile]
Reverted changes to scss file.
2015-07-09 15:31:35 -07:00
1fb1174c0a [Mobile] Clean-Up
Removed unused scss constant
.
2015-07-09 15:19:29 -07:00
635e1eda69 [Mobile] Clean-Up
Removed unused menu button and
cleaned up treeCl to be treeClass.
2015-07-09 15:14:36 -07:00
40d53f941f [Mobile] TreeMenuController
Removed the TreeMenuController.js file
and from the bundle. What this achieves
is already done in BrowseController.js
2015-07-09 14:46:36 -07:00
e339ee1dd1 [Search] Asynchronous recursion
The list creation now sucessfully goes 1 level
deep into the tree for objects. Still needs
more work to delve into subfolders.
2015-07-09 14:40:52 -07:00
684a0e88a2 [Mobile] Constants
Added constants to the
mobile one with device
height.
2015-07-09 14:26:02 -07:00
30a4f15330 [Mobile] Adjusted
Adjusted the _layout.scss to
have a function that makes
something disappear on phone
and tablet.
2015-07-09 14:11:51 -07:00
dfd08000f1 [Mobile] Adjust
Adjusted the tablet amount
that the slide occurs.
2015-07-09 13:42:07 -07:00
94b306e129 [Search] Listify filetree
SearchController now attempts to convert the filetree
into a list format. Still needs to be modified to be
asynchronous.
2015-07-09 11:16:55 -07:00
82c8d26264 [Mobile]
Now does not display
the icon for the slide menu
on desktops.
2015-07-09 11:16:41 -07:00
bd236e1cb1 [Mobile] Icon
Added menu/hamburger icon.
2015-07-09 11:06:25 -07:00
e47a36e799 [Mobile] Simplified
treeSlide now uses one line that
sets it to true or false simply
like a switch. So not matter what
it will either slide or not.
2015-07-09 10:55:52 -07:00
30efec0090 [Mobile] Angular
Replaced document usage with
angular calls that change the ternary
op to flip the slide.
2015-07-09 10:53:03 -07:00
b9371ea03d [Mobile] Moved Button
Button moved to the Browse.html
and BrowseController handles the
tree slide.
2015-07-09 10:28:45 -07:00
7974f33781 [Mobile] Phone
Adjusted to differentiate
phones and tablets.
2015-07-08 16:28:40 -07:00
32eaf3893a [Search] Display search items
The search view now very rudimentarily displays
some 'search-item's.
2015-07-08 16:20:12 -07:00
cdcaedc8dd [Mobile] Added transistions
Transistions added, however still using
document.getElementById.
2015-07-08 15:57:08 -07:00
845b9a2faa [Search] Fixed comments 2015-07-08 15:34:09 -07:00
5870248617 [Search] Search framework
Created a basic framework for a search
view. It consists of a search bar and
a results list.
2015-07-08 15:32:20 -07:00
07ef4dfe8a [Mobile] Menu Slide
Menu slides, but not transition
css slides out on click. Currently
uses document, which needs to be
replaced with angular version using
 and/or  and/or
ng-class and/or ng-click.
2015-07-08 14:27:59 -07:00
342be0822f [Mobile] Gen css 2015-07-08 12:17:19 -07:00
5c56484889 [Mobile] Main scss added
Added the mobile files as imports
to the main scss files that
generate as css files.
2015-07-08 12:14:40 -07:00
2b4162c0be [Mobile] Reorganize
Reorganized the sass files. To incorporate, new
mobile directory, which holds all the mobile
sass code.
2015-07-08 12:11:48 -07:00
3704d64560 [Mobile] Push to show current 2015-07-08 11:08:31 -07:00
24fae72492 [Mobile] Left tree
Attempt to resize left
tree menu when changing device.
Currently does not move the splitter
bar.
2015-07-07 16:46:32 -07:00
79fb6eabd9 [Mobile] Menu Button
Menu button added to the
bundle and as a file modelled
after the action button.
2015-07-07 16:28:34 -07:00
1ddb00c8d6 [Mobile] Resize
Resized the height of each
item in grid based on new
tablet/phone widths.
2015-07-07 14:01:57 -07:00
8a0b77ec5c [Mobile] Folder View
Folder representation now
will be a list.
2015-07-07 13:02:40 -07:00
2fc447e16f [Mobile] Comments
Added comments and reverted the
grid back to normal.
2015-07-07 10:15:25 -07:00
d828bf59f9 [Mobile] Constants/Etc
Added constants for media queries.
in _constants.scss. Also, now on tablet,
zoom is disabled.
2015-07-07 09:58:22 -07:00
d8806f14aa [Mobile] Set viewport
Viewport has been set in
index.html. Then what was
implemented prior to this
(rem-display and browser-manage)
was commented out.
2015-07-07 09:08:16 -07:00
0c6a9ca857 [Mobile] Styles
Added new style to set the width
of the tree.
2015-07-06 13:15:38 -07:00
07c907b315 Merge remote-tracking branch 'upstream/master' 2015-07-02 13:14:27 -07:00
d343d38037 Merge remote-tracking branch 'upstream/master' 2015-07-01 13:30:08 -07:00
7e89c13839 [Frontend] Markup updates to label and grid-item
WTD-1423
Depends on CSS and font updates in 2a032bf
2015-07-01 09:50:53 -07:00
2a032bf66d [Frontend] CSS and font updates ONLY from open1423
WTD-1423
Cherry-pick this into open1404 to get latest fonts and CSS into open-master;
2015-07-01 09:48:35 -07:00
e0727e8485 [Frontend] Markup and CSS for link icon indicators
WTD-1423
Added small icon to upper right;
IN PROGRESS;
2015-06-30 18:13:17 -07:00
d5d7ac90ac [Frontend] Markup and CSS for link icon indicators
WTD-1423
Grid item version with link at bottom right of main icon;
2015-06-30 17:58:56 -07:00
3e5fa30d9d [Style] Add stub for label link icon 2015-06-30 16:18:37 -07:00
73241efdc8 [Fix] Fixes bundle
Changes the persistance to the example
version.
2015-06-30 13:20:46 -07:00
cc470f671a [Core] Test missing model decorator
WTD-1334.
2015-06-30 10:14:26 -07:00
933927cda1 [Common UI] Reduce digest count
Reduce number of digest cycles triggered by mct-resize;
only trigger a new digest cycle when size actually
changes. #19.
2015-06-29 09:48:32 -07:00
557 changed files with 53810 additions and 23742 deletions

12
.gitignore vendored
View File

@ -3,8 +3,13 @@
*.gzip
*.tgz
*.DS_Store
*.idea
*.sass-cache
*COMPILE.css
# Intellij project configuration files
*.idea
*.iml
# External dependencies
@ -20,5 +25,6 @@ closed-lib
# Node dependencies
node_modules
# Build documentation
docs
# Protractor logs
protractor/logs

301
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,301 @@
# Contributing to Open MCT Web
This document describes the process of contributing to Open MCT Web as well
as the standards that will be applied when evaluating contributions.
Please be aware that additional agreements will be necessary before we can
accept changes from external contributors.
## Summary
The short version:
1. Write your contribution.
2. Make sure your contribution meets code, test, and commit message
standards as described below.
3. Submit a pull request from a topic branch back to `master`. Include a check
list, as described below. (Optionally, assign this to a specific member
for review.)
4. Respond to any discussion. When the reviewer decides it's ready, they
will merge back `master` and fill out their own check list.
## Contribution Process
Open MCT Web uses git for software version control, and for branching and
merging. The central repository is at
https://github.com/nasa/openmctweb.git.
### Roles
References to roles are made throughout this document. These are not intended
to reflect titles or long-term job assignments; rather, these are used as
descriptors to refer to members of the development team performing tasks in
the check-in process. These roles are:
* _Author_: The individual who has made changes to files in the software
repository, and wishes to check these in.
* _Reviewer_: The individual who reviews changes to files before they are
checked in.
* _Integrator_: The individual who performs the task of merging these files.
Usually the reviewer.
### Branching
Three basic types of branches may be included in the above repository:
1. Master branch.
2. Topic branches.
3. Developer branches.
Branches which do not fit into the above categories may be created and used
during the course of development for various reasons, such as large-scale
refactoring of code or implementation of complex features which may cause
instability. In these exceptional cases it is the responsibility of the
developer who initiates the task which motivated this branching to
communicate to the team the role of these branches and any associated
procedures for the duration of their use.
#### Master Branch
The role of the `master` branches is to represent the latest
"ready for test" version of the software. Source code on the master
branch has undergone peer review, and will undergo regular automated
testing with notification on failure. Master branches may be unstable
(particularly for recent features), but the intent is for the stability of
any features on master branches to be non-decreasing. It is the shared
responsibility of authors, reviewers, and integrators to ensure this.
#### Topic Branches
Topic branches are used by developers to perform and record work on issues.
Topic branches need not necessarily be stable, even when pushed to the
central repository; in fact, the practice of making incremental commits
while working on an issue and pushing these to the central repository is
encouraged, to avoid lost work and to share work-in-progress. (Small commits
also help isolate changes, which can help in identifying which change
introduced a defect, particularly when that defect went unnoticed for some
time, e.g. using `git bisect`.)
Topic branches should be named according to their corresponding issue
identifiers, all lower case, without hyphens. (e.g. branch mct9 would refer
to issue #9.)
In some cases, work on an issue may warrant the use of multiple divergent
branches; for instance, when a developer wants to try more than one solution
and compare them, or when a "dead end" is reached and an initial approach to
resolving an issue needs to be abandoned. In these cases, a short suffix
should be added to the additional branches; this may be simply a single
character (e.g. wtd481b) or, where useful, a descriptive term for what
distinguishes the branches (e.g. wtd481verbose). It is the responsibility of
the author to communicate which branch is intended to be merged to both the
reviewer and the integrator.
#### Developer Branches
Developer branches are any branches used for purposes outside of the scope
of the above; e.g. to try things out, or maintain a "my latest stuff"
branch that is not delayed by the review and integration process. These
may be pushed to the central repository, and may follow any naming convention
desired so long as the owner of the branch is identifiable, and so long as
the name chosen could not be mistaken for a topic or master branch.
### Merging
When development is complete on an issue, the first step toward merging it
back into the master branch is to file a Pull Request. The contributions
should meet code, test, and commit message standards as described below,
and the pull request should include a completed author checklist, also
as described below. Pull requests may be assigned to specific team
members when appropriate (e.g. to draw to a specific person's attention.)
Code review should take place using discussion features within the pull
request. When the reviewer is satisfied, they should add a comment to
the pull request containing the reviewer checklist (from below) and complete
the merge back to the master branch.
## Standards
Contributions to Open MCT Web are expected to meet the following standards.
In addition, reviewers should use general discretion before accepting
changes.
### Code Standards
JavaScript sources in Open MCT Web must satisfy JSLint under its default
settings. This is verified by the command line build.
#### Code Guidelines
JavaScript sources in Open MCT Web should:
* Use four spaces for indentation. Tabs should not be used.
* Include JSDoc for any exposed API (e.g. public methods, constructors.)
* Include non-JSDoc comments as-needed for explaining private variables,
methods, or algorithms when they are non-obvious.
* Define one public class per script, expressed as a constructor function
returned from an AMD-style module.
* Follow “Java-like” naming conventions. These includes:
* Classes should use camel case, first letter capitalized
(e.g. SomeClassName.)
* Methods, variables, fields, and function names should use camel case,
first letter lower-case (e.g. someVariableName.) Constants
(variables or fields which are meant to be declared and initialized
statically, and never changed) should use only capital letters, with
underscores between words (e.g. SOME_CONSTANT.)
* File name should be the name of the exported class, plus a .js extension
(e.g. SomeClassName.js)
* Avoid anonymous functions, except when functions are short (a few lines)
and/or their inclusion makes sense within the flow of the code
(e.g. as arguments to a forEach call.)
* Avoid deep nesting (especially of functions), except where necessary
(e.g. due to closure scope.)
* End with a single new-line character.
* Expose public methods by declaring them on the class's prototype.
* Within a given function's scope, do not mix declarations and imperative
code, and present these in the following order:
* First, variable declarations and initialization.
* Second, function declarations.
* Third, imperative statements.
* Finally, the returned value.
Deviations from Open MCT Web code style guidelines require two-party agreement,
typically from the author of the change and its reviewer.
#### Code Example
```js
/*global define*/
/**
* Bundles should declare themselves as namespaces in whichever source
* file is most like the "main point of entry" to the bundle.
* @namespace some/bundle
*/
define(
['./OtherClass'],
function (OtherClass) {
"use strict";
/**
* A summary of how to use this class goes here.
*
* @constructor
* @memberof some/bundle
*/
function ExampleClass() {
}
// Methods which are not intended for external use should
// not have JSDoc (or should be marked @private)
ExampleClass.prototype.privateMethod = function () {
};
/**
* A summary of this method goes here.
* @param {number} n a parameter
* @returns {number} a return value
*/
ExampleClass.prototype.publicMethod = function (n) {
return n * 2;
}
return ExampleClass;
}
);
```
### Test Standards
Automated testing shall occur whenever changes are merged into the main
development branch and must be confirmed alongside any pull request.
Automated tests are typically unit tests which exercise individual software
components. Tests are subject to code review along with the actual
implementation, to ensure that tests are applicable and useful.
Examples of useful tests:
* Tests which replicate bugs (or their root causes) to verify their
resolution.
* Tests which reflect details from software specifications.
* Tests which exercise edge or corner cases among inputs.
* Tests which verify expected interactions with other components in the
system.
During automated testing, code coverage metrics will be reported. Line
coverage must remain at or above 80%.
### Commit Message Standards
Commit messages should:
* Contain a one-line subject, followed by one line of white space,
followed by one or more descriptive paragraphs, each separated by one
line of white space.
* Contain a short (usually one word) reference to the feature or subsystem
the commit effects, in square brackets, at the start of the subject line
(e.g. `[Documentation] Draft of check-in process`)
* Contain a reference to a relevant issue number in the body of the commit.
* This is important for traceability; while branch names also provide this,
you cannot tell from looking at a commit what branch it was authored on.
* This may be omitted if the relevant issue is otherwise obvious from the
commit history (that is, if using `git log` from the relevant commit
directly leads to a similar issue reference) to minimize clutter.
* Describe the change that was made, and any useful rationale therefore.
* Comments in code should explain what things do, commit messages describe
how they came to be done that way.
* Provide sufficient information for a reviewer to understand the changes
made and their relationship to previous code.
Commit messages should not:
* Exceed 54 characters in length on the subject line.
* Exceed 72 characters in length in the body of the commit.
* Except where necessary to maintain the structure of machine-readable or
machine-generated text (e.g. error messages)
See [Contributing to a Project](http://git-scm.com/book/ch5-2.html) from
Pro Git by Shawn Chacon and Ben Straub for a bit of the rationale behind
these standards.
## Issue Reporting
Issues are tracked at https://github.com/nasa/openmctweb/issues
Issues should include:
* A short description of the issue encountered.
* A longer-form description of the issue encountered. When possible, steps to
reproduce the issue.
* When possible, a description of the impact of the issue. What use case does
it impede?
* An assessment of the severity of the issue.
Issue severity is categorized as follows (in ascending order):
* _Trivial_: Minimal impact on the usefulness and functionality of the
software; a "nice-to-have."
* _(Unspecified)_: Major loss of functionality or impairment of use.
* _Critical_: Large-scale loss of functionality or impairment of use,
such that remaining utility becomes marginal.
* _Blocker_: Harmful or otherwise unacceptable behavior. Must fix.
## Check Lists
The following check lists should be completed and attached to pull requests
when they are filed (author checklist) and when they are merged (reviewer
checklist.)
### Author Checklist
1. Changes address original issue?
2. Unit tests included and/or updated with changes?
3. Command line build passes?
4. Expect to pass code review?
### Reviewer Checklist
1. Changes appear to address issue?
2. Appropriate unit tests included?
3. Code style and in-line documentation are appropriate?
4. Commit messages meet standards?

View File

@ -67,6 +67,19 @@ as described above.
An example of this is expressed in `platform/framework`, which follows
bundle conventions.
### Functional Testing
The tests described above are all at the unit-level; an additional
test suite using [Protractor](https://angular.github.io/protractor/)
us under development, in the `protractor` folder.
To run:
* Install protractor following the instructions above.
* `cd protractor`
* `npm install`
* `npm run all`
## Build
Open MCT Web includes a Maven command line build. Although Open MCT Web
@ -90,6 +103,21 @@ This build will:
Run as `mvn clean install`.
### Building Documentation
Open MCT Web's documentation is generated by an
[npm](https://www.npmjs.com/)-based build:
* `npm install` _(only needs to run once)_
* `npm run docs`
Documentation will be generated in `target/docs`. Note that diagram
generation is dependent on having [Cairo](http://cairographics.org/download/)
installed; see
[node-canvas](https://github.com/Automattic/node-canvas#installation)'s
documentation for help with installation.
# Glossary
Certain terms are used throughout Open MCT Web with consistent meanings

View File

@ -24,7 +24,7 @@
# Script to build and deploy docs to github pages.
OUTPUT_DIRECTORY="docs"
OUTPUT_DIRECTORY="target/docs"
REPOSITORY_URL="git@github.com:nasa/openmctweb.git"
BUILD_SHA=`git rev-parse head`
@ -39,7 +39,7 @@ if [ -d $OUTPUT_DIRECTORY ]; then
rm -rf $OUTPUT_DIRECTORY || exit 1
fi
npm run-script jsdoc
npm run docs
cd $OUTPUT_DIRECTORY || exit 1
echo "git init"

View File

@ -8,6 +8,8 @@
"platform/commonUI/dialog",
"platform/commonUI/general",
"platform/commonUI/inspect",
"platform/commonUI/mobile",
"platform/commonUI/themes/espresso",
"platform/containment",
"platform/execution",
"platform/telemetry",
@ -18,12 +20,14 @@
"platform/features/scrolling",
"platform/features/events",
"platform/forms",
"platform/identity",
"platform/persistence/local",
"platform/persistence/queue",
"platform/policy",
"platform/entanglement",
"platform/search",
"example/imagery",
"example/persistence",
"example/eventGenerator",
"example/generator"
]

View File

@ -4,3 +4,11 @@ deployment:
commands:
- ./build-docs.sh
- git push git@heroku.com:openmctweb-demo.git $CIRCLE_SHA1:refs/heads/master
openmctweb-staging-un:
branch: search
heroku:
appname: openmctweb-staging-un
openmctweb-staging-deux:
branch: mobile
heroku:
appname: openmctweb-staging-deux

193
docs/gendocs.js Normal file
View File

@ -0,0 +1,193 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global require,process,GLOBAL*/
/*jslint nomen: false */
// Usage:
// node gendocs.js --in <source directory> --out <dest directory>
var CONSTANTS = {
DIAGRAM_WIDTH: 800,
DIAGRAM_HEIGHT: 500
};
GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be defined
(function () {
"use strict";
var fs = require("fs"),
mkdirp = require("mkdirp"),
path = require("path"),
glob = require("glob"),
marked = require("marked"),
split = require("split"),
stream = require("stream"),
nomnoml = require('nomnoml'),
Canvas = require('canvas'),
options = require("minimist")(process.argv.slice(2));
// Convert from nomnoml source to a target PNG file.
function renderNomnoml(source, target) {
var canvas =
new Canvas(CONSTANTS.DIAGRAM_WIDTH, CONSTANTS.DIAGRAM_HEIGHT);
nomnoml.draw(canvas, source, 1.0);
canvas.pngStream().pipe(fs.createWriteStream(target));
}
// Stream transform.
// Pulls out nomnoml diagrams from fenced code blocks and renders them
// as PNG files in the output directory, prefixed with a provided name.
// The fenced code blocks will be replaced with Markdown in the
// output of this stream.
function nomnomlifier(outputDirectory, prefix) {
var transform = new stream.Transform({ objectMode: true }),
isBuilding = false,
counter = 1,
outputPath,
source = "";
transform._transform = function (chunk, encoding, done) {
if (!isBuilding) {
if (chunk.trim().indexOf("```nomnoml") === 0) {
var outputFilename = prefix + '-' + counter + '.png';
outputPath = path.join(outputDirectory, outputFilename);
this.push([
"\n![Diagram ",
counter,
"](",
outputFilename,
")\n\n"
].join(""));
isBuilding = true;
source = "";
counter += 1;
} else {
// Otherwise, pass through
this.push(chunk + '\n');
}
} else {
if (chunk.trim() === "```") {
// End nomnoml
renderNomnoml(source, outputPath);
isBuilding = false;
} else {
source += chunk + '\n';
}
}
done();
};
return transform;
}
// Convert from Github-flavored Markdown to HTML
function gfmifier() {
var transform = new stream.Transform({ objectMode: true }),
markdown = "";
transform._transform = function (chunk, encoding, done) {
markdown += chunk;
done();
};
transform._flush = function (done) {
this.push("<html><body>\n");
this.push(marked(markdown));
this.push("\n</body></html>\n");
done();
};
return transform;
}
// Custom renderer for marked; converts relative links from md to html,
// and makes headings linkable.
function CustomRenderer() {
var renderer = new marked.Renderer(),
customRenderer = Object.create(renderer);
customRenderer.heading = function (text, level) {
var escapedText = (text || "").trim().toLowerCase().replace(/\W/g, "-"),
aOpen = "<a name=\"" + escapedText + "\" href=\"#" + escapedText + "\">",
aClose = "</a>";
return aOpen + renderer.heading.apply(renderer, arguments) + aClose;
};
// Change links to .md files to .html
customRenderer.link = function (href, title, text) {
// ...but only if they look like relative paths
return (href || "").indexOf(":") === -1 && href[0] !== "/" ?
renderer.link(href.replace(/\.md/, ".html"), title, text) :
renderer.link.apply(renderer, arguments);
};
return customRenderer;
}
options['in'] = options['in'] || options.i;
options.out = options.out || options.o;
marked.setOptions({
renderer: new CustomRenderer(),
gfm: true,
tables: true,
breaks: false,
pedantic: false,
sanitize: true,
smartLists: true,
smartypants: false
});
// Convert all markdown files.
// First, pull out nomnoml diagrams.
// Then, convert remaining Markdown to HTML.
glob(options['in'] + "/**/*.md", {}, function (err, files) {
files.forEach(function (file) {
var destination = file.replace(options['in'], options.out)
.replace(/md$/, "html"),
destPath = path.dirname(destination),
prefix = path.basename(destination).replace(/\.html$/, "");
mkdirp(destPath, function (err) {
fs.createReadStream(file, { encoding: 'utf8' })
.pipe(split())
.pipe(nomnomlifier(destPath, prefix))
.pipe(gfmifier())
.pipe(fs.createWriteStream(destination, {
encoding: 'utf8'
}));
});
});
});
// Also copy over all HTML, CSS, or PNG files
glob(options['in'] + "/**/*.@(html|css|png)", {}, function (err, files) {
files.forEach(function (file) {
var destination = file.replace(options['in'], options.out),
destPath = path.dirname(destination);
mkdirp(destPath, function (err) {
fs.createReadStream(file, { encoding: 'utf8' })
.pipe(fs.createWriteStream(destination, {
encoding: 'utf8'
}));
});
});
});
}());

View File

@ -0,0 +1,232 @@
# Overview
The framework layer's most basic responsibility is allowing individual
software components to communicate. The software components it recognizes
are:
* _Extensions_: Individual units of functionality that can be added to
or removed from Open MCT Web. _Extension categories_ distinguish what
type of functionality is being added/removed.
* _Bundles_: A grouping of related extensions
(named after an analogous concept from [OSGi](http://www.osgi.org/))
that may be added or removed as a group.
The framework layer operates by taking a set of active bundles, and
exposing extensions to one another as-needed, using
[dependency injection](https://en.wikipedia.org/wiki/Dependency_injection).
Extensions are responsible for declaring their dependencies in a
manner which the framework layer can understand.
```nomnoml
#direction: down
[Open MCT Web|
[Dependency injection framework]-->[Platform bundle #1]
[Dependency injection framework]-->[Platform bundle #2]
[Dependency injection framework]-->[Plugin bundle #1]
[Dependency injection framework]-->[Plugin bundle #2]
[Platform bundle #1|[Extensions]]
[Platform bundle #2|[Extensions]]
[Plugin bundle #1|[Extensions]]
[Plugin bundle #2|[Extensions]]
[Platform bundle #1]<->[Platform bundle #2]
[Plugin bundle #1]<->[Platform bundle #2]
[Plugin bundle #1]<->[Plugin bundle #2]
]
```
The "dependency injection framework" in this case is
[AngularJS](https://angularjs.org/). Open MCT Web's framework layer
is really just a thin wrapper over Angular that recognizes the
concepts of bundles and extensions (as declared in JSON files) and
registering extensions with Angular. It additionally acts as a
mediator between Angular and [RequireJS](http://requirejs.org/),
which is used to load JavaScript sources which implement
extensions.
```nomnoml
[Framework layer|
[AngularJS]<-[Framework Component]
[RequireJS]<-[Framework Component]
[Framework Component]1o-*[Bundles]
]
```
It is worth noting that _no other components_ are "aware" of the
framework component directly; Angular and Require are _used by_ the
framework components, and extensions in various bundles will have
their dependencies satisfied by Angular as a consequence of registration
activities which were performed by the framework component.
## Application Initialization
The framework component initializes an Open MCT Web application following
a simple sequence of steps.
```nomnoml
[<start> Start]->[<state> Load bundles.json]
[Load bundles.json]->[<state> Load bundle.json files]
[Load bundle.json files]->[<state> Resolve implementations]
[Resolve implementations]->[<state> Register with Angular]
[Register with Angular]->[<state> Bootstrap application]
[Bootstrap application]->[<end> End]
```
1. __Loading bundles.json.__ A file named `bundles.json` is loaded to determine
which bundles to load. Bundles are given in this file as relative paths
which point to bundle directories.
2. __Load bundle.json files.__ Individual bundle definitions are loaded; a
`bundle.json` file is expected in each bundle directory.
2. __Resolving implementations.__ Any scripts which provide implementations for
extensions exposed by bundles are loaded, using RequireJS.
3. __Register with Angular.__ Resolved extensions are registered with Angular,
such that they can be used by the application at run-time. This stage
includes both registration of Angular built-ins (directives, controllers,
routes, constants, and services) as well as registration of non-Angular
extensions.
4. __Bootstrap application.__ Once all extensions have been registered,
the Angular application
[is bootstrapped](https://docs.angularjs.org/guide/bootstrap).
## Architectural Paradigm
```nomnoml
[Extension]
[Extension]o->[Dependency #1]
[Extension]o->[Dependency #2]
[Extension]o->[Dependency #3]
```
Open MCT Web's architecture relies on a simple premise: Individual units
(extensions) only have access to the dependencies they declare that they
need, and they acquire references to these dependencies via dependency
injection. This has several desirable traits:
* Programming to an interface is enforced. Any given dependency can be
swapped out for something which exposes an equivalent interface. This
improves flexibility against refactoring, simplifies testing, and
provides a common mechanism for extension and reconfiguration.
* The dependencies of a unit must be explicitly defined. This means that
it can be easily determined what a given unit's role is within the
larger system, in terms of what other components it will interact with.
It also helps to enforce good separation of concerns: When a set of
declared dependencies becomes long it is obvious, and this is usually
a sign that a given unit is involved in too many concerns and should
be refactored into smaller pieces.
* Individual units do not need to be aware of the framework; they need
only be aware of the interfaces to the components they specifically
use. This avoids introducing a ubiquitous dependency upon the framework
layer itself; it is plausible to modify or replace the framework
without making changes to individual software components which run upon
the framework.
A drawback to this approach is that it makes it difficult to define
"the architecture" of Open MCT Web, in terms of describing the specific
units that interact at run-time. The run-time architecture is determined
by the framework as the consequence of wiring together dependencies.
As such, the specific architecture of any given application built on
Open MCT Web can look very different.
Keeping that in mind, there are a few useful patterns supported by the
framework that are useful to keep in mind.
The specific service infrastructure provided by the platform is described
in the [Platform Architecture](Platform.md).
## Extension Categories
One of the capabilities that the framework component layers on top of
AngularJS is support for many-to-one dependencies. That is, a specific
extension may declare a dependency to _all extensions of a specific
category_, instead of being limited to declaring specific dependencies.
```nomnoml
#direction: right
[Specific Extension] 1 o-> * [Extension of Some Category]
```
This is useful for introducing specific extension points to an application.
Some unit of software will depend upon all extensions of a given category
and integrate their behavior into the system in some fashion; plugin authors
can then add new extensions of that category to augment existing behaviors.
Some developers may be familiar with the use of registries to achieve
similar characteristics. This approach is similar, except that the registry
is effectively implicit whenever a new extension category is used or
depended-upon. This has some advantages over a more straightforward
registry-based approach:
* These many-to-one relationships are expressed as dependencies; an
extension category is registered as having dependencies on all individual
extensions of this category. This avoids ordering issues that may occur
with more conventional registries, which may be observed before all
dependencies are resolved.
* The need for service registries of specific types is removed, reducing
the number of interfaces to manage within the system. Groups of
extensions are provided as arrays.
## Composite Services
Composite services (registered via extension category `components`) are
a pattern supported by the framework. These allow service instances to
be built from multiple components at run-time; support for this pattern
allows additional bundles to introduce or modify behavior associated
with these services without modifying or replacing original service
instances.
```nomnoml
#direction: down
[<abstract> FooService]
[FooDecorator #1]--:>[FooService]
[FooDecorator #n]--:>[FooService]
[FooAggregator]--:>[FooService]
[FooProvider #1]--:>[FooService]
[FooProvider #n]--:>[FooService]
[FooDecorator #1]o->[<state> ...decorators...]
[...decorators...]o->[FooDecorator #n]
[FooDecorator #n]o->[FooAggregator]
[FooAggregator]o->[FooProvider #1]
[FooAggregator]o->[<state> ...providers...]
[FooAggregator]o->[FooProvider #n]
[FooDecorator #1]--[<note> Exposed as fooService]
```
In this pattern, components all implement an interface which is
standardized for that service. Components additionally declare
that they belong to one of three types:
* __Providers.__ A provider actually implements the behavior
(satisfies the contract) for that kind of service. For instance,
if a service is responsible for looking up documents by an identifier,
one provider may do so by querying a database, while another may
do so by reading a static JSON document. From the outside, either
provider would look the same (they expose the same interface) and
they could be swapped out easily.
* __Aggregator.__ An aggregator takes many providers and makes them
behave as one. Again, this implements the same interface as an
individual provider, so users of the service do not need to be
concerned about the difference between consulting many providers
and consulting one. Continuing with the example of a service that
looks up documents by identifiers, an aggregator here might consult
all providers, and return any document is found (perhaps picking one
over the other or merging documents if there are multiple matches.)
* __Decorators.__ A decorator exposes the same interface as other
components, but instead of fully implementing the behavior associated
with that kind of service, it only acts as an intermediary, delegating
the actual behavior to a different component. Decorators may transform
inputs or outputs, or initiate some side effects associated with a
service. This is useful if certain common behavior associated with a
service (caching, for instance) may be useful across many different
implementations of that same service.
The framework will register extensions in this category such that an
aggregator will depend on all of its providers, and decorators will
depend upon on one another in a chain. The result of this compositing step
(the last decorator, if any; otherwise the aggregator, if any;
otherwise a single provider) will be exposed as a single service that
other extensions can acquire through dependency injection. Because all
components of the same type of service expose the same interface, users
of that service do not need to be aware that they are talking to an
aggregator or a provider, for instance.

View File

@ -0,0 +1,714 @@
# Overview
The Open MCT Web 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
domain objects of various sorts.
* A variety of extension points for introducing new functionality
of various kinds within the context of the common user interface.
* A service infrastructure to support building additional components.
## Platform Architecture
While the framework provides a more general architectural paradigm for
building application, the platform adds more specificity by defining
additional extension types and allowing for integration with back end
components.
The run-time architecture of an Open MCT Web application can be categorized
into certain high-level tiers:
```nomnoml
[DOM]->[<state> AngularJS]
[AngularJS]->[Presentation Layer]
[Presentation Layer]->[Information Model]
[Presentation Layer]->[Service Infrastructure]
[Information Model]->[Service Infrastructure]
[Service Infrastructure]->[<state> Browser APIs]
[Browser APIs]->[Back-end]
```
Applications built using Open MCT Web may add or configure functionality
in __any of these tiers__.
* _DOM_: The rendered HTML document, composed from HTML templates which
have been processed by AngularJS and will be updated by AngularJS
to reflect changes from the presentation layer. User interactions
are initiated from here and invoke behavior in the presentation layer.
* [_Presentation layer_](#presentation-layer): The presentation layer
is responsible for updating (and providing information to update)
the displayed state of the application. The presentation layer consists
primarily of _controllers_ and _directives_. The presentation layer is
concerned with inspecting the information model and preparing it for
display.
* [_Information model_](#information-model): The information model
describes the state and behavior of the objects with which the user
interacts.
* [_Service infrastructure_](#service-infrastructure): The service
infrastructure is responsible for providing the underlying general
functionality needed to support the information model. This includes
exposing underlying sets of extensions and mediating with the
back-end.
* _Back-end_: The back-end is out of the scope of Open MCT Web, except
for the interfaces which are utilized by adapters participating in the
service infrastructure.
## Application Start-up
Once the
[application has been initialized](Framework.md#application-initialization)
Open MCT Web primarily operates in an event-driven paradigm; various
events (mouse clicks, timers firing, receiving responses to XHRs) trigger
the invocation of functions, typically in the presentation layer for
user actions or in the service infrastructure for server responses.
The "main point of entry" into an initialized Open MCT Web application
is effectively the
[route](https://docs.angularjs.org/api/ngRoute/service/$route#example)
which is associated with the URL used to access Open MCT Web (or a
default route.) This route will be associated with a template which
will be displayed; this template will include references to directives
and controllers which will be interpreted by Angular and used to
initialize the state of the display in a manner which is backed by
both the information model and the service infrastructure.
```nomnoml
[<start> Start]->[<state> page load]
[page load]->[<state> route selection]
[route selection]->[<state> compile, display template]
[compile, display template]->[Template]
[Template]->[<state> use Controllers]
[Template]->[<state> use Directives]
[use Controllers]->[Controllers]
[use Directives]->[Directives]
[Controllers]->[<state> consult information model]
[consult information model]->[<state> expose data]
[expose data]->[Angular]
[Angular]->[<state> update display]
[Directives]->[<state> add event listeners]
[Directives]->[<state> update display]
[add event listeners]->[<end> End]
[update display]->[<end> End]
```
# Presentation Layer
The presentation layer of Open MCT Web is responsible for providing
information to display within templates, and for handling interactions
which are initiated from templated DOM elements. AngularJS acts as
an intermediary between the web page as the user sees it, and the
presentation layer implemented as Open MCT Web extensions.
```nomnoml
[Presentation Layer|
[Angular built-ins|
[routes]
[controllers]
[directives]
[templates]
]
[Domain object representation|
[views]
[representations]
[representers]
[gestures]
]
]
```
## Angular built-ins
Several extension categories in the presentation layer map directly
to primitives from AngularJS:
* [_Controllers_](https://docs.angularjs.org/guide/controller) provide
data to templates, and expose functionality that can be called from
templates.
* [_Directives_](https://docs.angularjs.org/guide/directive) effectively
extend HTML to provide custom behavior associated with specific
attributes and tags.
* [_Routes_](https://docs.angularjs.org/api/ngRoute/service/$route#example)
are used to associate specific URLs (including the fragment identifier)
with specific application states. (In Open MCT Web, these are used to
describe the mode of usage - e.g. browse or edit - as well as to
identify the object being used.)
* [_Templates_](https://docs.angularjs.org/guide/templates) are partial
HTML documents that will be rendered and kept up-to-date by AngularJS.
Open MCT Web introduces a custom `mct-include` directive which acts
as a wrapper around `ng-include` to allow templates to be referred
to by symbolic names.
## Domain object representation
The remaining extension categories in the presentation layer are specific
to displaying domain objects.
* _Representations_ are templates that will be used to display
domain objects in specific ways (e.g. "as a tree node.")
* _Views_ are representations which are exposed to the user as options
for displaying domain objects.
* _Representers_ are extensions which modify or augment the process
of representing domain objects generally (e.g. by attaching
gestures to them.)
* _Gestures_ provide associations between specific user actions
(expressed as DOM events) and resulting behavior upon domain objects
(typically expressed as members of the `actions` extension category)
that can be reused across domain objects. For instance, `drag` and
`drop` are both gestures associated with using drag-and-drop to
modify the composition of domain objects by interacting with their
representations.
# Information Model
```nomnoml
#direction: right
[Information Model|
[DomainObject|
getId() : string
getModel() : object
getCapability(key : string) : Capability
hasCapability(key : string) : boolean
useCapability(key : string, args...) : *
]
[DomainObject] 1 +- 1 [Model]
[DomainObject] 1 o- * [Capability]
]
```
Domain objects are the most fundamental component of Open MCT Web's
information model. A domain object is some distinct thing relevant to a
user's work flow, such as a telemetry channel, display, or similar.
Open MCT Web is a tool for viewing, browsing, manipulating, and otherwise
interacting with a graph of domain objects.
A domain object should be conceived of as the union of the following:
* _Identifier_: A machine-readable string that uniquely identifies the
domain object within this application instance.
* _Model_: The persistent state of the domain object. A domain object's
model is a JavaScript object that can be losslessly converted to JSON.
* _Capabilities_: Dynamic behavior associated with the domain object.
Capabilities are JavaScript objects which provide additional methods
for interacting with the domain objects which expose those capabilities.
Not all domain objects expose all capabilities. The interface exposed
by any given capability will depend on its type (as identified
by the `key` argument.) For instance, a `persistence` capability
has a different interface from a `telemetry` capability. Using
capabilities requires some prior knowledge of their interface.
## Capabilities and Services
```nomnoml
#direction: right
[DomainObject]o-[FooCapability]
[FooCapability]o-[FooService]
[FooService]o-[foos]
```
At run-time, the user is primarily concerned with interacting with
domain objects. These interactions are ultimately supported via back-end
services, but to allow customization per-object, these are often mediated
by capabilities.
A common pattern that emerges in the Open MCT Platform is as follows:
* A `DomainObject` has some particular behavior that will be supported
by a service.
* A `Capability` of that domain object will define that behavior,
_for that domain object_, supported by a service.
* A `Service` utilized by that capability will perform the actual behavior.
* An extension category will be utilized by that capability to determine
the set of possible behaviors.
Concrete examples of capabilities which follow this pattern
(or a subset of this pattern) include:
```nomnoml
#direction: right
[DomainObject]1 o- *[Capability]
[Capability]<:--[TypeCapability]
[Capability]<:--[ActionCapability]
[Capability]<:--[PersistenceCapability]
[Capability]<:--[TelemetryCapability]
[TypeCapability]o-[TypeService]
[TypeService]o-[types]
[ActionCapability]o-[ActionService]
[ActionService]o-[actions]
[PersistenceCapability]o-[PersistenceService]
[TelemetryCapability]o-[TelemetryService]
```
# Service Infrastructure
Most services exposed by the Open MCT Web platform follow the
[composite services](Framework.md#composite-services) to permit
a higher degree of flexibility in how a service can be modified
or customized for specific applications.
To simplify usage for plugin developers, the platform also usually
includes a provider implementation for these service type that consumes
some extension category. For instance, an `ActionService` provider is
included which depends upon extension category `actions`, and exposes
all actions declared as such to the system. As such, plugin developers
can simply implement the new actions they wish to be made available without
worrying about the details of composite services or implementing a new
`ActionService` provider; however, the ability to implement a new provider
remains useful when the expressive power of individual extensions is
insufficient.
```nomnoml
[ Service Infrastructure |
[ObjectService]->[ModelService]
[ModelService]->[PersistenceService]
[ObjectService]->[CapabilityService]
[CapabilityService]->[capabilities]
[capabilities]->[TelemetryService]
[capabilities]->[PersistenceService]
[capabilities]->[TypeService]
[capabilities]->[ActionService]
[capabilities]->[ViewService]
[PersistenceService]->[<database> Document store]
[TelemetryService]->[<database> Telemetry source]
[ActionService]->[actions]
[ActionService]->[PolicyService]
[ViewService]->[PolicyService]
[ViewService]->[views]
[PolicyService]->[policies]
[TypeService]->[types]
]
```
A short summary of the roles of these services:
* _[ObjectService](#object-service)_: Allows retrieval of domain objects by
their identifiers; in practice, often the main point of entry into the
[information model](#information-model).
* _[ModelService](#model-service)_: Provides domain object models, retrieved
by their identifier.
* _[CapabilityService](#capability-service)_: Provides capabilities, as they
apply to specific domain objects (as judged from their model.)
* _[TelemetryService](#telemetry-service)_: Provides access to historical
and real-time telemetry data.
* _[PersistenceService](#persistence-service)_: Provides the ability to
store and retrieve documents (such as domain object models.)
* _[ActionService](#action-service)_: Provides distinct user actions that
can take place within the system (typically, upon or using domain objects.)
* _[ViewService](#view-service)_: Provides views for domain objects. A view
is a user-selectable representation of a domain object (in practice, an
HTML template.)
* _[PolicyService](#policy-service)_: Handles decisions about which
behavior are allowed within certain specific contexts.
* _[TypeService](#type-service)_: Provides information to distinguish
different types of domain objects from one another within the system.
## Object Service
```nomnoml
#direction: right
[<abstract> ObjectService|
getObjects(ids : Array.<string>) : Promise.<object.<string, DomainObject>>
]
[DomainObjectProvider]--:>[ObjectService]
[DomainObjectProvider]o-[ModelService]
[DomainObjectProvider]o-[CapabilityService]
```
As domain objects are central to Open MCT Web's information model,
acquiring domain objects is equally important.
```nomnoml
#direction: right
[<start> Start]->[<state> Look up models]
[<state> Look up models]->[<state> Look up capabilities]
[<state> Look up capabilities]->[<state> Instantiate DomainObject]
[<state> Instantiate DomainObject]->[<end> End]
```
Open MCT Web includes an implementation of an `ObjectService` which
satisfies this capability by:
* Consulting the [Model Service](#model-service) to acquire domain object
models by identifier.
* Passing these models to a [Capability Service](#capability-service) to
determine which capabilities are applicable.
* Combining these results together as [DomainObject](#information-model)
instances.
## Model Service
```nomnoml
#direction: down
[<abstract> ModelService|
getModels(ids : Array.<string>) : Promise.<object.<string, object>>
]
[StaticModelProvider]--:>[ModelService]
[RootModelProvider]--:>[ModelService]
[PersistedModelProvider]--:>[ModelService]
[ModelAggregator]--:>[ModelService]
[CachingModelDecorator]--:>[ModelService]
[MissingModelDecorator]--:>[ModelService]
[MissingModelDecorator]o-[CachingModelDecorator]
[CachingModelDecorator]o-[ModelAggregator]
[ModelAggregator]o-[StaticModelProvider]
[ModelAggregator]o-[RootModelProvider]
[ModelAggregator]o-[PersistedModelProvider]
[PersistedModelProvider]o-[PersistenceService]
[RootModelProvider]o-[roots]
[StaticModelProvider]o-[models]
```
The platform's model service is responsible for providing domain object
models (effectively, JSON documents describing the persistent state
associated with domain objects.) These are retrieved by identifier.
The platform includes multiple components of this variety:
* `PersistedModelProvider` looks up domain object models from
a persistence store (the [`PersistenceService`](#persistence-service));
this is how user-created and user-modified
domain object models are retrieved.
* `RootModelProvider` provides domain object models that have been
declared via the `roots` extension category. These will appear at the
top level of the tree hierarchy in the user interface.
* `StaticModelProvider` provides domain object models that have been
declared via the `models` extension category. This is useful for
allowing plugins to expose new domain objects declaratively.
* `ModelAggregator` merges together the results from multiple providers.
If multiple providers return models for the same domain object,
the most recently modified version (as determined by the `modified`
property of the model) is chosen.
* `CachingModelDecorator` caches model instances in memory. This
ensures that only a single instance of a domain object model is
present at any given time within the application, and prevent
redundant retrievals.
* `MissingModelDecorator` adds in placeholders when no providers
have returned domain object models for a specific identifier. This
allows the user to easily see that something was expected to be
present, but wasn't.
## Capability Service
```nomnoml
#direction: down
[<abstract> CapabilityService|
getCapabilities(model : object) : object.<string, Function>
]
[CoreCapabilityProvider]--:>[CapabilityService]
[QueuingPersistenceCapabilityDecorator]--:>[CapabilityService]
[CoreCapabilityProvider]o-[capabilities]
[QueuingPersistenceCapabilityDecorator]o-[CoreCapabilityProvider]
```
The capability service is responsible for determining which capabilities
are applicable for a given domain object, based on its model. Primarily,
this is handled by the `CoreCapabilityProvider`, which examines
capabilities exposed via the `capabilities` extension category.
Additionally, `platform/persistence/queue` decorates the persistence
capability specifically to batch persistence attempts among multiple
objects (this allows failures to be recognized and handled in groups.)
## Telemetry Service
```nomnoml
[<abstract> TelemetryService|
requestData(requests : Array.<TelemetryRequest>) : Promise.<object>
subscribe(requests : Array.<TelemetryRequest>) : Function
]<--:[TelemetryAggregator]
```
The telemetry service is responsible for acquiring telemetry data.
Notably, the platform does not include any providers for
`TelemetryService`; applications built on Open MCT Web will need to
implement a provider for this service if they wish to expose telemetry
data. This is usually the most important step for integrating Open MCT Web
into an existing telemetry system.
Requests for telemetry data are usually initiated in the
[presentation layer](#presentation-layer) by some `Controller` referenced
from a view. The `telemetryHandler` service is most commonly used (although
one could also use an object's `telemetry` capability directly) as this
handles capability delegation, by which a domain object such as a Telemetry
Panel can declare that its `telemetry` capability should be handled by the
objects it contains. Ultimately, the request for historical data and the
new subscriptions will reach the `TelemetryService`, and, by way of the
provider(s) which are present for that `TelemetryService`, will pass the
same requests to the back-end.
```nomnoml
[<start> Start]->[Controller]
[Controller]->[<state> declares object of interest]
[declares object of interest]->[TelemetryHandler]
[TelemetryHandler]->[<state> requests telemetry from capabilities]
[TelemetryHandler]->[<state> subscribes to telemetry using capabilities]
[requests telemetry from capabilities]->[TelemetryCapability]
[subscribes to telemetry using capabilities]->[TelemetryCapability]
[TelemetryCapability]->[<state> requests telemetry]
[TelemetryCapability]->[<state> subscribes to telemetry]
[requests telemetry]->[TelemetryService]
[subscribes to telemetry]->[TelemetryService]
[TelemetryService]->[<state> issues request]
[TelemetryService]->[<state> updates subscriptions]
[TelemetryService]->[<state> listens for real-time data]
[issues request]->[<database> Telemetry Back-end]
[updates subscriptions]->[Telemetry Back-end]
[listens for real-time data]->[Telemetry Back-end]
[Telemetry Back-end]->[<end> End]
```
The back-end, in turn, is expected to provide whatever historical
telemetry is available to satisfy the request that has been issue.
```nomnoml
[<start> Start]->[<database> Telemetry Back-end]
[Telemetry Back-end]->[<state> transmits historical telemetry]
[transmits historical telemetry]->[TelemetryService]
[TelemetryService]->[<state> packages telemetry, fulfills requests]
[packages telemetry, fulfills requests]->[TelemetryCapability]
[TelemetryCapability]->[<state> unpacks telemetry per-object, fulfills request]
[unpacks telemetry per-object, fulfills request]->[TelemetryHandler]
[TelemetryHandler]->[<state> exposes data]
[TelemetryHandler]->[<state> notifies controller]
[exposes data]->[Controller]
[notifies controller]->[Controller]
[Controller]->[<state> prepares data for template]
[prepares data for template]->[Template]
[Template]->[<state> displays data]
[displays data]->[<end> End]
```
One peculiarity of this approach is that we package many responses
together at once in the `TelemetryService`, then unpack these in the
`TelemetryCapability`, then repackage these in the `TelemetryHandler`.
The rationale for this is as follows:
* In the `TelemetryService`, we want to have the ability to combine
multiple requests into one call to the back-end, as many back-ends
will support this. It follows that we give the response as a single
object, packages in a manner that allows responses to individual
requests to be easily identified.
* In the `TelemetryCapability`, we want to provide telemetry for a
_single object_, so the telemetry data gets unpacked. This allows
for the unpacking of data to be handled in a single place, and
also permits a flexible substitution method; domain objects may have
implementations of the `telemetry` capability that do not use the
`TelemetryService` at all, while still maintaining compatibility
with any presentation layer code written to utilize this capability.
(This is true of capabilities generally.)
* In the `TelemetryHandler`, we want to group multiple responses back
together again to make it easy for the presentation layer to consume.
In this case, the grouping is different from what may have occurred
in the `TelemetryService`; this grouping is based on what is expected
to be useful _in a specific view_. The `TelemetryService`
may be receiving requests from multiple views.
```nomnoml
[<start> Start]->[<database> Telemetry Back-end]
[Telemetry Back-end]->[<state> notifies client of new data]
[notifies client of new data]->[TelemetryService]
[TelemetryService]->[<choice> relevant subscribers?]
[relevant subscribers?] yes ->[<state> notify subscribers]
[relevant subscribers?] no ->[<state> ignore]
[ignore]->[<end> Ignored]
[notify subscribers]->[TelemetryCapability]
[TelemetryCapability]->[<state> notify listener]
[notify listener]->[TelemetryHandler]
[TelemetryHandler]->[<state> exposes data]
[TelemetryHandler]->[<state> notifies controller]
[exposes data]->[Controller]
[notifies controller]->[Controller]
[Controller]->[<state> prepares data for template]
[prepares data for template]->[Template]
[Template]->[<state> displays data]
[displays data]->[<end> End]
```
The flow of real-time data is similar, and is handled by a sequence
of callbacks between the presentation layer component which is
interested in data and the telemetry service. Providers in the
telemetry service listen to the back-end for new data (via whatever
mechanism their specific back-end supports), package this data in
the same manner as historical data, and pass that to the callbacks
which are associated with relevant requests.
## Persistence Service
```nomnoml
#direction: right
[<abstract> PersistenceService|
listSpaces() : Promise.<Array.<string>>
listObjects() : Promise.<Array.<string>>
createObject(space : string, key : string, document : object) : Promise.<boolean>
readObject(space : string, key : string, document : object) : Promise.<object>
updateObject(space : string, key : string, document : object) : Promise.<boolean>
deleteObject(space : string, key : string, document : object) : Promise.<boolean>
]
[ElasticPersistenceProvider]--:>[PersistenceService]
[ElasticPersistenceProvider]->[<database> ElasticSearch]
[CouchPersistenceProvider]--:>[PersistenceService]
[CouchPersistenceProvider]->[<database> CouchDB]
```
Closely related to the notion of domain objects models is their
persistence. The `PersistenceService` allows these to be saved
and loaded. (Currently, this capability is only used for domain
object models, but the interface has been designed without this idea
in mind; other kinds of documents could be saved and loaded in the
same manner.)
There is no single definitive implementation of a `PersistenceService` in
the platform. Optional adapters are provided to store and load documents
from CouchDB and ElasticSearch, respectively; plugin authors may also
write additional adapters to utilize different back end technologies.
## Action Service
```nomnoml
[ActionService|
getActions(context : ActionContext) : Array.<Action>
]
[ActionProvider]--:>[ActionService]
[CreateActionProvider]--:>[ActionService]
[ActionAggregator]--:>[ActionService]
[LoggingActionDecorator]--:>[ActionService]
[PolicyActionDecorator]--:>[ActionService]
[LoggingActionDecorator]o-[PolicyActionDecorator]
[PolicyActionDecorator]o-[ActionAggregator]
[ActionAggregator]o-[ActionProvider]
[ActionAggregator]o-[CreateActionProvider]
[ActionProvider]o-[actions]
[CreateActionProvider]o-[TypeService]
[PolicyActionDecorator]o-[PolicyService]
```
Actions are discrete tasks or behaviors that can be initiated by a user
upon or using a domain object. Actions may appear as menu items or
buttons in the user interface, or may be triggered by certain gestures.
Responsibilities of platform components of the action service are as
follows:
* `ActionProvider` exposes actions registered via extension category
`actions`, supporting simple addition of new actions. Actions are
filtered down to match action contexts based on criteria defined as
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
are generated after looking up which actions are available from the
[`TypeService`](#type-service).
* `ActionAggregator` merges together actions from multiple providers.
* `PolicyActionDecorator` enforces the `action` policy category by
filtering out actions which violate this policy, as determined by
consulting the [`PolicyService`](#policy-service).
* `LoggingActionDecorator` wraps exposed actions and writes to the
console when they are performed.
## View Service
```nomnoml
[ViewService|
getViews(domainObject : DomainObject) : Array.<View>
]
[ViewProvider]--:>[ViewService]
[PolicyViewDecorator]--:>[ViewService]
[ViewProvider]o-[views]
[PolicyViewDecorator]o-[ViewProvider]
```
The view service provides views that are relevant to a specified domain
object. A "view" is a user-selectable visualization of a domain object.
The responsibilities of components of the view service are as follows:
* `ViewProvider` exposes views registered via extension category
`views`, supporting simple addition of new views. Views are
filtered down to match domain objects based on criteria defined as
part of a view's extension definition.
* `PolicyViewDecorator` enforces the `view` policy category by
filtering out views which violate this policy, as determined by
consulting the [`PolicyService`](#policy-service).
## Policy Service
```nomnoml
[PolicyService|
allow(category : string, candidate : object, context : object, callback? : Function) : boolean
]
[PolicyProvider]--:>[PolicyService]
[PolicyProvider]o-[policies]
```
The policy service provides a general-purpose extensible decision-making
mechanism; plugins can add new extensions of category `policies` to
modify decisions of a known category.
Often, the policy service is referenced from a decorator for another
service, to filter down the results of using that service based on some
appropriate policy category.
The policy provider works by looking up all registered policy extensions
which are relevant to a particular _category_, then consulting each in
order to see if they allow a particular _candidate_ in a particular
_context_; the types for the `candidate` and `context` arguments will
vary depending on the `category`. Any one policy may disallow the
decision as a whole.
```nomnoml
[<start> Start]->[<state> is something allowed?]
[is something allowed?]->[PolicyService]
[PolicyService]->[<state> look up relevant policies by category]
[look up relevant policies by category]->[<state> consult policy #1]
[consult policy #1]->[Policy #1]
[Policy #1]->[<choice> policy #1 allows?]
[policy #1 allows?] no ->[<state> decision disallowed]
[policy #1 allows?] yes ->[<state> consult policy #2]
[consult policy #2]->[Policy #2]
[Policy #2]->[<choice> policy #2 allows?]
[policy #2 allows?] no ->[<state> decision disallowed]
[policy #2 allows?] yes ->[<state> consult policy #3]
[consult policy #3]->[<state> ...]
[...]->[<state> consult policy #n]
[consult policy #n]->[Policy #n]
[Policy #n]->[<choice> policy #n allows?]
[policy #n allows?] no ->[<state> decision disallowed]
[policy #n allows?] yes ->[<state> decision allowed]
[decision disallowed]->[<end> Disallowed]
[decision allowed]->[<end> Allowed]
```
The policy decision is effectively an "and" operation over the individual
policy decisions: That is, all policies must agree to allow a particular
policy decision, and the first policy to disallow a decision will cause
the entire decision to be disallowed. As a consequence of this, policies
should generally be written with a default behavior of "allow", and
should only disallow the specific circumstances they are intended to
disallow.
## Type Service
```nomnoml
[TypeService|
listTypes() : Array.<Type>
getType(key : string) : Type
]
[TypeProvider]--:>[TypeService]
[TypeProvider]o-[types]
```
The type service provides metadata about the different types of domain
objects that exist within an Open MCT Web application. The platform
implementation reads these types in from extension category `types`
and wraps them in a JavaScript interface.

View File

@ -0,0 +1,78 @@
# Introduction
The purpose of this document is to familiarize developers with the
overall architecture of Open MCT Web.
The target audience includes:
* _Platform maintainers_: Individuals involved in developing,
extending, and maintaing capabilities of the platform.
* _Integration developers_: Individuals tasked with integrated
Open MCT Web into a larger system, who need to understand
its inner workings sufficiently to complete this integration.
As the focus of this document is on architecture, whenever possible
implementation details (such as relevant API or JSON syntax) have been
omitted. These details may be found in the developer guide.
# Overview
Open MCT Web is client software: It runs in a web browser and
provides a user interface, while communicating with various
server-side resources through browser APIs.
```nomnoml
#direction: right
[Client|[Browser|[Open MCT Web]->[Browser APIs]]]
[Server|[Web services]]
[Client]<->[Server]
```
While Open MCT Web can be configured to run as a standalone client,
this is rarely very useful. Instead, it is intended to be used as a
display and interaction layer for information obtained from a
variety of back-end services. Doing so requires authoring or utilizing
adapter plugins which allow Open MCT Web to interact with these services.
Typically, the pattern here is to provide a known interface that
Open MCT Web can utilize, and implement it such that it interacts with
whatever back-end provides the relevant information.
Examples of back-ends that can be utilized in this fashion include
databases for the persistence of user-created objects, or sources of
telemetry data.
## Software Architecture
The simplest overview of Open MCT Web is to look at it as a "layered"
architecture, where each layer more clearly specifies the behavior
of the software.
```nomnoml
#direction: down
[Open MCT Web|
[Platform]<->[Application]
[Framework]->[Application]
[Framework]->[Platform]
]
```
These layers are:
* [_Framework_](Framework.md): The framework layer is responsible for
managing the interactions between application components. It has no
application-specific knowledge; at this layer, we have only
established an abstraction by which different software components
may communicate and/or interact.
* [_Platform_](Platform.md): The platform layer defines the general look, feel, and
behavior of Open MCT Web. This includes user-facing components like
Browse mode and Edit mode, as well as underlying elements of the
information model and the general service infrastructure.
* _Application_: The application layer defines specific features of
an application built on Open MCT Web. This includes adapters to
specific back-ends, new types of things for users to create, and
new ways of visualizing objects within the system. This layer
typically consists of a mix of custom plug-ins to Open MCT Web,
as well as optional features (such as Plot view) included alongside
the platform.

3
docs/src/guide/index.md Normal file
View File

@ -0,0 +1,3 @@
# Developer Guide
This is a placeholder for the developer guide.

36
docs/src/index.html Normal file
View File

@ -0,0 +1,36 @@
<!--
Open MCT Web, Copyright (c) 2014-2015, United States Government
as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved.
Open MCT Web is licensed under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
Open MCT Web includes source code licensed under additional open source
licenses. See the Open Source Licenses file (LICENSES.md) included with
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Open MCT Web Documentation</title>
</head>
<body class="user-environ" ng-view>
Sections:
<ul>
<li><a href="api/">API</a></li>
<li><a href="guide/">Developer Guide</a></li>
<li><a href="architecture/">Architecture Overview</a></li>
</ul>
</body>
</html>

View File

@ -34,6 +34,10 @@
{
"key": "time",
"name": "Time"
},
{
"key": "yesterday",
"name": "Yesterday"
}
],
"ranges": [
@ -61,4 +65,4 @@
}
]
}
}
}

View File

@ -25,8 +25,8 @@
* Module defining SinewaveTelemetryProvider. Created by vwoeltje on 11/12/14.
*/
define(
["./SinewaveTelemetry"],
function (SinewaveTelemetry) {
["./SinewaveTelemetrySeries"],
function (SinewaveTelemetrySeries) {
"use strict";
/**
@ -45,7 +45,7 @@ define(
function generateData(request) {
return {
key: request.key,
telemetry: new SinewaveTelemetry(request)
telemetry: new SinewaveTelemetrySeries(request)
};
}
@ -112,4 +112,4 @@ define(
return SinewaveTelemetryProvider;
}
);
);

View File

@ -29,35 +29,47 @@ define(
function () {
"use strict";
var firstObservedTime = Date.now();
var ONE_DAY = 60 * 60 * 24,
firstObservedTime = Math.floor(Date.now() / 1000) - ONE_DAY;
/**
*
* @constructor
*/
function SinewaveTelemetry(request) {
var latestObservedTime = Date.now(),
count = Math.floor((latestObservedTime - firstObservedTime) / 1000),
period = request.period || 30,
generatorData = {};
function SinewaveTelemetrySeries(request) {
var timeOffset = (request.domain === 'yesterday') ? ONE_DAY : 0,
latestTime = Math.floor(Date.now() / 1000) - timeOffset,
firstTime = firstObservedTime - timeOffset,
endTime = (request.end !== undefined) ?
Math.floor(request.end / 1000) : latestTime,
count = Math.min(endTime, latestTime) - firstTime,
period = +request.period || 30,
generatorData = {},
requestStart = (request.start === undefined) ? firstTime :
Math.max(Math.floor(request.start / 1000), firstTime),
offset = requestStart - firstTime;
if (request.size !== undefined) {
offset = Math.max(offset, count - request.size);
}
generatorData.getPointCount = function () {
return count;
return count - offset;
};
generatorData.getDomainValue = function (i, domain) {
return i * 1000 +
(domain !== 'delta' ? firstObservedTime : 0);
return (i + offset) * 1000 + firstTime * 1000 -
(domain === 'yesterday' ? ONE_DAY : 0);
};
generatorData.getRangeValue = function (i, range) {
range = range || "sin";
return Math[range](i * Math.PI * 2 / period);
return Math[range]((i + offset) * Math.PI * 2 / period);
};
return generatorData;
}
return SinewaveTelemetry;
return SinewaveTelemetrySeries;
}
);
);

View File

@ -0,0 +1,12 @@
{
"extensions": {
"components": [
{
"implementation": "ExampleIdentityService.js",
"provides": "identityService",
"type": "provider",
"depends": [ "dialogService" ]
}
]
}
}

View File

@ -0,0 +1,75 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
function () {
"use strict";
var DEFAULT_IDENTITY = { key: "user", name: "Example User" },
DIALOG_STRUCTURE = {
name: "Identify Yourself",
sections: [{ rows: [
{
name: "User ID",
control: "textfield",
key: "key",
required: true
},
{
name: "Human name",
control: "textfield",
key: "name",
required: true
}
]}]
};
/**
* Example implementation of an identity service. This prompts the
* user to enter a name and user ID; in a more realistic
* implementation, this would be read from a server, possibly
* prompting for a user name and password (or similar) as
* appropriate.
*
* @implements {IdentityService}
* @memberof platform/identity
*/
function ExampleIdentityProvider(dialogService) {
// Handle rejected dialog messages by treating the
// current user as undefined.
function echo(v) { return v; }
function giveUndefined() { return undefined; }
this.userPromise =
dialogService.getUserInput(DIALOG_STRUCTURE, DEFAULT_IDENTITY)
.then(echo, giveUndefined);
}
ExampleIdentityProvider.prototype.getUser = function () {
return this.userPromise;
};
return ExampleIdentityProvider;
}
);

View File

@ -1,86 +0,0 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,localStorage*/
/**
* Stubbed implementation of a persistence provider,
* to permit objects to be created, saved, etc.
*/
define(
[],
function () {
'use strict';
function BrowserPersistenceProvider($q, SPACE) {
var spaces = SPACE ? [SPACE] : [],
promises = {
as: function (value) {
return $q.when(value);
}
},
provider;
function setValue(key, value) {
localStorage[key] = JSON.stringify(value);
}
function getValue(key) {
if (localStorage[key]) {
return JSON.parse(localStorage[key]);
}
return {};
}
provider = {
listSpaces: function () {
return promises.as(spaces);
},
listObjects: function (space) {
var space_obj = getValue(space);
return promises.as(Object.keys(space_obj));
},
createObject: function (space, key, value) {
var space_obj = getValue(space);
space_obj[key] = value;
setValue(space, space_obj);
return promises.as(true);
},
readObject: function (space, key) {
var space_obj = getValue(space);
return promises.as(space_obj[key]);
},
deleteObject: function (space, key, value) {
var space_obj = getValue(space);
delete space_obj[key];
return promises.as(true);
}
};
provider.updateObject = provider.createObject;
return provider;
}
return BrowserPersistenceProvider;
}
);

View File

@ -4,7 +4,11 @@
{
"implementation": "WatchIndicator.js",
"depends": ["$interval", "$rootScope"]
},
{
"implementation": "DigestIndicator.js",
"depends": ["$interval", "$rootScope"]
}
]
}
}
}

View File

@ -0,0 +1,77 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Displays the number of digests that have occurred since the
* indicator was first instantiated.
* @constructor
* @param $interval Angular's $interval
* @implements {Indicator}
*/
function DigestIndicator($interval, $rootScope) {
var digests = 0,
displayed = 0,
start = Date.now();
function update() {
var secs = (Date.now() - start) / 1000;
displayed = Math.round(digests / secs);
}
function increment() {
digests += 1;
}
$rootScope.$watch(increment);
// Update state every second
$interval(update, 1000);
// Provide initial state, too
update();
return {
getGlyph: function () {
return ".";
},
getGlyphClass: function () {
return undefined;
},
getText: function () {
return displayed + " digests/sec";
},
getDescription: function () {
return "";
}
};
}
return DigestIndicator;
}
);

View File

@ -23,6 +23,7 @@
<html>
<head lang="en">
<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="platform/framework/lib/require.js"

View File

@ -1,10 +1,12 @@
{
"source": {
"include": [
"example/",
"platform/"
],
"includePattern": "(example|platform)/.+\\.js$",
"includePattern": "platform/.+\\.js$",
"excludePattern": ".+\\Spec\\.js$|lib/.+"
}
}
},
"plugins": [
"plugins/markdown"
]
}

View File

@ -16,13 +16,22 @@
"karma-jasmine": "^0.1.5",
"karma-phantomjs-launcher": "^0.1.4",
"karma-requirejs": "^0.2.2",
"requirejs": "^2.1.17"
"requirejs": "^2.1.17",
"marked": "^0.3.5",
"glob": ">= 3.0.0",
"split": "^1.0.0",
"mkdirp": "^0.5.1",
"nomnoml": "^0.0.3",
"canvas": "^1.2.7"
},
"scripts": {
"start": "node app.js",
"test": "karma start --single-run",
"jshint": "jshint platform example || exit 0",
"jsdoc": "jsdoc -c jsdoc.json -r -d docs"
"watch": "karma start",
"jsdoc": "jsdoc -c jsdoc.json -r -d target/docs/api",
"otherdoc": "node docs/gendocs.js --in docs/src --out target/docs",
"docs": "npm run jsdoc ; npm run otherdoc"
},
"repository": {
"type": "git",

View File

@ -21,6 +21,11 @@
*****************************************************************************/
/*global define*/
/**
* Implements Open MCT Web's About dialog.
* @namespace platform/commonUI/about
*/
define(
[],
function () {
@ -29,35 +34,36 @@ define(
/**
* The AboutController provides information to populate the
* About dialog.
* @memberof platform/commonUI/about
* @constructor
* @param {object[]} versions an array of version extensions;
* injected from `versions[]`
* @param $window Angular-injected window object
*/
function AboutController(versions, $window) {
return {
/**
* Get version info. This is given as an array of
* objects, where each object is intended to appear
* as a line-item in the version information listing.
* @memberof AboutController#
* @returns {object[]} version information
*/
versions: function () {
return versions;
},
/**
* Open a new window (or tab, depending on browser
* configuration) containing open source licenses.
* @memberof AboutController#
*/
openLicenses: function () {
// Open a new browser window at the licenses route
$window.open("#/licenses");
}
};
this.versionDefinitions = versions;
this.$window = $window;
}
/**
* Get version info. This is given as an array of
* objects, where each object is intended to appear
* as a line-item in the version information listing.
* @returns {object[]} version information
*/
AboutController.prototype.versions = function () {
return this.versionDefinitions;
};
/**
* Open a new window (or tab, depending on browser
* configuration) containing open source licenses.
*/
AboutController.prototype.openLicenses = function () {
// Open a new browser window at the licenses route
this.$window.open("#/licenses");
};
return AboutController;
}
);
);

View File

@ -29,20 +29,22 @@ define(
/**
* Provides extension-introduced licenses information to the
* licenses route.
* @memberof platform/commonUI/about
* @constructor
*/
function LicenseController(licenses) {
return {
/**
* Get license information.
* @returns {Array} license extensions
*/
licenses: function () {
return licenses;
}
};
this.licenseDefinitions = licenses;
}
/**
* Get license information.
* @returns {Array} license extensions
* @memberof platform/commonUI/about.LicenseController#
*/
LicenseController.prototype.licenses = function () {
return this.licenseDefinitions;
};
return LicenseController;
}
);
);

View File

@ -29,21 +29,23 @@ define(
/**
* The LogoController provides functionality to the application
* logo in the bottom-right of the user interface.
* @memberof platform/commonUI/about
* @constructor
* @param {OverlayService} overlayService the overlay service
*/
function LogoController(overlayService) {
return {
/**
* Display the About dialog.
* @memberof LogoController#
*/
showAboutDialog: function () {
overlayService.createOverlay("overlay-about");
}
};
this.overlayService = overlayService;
}
/**
* Display the About dialog.
* @memberof LogoController#
* @memberof platform/commonUI/about.LogoController#
*/
LogoController.prototype.showAboutDialog = function () {
this.overlayService.createOverlay("overlay-about");
};
return LogoController;
}
);
);

View File

@ -16,26 +16,41 @@
{
"key": "BrowseController",
"implementation": "BrowseController.js",
"depends": [ "$scope", "$route", "$location", "objectService", "navigationService", "urlService" ]
"depends": [
"$scope",
"$route",
"$location",
"$q",
"objectService",
"navigationService",
"urlService"
]
},
{
"key": "BrowseTreeController",
"implementation": "BrowseTreeController.js",
"priority": "preferred",
"depends": [ "$scope", "agentService" ]
},
{
"key": "BrowseObjectController",
"implementation": "BrowseObjectController.js",
"depends": [ "$scope", "$location", "$route" ]
"depends": [ "$scope", "$location", "$route", "$q",
"navigationService" ]
},
{
"key": "CreateMenuController",
"implementation": "creation/CreateMenuController",
"implementation": "creation/CreateMenuController.js",
"depends": [ "$scope" ]
},
{
"key": "LocatorController",
"implementation": "creation/LocatorController",
"depends": [ "$scope" ]
"implementation": "creation/LocatorController.js",
"depends": [ "$scope", "$timeout" ]
},
{
"key": "MenuArrowController",
"implementation": "MenuArrowController",
"implementation": "MenuArrowController.js",
"depends": [ "$scope" ]
}
],
@ -45,16 +60,11 @@
"templateUrl": "templates/create/locator.html"
}
],
"templates": [
{
"key": "topbar-browse",
"templateUrl": "templates/topbar-browse.html"
}
],
"representations": [
{
"key": "browse-object",
"templateUrl": "templates/browse-object.html",
"gestures": ["drop"],
"uses": [ "view" ]
},
{
@ -69,8 +79,8 @@
{
"key": "grid-item",
"templateUrl": "templates/items/grid-item.html",
"uses": [ "type", "action" ],
"gestures": [ "info","menu" ]
"uses": [ "type", "action", "location" ],
"gestures": [ "info", "menu" ]
},
{
"key": "object-header",
@ -82,18 +92,18 @@
"templateUrl": "templates/menu-arrow.html",
"uses": [ "action" ],
"gestures": [ "menu" ]
},
{
"key": "back-arrow",
"uses": [ "context" ],
"templateUrl": "templates/back-arrow.html"
}
],
"services": [
{
"key": "navigationService",
"implementation": "navigation/NavigationService.js"
},
{
"key": "creationService",
"implementation": "creation/CreationService.js",
"depends": [ "persistenceService", "$q", "$log" ]
}
}
],
"actions": [
{
@ -110,7 +120,7 @@
"depends": [ "urlService", "$window" ],
"group": "windowing",
"glyph": "y",
"priority": "preferred"
"priority": "preferred"
},
{
"key": "fullscreen",
@ -118,7 +128,7 @@
"category": "view-control",
"group": "windowing",
"glyph": "z",
"priority": "default"
"priority": "default"
}
],
"views": [
@ -141,6 +151,13 @@
"type": "provider",
"implementation": "creation/CreateActionProvider.js",
"depends": [ "typeService", "dialogService", "creationService", "policyService" ]
},
{
"key": "CreationService",
"provides": "creationService",
"type": "provider",
"implementation": "creation/CreationService.js",
"depends": [ "persistenceService", "now", "$q", "$log" ]
}
],
"runs": [

View File

@ -0,0 +1,30 @@
<!--
Open MCT Web, Copyright (c) 2014-2015, United States Government
as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved.
Open MCT Web is licensed under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
Open MCT Web includes source code licensed under additional open source
licenses. See the Open Source Licenses file (LICENSES.md) included with
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<!-- Back Arrow Icon used on mobile-->
<a
class='type-icon icon ui-symbol s-back'
ng-show="context.getPath().length > 2"
ng-click="context.getParent().getCapability('action').perform('navigate')">
{
</a>

View File

@ -19,29 +19,100 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<span ng-controller="BrowseObjectController">
<div class="object-browse-bar bar abs">
<div class="items-select left abs">
<div ng-init="
editBtns = [{ cssclass: 'save',title: 'Save' },{ cssclass: 'cancel',title: 'Discard Changes', action:'cancelEditing' }];
"></div>
<span ng-controller="BrowseObjectController"
mct-before-unload="getUnloadWarning()">
<a class="s-btn"
style="opacity: 0.9; position:absolute; right: 250px; z-index: 100"
ng-class="{ major:!editMode }"
ng-click="editMode = !editMode">Set EditMode to {{!editMode}}</a>
<div class="object-browse-bar bar l-flex">
<div class="items-select left">
<mct-representation key="'back-arrow'"
mct-object="domainObject"
class="l-back"></mct-representation>
<mct-representation key="'object-header'" mct-object="domainObject">
</mct-representation>
</div>
<div class="btn-bar right abs">
<mct-representation key="'action-group'"
mct-object="domainObject"
parameters="{ category: 'view-control' }">
</mct-representation>
<div class="btn-bar right">
<mct-representation key="'switcher'"
mct-object="domainObject"
ng-model="representation">
</mct-representation>
<!-- Temporarily, on mobile, the action buttons are hidden-->
<mct-representation key="'action-group'"
mct-object="domainObject"
parameters="{ category: 'view-control' }"
class="mobile-hide">
</mct-representation>
</div>
</div>
<div class='object-holder abs vscroll'>
<mct-representation key="representation.selected.key"
mct-object="representation.selected.key && domainObject">
</mct-representation>
<div class="l-object-wrapper"
ng-class="{ active:editMode, 'edit-main':editMode}">
<div class="l-object-wrapper-inner l-flex flex-col">
<!-- Toolbar and Save/Cancel buttons -->
<div class="l-edit-controls flex-elem l-flex flex-row flex-align-end"
ng-class="{ active:editMode }">
<!-- <mct-toolbar name="mctToolbar"
structure="toolbar.structure"
ng-model="toolbar.state"
class="flex-elem grow">
</mct-toolbar>-->
<!-- from toolbar.html -->
<mct-toolbar-x class="flex-elem grow ellipsis">
<form novalidate>
<div class="tool-bar btn-bar">
<span class="l-control-group">
<span class="s-menu-btn">Foo</span>
<span class="s-menu-btn">Bar</span>
</span>
<span class="l-control-group">
<span class="s-menu-btn">Foo</span>
<span class="s-menu-btn">Bar</span>
<span class="s-menu-btn">Foo</span>
<span class="s-menu-btn">Lorem</span>
</span>
<span class="l-control-group">
<span class="s-menu-btn">Foo</span>
<span class="s-menu-btn">Bar</span>
<span class="s-menu-btn">Lorem</span>
</span>
<span class="s-menu-btn">Lorem</span>
</div>
</form>
</mct-toolbar-x>
<!-- <mct-representation key="'edit-action-buttons'"
mct-object="domainObject"
class='flex-elem conclude-editing'>
</mct-representation>-->
<!-- from edit-action-buttons.html -->
<span class='flex-elem conclude-editing'>
<span ng-repeat="btn in editBtns">
<a class='s-btn t-{{btn.cssclass}}'
title='{{btn.title}}'
ng-click="doAction(btn.action)"
ng-class="{ major: $index === 0 }">
<span class="title-label">{{btn.title}}</span>
</a>
</span>
</span>
</div>
<mct-representation key="representation.selected.key"
mct-object="representation.selected.key && domainObject"
class="flex-elem grow object-holder">
</mct-representation>
</div>
</div>
</span>

View File

@ -19,30 +19,51 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<div content="jquery-wrapper" class="abs holder-all browse-mode">
<div class="abs holder-all browse-mode" ng-controller="BrowseController">
<mct-include key="'topbar-browse'"></mct-include>
<div class="holder browse-area s-browse-area abs" ng-controller="BrowseController">
<div class="holder browse-area s-browse-area abs browse-wrapper"
ng-controller="BrowseTreeController as tree"
ng-class="tree.visible() ? 'browse-showtree' : 'browse-hidetree'">
<mct-split-pane class='contents abs' anchor='left'>
<div
class='split-pane-component treeview pane left'
>
<mct-representation key="'create-button'" mct-object="navigatedObject">
</mct-representation>
<div class='holder tree-holder abs'>
<mct-representation key="'tree'"
mct-object="domainObject"
ng-model="treeModel">
<div class='split-pane-component treeview pane left'>
<div class="holder abs l-mobile">
<mct-representation key="'create-button'"
mct-object="navigatedObject"
mct-device="desktop">
</mct-representation>
<div class='holder search-holder abs'
ng-class="{active: treeModel.search}">
<mct-representation key="'search'"
mct-object="domainObject"
ng-model="treeModel">
</mct-representation>
</div>
<div class='tree-holder abs mobile-tree-holder'
ng-hide="treeModel.search">
<mct-representation key="'tree'"
mct-object="domainObject"
parameters="tree"
ng-model="treeModel">
</mct-representation>
</div>
</div>
</div>
<mct-splitter></mct-splitter>
<div class='split-pane-component items pane'>
<div class='holder abs' id='content-area'>
<mct-representation mct-object="navigatedObject" key="'browse-object'">
<mct-splitter class="mobile-hide"></mct-splitter>
<div class='split-pane-component items pane right-repr'>
<div class='holder abs l-mobile' id='content-area'>
<mct-representation mct-object="navigatedObject"
key="'browse-object'">
</mct-representation>
</div>
<div class="key-properties ui-symbol icon mobile-menu-icon desktop-hide"
mct-device="mobile"
ng-click="tree.toggle()">m</div>
</div>
</mct-split-pane>
</div>
<mct-include key="'bottombar'"></mct-include>
</div>

View File

@ -19,11 +19,11 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<div class='object-header'>
<span class="label s-label">
<span class='type-icon icon ui-symbol'>{{type.getGlyph()}}</span>
<div class='object-header object-header-mobile'>
<span class='type-icon ui-symbol'>{{type.getGlyph()}}</span>
<!--span class='type-name mobile-important-hide'>{{type.getName()}}</span-->
<span class="l-elem-wrapper l-flex">
<span ng-if="parameters.mode" class='action'>{{parameters.mode}}</span>
<span class='type-name'>{{type.getName()}}</span>
<span class='title-label'>{{model.name}}</span>
<mct-representation key="'menu-arrow'" mct-object='domainObject'></mct-representation>
</span>

View File

@ -20,10 +20,11 @@
at runtime from the About dialog for additional information.
-->
<div class="menu-element wrapper" ng-controller="ClickAwayController as createController">
<div class="btn btn-menu create-btn major" ng-click="createController.toggle()">
Create
<div class="s-menu-btn major create-btn" ng-click="createController.toggle()">
<span class="ui-symbol icon type-icon">&#x2b;</span>
<span class="title-label">Create</span>
</div>
<div class="menu dropdown super-menu" ng-show="createController.isActive()">
<div class="menu super-menu" ng-show="createController.isActive()">
<mct-representation mct-object="domainObject" key="'create-menu'">
</mct-representation>
</div>

View File

@ -23,9 +23,8 @@
<div class="pane left menu-items">
<ul>
<li ng-repeat="createAction in createActions">
<li ng-repeat="createAction in createActions" ng-click="createAction.perform()">
<a
ng-click="createAction.perform()"
ng-mouseover="representation.activeMetadata = createAction.getMetadata()"
ng-mouseleave="representation.activeMetadata = undefined">
<span class="ui-symbol icon type-icon">
@ -48,4 +47,4 @@
{{representation.activeMetadata.description}}
</div>
</div>
</div>
</div>

View File

@ -20,7 +20,7 @@
at runtime from the About dialog for additional information.
-->
<div ng-controller="LocatorController" class="selector-list">
<div>
<div class="wrapper">
<mct-representation key="'tree'"
mct-object="rootObject"
ng-model="treeModel">

View File

@ -21,27 +21,29 @@
-->
<!-- For selected, add class 'selected' to outer div -->
<div class='item grid-item' ng-click='action.perform("navigate")'>
<div class="contents abs">
<div class='contents abs'>
<div class='top-bar bar abs'>
<div class='left abs'>
<mct-include key="_checkbox"></mct-include>
</div>
<div class='right abs'>
<div class='ui-symbol icon alert hidden' onclick="alert('Not yet functional. When this is visible, it means that this object needs to be updated. Clicking will allow that action via a dialog.');">!</div>
<div class='ui-symbol icon profile' title="Shared">P</div>
</div>
<div class='ui-symbol profile' title='Shared'>&#x4f;</div>
<mct-representation class="desktop-hide" key="'info-button'" mct-object="domainObject"></mct-representation>
</div>
<div class='item-main abs'>
<div class='ui-symbol icon lg abs item-type'>{{type.getGlyph()}}</div>
<div class='ui-symbol icon abs item-open'>}</div>
<div class='ui-symbol icon lg item-type'>
{{type.getGlyph()}}
<span
class="ui-symbol l-icon-link" title="This object is a link"
ng-show="location.isLink()"
></span>
</div>
<div class='ui-symbol abs item-open'>}</div>
</div>
<div class='bottom-bar bar abs'>
<div class='title'>{{model.name}}</div>
<div class='details'>
<span>{{type.getName()}}</span>
<span ng-show="model.composition !== undefined">
{{model.composition.length}} Items
- {{model.composition.length}} Item<span ng-show="model.composition.length > 1">s</span>
</span>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,36 +0,0 @@
<!--
Open MCT Web, Copyright (c) 2014-2015, United States Government
as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved.
Open MCT Web is licensed under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
Open MCT Web includes source code licensed under additional open source
licenses. See the Open Source Licenses file (LICENSES.md) included with
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<div class='top-bar browse abs'>
<!-- TO-DO: replace JS placeholders for click actions -->
<div class='browse-main bar abs left'>
<a class="menu-element btn btn-menu browse-btn" onclick="alert('Not yet functional. This will allow filtering of browsed objects and search context.');">
<span class='ui-symbol badge major' href=''>*</span>Browse All<span class='ui-symbol invoke-menu'>v</span>
</a>
<input type='text' class='control filter' name='filter-available'/>
<a class='icon icon-filter ui-symbol' onclick="alert('Not yet functional. This will initiate a search.');">M</a>
</div>
<div class='icon-buttons-main bar abs right'>
<a class='ui-symbol icon major alert' onclick="alert('Not yet functional. This will allow updating of domain objects that need to be refreshed.');">!<span id='alert-actions-menu' class='ui-symbol invoke-menu'>v</span></a>
<!--a class='ui-symbol icon major profile' href=''>P<span id='profile-actions-menu' class='ui-symbol invoke-menu'>v</span></a-->
<a class='ui-symbol icon major settings' onclick="alert('Not yet functional. This will allow access to application configuration settings.');">G<span id='settings-actions-menu' class='ui-symbol invoke-menu'>v</span></a>
</div>
</div>

View File

@ -22,11 +22,15 @@
/*global define,Promise*/
/**
* Module defining BrowseController. Created by vwoeltje on 11/7/14.
* This bundle implements Browse mode.
* @namespace platform/commonUI/browse
*/
define(
[],
function () {
[
'../../../representation/src/gestures/GestureConstants',
'../../edit/src/objects/EditableDomainObject'
],
function (GestureConstants, EditableDomainObject) {
"use strict";
var ROOT_ID = "ROOT",
@ -39,9 +43,10 @@ define(
* which Angular templates first have access to the domain object
* hierarchy.
*
* @memberof platform/commonUI/browse
* @constructor
*/
function BrowseController($scope, $route, $location, objectService, navigationService, urlService) {
function BrowseController($scope, $route, $location, $q, objectService, navigationService, urlService) {
var path = [ROOT_ID].concat(
($route.current.params.ids || DEFAULT_PATH).split("/")
);
@ -53,7 +58,7 @@ define(
unlisten = $scope.$on('$locationChangeSuccess', function () {
// Checks path to make sure /browse/ is at front
// if so, change $route.current
// if so, change $route.current
if ($location.path().indexOf("/browse/") === 0) {
$route.current = priorRoute;
}
@ -63,19 +68,23 @@ define(
// path to new, addressed, path based on
// domainObject
$location.path(urlService.urlForLocation("browse", domainObject));
}
// Callback for updating the in-scope reference to the object
// that is currently navigated-to.
function setNavigation(domainObject) {
$scope.navigatedObject = domainObject;
var wrappedObject = domainObject;
$scope.navigatedObject = wrappedObject;
$scope.treeModel.selectedObject = domainObject;
navigationService.setNavigation(domainObject);
updateRoute(domainObject);
}
function navigateTo(domainObject) {
// Check if an object has been navigated-to already...
// If not, or if an ID path has been explicitly set in the URL,
// navigate to the URL-specified object.
@ -146,14 +155,15 @@ define(
// Also listen for changes which come from the tree
$scope.$watch("treeModel.selectedObject", setNavigation);
// Clean up when the scope is destroyed
$scope.$on("$destroy", function () {
navigationService.removeListener(setNavigation);
});
}
return BrowseController;
}
);

View File

@ -22,17 +22,21 @@
/*global define,Promise*/
define(
[],
function () {
['../../../representation/src/gestures/GestureConstants',
'../../edit/src/objects/EditableDomainObject'],
function (GestureConstants, EditableDomainObject) {
"use strict";
/**
* Controller for the `browse-object` representation of a domain
* object (the right-hand side of Browse mode.)
* @memberof platform/commonUI/browse
* @constructor
*/
function BrowseObjectController($scope, $location, $route) {
function BrowseObjectController($scope, $location, $route, $q, navigationService) {
var navigatedObject;
function setViewForDomainObject(domainObject) {
var locationViewKey = $location.search().view;
function selectViewIfMatching(view) {
@ -46,6 +50,8 @@ define(
((domainObject && domainObject.useCapability('view')) || [])
.forEach(selectViewIfMatching);
}
$scope.editMode = domainObject.getDomainObject ? true : false;
navigatedObject = domainObject;
}
function updateQueryParam(viewKey) {
@ -66,8 +72,18 @@ define(
$scope.$watch('domainObject', setViewForDomainObject);
$scope.$watch('representation.selected.key', updateQueryParam);
$scope.cancelEditing = function() {
navigationService.setNavigation($scope.domainObject.getDomainObject());
}
$scope.doAction = function (action){
$scope[action] && $scope[action]();
}
}
return BrowseObjectController;
}
);

View File

@ -0,0 +1,78 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
define(
[],
function () {
"use strict";
/**
* Controller to provide the ability to show/hide the tree in
* Browse mode.
* @constructor
* @memberof platform/commonUI/browse
*/
function BrowseTreeController($scope, agentService) {
var self = this;
this.agentService = agentService;
this.state = true;
/**
* Callback to invoke when any selection occurs in the tree.
* This controller can be passed in as the `parameters` object
* to the tree representation.
*
* @property {Function} callback
* @memberof platform/commonUI/browse.BrowseTreeController#
*/
this.callback = function () {
// Note that, since this is a callback to pass, this is not
// declared as a method but as a property which happens to
// be a function.
if (agentService.isPhone() && agentService.isPortrait()) {
// On phones, trees should collapse in portrait mode
// when something is navigated-to.
self.state = false;
}
};
}
/**
* Toggle the visibility of the tree.
*/
BrowseTreeController.prototype.toggle = function () {
this.state = !this.state;
};
/**
* Get the desired visibility state of the tree.
* @returns {boolean} true when visible
*/
BrowseTreeController.prototype.visible = function () {
return this.state;
};
return BrowseTreeController;
}
);

View File

@ -33,19 +33,29 @@ define(
* A left-click on the menu arrow should display a
* context menu. This controller launches the context
* menu.
* @memberof platform/commonUI/browse
* @constructor
*/
function MenuArrowController($scope) {
function showMenu(event) {
var actionContext = {key: 'menu', domainObject: $scope.domainObject, event: event};
$scope.domainObject.getCapability('action').perform(actionContext);
}
return {
showMenu: showMenu
};
this.$scope = $scope;
}
/**
* Show a context menu for the domain object in this scope.
*
* @param event the browser event which caused this (used to
* position the menu)
*/
MenuArrowController.prototype.showMenu = function (event) {
var actionContext = {
key: 'menu',
domainObject: this.$scope.domainObject,
event: event
};
this.$scope.domainObject.getCapability('action').perform(actionContext);
};
return MenuArrowController;
}
);
);

View File

@ -34,7 +34,10 @@ define(
* domain objects of a specific type. This is the action that
* is performed when a user uses the Create menu.
*
* @memberof platform/commonUI/browse
* @implements {Action}
* @constructor
*
* @param {Type} type the type of domain object to create
* @param {DomainObject} parent the domain object that should
* act as a container for the newly-created object
@ -49,78 +52,84 @@ define(
* of the newly-created domain object
*/
function CreateAction(type, parent, context, dialogService, creationService, policyService) {
this.metadata = {
key: 'create',
glyph: type.getGlyph(),
name: type.getName(),
type: type.getKey(),
description: type.getDescription(),
context: context
};
this.type = type;
this.parent = parent;
this.policyService = policyService;
this.dialogService = dialogService;
this.creationService = creationService;
}
/**
* Create a new object of the given type.
* This will prompt for user input first.
*/
CreateAction.prototype.perform = function () {
/*
Overview of steps in object creation:
1. Show dialog
a. Prepare dialog contents
b. Invoke dialogService
a. Prepare dialog contents
b. Invoke dialogService
2. Create new object in persistence service
a. Generate UUID
b. Store model
a. Generate UUID
b. Store model
3. Mutate destination container
a. Get mutation capability
b. Add new id to composition
a. Get mutation capability
b. Add new id to composition
4. Persist destination container
a. ...use persistence capability.
a. ...use persistence capability.
*/
function perform() {
// The wizard will handle creating the form model based
// on the type...
var wizard = new CreateWizard(type, parent, policyService);
// The wizard will handle creating the form model based
// on the type...
var wizard =
new CreateWizard(this.type, this.parent, this.policyService),
self = this;
// Create and persist the new object, based on user
// input.
function persistResult(formValue) {
var parent = wizard.getLocation(formValue),
newModel = wizard.createModel(formValue);
return creationService.createObject(newModel, parent);
}
function doNothing() {
// Create cancelled, do nothing
return false;
}
return dialogService.getUserInput(
wizard.getFormStructure(),
wizard.getInitialFormValue()
).then(persistResult, doNothing);
// Create and persist the new object, based on user
// input.
function persistResult(formValue) {
var parent = wizard.getLocation(formValue),
newModel = wizard.createModel(formValue);
return self.creationService.createObject(newModel, parent);
}
return {
/**
* Create a new object of the given type.
* This will prompt for user input first.
* @method
* @memberof CreateAction
*/
perform: perform,
function doNothing() {
// Create cancelled, do nothing
return false;
}
/**
* Get metadata about this action. This includes fields:
* * `name`: Human-readable name
* * `key`: Machine-readable identifier ("create")
* * `glyph`: Glyph to use as an icon for this action
* * `description`: Human-readable description
* * `context`: The context in which this action will be performed.
*
* @return {object} metadata about the create action
*/
getMetadata: function () {
return {
key: 'create',
glyph: type.getGlyph(),
name: type.getName(),
type: type.getKey(),
description: type.getDescription(),
context: context
};
}
};
}
return this.dialogService.getUserInput(
wizard.getFormStructure(),
wizard.getInitialFormValue()
).then(persistResult, doNothing);
};
/**
* Metadata associated with a Create action.
* @typedef {ActionMetadata} CreateActionMetadata
* @property {string} type the key for the type of domain object
* to be created
*/
/**
* Get metadata about this action.
* @returns {CreateActionMetadata} metadata about this action
*/
CreateAction.prototype.getMetadata = function () {
return this.metadata;
};
return CreateAction;
}
);
);

View File

@ -33,7 +33,10 @@ define(
* The CreateActionProvider is an ActionProvider which introduces
* a Create action for each creatable domain object type.
*
* @memberof platform/commonUI/browse
* @constructor
* @implements {ActionService}
*
* @param {TypeService} typeService the type service, used to discover
* available types
* @param {DialogService} dialogService the dialog service, used by
@ -44,44 +47,41 @@ define(
* object creation.
*/
function CreateActionProvider(typeService, dialogService, creationService, policyService) {
return {
/**
* Get all Create actions which are applicable in the provided
* context.
* @memberof CreateActionProvider
* @method
* @returns {CreateAction[]}
*/
getActions: function (actionContext) {
var context = actionContext || {},
key = context.key,
destination = context.domainObject;
// We only provide Create actions, and we need a
// domain object to serve as the container for the
// newly-created object (although the user may later
// make a different selection)
if (key !== 'create' || !destination) {
return [];
}
// Introduce one create action per type
return typeService.listTypes().filter(function (type) {
return type.hasFeature("creation");
}).map(function (type) {
return new CreateAction(
type,
destination,
context,
dialogService,
creationService,
policyService
);
});
}
};
this.typeService = typeService;
this.dialogService = dialogService;
this.creationService = creationService;
this.policyService = policyService;
}
CreateActionProvider.prototype.getActions = function (actionContext) {
var context = actionContext || {},
key = context.key,
destination = context.domainObject,
self = this;
// We only provide Create actions, and we need a
// domain object to serve as the container for the
// newly-created object (although the user may later
// make a different selection)
if (key !== 'create' || !destination) {
return [];
}
// Introduce one create action per type
return this.typeService.listTypes().filter(function (type) {
return type.hasFeature("creation");
}).map(function (type) {
return new CreateAction(
type,
destination,
context,
self.dialogService,
self.creationService,
self.policyService
);
});
};
return CreateActionProvider;
}
);
);

View File

@ -34,6 +34,7 @@ define(
* set of Create actions based on the currently-selected
* domain object.
*
* @memberof platform/commonUI/browse
* @constructor
*/
function CreateMenuController($scope) {
@ -55,4 +56,4 @@ define(
return CreateMenuController;
}
);
);

View File

@ -21,12 +21,6 @@
*****************************************************************************/
/*global define*/
/**
* Defines the CreateWizard, used by the CreateAction to
* populate the form shown in dialog based on the created type.
*
* @module core/action/create-wizard
*/
define(
function () {
'use strict';
@ -37,16 +31,33 @@ define(
* @param {TypeImpl} type the type of domain object to be created
* @param {DomainObject} parent the domain object to serve as
* the initial parent for the created object, in the dialog
* @memberof platform/commonUI/browse
* @constructor
* @memberof module:core/action/create-wizard
*/
function CreateWizard(type, parent, policyService) {
var model = type.getInitialModel(),
properties = type.getProperties();
this.type = type;
this.model = type.getInitialModel();
this.properties = type.getProperties();
this.parent = parent;
this.policyService = policyService;
}
/**
* Get the form model for this wizard; this is a description
* that will be rendered to an HTML form. See the
* platform/forms bundle
*
* @return {FormModel} formModel the form model to
* show in the create dialog
*/
CreateWizard.prototype.getFormStructure = function () {
var sections = [],
type = this.type,
policyService = this.policyService;
function validateLocation(locatingObject) {
var locatingType = locatingObject &&
locatingObject.getCapability('type');
locatingObject.getCapability('type');
return locatingType && policyService.allow(
"composition",
locatingType,
@ -54,96 +65,87 @@ define(
);
}
sections.push({
name: "Properties",
rows: this.properties.map(function (property, index) {
// Property definition is same as form row definition
var row = Object.create(property.getDefinition());
// Use index as the key into the formValue;
// this correlates to the indexing provided by
// getInitialFormValue
row.key = index;
return row;
}).filter(function (row) {
// Only show rows which have defined controls
return row && row.control;
})
});
// Ensure there is always a "save in" section
sections.push({ name: 'Location', rows: [{
name: "Save In",
control: "locator",
validate: validateLocation,
key: "createParent"
}]});
return {
/**
* Get the form model for this wizard; this is a description
* that will be rendered to an HTML form. See the
* platform/forms bundle
*
* @return {FormModel} formModel the form model to
* show in the create dialog
*/
getFormStructure: function () {
var sections = [];
sections.push({
name: "Properties",
rows: properties.map(function (property, index) {
// Property definition is same as form row definition
var row = Object.create(property.getDefinition());
// Use index as the key into the formValue;
// this correlates to the indexing provided by
// getInitialFormValue
row.key = index;
return row;
})
});
// Ensure there is always a "save in" section
sections.push({ name: 'Location', rows: [{
name: "Save In",
control: "locator",
validate: validateLocation,
key: "createParent"
}]});
return {
sections: sections,
name: "Create a New " + type.getName()
};
},
/**
* Get the initial value for the form being described.
* This will include the values for all properties described
* in the structure.
*
* @returns {object} the initial value of the form
*/
getInitialFormValue: function () {
// Start with initial values for properties
var formValue = properties.map(function (property) {
return property.getValue(model);
});
// Include the createParent
formValue.createParent = parent;
return formValue;
},
/**
* Based on a populated form, get the domain object which
* should be used as a parent for the newly-created object.
* @return {DomainObject}
*/
getLocation: function (formValue) {
return formValue.createParent || parent;
},
/**
* Create the domain object model for a newly-created object,
* based on user input read from a formModel.
* @return {object} the domain object' model
*/
createModel: function (formValue) {
// Clone
var newModel = JSON.parse(JSON.stringify(model));
// Always use the type from the type definition
newModel.type = type.getKey();
// Update all properties
properties.forEach(function (property, index) {
property.setValue(newModel, formValue[index]);
});
return newModel;
}
sections: sections,
name: "Create a New " + this.type.getName()
};
};
/**
* Get the initial value for the form being described.
* This will include the values for all properties described
* in the structure.
*
* @returns {object} the initial value of the form
*/
CreateWizard.prototype.getInitialFormValue = function () {
// Start with initial values for properties
var model = this.model,
formValue = this.properties.map(function (property) {
return property.getValue(model);
});
}
// Include the createParent
formValue.createParent = this.parent;
return formValue;
};
/**
* Based on a populated form, get the domain object which
* should be used as a parent for the newly-created object.
* @return {DomainObject}
*/
CreateWizard.prototype.getLocation = function (formValue) {
return formValue.createParent || this.parent;
};
/**
* Create the domain object model for a newly-created object,
* based on user input read from a formModel.
* @return {object} the domain object model
*/
CreateWizard.prototype.createModel = function (formValue) {
// Clone
var newModel = JSON.parse(JSON.stringify(this.model));
// Always use the type from the type definition
newModel.type = this.type.getKey();
// Update all properties
this.properties.forEach(function (property, index) {
property.setValue(newModel, formValue[index]);
});
return newModel;
};
return CreateWizard;
}
);
);

View File

@ -39,15 +39,44 @@ define(
* persisting new domain objects. Handles all actual object
* mutation and persistence associated with domain object
* creation.
* @memberof platform/commonUI/browse
* @constructor
*/
function CreationService(persistenceService, $q, $log) {
function CreationService(persistenceService, now, $q, $log) {
this.persistenceService = persistenceService;
this.$q = $q;
this.$log = $log;
this.now = now;
}
/**
* Create a new domain object with the provided model, as
* a member of the provided parent domain object's composition.
* This parent will additionally determine which persistence
* space an object is created within (as it is possible to
* have multiple persistence spaces attached.)
*
* Note that the model passed in for object creation may be
* modified to attach additional initial properties associated
* with domain object creation.
*
* @param {object} model the model for the newly-created
* domain object
* @param {DomainObject} parent the domain object which
* should contain the newly-created domain object
* in its composition
* @return {Promise} a promise that will resolve when the domain
* object has been created
*/
CreationService.prototype.createObject = function (model, parent) {
var persistence = parent.getCapability("persistence"),
self = this;
// Persist the new domain object's model; it will be fully
// constituted as a domain object when loaded back, as all
// domain object models are.
function doPersist(space, id, model) {
return persistenceService.createObject(
return self.persistenceService.createObject(
space,
id,
model
@ -58,84 +87,44 @@ define(
// composition, so that it will subsequently appear
// as a child contained by that parent.
function addToComposition(id, parent, parentPersistence) {
var mutatationResult = parent.useCapability("mutation", function (model) {
if (Array.isArray(model.composition)) {
// Don't add if the id is already there
if (model.composition.indexOf(id) === -1) {
model.composition.push(id);
}
} else {
// This is abnormal; composition should be an array
$log.warn(NO_COMPOSITION_WARNING + parent.getId());
return false; // Cancel mutation
}
});
var compositionCapability = parent.getCapability('composition'),
addResult = compositionCapability &&
compositionCapability.add(id);
return $q.when(mutatationResult).then(function (result) {
return self.$q.when(addResult).then(function (result) {
if (!result) {
$log.error("Could not mutate " + parent.getId());
self.$log.error("Could not modify " + parent.getId());
return undefined;
}
return parentPersistence.persist().then(function () {
// Locate and return new Object in context of parent.
return parent
.useCapability('composition')
.then(function (children) {
var i;
for (i = 0; i < children.length; i += 1) {
if (children[i].getId() === id) {
return children[i];
}
}
});
return result;
});
});
}
// Create a new domain object with the provided model as a
// member of the specified parent's composition
function createObject(model, parent) {
var persistence = parent.getCapability("persistence");
// We need the parent's persistence capability to determine
// what space to create the new object's model in.
if (!persistence) {
$log.warn(NON_PERSISTENT_WARNING);
return $q.reject(new Error(NON_PERSISTENT_WARNING));
}
// We create a new domain object in three sequential steps:
// 1. Get a new UUID for the object
// 2. Create a model with that ID in the persistence space
// 3. Add that ID to
return $q.when(
uuid()
).then(function (id) {
return doPersist(persistence.getSpace(), id, model);
}).then(function (id) {
return addToComposition(id, parent, persistence);
});
// We need the parent's persistence capability to determine
// what space to create the new object's model in.
if (!persistence) {
self.$log.warn(NON_PERSISTENT_WARNING);
return self.$q.reject(new Error(NON_PERSISTENT_WARNING));
}
return {
/**
* Create a new domain object with the provided model, as
* a member of the provided parent domain object's composition.
* This parent will additionally determine which persistence
* space an object is created within (as it is possible to
* have multiple persistence spaces attached.)
*
* @param {object} model the model for the newly-created
* domain object
* @param {DomainObject} parent the domain object which
* should contain the newly-created domain object
* in its composition
*/
createObject: createObject
};
}
// We create a new domain object in three sequential steps:
// 1. Get a new UUID for the object
// 2. Create a model with that ID in the persistence space
// 3. Add that ID to
return self.$q.when(uuid()).then(function (id) {
model.persisted = self.now();
return doPersist(persistence.getSpace(), id, model);
}).then(function (id) {
return addToComposition(id, parent, persistence);
});
};
return CreationService;
}
);

View File

@ -30,9 +30,10 @@ define(
* Controller for the "locator" control, which provides the
* user with the ability to select a domain object as the
* destination for a newly-created object in the Create menu.
* @memberof platform/commonUI/browse
* @constructor
*/
function LocatorController($scope) {
function LocatorController($scope, $timeout) {
// Populate values needed by the locator control. These are:
// * rootObject: The top-level object, since we want to show
// the full tree
@ -40,9 +41,19 @@ define(
// used for bi-directional object selection.
function setLocatingObject(domainObject, priorObject) {
var context = domainObject &&
domainObject.getCapability("context");
domainObject.getCapability("context"),
contextRoot = context && context.getRoot();
if (contextRoot && contextRoot !== $scope.rootObject) {
$scope.rootObject = undefined;
// Update the displayed tree on a timeout to avoid
// an infinite digest exception.
$timeout(function () {
$scope.rootObject =
(context && context.getRoot()) || $scope.rootObject;
}, 0);
}
$scope.rootObject = (context && context.getRoot()) || $scope.rootObject;
$scope.treeModel.selectedObject = domainObject;
$scope.ngModel[$scope.field] = domainObject;
@ -51,10 +62,7 @@ define(
$scope.structure &&
$scope.structure.validate) {
if (!$scope.structure.validate(domainObject)) {
setLocatingObject(
$scope.structure.validate(priorObject) ?
priorObject : undefined
);
setLocatingObject(priorObject, undefined);
return;
}
}
@ -79,3 +87,4 @@ define(
return LocatorController;
}
);

View File

@ -31,32 +31,34 @@ define(
/**
* The navigate action navigates to a specific domain object.
* @memberof platform/commonUI/browse
* @constructor
* @implements {Action}
*/
function NavigateAction(navigationService, $q, context) {
var domainObject = context.domainObject;
function perform() {
// Set navigation, and wrap like a promise
return $q.when(navigationService.setNavigation(domainObject));
}
return {
/**
* Navigate to the object described in the context.
* @returns {Promise} a promise that is resolved once the
* navigation has been updated
*/
perform: perform
};
this.domainObject = context.domainObject;
this.$q = $q;
this.navigationService = navigationService;
}
/**
* Navigate to the object described in the context.
* @returns {Promise} a promise that is resolved once the
* navigation has been updated
*/
NavigateAction.prototype.perform = function () {
// Set navigation, and wrap like a promise
return this.$q.when(
this.navigationService.setNavigation(this.domainObject)
);
};
/**
* Navigate as an action is only applicable when a domain object
* is described in the action context.
* @param {ActionContext} context the context in which the action
* will be performed
* @returns true if applicable
* @returns {boolean} true if applicable
*/
NavigateAction.appliesTo = function (context) {
return context.domainObject !== undefined;
@ -64,4 +66,4 @@ define(
return NavigateAction;
}
);
);

View File

@ -32,68 +32,58 @@ define(
/**
* The navigation service maintains the application's current
* navigation state, and allows listening for changes thereto.
* @memberof platform/commonUI/browse
* @constructor
*/
function NavigationService() {
var navigated,
callbacks = [];
this.navigated = undefined;
this.callbacks = [];
}
// Getter for current navigation
function getNavigation() {
return navigated;
}
/**
* Get the current navigation state.
* @returns {DomainObject} the object that is navigated-to
*/
NavigationService.prototype.getNavigation = function () {
return this.navigated;
};
// Setter for navigation; invokes callbacks
function setNavigation(value) {
if (navigated !== value) {
navigated = value;
callbacks.forEach(function (callback) {
callback(value);
});
}
}
// Adds a callback
function addListener(callback) {
callbacks.push(callback);
}
// Filters out a callback
function removeListener(callback) {
callbacks = callbacks.filter(function (cb) {
return cb !== callback;
/**
* Set the current navigation state. This will invoke listeners.
* @param {DomainObject} domainObject the domain object to navigate to
*/
NavigationService.prototype.setNavigation = function (value) {
if (this.navigated !== value) {
this.navigated = value;
this.callbacks.forEach(function (callback) {
callback(value);
});
}
};
return {
/**
* Get the current navigation state.
*/
getNavigation: getNavigation,
/**
* Set the current navigation state. Thiswill invoke listeners.
* @param {DomainObject} value the domain object to navigate
* to
*/
setNavigation: setNavigation,
/**
* Listen for changes in navigation. The passed callback will
* be invoked with the new domain object of navigation when
* this changes.
* @param {function} callback the callback to invoke when
* navigation state changes
*/
addListener: addListener,
/**
* Stop listening for changes in navigation state.
* @param {function} callback the callback which should
* no longer be invoked when navigation state
* changes
*/
removeListener: removeListener
};
}
/**
* Listen for changes in navigation. The passed callback will
* be invoked with the new domain object of navigation when
* this changes.
* @param {function} callback the callback to invoke when
* navigation state changes
*/
NavigationService.prototype.addListener = function (callback) {
this.callbacks.push(callback);
};
/**
* Stop listening for changes in navigation state.
* @param {function} callback the callback which should
* no longer be invoked when navigation state
* changes
*/
NavigationService.prototype.removeListener = function (callback) {
this.callbacks = this.callbacks.filter(function (cb) {
return cb !== callback;
});
};
return NavigationService;
}
);
);

View File

@ -35,36 +35,32 @@ define(
/**
* The fullscreen action toggles between fullscreen display
* and regular in-window display.
* @memberof platform/commonUI/browse
* @constructor
* @implements {Action}
*/
function FullscreenAction(context) {
return {
/**
* Toggle full screen state
*/
perform: function () {
screenfull.toggle();
},
/**
* Get metadata about this action, including the
* applicable glyph to display.
*/
getMetadata: function () {
// We override getMetadata, because the glyph and
// description need to be determined at run-time
// based on whether or not we are currently
// full screen.
var metadata = Object.create(FullscreenAction);
metadata.glyph = screenfull.isFullscreen ? "_" : "z";
metadata.description = screenfull.isFullscreen ?
EXIT_FULLSCREEN : ENTER_FULLSCREEN;
metadata.group = "windowing";
metadata.context = context;
return metadata;
}
};
this.context = context;
}
FullscreenAction.prototype.perform = function () {
screenfull.toggle();
};
FullscreenAction.prototype.getMetadata = function () {
// We override getMetadata, because the glyph and
// description need to be determined at run-time
// based on whether or not we are currently
// full screen.
var metadata = Object.create(FullscreenAction);
metadata.glyph = screenfull.isFullscreen ? "_" : "z";
metadata.description = screenfull.isFullscreen ?
EXIT_FULLSCREEN : ENTER_FULLSCREEN;
metadata.group = "windowing";
metadata.context = this.context;
return metadata;
};
return FullscreenAction;
}
);
);

View File

@ -33,35 +33,29 @@ define(
/**
* The new tab action allows a domain object to be opened
* into a new browser tab.
* @memberof platform/commonUI/browse
* @constructor
* @implements {Action}
*/
function NewTabAction(urlService, $window, context) {
// Returns the selected domain object
// when using the context menu or the top right button
// based on the context and the existance of the object
// It is set to object an returned
function getSelectedObject() {
var object;
if (context.selectedObject) {
object = context.selectedObject;
} else {
object = context.domainObject;
}
return object;
}
return {
// Performs the open in new tab function
// By calling the url service, the mode needed
// (browse) and the domainObject is passed in and
// the path is returned and opened in a new tab
perform: function () {
$window.open(urlService.urlForNewTab("browse", getSelectedObject()),
"_blank");
}
context = context || {};
this.urlService = urlService;
this.open = function () {
$window.open.apply($window, arguments);
};
// Choose the object to be opened into a new tab
this.domainObject = context.selectedObject || context.domainObject;
}
NewTabAction.prototype.perform = function () {
this.open(
this.urlService.urlForNewTab("browse", this.domainObject),
"_blank"
);
};
return NewTabAction;
}
);
);

View File

@ -29,6 +29,7 @@ define(
/**
* Updates the title of the current window to reflect the name
* of the currently navigated-to domain object.
* @memberof platform/commonUI/browse
* @constructor
*/
function WindowTitler(navigationService, $rootScope, $document) {
@ -49,4 +50,4 @@ define(
return WindowTitler;
}
);
);

View File

@ -146,12 +146,14 @@ define(
expect(mockScope.navigatedObject).toEqual(mockDomainObject);
});
it("releases its navigation listener when its scope is destroyed", function () {
expect(mockScope.$on).toHaveBeenCalledWith(
"$destroy",
jasmine.any(Function)
);
mockScope.$on.mostRecentCall.args[1]();
// Should remove the listener it added earlier
expect(mockNavigationService.removeListener).toHaveBeenCalledWith(
mockNavigationService.addListener.mostRecentCall.args[0]
@ -222,16 +224,16 @@ define(
mockNavigationService.addListener.mostRecentCall.args[0](
mockNextObject
);
// Allows the path index to be checked
// prior to setting $route.current
// prior to setting $route.current
mockLocation.path.andReturn("/browse/");
// Exercise the Angular workaround
mockScope.$on.mostRecentCall.args[1]();
expect(mockUnlisten).toHaveBeenCalled();
// location.path to be called with the urlService's
// location.path to be called with the urlService's
// urlFor function with the next domainObject and mode
expect(mockLocation.path).toHaveBeenCalledWith(
mockUrlService.urlForLocation(mockMode, mockNextObject)

View File

@ -0,0 +1,90 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/
define(
["../src/BrowseTreeController"],
function (BrowseTreeController) {
'use strict';
describe("The BrowseTreeController", function () {
var mockScope,
mockAgentService,
mockDomainObjects,
controller;
// We want to reinstantiate for each test case
// because device state can influence constructor-time behavior
function instantiateController() {
return new BrowseTreeController(
mockScope,
mockAgentService
);
}
beforeEach(function () {
mockScope = jasmine.createSpyObj("$scope", [ "$on" ]);
mockDomainObjects = ['a', 'b'].map(function (id) {
var mockDomainObject = jasmine.createSpyObj(
'domainObject-' + id,
[ 'getId', 'getModel', 'getCapability' ]
);
mockDomainObject.getId.andReturn(id);
mockDomainObject.getModel.andReturn({});
return mockDomainObject;
});
mockAgentService = jasmine.createSpyObj(
"agentService",
[ "isMobile", "isPhone", "isTablet", "isPortrait", "isLandscape" ]
);
});
it("is initially visible", function () {
expect(instantiateController().visible()).toBeTruthy();
});
it("allows visibility to be toggled", function () {
controller = instantiateController();
controller.toggle();
expect(controller.visible()).toBeFalsy();
controller.toggle();
expect(controller.visible()).toBeTruthy();
});
it("collapses on navigation changes on portrait-oriented phones", function () {
mockAgentService.isMobile.andReturn(true);
mockAgentService.isPhone.andReturn(true);
mockAgentService.isPortrait.andReturn(true);
controller = instantiateController();
expect(controller.visible()).toBeTruthy();
// Simulate a change from the tree by invoking controller's
controller.callback();
// Tree should have collapsed
expect(controller.visible()).toBeFalsy();
});
});
}
);

View File

@ -42,7 +42,9 @@ define(
"property" + name,
[ "getDefinition", "getValue", "setValue" ]
);
mockProperty.getDefinition.andReturn({});
mockProperty.getDefinition.andReturn({
control: "textfield"
});
mockProperty.getValue.andReturn(name);
return mockProperty;
}
@ -157,4 +159,4 @@ define(
});
}
);
);

View File

@ -31,6 +31,7 @@ define(
describe("The creation service", function () {
var mockPersistenceService,
mockNow,
mockQ,
mockLog,
mockParentObject,
@ -38,6 +39,7 @@ define(
mockMutationCapability,
mockPersistenceCapability,
mockCompositionCapability,
mockContextCapability,
mockCapabilities,
creationService;
@ -62,6 +64,7 @@ define(
"persistenceService",
[ "createObject" ]
);
mockNow = jasmine.createSpy('now');
mockQ = { when: mockPromise, reject: mockReject };
mockLog = jasmine.createSpyObj(
"$log",
@ -85,24 +88,32 @@ define(
);
mockCompositionCapability = jasmine.createSpyObj(
"composition",
["invoke"]
["invoke", "add"]
);
mockContextCapability = jasmine.createSpyObj(
"context",
["getPath"]
);
mockCapabilities = {
mutation: mockMutationCapability,
persistence: mockPersistenceCapability,
composition: mockCompositionCapability
composition: mockCompositionCapability,
context: mockContextCapability
};
mockPersistenceService.createObject.andReturn(
mockPromise(true)
);
mockNow.andReturn(12321);
mockParentObject.getCapability.andCallFake(function (key) {
return mockCapabilities[key];
});
mockParentObject.useCapability.andCallFake(function (key, value) {
return mockCapabilities[key].invoke(value);
});
mockParentObject.getId.andReturn('parentId');
mockPersistenceCapability.persist.andReturn(
mockPromise(true)
@ -113,9 +124,11 @@ define(
mockCompositionCapability.invoke.andReturn(
mockPromise([mockNewObject])
);
mockCompositionCapability.add.andReturn(mockPromise(true));
creationService = new CreationService(
mockPersistenceService,
mockNow,
mockQ,
mockLog
);
@ -136,33 +149,34 @@ define(
parentModel = { composition: ["notAnyUUID"] };
creationService.createObject(model, mockParentObject);
// Invoke the mutation callback
expect(mockMutationCapability.invoke).toHaveBeenCalled();
mockMutationCapability.invoke.mostRecentCall.args[0](parentModel);
// Should have a longer composition now, with the new UUID
expect(parentModel.composition.length).toEqual(2);
// Verify that a new ID was added
expect(mockCompositionCapability.add)
.toHaveBeenCalledWith(jasmine.any(String));
});
it("warns if parent has no composition", function () {
var model = { someKey: "some value" },
parentModel = { };
creationService.createObject(model, mockParentObject);
it("provides the newly-created object", function () {
var mockDomainObject = jasmine.createSpyObj(
'newDomainObject',
['getId', 'getModel', 'getCapability']
),
mockCallback = jasmine.createSpy('callback');
// Verify precondition; no prior warnings
expect(mockLog.warn).not.toHaveBeenCalled();
// Act as if the object had been created
mockCompositionCapability.add.andCallFake(function (id) {
mockDomainObject.getId.andReturn(id);
mockCompositionCapability.invoke
.andReturn(mockPromise([mockDomainObject]));
return mockPromise(mockDomainObject);
});
// Invoke the mutation callback
expect(mockMutationCapability.invoke).toHaveBeenCalled();
mockMutationCapability.invoke.mostRecentCall.args[0](parentModel);
// Should find it in the composition
creationService.createObject({}, mockParentObject)
.then(mockCallback);
expect(mockCallback).toHaveBeenCalledWith(mockDomainObject);
// Should have a longer composition now, with the new UUID
expect(mockLog.warn).toHaveBeenCalled();
// Composition should still be undefined
expect(parentModel.composition).toBeUndefined();
});
it("warns if parent has no persistence capability", function () {
// Callbacks
var success = jasmine.createSpy("success"),
@ -178,7 +192,6 @@ define(
expect(mockLog.warn).toHaveBeenCalled();
expect(success).not.toHaveBeenCalled();
expect(failure).toHaveBeenCalled();
});
it("logs an error when mutaton fails", function () {
@ -187,14 +200,19 @@ define(
var model = { someKey: "some value" },
parentModel = { composition: ["notAnyUUID"] };
mockMutationCapability.invoke.andReturn(mockPromise(false));
mockCompositionCapability.add.andReturn(mockPromise(false));
creationService.createObject(model, mockParentObject);
expect(mockLog.error).toHaveBeenCalled();
});
it("attaches a 'persisted' timestamp", function () {
var model = { someKey: "some value" };
creationService.createObject(model, mockParentObject);
expect(model.persisted).toEqual(mockNow());
});
});
}
);
);

View File

@ -31,6 +31,7 @@ define(
describe("The locator controller", function () {
var mockScope,
mockTimeout,
mockDomainObject,
mockRootObject,
mockContext,
@ -41,6 +42,7 @@ define(
"$scope",
[ "$watch" ]
);
mockTimeout = jasmine.createSpy("$timeout");
mockDomainObject = jasmine.createSpyObj(
"domainObject",
[ "getCapability" ]
@ -60,7 +62,7 @@ define(
mockScope.ngModel = {};
mockScope.field = "someField";
controller = new LocatorController(mockScope);
controller = new LocatorController(mockScope, mockTimeout);
});
it("adds a treeModel to scope", function () {
@ -80,6 +82,7 @@ define(
// Need to pass on selection changes as updates to
// the control's value
mockScope.$watch.mostRecentCall.args[1](mockDomainObject);
mockTimeout.mostRecentCall.args[0]();
expect(mockScope.ngModel.someField).toEqual(mockDomainObject);
expect(mockScope.rootObject).toEqual(mockRootObject);
@ -95,6 +98,7 @@ define(
// Pass selection change
mockScope.$watch.mostRecentCall.args[1](mockDomainObject);
mockTimeout.mostRecentCall.args[0]();
expect(mockScope.structure.validate).toHaveBeenCalled();
// Change should have been rejected
@ -108,14 +112,16 @@ define(
);
mockScope.$watch.mostRecentCall.args[1](mockDomainObject);
mockTimeout.mostRecentCall.args[0]();
expect(mockScope.ngModelController.$setValidity)
.toHaveBeenCalledWith(jasmine.any(String), true);
mockScope.$watch.mostRecentCall.args[1](undefined);
mockTimeout.mostRecentCall.args[0]();
expect(mockScope.ngModelController.$setValidity)
.toHaveBeenCalledWith(jasmine.any(String), false);
});
});
}
);
);

View File

@ -1,6 +1,7 @@
[
"BrowseController",
"BrowseObjectController",
"BrowseTreeController",
"MenuArrowController",
"creation/CreateAction",
"creation/CreateActionProvider",

View File

@ -25,7 +25,7 @@
All fields marked <span class="ui-symbol req">*</span> are required.
</div>
</div>
<div class="abs form outline editor">
<div class="abs form editor">
<div class='abs contents l-dialog'>
<mct-form ng-model="ngModel.value"
structure="ngModel.structure"
@ -34,13 +34,13 @@
</div>
</div>
<div class="abs bottom-bar">
<a class='btn lg major'
href=''
<a class='s-btn major'
ng-class="{ disabled: !createForm.$valid }"
ng-click="ngModel.confirm()">
OK
</a>
<a class='btn lg subtle' href='' ng-click="ngModel.cancel()">
<a class='s-btn'
ng-click="ngModel.cancel()">
Cancel
</a>
</div>

View File

@ -35,7 +35,7 @@
<div class="abs bottom-bar">
<a ng-repeat="option in ngModel.dialog.options"
href=''
class="btn lg"
class="s-btn lg"
title="{{option.description}}"
ng-click="ngModel.confirm(option.key)"
ng-class="{ major: $first, subtle: !$first }">

View File

@ -25,7 +25,7 @@
<a href=""
ng-click="ngModel.cancel()"
ng-if="ngModel.cancel"
class="btn normal ui-symbol close">
class="clk-icon icon ui-symbol close">
x
</a>
<div class="abs contents" ng-transclude>

View File

@ -22,7 +22,9 @@
/*global define*/
/**
* Module defining DialogService. Created by vwoeltje on 11/10/14.
* This bundle implements the dialog service, which can be used to
* launch dialogs for user input & notifications.
* @namespace platform/commonUI/dialog
*/
define(
[],
@ -32,128 +34,130 @@ define(
* The dialog service is responsible for handling window-modal
* communication with the user, such as displaying forms for user
* input.
* @memberof platform/commonUI/dialog
* @constructor
*/
function DialogService(overlayService, $q, $log) {
var overlay,
dialogVisible = false;
// Stop showing whatever overlay is currently active
// (e.g. because the user hit cancel)
function dismiss() {
if (overlay) {
overlay.dismiss();
}
dialogVisible = false;
}
function getDialogResponse(key, model, resultGetter) {
// We will return this result as a promise, because user
// input is asynchronous.
var deferred = $q.defer(),
overlayModel;
// Confirm function; this will be passed in to the
// overlay-dialog template and associated with a
// OK button click
function confirm(value) {
// Pass along the result
deferred.resolve(resultGetter ? resultGetter() : value);
// Stop showing the dialog
dismiss();
}
// Cancel function; this will be passed in to the
// overlay-dialog template and associated with a
// Cancel or X button click
function cancel() {
deferred.reject();
dismiss();
}
// Add confirm/cancel callbacks
model.confirm = confirm;
model.cancel = cancel;
if (dialogVisible) {
// Only one dialog should be shown at a time.
// The application design should be such that
// we never even try to do this.
$log.warn([
"Dialog already showing; ",
"unable to show ",
model.name
].join(""));
deferred.reject();
} else {
// Add the overlay using the OverlayService, which
// will handle actual insertion into the DOM
overlay = overlayService.createOverlay(
key,
model
);
// Track that a dialog is already visible, to
// avoid spawning multiple dialogs at once.
dialogVisible = true;
}
return deferred.promise;
}
function getUserInput(formModel, value) {
var overlayModel = {
title: formModel.name,
message: formModel.message,
structure: formModel,
value: value
};
// Provide result from the model
function resultGetter() {
return overlayModel.value;
}
// Show the overlay-dialog
return getDialogResponse(
"overlay-dialog",
overlayModel,
resultGetter
);
}
function getUserChoice(dialogModel) {
// Show the overlay-options dialog
return getDialogResponse(
"overlay-options",
{ dialog: dialogModel }
);
}
return {
/**
* Request user input via a window-modal dialog.
*
* @param {FormModel} formModel a description of the form
* to be shown (see platform/forms)
* @param {object} value the initial state of the form
* @returns {Promise} a promsie for the form value that the
* user has supplied; this may be rejected if
* user input cannot be obtained (for instance,
* because the user cancelled the dialog)
*/
getUserInput: getUserInput,
/**
* Request that the user chooses from a set of options,
* which will be shown as buttons.
*
* @param dialogModel a description of the dialog to show
*/
getUserChoice: getUserChoice
};
this.overlayService = overlayService;
this.$q = $q;
this.$log = $log;
this.overlay = undefined;
this.dialogVisible = false;
}
// Stop showing whatever overlay is currently active
// (e.g. because the user hit cancel)
DialogService.prototype.dismiss = function () {
var overlay = this.overlay;
if (overlay) {
overlay.dismiss();
}
this.dialogVisible = false;
};
DialogService.prototype.getDialogResponse = function (key, model, resultGetter) {
// We will return this result as a promise, because user
// input is asynchronous.
var deferred = this.$q.defer(),
self = this;
// Confirm function; this will be passed in to the
// overlay-dialog template and associated with a
// OK button click
function confirm(value) {
// Pass along the result
deferred.resolve(resultGetter ? resultGetter() : value);
// Stop showing the dialog
self.dismiss();
}
// Cancel function; this will be passed in to the
// overlay-dialog template and associated with a
// Cancel or X button click
function cancel() {
deferred.reject();
self.dismiss();
}
// Add confirm/cancel callbacks
model.confirm = confirm;
model.cancel = cancel;
if (this.dialogVisible) {
// Only one dialog should be shown at a time.
// The application design should be such that
// we never even try to do this.
this.$log.warn([
"Dialog already showing; ",
"unable to show ",
model.name
].join(""));
deferred.reject();
} else {
// Add the overlay using the OverlayService, which
// will handle actual insertion into the DOM
this.overlay = this.overlayService.createOverlay(
key,
model
);
// Track that a dialog is already visible, to
// avoid spawning multiple dialogs at once.
this.dialogVisible = true;
}
return deferred.promise;
};
/**
* Request user input via a window-modal dialog.
*
* @param {FormModel} formModel a description of the form
* to be shown (see platform/forms)
* @param {object} value the initial state of the form
* @returns {Promise} a promise for the form value that the
* user has supplied; this may be rejected if
* user input cannot be obtained (for instance,
* because the user cancelled the dialog)
*/
DialogService.prototype.getUserInput = function (formModel, value) {
var overlayModel = {
title: formModel.name,
message: formModel.message,
structure: formModel,
value: value
};
// Provide result from the model
function resultGetter() {
return overlayModel.value;
}
// Show the overlay-dialog
return this.getDialogResponse(
"overlay-dialog",
overlayModel,
resultGetter
);
};
/**
* Request that the user chooses from a set of options,
* which will be shown as buttons.
*
* @param dialogModel a description of the dialog to show
* @return {Promise} a promise for the user's choice
*/
DialogService.prototype.getUserChoice = function (dialogModel) {
// Show the overlay-options dialog
return this.getDialogResponse(
"overlay-options",
{ dialog: dialogModel }
);
};
return DialogService;
}
);
);

View File

@ -43,57 +43,63 @@ define(
* particularly where a multiple-overlay effect is not specifically
* desired).
*
* @memberof platform/commonUI/dialog
* @constructor
*/
function OverlayService($document, $compile, $rootScope) {
function createOverlay(key, overlayModel) {
// Create a new scope for this overlay
var scope = $rootScope.$new(),
element;
this.$compile = $compile;
// Stop showing the overlay; additionally, release the scope
// that it uses.
function dismiss() {
scope.$destroy();
element.remove();
}
// If no model is supplied, just fill in a default "cancel"
overlayModel = overlayModel || { cancel: dismiss };
// Populate the scope; will be passed directly to the template
scope.overlay = overlayModel;
scope.key = key;
// Create the overlay element and add it to the document's body
element = $compile(TEMPLATE)(scope);
$document.find('body').prepend(element);
return {
dismiss: dismiss
};
}
return {
/**
* Add a new overlay to the document. This will be
* prepended to the document body; the overlay's
* template (as pointed to by the `key` argument) is
* responsible for having a useful z-order, and for
* blocking user interactions if appropriate.
*
* @param {string} key the symbolic key which identifies
* the template of the overlay to be shown
* @param {object} overlayModel the model to pass to the
* included overlay template (this will be passed
* in via ng-model)
*/
createOverlay: createOverlay
// Don't include $document and $rootScope directly;
// avoids https://docs.angularjs.org/error/ng/cpws
this.findBody = function () {
return $document.find('body');
};
this.newScope = function () {
return $rootScope.$new();
};
}
/**
* Add a new overlay to the document. This will be
* prepended to the document body; the overlay's
* template (as pointed to by the `key` argument) is
* responsible for having a useful z-order, and for
* blocking user interactions if appropriate.
*
* @param {string} key the symbolic key which identifies
* the template of the overlay to be shown
* @param {object} overlayModel the model to pass to the
* included overlay template (this will be passed
* in via ng-model)
*/
OverlayService.prototype.createOverlay = function (key, overlayModel) {
// Create a new scope for this overlay
var scope = this.newScope(),
element;
// Stop showing the overlay; additionally, release the scope
// that it uses.
function dismiss() {
scope.$destroy();
element.remove();
}
// If no model is supplied, just fill in a default "cancel"
overlayModel = overlayModel || { cancel: dismiss };
// Populate the scope; will be passed directly to the template
scope.overlay = overlayModel;
scope.key = key;
// Create the overlay element and add it to the document's body
element = this.$compile(TEMPLATE)(scope);
this.findBody().prepend(element);
return {
dismiss: dismiss
};
};
return OverlayService;
}
);
);

View File

@ -59,7 +59,7 @@
"glyph": "Z",
"name": "Remove",
"description": "Remove this object from its containing object.",
"depends": [ "$q" ]
"depends": [ "$q", "navigationService" ]
},
{
"key": "save",

View File

@ -21,10 +21,11 @@
-->
<span ng-controller="EditActionController">
<span ng-repeat="currentAction in editActions">
<a class='btn'
<a class='s-btn t-{{currentAction.getMetadata().key}}'
title='{{currentAction.getMetadata().name}}'
ng-click="currentAction.perform()"
ng-class="{ major: $index === 0, subtle: $index !== 0 }">
{{currentAction.getMetadata().name}}
ng-class="{ major: $index === 0 }">
<span class="title-label">{{currentAction.getMetadata().name}}</span>
</a>
</span>
</span>

View File

@ -30,12 +30,11 @@
structure="toolbar.structure"
ng-model="toolbar.state">
</mct-toolbar>
<div class='holder abs object-holder work-area'>
<mct-representation key="representation.selected.key"
toolbar="toolbar"
mct-object="representation.selected.key && domainObject">
</mct-representation>
</div>
<mct-representation key="representation.selected.key"
toolbar="toolbar"
mct-object="representation.selected.key && domainObject"
class="holder abs object-holder work-area">
</mct-representation>
</div>
<mct-splitter></mct-splitter>
<div

View File

@ -29,9 +29,26 @@ define(
* The "Cancel" action; the action triggered by clicking Cancel from
* Edit Mode. Exits the editing user interface and invokes object
* capabilities to persist the changes that have been made.
* @constructor
* @memberof platform/commonUI/edit
* @implements {Action}
*/
function CancelAction($location, urlService, context) {
var domainObject = context.domainObject;
this.domainObject = context.domainObject;
this.$location = $location;
this.urlService = urlService;
}
/**
* Cancel editing.
*
* @returns {Promise} a promise that will be fulfilled when
* cancellation has completed
*/
CancelAction.prototype.perform = function () {
var domainObject = this.domainObject,
$location = this.$location,
urlService = this.urlService;
// Look up the object's "editor.completion" capability;
// this is introduced by EditableDomainObject which is
@ -56,25 +73,15 @@ define(
)));
}
return {
/**
* Cancel editing.
*
* @returns {Promise} a promise that will be fulfilled when
* cancellation has completed
*/
perform: function () {
return doCancel(getEditorCapability())
.then(returnToBrowse);
}
};
}
return doCancel(getEditorCapability())
.then(returnToBrowse);
};
/**
* 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
* @returns {boolean} true if applicable
*/
CancelAction.appliesTo = function (context) {
var domainObject = (context || {}).domainObject;
@ -84,4 +91,4 @@ define(
return CancelAction;
}
);
);

View File

@ -25,8 +25,8 @@
* Module defining EditAction. Created by vwoeltje on 11/14/14.
*/
define(
[],
function () {
['../objects/EditableDomainObject'],
function (EditableDomainObject) {
"use strict";
// A no-op action to return in the event that the action cannot
@ -42,7 +42,9 @@ define(
* mode (typically triggered by the Edit button.) This will
* show the user interface for editing (by way of a change in
* route)
* @memberof platform/commonUI/edit
* @constructor
* @implements {Action}
*/
function EditAction($location, navigationService, $log, context) {
var domainObject = (context || {}).domainObject;
@ -60,17 +62,21 @@ define(
return NULL_ACTION;
}
return {
/**
* Enter edit mode.
*/
perform: function () {
navigationService.setNavigation(domainObject);
$location.path("/edit");
}
};
this.domainObject = domainObject;
this.$location = $location;
this.navigationService = navigationService;
}
/**
* Enter edit mode.
*/
EditAction.prototype.perform = function () {
if (!this.domainObject.getDomainObject) {
this.navigationService.setNavigation(new EditableDomainObject(this.domainObject));
}
//this.$location.path("/edit");
};
/**
* Check for applicability; verify that a domain object is present
* for this action to be performed upon.
@ -79,12 +85,13 @@ define(
*/
EditAction.appliesTo = function (context) {
var domainObject = (context || {}).domainObject,
type = domainObject && domainObject.getCapability('type');
type = domainObject && domainObject.getCapability('type'),
isEditMode = domainObject && domainObject.getDomainObject ? true : false;
// Only allow creatable types to be edited
return type && type.hasFeature('creation');
return type && type.hasFeature('creation') && !isEditMode;
};
return EditAction;
}
);
);

View File

@ -29,42 +29,36 @@ define(
/**
* Add one domain object to another's composition.
* @constructor
* @memberof platform/commonUI/edit
* @implements {Action}
*/
function LinkAction(context) {
var domainObject = (context || {}).domainObject,
selectedObject = (context || {}).selectedObject,
selectedId = selectedObject && selectedObject.getId();
this.domainObject = (context || {}).domainObject;
this.selectedObject = (context || {}).selectedObject;
}
// Add this domain object's identifier
function addId(model) {
if (Array.isArray(model.composition) &&
model.composition.indexOf(selectedId) < 0) {
model.composition.push(selectedId);
}
}
LinkAction.prototype.perform = function () {
var self = this;
// Persist changes to the domain object
function doPersist() {
var persistence = domainObject.getCapability('persistence');
var persistence =
self.domainObject.getCapability('persistence');
return persistence.persist();
}
// Link these objects
function doLink() {
return domainObject.useCapability("mutation", addId)
.then(doPersist);
var composition = self.domainObject &&
self.domainObject.getCapability('composition');
return composition && composition.add(self.selectedObject)
.then(doPersist);
}
return {
/**
* Perform this action.
*/
perform: function () {
return selectedId && doLink();
}
};
}
return this.selectedObject && doLink();
};
return LinkAction;
}
);
);

View File

@ -32,58 +32,58 @@ define(
'use strict';
/**
* Construct an action which will allow an object's metadata to be
* edited.
* Implements the "Edit Properties" action, which prompts the user
* to modify a domain object's properties.
*
* @param {DialogService} dialogService a service which will show the dialog
* @param {DomainObject} object the object to be edited
* @param {ActionContext} context the context in which this action is performed
* @memberof platform/commonUI/edit
* @implements {Action}
* @constructor
*/
function PropertiesAction(dialogService, context) {
var object = context.domainObject;
this.domainObject = (context || {}).domainObject;
this.dialogService = dialogService;
}
PropertiesAction.prototype.perform = function () {
var type = this.domainObject.getCapability('type'),
domainObject = this.domainObject,
dialogService = this.dialogService;
// Persist modifications to this domain object
function doPersist() {
var persistence = object.getCapability('persistence');
var persistence = domainObject.getCapability('persistence');
return persistence && persistence.persist();
}
// Update the domain object model based on user input
function updateModel(userInput, dialog) {
return object.useCapability('mutation', function (model) {
return domainObject.useCapability('mutation', function (model) {
dialog.updateModel(model, userInput);
});
}
function showDialog(type) {
// Create a dialog object to generate the form structure, etc.
var dialog = new PropertiesDialog(type, object.getModel());
var dialog =
new PropertiesDialog(type, domainObject.getModel());
// Show the dialog
return dialogService.getUserInput(
dialog.getFormStructure(),
dialog.getInitialFormValue()
).then(function (userInput) {
// Update the model, if user input was provided
return userInput && updateModel(userInput, dialog);
}).then(function (result) {
return result && doPersist();
});
// Update the model, if user input was provided
return userInput && updateModel(userInput, dialog);
}).then(function (result) {
return result && doPersist();
});
}
return {
/**
* Perform this action.
* @return {Promise} a promise which will be
* fulfilled when the action has completed.
*/
perform: function () {
var type = object.getCapability('type');
return type && showDialog(type);
}
};
}
return type && showDialog(type);
};
/**
* Filter this action for applicability against a given context.
@ -106,3 +106,4 @@ define(
);

View File

@ -21,12 +21,6 @@
*****************************************************************************/
/*global define*/
/**
* Defines the PropertiesDialog, used by the PropertiesAction to
* populate the form shown in dialog based on the created type.
*
* @module common/actions/properties-dialog
*/
define(
function () {
'use strict';
@ -37,58 +31,63 @@ define(
* @param {TypeImpl} type the type of domain object for which properties
* will be specified
* @param {DomainObject} the object for which properties will be set
* @memberof platform/commonUI/edit
* @constructor
* @memberof module:common/actions/properties-dialog
*/
function PropertiesDialog(type, model) {
var properties = type.getProperties();
return {
/**
* Get sections provided by this dialog.
* @return {FormStructure} the structure of this form
*/
getFormStructure: function () {
return {
name: "Edit " + model.name,
sections: [{
name: "Properties",
rows: properties.map(function (property, index) {
// Property definition is same as form row definition
var row = Object.create(property.getDefinition());
row.key = index;
return row;
})
}]
};
},
/**
* Get the initial state of the form shown by this dialog
* (based on the object model)
* @returns {object} initial state of the form
*/
getInitialFormValue: function () {
// Start with initial values for properties
// Note that index needs to correlate to row.key
// from getFormStructure
return properties.map(function (property) {
return property.getValue(model);
});
},
/**
* Update a domain object model based on the value of a form.
*/
updateModel: function (model, formValue) {
// Update all properties
properties.forEach(function (property, index) {
property.setValue(model, formValue[index]);
});
}
};
this.type = type;
this.model = model;
this.properties = type.getProperties();
}
/**
* Get sections provided by this dialog.
* @return {FormStructure} the structure of this form
*/
PropertiesDialog.prototype.getFormStructure = function () {
return {
name: "Edit " + this.model.name,
sections: [{
name: "Properties",
rows: this.properties.map(function (property, index) {
// Property definition is same as form row definition
var row = Object.create(property.getDefinition());
row.key = index;
return row;
}).filter(function (row) {
// Only show properties which are editable
return row.control;
})
}]
};
};
/**
* Get the initial state of the form shown by this dialog
* (based on the object model)
* @returns {object} initial state of the form
*/
PropertiesDialog.prototype.getInitialFormValue = function () {
var model = this.model;
// Start with initial values for properties
// Note that index needs to correlate to row.key
// from getFormStructure
return this.properties.map(function (property) {
return property.getValue(model);
});
};
/**
* Update a domain object model based on the value of a form.
*/
PropertiesDialog.prototype.updateModel = function (model, formValue) {
// Update all properties
this.properties.forEach(function (property, index) {
property.setValue(model, formValue[index]);
});
};
return PropertiesDialog;
}
);
);

View File

@ -37,22 +37,35 @@ define(
*
* @param {DomainObject} object the object to be removed
* @param {ActionContext} context the context in which this action is performed
* @memberof platform/commonUI/edit
* @constructor
* @memberof module:editor/actions/remove-action
* @implements {Action}
*/
function RemoveAction($q, context) {
var object = (context || {}).domainObject;
function RemoveAction($q, navigationService, context) {
this.domainObject = (context || {}).domainObject;
this.$q = $q;
this.navigationService = navigationService;
}
/**
/**
* Perform this action.
* @return {Promise} a promise which will be
* fulfilled when the action has completed.
*/
RemoveAction.prototype.perform = function () {
var $q = this.$q,
navigationService = this.navigationService,
domainObject = this.domainObject;
/*
* Check whether an object ID matches the ID of the object being
* removed (used to filter a parent's composition to handle the
* removal.)
*/
function isNotObject(otherObjectId) {
return otherObjectId !== object.getId();
return otherObjectId !== domainObject.getId();
}
/**
/*
* Mutate a parent object such that it no longer contains the object
* which is being removed.
*/
@ -60,7 +73,7 @@ define(
model.composition = model.composition.filter(isNotObject);
}
/**
/*
* Invoke persistence on a domain object. This will be called upon
* the removed object's parent (as its composition will have changed.)
*/
@ -69,33 +82,55 @@ define(
return persistence && persistence.persist();
}
/**
* Remove the object from its parent, as identified by its context
* capability.
* @param {ContextCapability} contextCapability the "context" capability
* of the domain object being removed.
/*
* Checks current object and ascendants of current
* object with object being removed, if the current
* object or any in the current object's path is being removed,
* navigate back to parent of removed object.
*/
function removeFromContext(contextCapability) {
var parent = contextCapability.getParent();
$q.when(
function checkObjectNavigation(object, parentObject) {
// Traverse object starts at current location
var traverseObject = (navigationService).getNavigation(),
context;
// Stop when object is not defined (above ROOT)
while (traverseObject) {
// If object currently traversed to is object being removed
// navigate to parent of current object and then exit loop
if (traverseObject.getId() === object.getId()) {
navigationService.setNavigation(parentObject);
return;
}
// Traverses to parent of current object, moving
// up the ascendant path
context = traverseObject.getCapability('context');
traverseObject = context && context.getParent();
}
}
/*
* Remove the object from its parent, as identified by its context
* capability. Based on object's location and selected object's location
* user may be navigated to existing parent object
*/
function removeFromContext(object) {
var contextCapability = object.getCapability('context'),
parent = contextCapability.getParent();
// If currently within path of removed object(s),
// navigates to existing object up tree
checkObjectNavigation(object, parent);
return $q.when(
parent.useCapability('mutation', doMutate)
).then(function () {
return doPersist(parent);
});
}
return {
/**
* Perform this action.
* @return {module:core/promises.Promise} a promise which will be
* fulfilled when the action has completed.
*/
perform: function () {
return $q.when(object.getCapability('context'))
.then(removeFromContext);
}
};
}
return $q.when(domainObject)
.then(removeFromContext);
};
// Object needs to have a parent for Remove to be applicable
RemoveAction.appliesTo = function (context) {
@ -113,4 +148,4 @@ define(
return RemoveAction;
}
);
);

View File

@ -30,9 +30,27 @@ define(
* 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.
* @constructor
* @implements {Action}
* @memberof platform/commonUI/edit
*/
function SaveAction($location, urlService, context) {
var domainObject = context.domainObject;
this.domainObject = (context || {}).domainObject;
this.$location = $location;
this.urlService = urlService;
}
/**
* Save changes and conclude editing.
*
* @returns {Promise} a promise that will be fulfilled when
* cancellation has completed
* @memberof platform/commonUI/edit.SaveAction#
*/
SaveAction.prototype.perform = function () {
var domainObject = this.domainObject,
$location = this.$location,
urlService = this.urlService;
// Invoke any save behavior introduced by the editor capability;
// this is introduced by EditableDomainObject which is
@ -51,18 +69,8 @@ define(
));
}
return {
/**
* Save changes and conclude editing.
*
* @returns {Promise} a promise that will be fulfilled when
* cancellation has completed
*/
perform: function () {
return doSave().then(returnToBrowse);
}
};
}
return doSave().then(returnToBrowse);
};
/**
* Check if this action is applicable in a given context.
@ -78,4 +86,4 @@ define(
return SaveAction;
}
);
);

View File

@ -35,6 +35,9 @@ define(
* Meant specifically for use by EditableDomainObject and the
* associated cache; the constructor signature is particular
* to a pattern used there and may contain unused arguments.
* @constructor
* @memberof platform/commonUI/edit
* @implements {CompositionCapability}
*/
return function EditableCompositionCapability(
contextCapability,
@ -54,4 +57,4 @@ define(
);
};
}
);
);

View File

@ -35,6 +35,9 @@ define(
* Meant specifically for use by EditableDomainObject and the
* associated cache; the constructor signature is particular
* to a pattern used there and may contain unused arguments.
* @constructor
* @memberof platform/commonUI/edit
* @implements {ContextCapability}
*/
return function EditableContextCapability(
contextCapability,
@ -72,4 +75,4 @@ define(
return capability;
};
}
);
);

View File

@ -35,6 +35,8 @@ define(
* Meant specifically for use by EditableDomainObject and the
* associated cache; the constructor signature is particular
* to a pattern used there and may contain unused arguments.
* @constructor
* @memberof platform/commonUI/edit
*/
return function EditableLookupCapability(
contextCapability,
@ -76,7 +78,7 @@ define(
// Wrap a returned value (see above); if it's a promise, wrap
// the resolved value.
function wrapResult(result) {
return result.then ? // promise-like
return (result && result.then) ? // promise-like
result.then(makeEditable) :
makeEditable(result);
}
@ -105,8 +107,10 @@ define(
// Wrap a method of this capability
function wrapMethod(fn) {
capability[fn] =
(idempotent ? oneTimeFunction : wrapFunction)(fn);
if (typeof capability[fn] === 'function') {
capability[fn] =
(idempotent ? oneTimeFunction : wrapFunction)(fn);
}
}
// Wrap all methods; return only editable domain objects.
@ -115,4 +119,4 @@ define(
return capability;
};
}
);
);

View File

@ -35,6 +35,9 @@ define(
* Meant specifically for use by EditableDomainObject and the
* associated cache; the constructor signature is particular
* to a pattern used there and may contain unused arguments.
* @constructor
* @memberof platform/commonUI/edit
* @implements {PersistenceCapability}
*/
function EditablePersistenceCapability(
persistenceCapability,
@ -62,4 +65,4 @@ define(
return EditablePersistenceCapability;
}
);
);

View File

@ -35,6 +35,9 @@ define(
* Meant specifically for use by EditableDomainObject and the
* associated cache; the constructor signature is particular
* to a pattern used there and may contain unused arguments.
* @constructor
* @memberof platform/commonUI/edit
* @implements {RelationshipCapability}
*/
return function EditableRelationshipCapability(
relationshipCapability,
@ -54,4 +57,4 @@ define(
);
};
}
);
);

View File

@ -39,27 +39,48 @@ define(
* Meant specifically for use by EditableDomainObject and the
* associated cache; the constructor signature is particular
* to a pattern used there and may contain unused arguments.
* @constructor
* @memberof platform/commonUI/edit
*/
return function EditorCapability(
function EditorCapability(
persistenceCapability,
editableObject,
domainObject,
cache
) {
this.editableObject = editableObject;
this.domainObject = domainObject;
this.cache = cache;
}
// Simulate Promise.resolve (or $q.when); the former
// causes a delayed reaction from Angular (since it
// does not trigger a digest) and the latter is not
// readily accessible, since we're a few classes
// removed from the layer which gets dependency
// injection.
function resolvePromise(value) {
return (value && value.then) ? value : {
then: function (callback) {
return resolvePromise(callback(value));
}
};
}
// Simulate Promise.resolve (or $q.when); the former
// causes a delayed reaction from Angular (since it
// does not trigger a digest) and the latter is not
// readily accessible, since we're a few classes
// removed from the layer which gets dependency
// injection.
function resolvePromise(value) {
return (value && value.then) ? value : {
then: function (callback) {
return resolvePromise(callback(value));
}
};
}
/**
* Save any changes that have been made to this domain object
* (as well as to others that might have been retrieved and
* modified during the editing session)
* @param {boolean} nonrecursive if true, save only this
* object (and not other objects with associated changes)
* @returns {Promise} a promise that will be fulfilled after
* persistence has completed.
* @memberof platform/commonUI/edit.EditorCapability#
*/
EditorCapability.prototype.save = function (nonrecursive) {
var domainObject = this.domainObject,
editableObject = this.editableObject,
cache = this.cache;
// Update the underlying, "real" domain object's model
// with changes made to the copy used for editing.
@ -74,39 +95,32 @@ define(
return domainObject.getCapability('persistence').persist();
}
return {
/**
* Save any changes that have been made to this domain object
* (as well as to others that might have been retrieved and
* modified during the editing session)
* @param {boolean} nonrecursive if true, save only this
* object (and not other objects with associated changes)
* @returns {Promise} a promise that will be fulfilled after
* persistence has completed.
*/
save: function (nonrecursive) {
return nonrecursive ?
resolvePromise(doMutate()).then(doPersist) :
resolvePromise(cache.saveAll());
},
/**
* Cancel editing; Discard any changes that have been made to
* this domain object (as well as to others that might have
* been retrieved and modified during the editing session)
* @returns {Promise} a promise that will be fulfilled after
* cancellation has completed.
*/
cancel: function () {
return resolvePromise(undefined);
},
/**
* Check if there are any unsaved changes.
* @returns {boolean} true if there are unsaved changes
*/
dirty: function () {
return cache.dirty();
}
};
return nonrecursive ?
resolvePromise(doMutate()).then(doPersist) :
resolvePromise(cache.saveAll());
};
/**
* Cancel editing; Discard any changes that have been made to
* this domain object (as well as to others that might have
* been retrieved and modified during the editing session)
* @returns {Promise} a promise that will be fulfilled after
* cancellation has completed.
* @memberof platform/commonUI/edit.EditorCapability#
*/
EditorCapability.prototype.cancel = function () {
return resolvePromise(undefined);
};
/**
* Check if there are any unsaved changes.
* @returns {boolean} true if there are unsaved changes
* @memberof platform/commonUI/edit.EditorCapability#
*/
EditorCapability.prototype.dirty = function () {
return this.cache.dirty();
};
return EditorCapability;
}
);
);

View File

@ -33,6 +33,7 @@ define(
/**
* Controller which supplies action instances for Save/Cancel.
* @memberof platform/commonUI/edit
* @constructor
*/
function EditActionController($scope) {
@ -51,4 +52,4 @@ define(
return EditActionController;
}
);
);

View File

@ -22,7 +22,8 @@
/*global define,Promise*/
/**
* Module defining EditController. Created by vwoeltje on 11/14/14.
* This bundle implements Edit mode.
* @namespace platform/commonUI/edit
*/
define(
["../objects/EditableDomainObject"],
@ -33,15 +34,16 @@ define(
* Controller which is responsible for populating the scope for
* Edit mode; introduces an editable version of the currently
* navigated domain object into the scope.
* @memberof platform/commonUI/edit
* @constructor
*/
function EditController($scope, $q, navigationService) {
var navigatedObject;
var self = this;
function setNavigation(domainObject) {
// Wrap the domain object such that all mutation is
// confined to edit mode (until Save)
navigatedObject =
self.navigatedDomainObject =
domainObject && new EditableDomainObject(domainObject, $q);
}
@ -50,33 +52,33 @@ define(
$scope.$on("$destroy", function () {
navigationService.removeListener(setNavigation);
});
return {
/**
* Get the domain object which is navigated-to.
* @returns {DomainObject} the domain object that is navigated-to
*/
navigatedObject: function () {
return navigatedObject;
},
/**
* Get the warning to show if the user attempts to navigate
* away from Edit mode while unsaved changes are present.
* @returns {string} the warning to show, or undefined if
* there are no unsaved changes
*/
getUnloadWarning: function () {
var editorCapability = navigatedObject &&
navigatedObject.getCapability("editor"),
hasChanges = editorCapability && editorCapability.dirty();
return hasChanges ?
"Unsaved changes will be lost if you leave this page." :
undefined;
}
};
}
/**
* Get the domain object which is navigated-to.
* @returns {DomainObject} the domain object that is navigated-to
*/
EditController.prototype.navigatedObject = function () {
return this.navigatedDomainObject;
};
/**
* Get the warning to show if the user attempts to navigate
* away from Edit mode while unsaved changes are present.
* @returns {string} the warning to show, or undefined if
* there are no unsaved changes
*/
EditController.prototype.getUnloadWarning = function () {
var navigatedObject = this.navigatedDomainObject,
editorCapability = navigatedObject &&
navigatedObject.getCapability("editor"),
hasChanges = editorCapability && editorCapability.dirty();
return hasChanges ?
"Unsaved changes will be lost if you leave this page." :
undefined;
};
return EditController;
}
);
);

View File

@ -28,15 +28,17 @@ define(
/**
* Supports the Library and Elements panes in Edit mode.
* @memberof platform/commonUI/edit
* @constructor
*/
function EditPanesController($scope) {
var root;
var self = this;
// Update root object based on represented object
function updateRoot(domainObject) {
var context = domainObject &&
domainObject.getCapability('context'),
var root = self.rootDomainObject,
context = domainObject &&
domainObject.getCapability('context'),
newRoot = context && context.getTrueRoot(),
oldId = root && root.getId(),
newId = newRoot && newRoot.getId();
@ -44,25 +46,22 @@ define(
// Only update if this has actually changed,
// to avoid excessive refreshing.
if (oldId !== newId) {
root = newRoot;
self.rootDomainObject = newRoot;
}
}
// Update root when represented object changes
$scope.$watch('domainObject', updateRoot);
return {
/**
* Get the root-level domain object, as reported by the
* represented domain object.
* @returns {DomainObject} the root object
*/
getRoot: function () {
return root;
}
};
}
/**
* Get the root-level domain object, as reported by the
* represented domain object.
* @returns {DomainObject} the root object
*/
EditPanesController.prototype.getRoot = function () {
return this.rootDomainObject;
};
return EditPanesController;
}
);
);

View File

@ -31,6 +31,7 @@ define(
* to this attribute will be evaluated during page navigation events
* and, if it returns a truthy value, will be used to populate a
* prompt to the user to confirm this navigation.
* @memberof platform/commonUI/edit
* @constructor
* @param $window the window
*/
@ -102,4 +103,4 @@ define(
return MCTBeforeUnload;
}
);
);

View File

@ -68,6 +68,9 @@ define(
* which need to behave differently in edit mode,
* and provides a "working copy" of the object's
* model to allow changes to be easily cancelled.
* @constructor
* @memberof platform/commonUI/edit
* @implements {DomainObject}
*/
function EditableDomainObject(domainObject, $q) {
// The cache will hold all domain objects reached from
@ -92,12 +95,16 @@ define(
this,
delegateArguments
),
factory = capabilityFactories[name];
Factory = capabilityFactories[name];
return (factory && capability) ?
factory(capability, editableObject, domainObject, cache) :
return (Factory && capability) ?
new Factory(capability, editableObject, domainObject, cache) :
capability;
};
editableObject.getDomainObject = function() {
return domainObject;
}
return editableObject;
}
@ -109,4 +116,4 @@ define(
return EditableDomainObject;
}
);
);

View File

@ -22,7 +22,7 @@
/*global define*/
/**
/*
* An editable domain object cache stores domain objects that have been
* made editable, in a group that can be saved all-at-once. This supports
* Edit mode, which is launched for a specific object but may contain
@ -32,8 +32,6 @@
* to ensure that changes made while in edit mode do not propagate up
* to the objects used in browse mode (or to persistence) until the user
* initiates a Save.
*
* @module editor/object/editable-domain-object-cache
*/
define(
["./EditableModelCache"],
@ -46,107 +44,118 @@ define(
* of objects retrieved via composition or context capabilities as
* editable domain objects.
*
* @param {Constructor<EditableDomainObject>} EditableDomainObject a
* @param {Constructor<DomainObject>} EditableDomainObject a
* constructor function which takes a regular domain object as
* an argument, and returns an editable domain object as its
* result.
* @param $q Angular's $q, for promise handling
* @memberof platform/commonUI/edit
* @constructor
* @memberof module:editor/object/editable-domain-object-cache
*/
function EditableDomainObjectCache(EditableDomainObject, $q) {
var cache = new EditableModelCache(),
dirty = {},
root;
return {
/**
* Wrap this domain object in an editable form, or pull such
* an object from the cache if one already exists.
*
* @param {DomainObject} domainObject the regular domain object
* @returns {DomainObject} the domain object in an editable form
*/
getEditableObject: function (domainObject) {
var type = domainObject.getCapability('type');
// Track the top-level domain object; this will have
// some special behavior for its context capability.
root = root || domainObject;
// Avoid double-wrapping (WTD-1017)
if (domainObject.hasCapability('editor')) {
return domainObject;
}
// Don't bother wrapping non-editable objects
if (!type || !type.hasFeature('creation')) {
return domainObject;
}
// Provide an editable form of the object
return new EditableDomainObject(
domainObject,
cache.getCachedModel(domainObject)
);
},
/**
* Check if a domain object is (effectively) the top-level
* object in this editable subgraph.
* @returns {boolean} true if it is the root
*/
isRoot: function (domainObject) {
return domainObject === root;
},
/**
* Mark an editable domain object (presumably already cached)
* as having received modifications during editing; it should be
* included in the bulk save invoked when editing completes.
*
* @param {DomainObject} domainObject the domain object
*/
markDirty: function (domainObject) {
dirty[domainObject.getId()] = domainObject;
},
/**
* Mark an object (presumably already cached) as having had its
* changes saved (and thus no longer needing to be subject to a
* save operation.)
*
* @param {DomainObject} domainObject the domain object
*/
markClean: function (domainObject) {
delete dirty[domainObject.getId()];
},
/**
* Initiate a save on all objects that have been cached.
*/
saveAll: function () {
// Get a list of all dirty objects
var objects = Object.keys(dirty).map(function (k) {
return dirty[k];
});
// Clear dirty set, since we're about to save.
dirty = {};
// Most save logic is handled by the "editor.completion"
// capability, so that is delegated here.
return $q.all(objects.map(function (object) {
// Save; pass a nonrecursive flag to avoid looping
return object.getCapability('editor').save(true);
}));
},
/**
* Check if any objects have been marked dirty in this cache.
* @returns {boolean} true if objects are dirty
*/
dirty: function () {
return Object.keys(dirty).length > 0;
}
};
this.cache = new EditableModelCache();
this.dirtyObjects = {};
this.root = undefined;
this.$q = $q;
this.EditableDomainObject = EditableDomainObject;
}
/**
* Wrap this domain object in an editable form, or pull such
* an object from the cache if one already exists.
*
* @param {DomainObject} domainObject the regular domain object
* @returns {DomainObject} the domain object in an editable form
*/
EditableDomainObjectCache.prototype.getEditableObject = function (domainObject) {
var type = domainObject.getCapability('type'),
EditableDomainObject = this.EditableDomainObject;
// Track the top-level domain object; this will have
// some special behavior for its context capability.
this.root = this.root || domainObject;
// Avoid double-wrapping (WTD-1017)
if (domainObject.hasCapability('editor')) {
return domainObject;
}
// Don't bother wrapping non-editable objects
if (!type || !type.hasFeature('creation')) {
return domainObject;
}
// Provide an editable form of the object
return new EditableDomainObject(
domainObject,
this.cache.getCachedModel(domainObject)
);
};
/**
* Check if a domain object is (effectively) the top-level
* object in this editable subgraph.
* @returns {boolean} true if it is the root
*/
EditableDomainObjectCache.prototype.isRoot = function (domainObject) {
return domainObject === this.root;
};
/**
* Mark an editable domain object (presumably already cached)
* as having received modifications during editing; it should be
* included in the bulk save invoked when editing completes.
*
* @param {DomainObject} domainObject the domain object
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
*/
EditableDomainObjectCache.prototype.markDirty = function (domainObject) {
this.dirtyObjects[domainObject.getId()] = domainObject;
};
/**
* Mark an object (presumably already cached) as having had its
* changes saved (and thus no longer needing to be subject to a
* save operation.)
*
* @param {DomainObject} domainObject the domain object
*/
EditableDomainObjectCache.prototype.markClean = function (domainObject) {
delete this.dirtyObjects[domainObject.getId()];
};
/**
* Initiate a save on all objects that have been cached.
* @return {Promise} A promise which will resolve when all objects are
* persisted.
*/
EditableDomainObjectCache.prototype.saveAll = function () {
// Get a list of all dirty objects
var dirty = this.dirtyObjects,
objects = Object.keys(dirty).map(function (k) {
return dirty[k];
});
// Clear dirty set, since we're about to save.
this.dirtyObjects = {};
// Most save logic is handled by the "editor.completion"
// capability, so that is delegated here.
return this.$q.all(objects.map(function (object) {
// Save; pass a nonrecursive flag to avoid looping
return object.getCapability('editor').save(true);
}));
};
/**
* Check if any objects have been marked dirty in this cache.
* @returns {boolean} true if objects are dirty
*/
EditableDomainObjectCache.prototype.dirty = function () {
return Object.keys(this.dirtyObjects).length > 0;
};
return EditableDomainObjectCache;
}
);

View File

@ -31,33 +31,32 @@ define(
* made editable, to support a group that can be saved all-at-once.
* This is useful in Edit mode, which is launched for a specific
* object but may contain changes across many objects.
* @memberof platform/commonUI/edit
* @constructor
*/
function EditableModelCache() {
var cache = {};
// Deep-copy a model. Models are JSONifiable, so this can be
// done by stringification then destringification
function clone(model) {
return JSON.parse(JSON.stringify(model));
}
return {
/**
* Get this domain object's model from the cache (or
* place it in the cache if it isn't in the cache yet)
* @returns a clone of the domain object's model
*/
getCachedModel: function (domainObject) {
var id = domainObject.getId();
return (cache[id] =
cache[id] || clone(domainObject.getModel()));
}
};
this.cache = {};
}
// Deep-copy a model. Models are JSONifiable, so this can be
// done by stringification then destringification
function clone(model) {
return JSON.parse(JSON.stringify(model));
}
/**
* Get this domain object's model from the cache (or
* place it in the cache if it isn't in the cache yet)
* @returns a clone of the domain object's model
*/
EditableModelCache.prototype.getCachedModel = function (domainObject) {
var id = domainObject.getId(),
cache = this.cache;
return (cache[id] =
cache[id] || clone(domainObject.getModel()));
};
return EditableModelCache;
}
);
);

View File

@ -30,53 +30,47 @@ define(
* Policy controlling when the `edit` and/or `properties` actions
* can appear as applicable actions of the `view-control` category
* (shown as buttons in the top-right of browse mode.)
* @memberof platform/commonUI/edit
* @constructor
* @implements {Policy.<Action, ActionContext>}
*/
function EditActionPolicy() {
// Get a count of views which are not flagged as non-editable.
function countEditableViews(context) {
var domainObject = (context || {}).domainObject,
views = domainObject && domainObject.useCapability('view'),
count = 0;
}
// A view is editable unless explicitly flagged as not
(views || []).forEach(function (view) {
count += (view.editable !== false) ? 1 : 0;
});
// Get a count of views which are not flagged as non-editable.
function countEditableViews(context) {
var domainObject = (context || {}).domainObject,
views = domainObject && domainObject.useCapability('view'),
count = 0;
return count;
// A view is editable unless explicitly flagged as not
(views || []).forEach(function (view) {
count += (view.editable !== false) ? 1 : 0;
});
return count;
}
EditActionPolicy.prototype.allow = function (action, context) {
var key = action.getMetadata().key,
category = (context || {}).category;
// Only worry about actions in the view-control category
if (category === 'view-control') {
// Restrict 'edit' to cases where there are editable
// views (similarly, restrict 'properties' to when
// the converse is true)
if (key === 'edit') {
return countEditableViews(context) > 0;
} else if (key === 'properties') {
return countEditableViews(context) < 1;
}
}
return {
/**
* Check whether or not a given action is allowed by this
* policy.
* @param {Action} action the action
* @param context the context
* @returns {boolean} true if not disallowed
*/
allow: function (action, context) {
var key = action.getMetadata().key,
category = (context || {}).category;
// Only worry about actions in the view-control category
if (category === 'view-control') {
// Restrict 'edit' to cases where there are editable
// views (similarly, restrict 'properties' to when
// the converse is true)
if (key === 'edit') {
return countEditableViews(context) > 0;
} else if (key === 'properties') {
return countEditableViews(context) < 1;
}
}
// Like all policies, allow by default.
return true;
}
};
}
// Like all policies, allow by default.
return true;
};
return EditActionPolicy;
}
);
);

View File

@ -28,30 +28,24 @@ define(
/**
* Policy controlling which views should be visible in Edit mode.
* @memberof platform/commonUI/edit
* @constructor
* @implements {Policy.<View, DomainObject>}
*/
function EditableViewPolicy() {
return {
/**
* Check whether or not a given action is allowed by this
* policy.
* @param {Action} action the action
* @param domainObject the domain object which will be viewed
* @returns {boolean} true if not disallowed
*/
allow: function (view, domainObject) {
// If a view is flagged as non-editable, only allow it
// while we're not in Edit mode.
if ((view || {}).editable === false) {
return !domainObject.hasCapability('editor');
}
// Like all policies, allow by default.
return true;
}
};
}
EditableViewPolicy.prototype.allow = function (view, domainObject) {
// If a view is flagged as non-editable, only allow it
// while we're not in Edit mode.
if ((view || {}).editable === false) {
return !domainObject.hasCapability('editor');
}
// Like all policies, allow by default.
return true;
};
return EditableViewPolicy;
}
);
);

View File

@ -41,14 +41,17 @@ define(
* and may be reused for different domain objects and/or
* representations resulting from changes there.
*
* @memberof platform/commonUI/edit
* @implements {Representer}
* @constructor
*/
function EditRepresenter($q, $log, scope) {
var domainObject,
key;
var self = this;
// Mutate and persist a new version of a domain object's model.
function doPersist(model) {
var domainObject = self.domainObject;
// First, mutate; then, persist.
return $q.when(domainObject.useCapability("mutation", function () {
return model;
@ -64,7 +67,8 @@ define(
// Look up from scope; these will have been populated by
// mct-representation.
var model = scope.model,
configuration = scope.configuration;
configuration = scope.configuration,
domainObject = self.domainObject;
// Log the commit message
$log.debug([
@ -78,50 +82,33 @@ define(
if (domainObject && domainObject.hasCapability("persistence")) {
// Configurations for specific views are stored by
// key in the "configuration" field of the model.
if (key && configuration) {
if (self.key && configuration) {
model.configuration = model.configuration || {};
model.configuration[key] = configuration;
model.configuration[self.key] = configuration;
}
doPersist(model);
}
}
// Respond to the destruction of the current representation.
function destroy() {
// Nothing to clean up
}
// Handle a specific representation of a specific domain object
function represent(representation, representedObject) {
// Track the key, to know which view configuration to save to.
key = (representation || {}).key;
// Track the represented object
domainObject = representedObject;
// Ensure existing watches are released
destroy();
}
// Place the "commit" method in the scope
scope.commit = commit;
return {
/**
* Set the current representation in use, and the domain
* object being represented.
*
* @param {RepresentationDefinition} representation the
* definition of the representation in use
* @param {DomainObject} domainObject the domain object
* being represented
*/
represent: represent,
/**
* Release any resources associated with this representer.
*/
destroy: destroy
};
}
// Handle a specific representation of a specific domain object
EditRepresenter.prototype.represent = function represent(representation, representedObject) {
// Track the key, to know which view configuration to save to.
this.key = (representation || {}).key;
// Track the represented object
this.domainObject = representedObject;
// Ensure existing watches are released
this.destroy();
};
// Respond to the destruction of the current representation.
EditRepresenter.prototype.destroy = function destroy() {
// Nothing to clean up
};
return EditRepresenter;
}
);
);

View File

@ -38,125 +38,23 @@ define(
*
* @param structure toolbar structure, as provided by view definition
* @param {Function} commit callback to invoke after changes
* @memberof platform/commonUI/edit
* @constructor
*/
function EditToolbar(structure, commit) {
var toolbarStructure = Object.create(structure || {}),
toolbarState,
selection,
properties = [];
var self = this;
// Generate a new key for an item's property
function addKey(property) {
properties.push(property);
return properties.length - 1; // Return index of property
}
// Update value for this property in all elements of the
// selection which have this property.
function updateProperties(property, value) {
var changed = false;
// Update property in a selected element
function updateProperty(selected) {
// Ignore selected elements which don't have this property
if (selected[property] !== undefined) {
// Check if this is a setter, or just assignable
if (typeof selected[property] === 'function') {
changed =
changed || (selected[property]() !== value);
selected[property](value);
} else {
changed =
changed || (selected[property] !== value);
selected[property] = value;
}
}
}
// Update property in all selected elements
selection.forEach(updateProperty);
// Return whether or not anything changed
return changed;
}
// Look up the current value associated with a property
// in selection i
function lookupState(property, selected) {
var value = selected[property];
return (typeof value === 'function') ? value() : value;
}
// Get initial value for a given property
function initializeState(property) {
var result;
// Look through all selections for this property;
// values should all match by the time we perform
// this lookup anyway.
selection.forEach(function (selected) {
result = (selected[property] !== undefined) ?
lookupState(property, selected) :
result;
});
return result;
}
// Check if all elements of the selection which have this
// property have the same value for this property.
function isConsistent(property) {
var consistent = true,
observed = false,
state;
// Check if a given element of the selection is consistent
// with previously-observed elements for this property.
function checkConsistency(selected) {
var next;
// Ignore selections which don't have this property
if (selected[property] !== undefined) {
// Look up state of this element in the selection
next = lookupState(property, selected);
// Detect inconsistency
if (observed) {
consistent = consistent && (next === state);
}
// Track state for next iteration
state = next;
observed = true;
}
}
// Iterate through selections
selection.forEach(checkConsistency);
return consistent;
}
// Used to filter out items which are applicable (or not)
// to the current selection.
function isApplicable(item) {
var property = (item || {}).property,
method = (item || {}).method,
exclusive = !!(item || {}).exclusive;
// Check if a selected item defines this property
function hasProperty(selected) {
return (property && (selected[property] !== undefined)) ||
(method && (typeof selected[method] === 'function'));
}
return selection.map(hasProperty).reduce(
exclusive ? and : or,
exclusive
) && isConsistent(property);
self.properties.push(property);
return self.properties.length - 1; // Return index of property
}
// Invoke all functions in selections with the given name
function invoke(method, value) {
if (method) {
// Make the change in the selection
selection.forEach(function (selected) {
self.selection.forEach(function (selected) {
if (typeof selected[method] === 'function') {
selected[method](value);
}
@ -189,73 +87,172 @@ define(
return converted;
}
this.toolbarState = [];
this.selection = undefined;
this.properties = [];
this.toolbarStructure = Object.create(structure || {});
this.toolbarStructure.sections =
((structure || {}).sections || []).map(convertSection);
}
// Check if all elements of the selection which have this
// property have the same value for this property.
EditToolbar.prototype.isConsistent = function (property) {
var self = this,
consistent = true,
observed = false,
state;
// Check if a given element of the selection is consistent
// with previously-observed elements for this property.
function checkConsistency(selected) {
var next;
// Ignore selections which don't have this property
if (selected[property] !== undefined) {
// Look up state of this element in the selection
next = self.lookupState(property, selected);
// Detect inconsistency
if (observed) {
consistent = consistent && (next === state);
}
// Track state for next iteration
state = next;
observed = true;
}
}
// Iterate through selections
self.selection.forEach(checkConsistency);
return consistent;
};
// Used to filter out items which are applicable (or not)
// to the current selection.
EditToolbar.prototype.isApplicable = function (item) {
var property = (item || {}).property,
method = (item || {}).method,
exclusive = !!(item || {}).exclusive;
// Check if a selected item defines this property
function hasProperty(selected) {
return (property && (selected[property] !== undefined)) ||
(method && (typeof selected[method] === 'function'));
}
return this.selection.map(hasProperty).reduce(
exclusive ? and : or,
exclusive
) && this.isConsistent(property);
};
// Look up the current value associated with a property
EditToolbar.prototype.lookupState = function (property, selected) {
var value = selected[property];
return (typeof value === 'function') ? value() : value;
};
/**
* Set the current selection. Visibility of sections
* and items in the toolbar will be updated to match this.
* @param {Array} s the new selection
*/
EditToolbar.prototype.setSelection = function (s) {
var self = this;
// Show/hide controls in this section per applicability
function refreshSectionApplicability(section) {
var count = 0;
// Show/hide each item
(section.items || []).forEach(function (item) {
item.hidden = !isApplicable(item);
item.hidden = !self.isApplicable(item);
count += item.hidden ? 0 : 1;
});
// Hide this section if there are no applicable items
section.hidden = !count;
}
// Show/hide controls if they are applicable
function refreshApplicability() {
toolbarStructure.sections.forEach(refreshSectionApplicability);
// Get initial value for a given property
function initializeState(property) {
var result;
// Look through all selections for this property;
// values should all match by the time we perform
// this lookup anyway.
self.selection.forEach(function (selected) {
result = (selected[property] !== undefined) ?
self.lookupState(property, selected) :
result;
});
return result;
}
// Refresh toolbar state to match selection
function refreshState() {
toolbarState = properties.map(initializeState);
}
this.selection = s;
this.toolbarStructure.sections.forEach(refreshSectionApplicability);
this.toolbarState = this.properties.map(initializeState);
};
toolbarStructure.sections =
((structure || {}).sections || []).map(convertSection);
/**
* Get the structure of the toolbar, as appropriate to
* pass to `mct-toolbar`.
* @returns the toolbar structure
*/
EditToolbar.prototype.getStructure = function () {
return this.toolbarStructure;
};
toolbarState = [];
/**
* Get the current state of the toolbar, as appropriate
* to two-way bind to the state handled by `mct-toolbar`.
* @returns {Array} state of the toolbar
*/
EditToolbar.prototype.getState = function () {
return this.toolbarState;
};
return {
/**
* Set the current selection. Visisbility of sections
* and items in the toolbar will be updated to match this.
* @param {Array} s the new selection
*/
setSelection: function (s) {
selection = s;
refreshApplicability();
refreshState();
},
/**
* Get the structure of the toolbar, as appropriate to
* pass to `mct-toolbar`.
* @returns the toolbar structure
*/
getStructure: function () {
return toolbarStructure;
},
/**
* Get the current state of the toolbar, as appropriate
* to two-way bind to the state handled by `mct-toolbar`.
* @returns {Array} state of the toolbar
*/
getState: function () {
return toolbarState;
},
/**
* Update state within the current selection.
* @param {number} index the index of the corresponding
* element in the state array
* @param value the new value to convey to the selection
*/
updateState: function (index, value) {
return updateProperties(properties[index], value);
/**
* Update state within the current selection.
* @param {number} index the index of the corresponding
* element in the state array
* @param value the new value to convey to the selection
*/
EditToolbar.prototype.updateState = function (index, value) {
var self = this;
// Update value for this property in all elements of the
// selection which have this property.
function updateProperties(property, value) {
var changed = false;
// Update property in a selected element
function updateProperty(selected) {
// Ignore selected elements which don't have this property
if (selected[property] !== undefined) {
// Check if this is a setter, or just assignable
if (typeof selected[property] === 'function') {
changed =
changed || (selected[property]() !== value);
selected[property](value);
} else {
changed =
changed || (selected[property] !== value);
selected[property] = value;
}
}
}
};
}
// Update property in all selected elements
self.selection.forEach(updateProperty);
// Return whether or not anything changed
return changed;
}
return updateProperties(this.properties[index], value);
};
return EditToolbar;
}
);

View File

@ -27,17 +27,21 @@ define(
"use strict";
// No operation
function noop() {}
var NOOP_REPRESENTER = {
represent: function () {},
destroy: function () {}
};
/**
* The EditToolbarRepresenter populates the toolbar in Edit mode
* based on a view's definition.
* @param {Scope} scope the Angular scope of the representation
* @memberof platform/commonUI/edit
* @constructor
* @implements {Representer}
*/
function EditToolbarRepresenter(scope, element, attrs) {
var toolbar,
toolbarObject = {};
var self = this;
// Mark changes as ready to persist
function commit(message) {
@ -49,31 +53,33 @@ define(
// Handle changes to the current selection
function updateSelection(selection) {
// Only update if there is a toolbar to update
if (toolbar) {
if (self.toolbar) {
// Make sure selection is array-like
selection = Array.isArray(selection) ?
selection :
(selection ? [selection] : []);
// Update the toolbar's selection
toolbar.setSelection(selection);
self.toolbar.setSelection(selection);
// ...and expose its structure/state
toolbarObject.structure = toolbar.getStructure();
toolbarObject.state = toolbar.getState();
self.toolbarObject.structure =
self.toolbar.getStructure();
self.toolbarObject.state =
self.toolbar.getState();
}
}
// Get state (to watch it)
function getState() {
return toolbarObject.state;
return self.toolbarObject.state;
}
// Update selection models to match changed toolbar state
function updateState(state) {
// Update underlying state based on toolbar changes
var changed = (state || []).map(function (value, index) {
return toolbar.updateState(index, value);
return self.toolbar.updateState(index, value);
}).reduce(function (a, b) {
return a || b;
}, false);
@ -85,66 +91,73 @@ define(
}
}
// Initialize toolbar (expose object to parent scope)
function initialize(definition) {
// If we have been asked to expose toolbar state...
if (attrs.toolbar) {
// Initialize toolbar object
toolbar = new EditToolbar(definition, commit);
// Ensure toolbar state is exposed
scope.$parent[attrs.toolbar] = toolbarObject;
}
}
// Represent a domain object using this definition
function represent(representation) {
// Get the newest toolbar definition from the view
var definition = (representation || {}).toolbar || {};
// Expose the toolbar object to the parent scope
initialize(definition);
// Create a selection scope
scope.selection = new EditToolbarSelection();
// Initialize toolbar to an empty selection
updateSelection([]);
}
// Destroy; remove toolbar object from parent scope
function destroy() {
// Avoid attaching scope to this;
// http://errors.angularjs.org/1.2.26/ng/cpws
this.setSelection = function (s) {
scope.selection = s;
};
this.clearExposedToolbar = function () {
// Clear exposed toolbar state (if any)
if (attrs.toolbar) {
delete scope.$parent[attrs.toolbar];
}
}
};
this.exposeToolbar = function () {
scope.$parent[self.attrs.toolbar] = self.toolbarObject;
};
this.commit = commit;
this.attrs = attrs;
this.updateSelection = updateSelection;
this.toolbar = undefined;
this.toolbarObject = {};
// If this representation exposes a toolbar, set up watches
// to synchronize with it.
if (attrs.toolbar) {
if (attrs && attrs.toolbar) {
// Detect and handle changes to state from the toolbar
scope.$watchCollection(getState, updateState);
// Watch for changes in the current selection state
scope.$watchCollection("selection.all()", updateSelection);
// Expose toolbar state under that name
scope.$parent[attrs.toolbar] = toolbarObject;
scope.$parent[attrs.toolbar] = this.toolbarObject;
} else {
// No toolbar declared, so do nothing.
return NOOP_REPRESENTER;
}
return {
/**
* Set the current representation in use, and the domain
* object being represented.
*
* @param {RepresentationDefinition} representation the
* definition of the representation in use
* @param {DomainObject} domainObject the domain object
* being represented
*/
represent: (attrs || {}).toolbar ? represent : noop,
/**
* Release any resources associated with this representer.
*/
destroy: (attrs || {}).toolbar ? destroy : noop
};
}
// Represent a domain object using this definition
EditToolbarRepresenter.prototype.represent = function (representation) {
// Get the newest toolbar definition from the view
var definition = (representation || {}).toolbar || {},
self = this;
// Initialize toolbar (expose object to parent scope)
function initialize(definition) {
// If we have been asked to expose toolbar state...
if (self.attrs.toolbar) {
// Initialize toolbar object
self.toolbar = new EditToolbar(definition, self.commit);
// Ensure toolbar state is exposed
self.exposeToolbar();
}
}
// Expose the toolbar object to the parent scope
initialize(definition);
// Create a selection scope
this.setSelection(new EditToolbarSelection());
// Initialize toolbar to an empty selection
this.updateSelection([]);
};
// Destroy; remove toolbar object from parent scope
EditToolbarRepresenter.prototype.destroy = function () {
this.clearExposedToolbar();
};
return EditToolbarRepresenter;
}
);
);

View File

@ -37,110 +37,96 @@ define(
* * The selection, for single selected elements within the
* view.
*
* @memberof platform/commonUI/edit
* @constructor
*/
function EditToolbarSelection() {
var selection = [ {} ],
selecting = false,
selected;
this.selection = [{}];
this.selecting = false;
this.selectedObj = undefined;
}
// Remove the currently-selected object
function deselect() {
// Nothing to do if we don't have a selected object
if (selecting) {
// Clear state tracking
selecting = false;
selected = undefined;
/**
* Check if an object is currently selected.
* @param {*} obj the object to check for selection
* @returns {boolean} true if selected, otherwise false
*/
EditToolbarSelection.prototype.selected = function (obj) {
return (obj === this.selectedObj) || (obj === this.selection[0]);
};
// Remove the selection
selection.pop();
return true;
}
/**
* Select an object.
* @param obj the object to select
* @returns {boolean} true if selection changed
*/
EditToolbarSelection.prototype.select = function (obj) {
// Proxy is always selected
if (obj === this.selection[0]) {
return false;
}
// Select an object
function select(obj) {
// Proxy is always selected
if (obj === selection[0]) {
return false;
}
// Clear any existing selection
this.deselect();
// Clear any existing selection
deselect();
// Note the current selection state
this.selectedObj = obj;
this.selecting = true;
// Note the current selection state
selected = obj;
selecting = true;
// Add the selection
this.selection.push(obj);
};
// Add the selection
selection.push(obj);
/**
* Clear the current selection.
* @returns {boolean} true if selection changed
*/
EditToolbarSelection.prototype.deselect = function () {
// Nothing to do if we don't have a selected object
if (this.selecting) {
// Clear state tracking
this.selecting = false;
this.selectedObj = undefined;
// Remove the selection
this.selection.pop();
return true;
}
return false;
};
/**
* Get the currently-selected object.
* @returns the currently selected object
*/
EditToolbarSelection.prototype.get = function () {
return this.selectedObj;
};
// Check if an object is selected
function isSelected(obj) {
return (obj === selected) || (obj === selection[0]);
/**
* Get/set the view proxy (for toolbar actions taken upon
* the view itself.)
* @param [proxy] the view proxy (if setting)
* @returns the current view proxy
*/
EditToolbarSelection.prototype.proxy = function (p) {
if (arguments.length > 0) {
this.selection[0] = p;
}
return this.selection[0];
};
// Getter for current selection
function get() {
return selected;
}
// Getter/setter for view proxy
function proxy(p) {
if (arguments.length > 0) {
selection[0] = p;
}
return selection[0];
}
// Getter for the full array of selected objects (incl. view proxy)
function all() {
return selection;
}
return {
/**
* Check if an object is currently selected.
* @returns true if selected, otherwise false
*/
selected: isSelected,
/**
* Select an object.
* @param obj the object to select
* @returns {boolean} true if selection changed
*/
select: select,
/**
* Clear the current selection.
* @returns {boolean} true if selection changed
*/
deselect: deselect,
/**
* Get the currently-selected object.
* @returns the currently selected object
*/
get: get,
/**
* Get/set the view proxy (for toolbar actions taken upon
* the view itself.)
* @param [proxy] the view proxy (if setting)
* @returns the current view proxy
*/
proxy: proxy,
/**
* Get an array containing all selections, including the
* selection proxy. It is generally not advisable to
* mutate this array directly.
* @returns {Array} all selections
*/
all: all
};
}
/**
* Get an array containing all selections, including the
* selection proxy. It is generally not advisable to
* mutate this array directly.
* @returns {Array} all selections
*/
EditToolbarSelection.prototype.all = function () {
return this.selection;
};
return EditToolbarSelection;
}
);
);

View File

@ -31,7 +31,7 @@ define(
mockDomainObject,
mockParent,
mockContext,
mockMutation,
mockComposition,
mockPersistence,
mockType,
actionContext,
@ -67,7 +67,7 @@ define(
}
};
mockContext = jasmine.createSpyObj("context", [ "getParent" ]);
mockMutation = jasmine.createSpyObj("mutation", [ "invoke" ]);
mockComposition = jasmine.createSpyObj("composition", [ "invoke", "add" ]);
mockPersistence = jasmine.createSpyObj("persistence", [ "persist" ]);
mockType = jasmine.createSpyObj("type", [ "hasFeature" ]);
@ -75,11 +75,11 @@ define(
mockDomainObject.getCapability.andReturn(mockContext);
mockContext.getParent.andReturn(mockParent);
mockType.hasFeature.andReturn(true);
mockMutation.invoke.andReturn(mockPromise(true));
mockComposition.invoke.andReturn(mockPromise(true));
mockComposition.add.andReturn(mockPromise(true));
capabilities = {
mutation: mockMutation,
composition: mockComposition,
persistence: mockPersistence,
type: mockType
};
@ -96,33 +96,17 @@ define(
});
it("mutates the parent when performed", function () {
it("adds to the parent's composition when performed", function () {
action.perform();
expect(mockMutation.invoke)
.toHaveBeenCalledWith(jasmine.any(Function));
expect(mockComposition.add)
.toHaveBeenCalledWith(mockDomainObject);
});
it("changes composition from its mutation function", function () {
var mutator, result;
it("persists changes afterward", function () {
action.perform();
mutator = mockMutation.invoke.mostRecentCall.args[0];
result = mutator(model);
// Should not have cancelled the mutation
expect(result).not.toBe(false);
// Simulate mutate's behavior (remove can either return a
// new model or modify this one in-place)
result = result || model;
// Should have removed "test" - that was our
// mock domain object's id.
expect(result.composition).toEqual(["a", "b", "c", "test"]);
// Finally, should have persisted
expect(mockPersistence.persist).toHaveBeenCalled();
});
});
}
);
);

View File

@ -39,7 +39,7 @@ define(
return {
getValue: function (model) { return model[k]; },
setValue: function (model, v) { model[k] = v; },
getDefinition: function () { return {}; }
getDefinition: function () { return { control: 'textfield '}; }
};
});

View File

@ -28,9 +28,16 @@ define(
describe("The Remove action", function () {
var mockQ,
mockNavigationService,
mockDomainObject,
mockParent,
mockChildObject,
mockGrandchildObject,
mockRootObject,
mockContext,
mockChildContext,
mockGrandchildContext,
mockRootContext,
mockMutation,
mockPersistence,
mockType,
@ -54,6 +61,18 @@ define(
"domainObject",
[ "getId", "getCapability" ]
);
mockChildObject = jasmine.createSpyObj(
"domainObject",
[ "getId", "getCapability" ]
);
mockGrandchildObject = jasmine.createSpyObj(
"domainObject",
[ "getId", "getCapability" ]
);
mockRootObject = jasmine.createSpyObj(
"domainObject",
[ "getId", "getCapability" ]
);
mockQ = { when: mockPromise };
mockParent = {
getModel: function () {
@ -67,28 +86,41 @@ define(
}
};
mockContext = jasmine.createSpyObj("context", [ "getParent" ]);
mockChildContext = jasmine.createSpyObj("context", [ "getParent" ]);
mockGrandchildContext = jasmine.createSpyObj("context", [ "getParent" ]);
mockRootContext = jasmine.createSpyObj("context", [ "getParent" ]);
mockMutation = jasmine.createSpyObj("mutation", [ "invoke" ]);
mockPersistence = jasmine.createSpyObj("persistence", [ "persist" ]);
mockType = jasmine.createSpyObj("type", [ "hasFeature" ]);
mockNavigationService = jasmine.createSpyObj(
"navigationService",
[
"getNavigation",
"setNavigation",
"addListener",
"removeListener"
]
);
mockNavigationService.getNavigation.andReturn(mockDomainObject);
mockDomainObject.getId.andReturn("test");
mockDomainObject.getCapability.andReturn(mockContext);
mockContext.getParent.andReturn(mockParent);
mockType.hasFeature.andReturn(true);
capabilities = {
mutation: mockMutation,
persistence: mockPersistence,
type: mockType
};
model = {
composition: [ "a", "test", "b", "c" ]
composition: [ "a", "test", "b" ]
};
actionContext = { domainObject: mockDomainObject };
action = new RemoveAction(mockQ, actionContext);
action = new RemoveAction(mockQ, mockNavigationService, actionContext);
});
it("only applies to objects with parents", function () {
@ -123,11 +155,64 @@ define(
// Should have removed "test" - that was our
// mock domain object's id.
expect(result.composition).toEqual(["a", "b", "c"]);
expect(result.composition).toEqual(["a", "b"]);
// Finally, should have persisted
expect(mockPersistence.persist).toHaveBeenCalled();
});
it("removes parent of object currently navigated to", function () {
// Navigates to child object
mockNavigationService.getNavigation.andReturn(mockChildObject);
// Test is id of object being removed
// Child object has different id
mockDomainObject.getId.andReturn("test");
mockChildObject.getId.andReturn("not test");
// Sets context for the child and domainObject
mockDomainObject.getCapability.andReturn(mockContext);
mockChildObject.getCapability.andReturn(mockChildContext);
// Parents of child and domainObject are set
mockContext.getParent.andReturn(mockParent);
mockChildContext.getParent.andReturn(mockDomainObject);
mockType.hasFeature.andReturn(true);
action.perform();
// Expects navigation to parent of domainObject (removed object)
expect(mockNavigationService.setNavigation).toHaveBeenCalledWith(mockParent);
});
it("checks if removing object not in ascendent path (reaches ROOT)", function () {
// Navigates to grandchild of ROOT
mockNavigationService.getNavigation.andReturn(mockGrandchildObject);
// domainObject (grandparent) is set as ROOT, child and grandchild
// are set objects not being removed
mockDomainObject.getId.andReturn("test 1");
mockRootObject.getId.andReturn("ROOT");
mockChildObject.getId.andReturn("not test 2");
mockGrandchildObject.getId.andReturn("not test 3");
// Sets context for the grandchild, child, and domainObject
mockRootObject.getCapability.andReturn(mockRootContext);
mockChildObject.getCapability.andReturn(mockChildContext);
mockGrandchildObject.getCapability.andReturn(mockGrandchildContext);
// Parents of grandchild and child are set
mockChildContext.getParent.andReturn(mockRootObject);
mockGrandchildContext.getParent.andReturn(mockChildObject);
mockType.hasFeature.andReturn(true);
action.perform();
// Expects no navigation to occur
expect(mockNavigationService.setNavigation).not.toHaveBeenCalled();
});
});
}

View File

@ -112,7 +112,9 @@ define(
});
it("saves objects that have been marked dirty", function () {
var objects = ['a', 'b', 'c'].map(TestObject).map(cache.getEditableObject);
var objects = ['a', 'b', 'c'].map(TestObject).map(function (domainObject) {
return cache.getEditableObject(domainObject);
});
cache.markDirty(objects[0]);
cache.markDirty(objects[2]);
@ -123,7 +125,9 @@ define(
});
it("does not save objects that have been marked clean", function () {
var objects = ['a', 'b', 'c'].map(TestObject).map(cache.getEditableObject);
var objects = ['a', 'b', 'c'].map(TestObject).map(function (domainObject) {
return cache.getEditableObject(domainObject);
});
cache.markDirty(objects[0]);
cache.markDirty(objects[2]);

View File

@ -6,8 +6,13 @@
"services": [
{
"key": "urlService",
"implementation": "/services/UrlService.js",
"implementation": "services/UrlService.js",
"depends": [ "$location" ]
},
{
"key": "popupService",
"implementation": "services/PopupService.js",
"depends": [ "$document", "$window" ]
}
],
"runs": [
@ -20,18 +25,6 @@
{
"stylesheetUrl": "css/normalize.min.css",
"priority": "mandatory"
},
{
"stylesheetUrl": "css/theme-espresso.css",
"priority": 1000
},
{
"stylesheetUrl": "css/items.css",
"priority": 901
},
{
"stylesheetUrl": "css/tree.css",
"priority": 900
}
],
"templates": [
@ -57,6 +50,16 @@
}
],
"controllers": [
{
"key": "TimeRangeController",
"implementation": "controllers/TimeRangeController.js",
"depends": [ "$scope", "now" ]
},
{
"key": "DateTimePickerController",
"implementation": "controllers/DateTimePickerController.js",
"depends": [ "$scope", "now" ]
},
{
"key": "TreeNodeController",
"implementation": "controllers/TreeNodeController.js",
@ -117,11 +120,21 @@
"implementation": "directives/MCTDrag.js",
"depends": [ "$document" ]
},
{
"key": "mctClickElsewhere",
"implementation": "directives/MCTClickElsewhere.js",
"depends": [ "$document" ]
},
{
"key": "mctResize",
"implementation": "directives/MCTResize.js",
"depends": [ "$timeout" ]
},
{
"key": "mctPopup",
"implementation": "directives/MCTPopup.js",
"depends": [ "$compile", "popupService" ]
},
{
"key": "mctScrollX",
"implementation": "directives/MCTScroll.js",
@ -135,7 +148,7 @@
{
"key": "mctSplitPane",
"implementation": "directives/MCTSplitPane.js",
"depends": [ "$parse", "$log" ]
"depends": [ "$parse", "$log", "$interval" ]
},
{
"key": "mctSplitter",
@ -196,7 +209,7 @@
{
"key": "label",
"templateUrl": "templates/label.html",
"uses": [ "type" ],
"uses": [ "type", "location" ],
"gestures": [ "drag", "menu", "info" ]
},
{
@ -225,6 +238,10 @@
{
"key": "selector",
"templateUrl": "templates/controls/selector.html"
},
{
"key": "datetime-picker",
"templateUrl": "templates/controls/datetime-picker.html"
}
],
"licenses": [

View File

@ -13,7 +13,7 @@ javascripts_dir = "js"
output_style = :nested
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false

View File

@ -1,541 +0,0 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/************************** FEATURES */
/************************** VERY INFLUENTIAL GLOBAL DIMENSIONS */
/************************** COLORS AND SHADING */
/************************** RATIOS */
/************************** LAYOUT */
/************************** CONTROLS */
/************************** PATHS */
/************************** TIMINGS */
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*
@mixin invokeMenu($baseColor: $colorBodyFg) {
$c: $baseColor;
color: $c;
&:hover {
color: lighten($c, $ltGamma);
}
}
*/
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/* line 22, ../sass/forms/_elems.scss */
.section-header {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.1);
font-size: 0.8em;
margin-top: 5px;
padding: 5px; }
/* line 28, ../sass/forms/_elems.scss */
.section-header:first-child {
margin-top: 0; }
/* line 35, ../sass/forms/_elems.scss */
.form .form-section {
position: relative; }
/* line 39, ../sass/forms/_elems.scss */
.form .form-row {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
*zoom: 1;
border-top: 1px solid #4d4d4d;
margin-top: 5px;
padding: 5px;
position: relative; }
/* line 46, ../sass/forms/_elems.scss */
.form .form-row.first {
border-top: none; }
/* line 50, ../sass/forms/_elems.scss */
.form .form-row .label,
.form .form-row .controls {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
*zoom: 1;
box-sizing: border-box;
font-size: 0.75rem;
line-height: 22px;
min-height: 22px; }
/* line 61, ../sass/forms/_elems.scss */
.form .form-row > .label {
float: left;
position: relative;
white-space: nowrap;
width: 20%; }
/* line 69, ../sass/forms/_elems.scss */
.form .form-row .value {
color: #cccccc; }
/* line 73, ../sass/forms/_elems.scss */
.form .form-row .controls {
float: left;
position: relative;
width: 79.9%; }
/* line 80, ../sass/forms/_elems.scss */
.form .form-row .controls .l-composite-control.l-checkbox {
display: inline-block;
line-height: 14px;
margin-right: 5px; }
/* line 89, ../sass/forms/_elems.scss */
.form .form-row .controls input[type="text"] {
height: 22px;
line-height: 22px;
margin-top: -4px;
vertical-align: baseline; }
/* line 96, ../sass/forms/_elems.scss */
.form .form-row .controls .l-med input[type="text"] {
width: 200px; }
/* line 100, ../sass/forms/_elems.scss */
.form .form-row .controls .l-small input[type="text"] {
width: 50px; }
/* line 104, ../sass/forms/_elems.scss */
.form .form-row .controls .l-numeric input[type="text"] {
text-align: right; }
/* line 108, ../sass/forms/_elems.scss */
.form .form-row .controls .select {
margin-right: 5px; }
/* line 113, ../sass/forms/_elems.scss */
.form .form-row .field-hints {
color: #666666; }
/* line 117, ../sass/forms/_elems.scss */
.form .form-row .selector-list {
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: rgba(0, 0, 0, 0.2);
padding: 5px;
position: relative;
height: 150px;
overflow: auto; }
/* line 128, ../sass/forms/_elems.scss */
.form .form-row .selector-list .wrapper {
overflow-y: auto;
position: absolute;
top: 5px;
right: 5px;
bottom: 5px;
left: 5px; }
/* line 142, ../sass/forms/_elems.scss */
label.form-control.checkbox input {
margin-right: 5px;
vertical-align: top; }
/* line 148, ../sass/forms/_elems.scss */
.hint,
.s-hint {
font-size: 0.9em; }
/* line 153, ../sass/forms/_elems.scss */
.l-result {
display: inline-block;
min-width: 32px;
min-height: 32px;
position: relative;
vertical-align: top; }
/* line 160, ../sass/forms/_elems.scss */
.l-result div.s-hint {
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
background: rgba(255, 153, 0, 0.8);
display: block;
color: #ffd699;
padding: 5px; }
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/* line 22, ../sass/forms/_textarea.scss */
.edit-main textarea {
-moz-appearance: none;
-webkit-appearance: none;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-moz-box-shadow: inset rgba(0, 0, 0, 0.5) 0 1px 5px;
-webkit-box-shadow: inset rgba(0, 0, 0, 0.5) 0 1px 5px;
box-shadow: inset rgba(0, 0, 0, 0.5) 0 1px 5px;
background: rgba(255, 255, 255, 0.1);
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
color: #cccccc;
outline: none;
padding: 5px;
position: absolute;
height: 100%;
width: 100%; }
/* line 33, ../sass/forms/_mixins.scss */
.edit-main textarea.error {
background: rgba(255, 0, 0, 0.5); }
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/* line 22, ../sass/forms/_text-input.scss */
input[type="text"] {
-moz-appearance: none;
-webkit-appearance: none;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-moz-box-shadow: inset rgba(0, 0, 0, 0.5) 0 1px 5px;
-webkit-box-shadow: inset rgba(0, 0, 0, 0.5) 0 1px 5px;
box-shadow: inset rgba(0, 0, 0, 0.5) 0 1px 5px;
background: rgba(255, 255, 255, 0.1);
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
color: #cccccc;
outline: none;
padding: 0 3px; }
/* line 33, ../sass/forms/_mixins.scss */
input[type="text"].error {
background: rgba(255, 0, 0, 0.5); }
/* line 29, ../sass/forms/_text-input.scss */
input[type="text"].numeric {
text-align: right; }
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/* line 22, ../sass/forms/_selects.scss */
.form-control.select {
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzUyNTI1MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzQ1NDU0NSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #525252), color-stop(100%, #454545));
background-image: -moz-linear-gradient(#525252, #454545);
background-image: -webkit-linear-gradient(#525252, #454545);
background-image: linear-gradient(#525252, #454545);
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px;
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px;
box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px;
border: none;
border-top: 1px solid #575757;
color: #999;
display: inline-block;
cursor: pointer;
display: inline-block;
margin: 0 0 2px 2px;
overflow: hidden;
position: relative; }
/* line 162, ../sass/_mixins.scss */
.form-control.select:not(.disabled):hover {
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzYzNjM2MyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzU3NTc1NyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #636363), color-stop(100%, #575757));
background-image: -moz-linear-gradient(#636363, #575757);
background-image: -webkit-linear-gradient(#636363, #575757);
background-image: linear-gradient(#636363, #575757);
color: #bdbdbd; }
/* line 165, ../sass/_mixins.scss */
.form-control.select:not(.disabled):hover.btn-menu .invoke-menu {
color: #878787; }
/* line 170, ../sass/_mixins.scss */
.form-control.select.btn-menu .invoke-menu {
color: #757575; }
/* line 29, ../sass/forms/_selects.scss */
.form-control.select select {
-moz-appearance: none;
-webkit-appearance: none;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: none;
color: #999;
border: none !important;
cursor: pointer;
padding: 4px 25px 2px 5px;
width: 120%; }
/* line 38, ../sass/forms/_selects.scss */
.form-control.select select option {
margin: 5px 0; }
/* line 42, ../sass/forms/_selects.scss */
.form-control.select:after {
color: #0099cc;
content: "v";
display: block;
font-family: 'symbolsfont';
pointer-events: none;
position: absolute;
right: 5px;
top: 0; }
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/* line 23, ../sass/forms/_channel-selector.scss */
.channel-selector .line {
margin-bottom: 5px;
min-height: 22px; }
/* line 27, ../sass/forms/_channel-selector.scss */
.channel-selector .treeview {
-moz-appearance: none;
-webkit-appearance: none;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-moz-box-shadow: inset rgba(0, 0, 0, 0.5) 0 1px 5px;
-webkit-box-shadow: inset rgba(0, 0, 0, 0.5) 0 1px 5px;
box-shadow: inset rgba(0, 0, 0, 0.5) 0 1px 5px;
background: rgba(255, 255, 255, 0.1);
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
color: #cccccc;
outline: none;
padding: 0 3px;
background: #3b3b3b;
border-bottom: 1px solid #4d4d4d;
min-height: 300px;
max-height: 400px;
overflow: auto;
padding: 5px; }
/* line 33, ../sass/forms/_mixins.scss */
.channel-selector .treeview.error {
background: rgba(255, 0, 0, 0.5); }
/* line 36, ../sass/forms/_channel-selector.scss */
.channel-selector .btns-add-remove {
margin-top: 150px; }
/* line 39, ../sass/forms/_channel-selector.scss */
.channel-selector .btns-add-remove .btn {
display: block;
font-size: 1.5em;
margin-bottom: 5px;
padding: 10px;
text-align: center; }
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/* line 23, ../sass/forms/_datetime.scss */
.complex.datetime span {
display: inline-block;
margin-right: 5px; }
/* line 36, ../sass/forms/_datetime.scss */
.complex.datetime .fields {
margin-top: 3px 0;
padding: 3px 0; }
/* line 41, ../sass/forms/_datetime.scss */
.complex.datetime .date {
width: 85px; }
/* line 44, ../sass/forms/_datetime.scss */
.complex.datetime .date input {
width: 80px; }
/* line 50, ../sass/forms/_datetime.scss */
.complex.datetime .time.sm {
width: 45px; }
/* line 53, ../sass/forms/_datetime.scss */
.complex.datetime .time.sm input {
width: 40px; }

View File

@ -1,298 +0,0 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/************************** FEATURES */
/************************** VERY INFLUENTIAL GLOBAL DIMENSIONS */
/************************** COLORS AND SHADING */
/************************** RATIOS */
/************************** LAYOUT */
/************************** CONTROLS */
/************************** PATHS */
/************************** TIMINGS */
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*
@mixin invokeMenu($baseColor: $colorBodyFg) {
$c: $baseColor;
color: $c;
&:hover {
color: lighten($c, $ltGamma);
}
}
*/
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/* line 22, ../sass/items/_item.scss */
.items-holder {
overflow: hidden;
*zoom: 1;
overflow-y: auto; }
/* line 25, ../sass/items/_item.scss */
.items-holder .contents {
top: 0; }
/* line 29, ../sass/items/_item.scss */
.items-holder .item.grid-item {
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzVlNWU1ZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzUyNTI1MiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5e5e5e), color-stop(100%, #525252));
background-image: -moz-linear-gradient(#5e5e5e, #525252);
background-image: -webkit-linear-gradient(#5e5e5e, #525252);
background-image: linear-gradient(#5e5e5e, #525252);
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px;
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px;
box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px;
border: none;
border-top: 1px solid #636363;
color: #999;
display: inline-block;
box-sizing: border-box;
cursor: pointer;
float: left;
height: 200px;
width: 200px;
margin-bottom: 3px;
margin-right: 3px;
position: relative; }
/* line 162, ../sass/_mixins.scss */
.items-holder .item.grid-item:not(.disabled):hover {
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzcwNzA3MCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzYzNjM2MyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #707070), color-stop(100%, #636363));
background-image: -moz-linear-gradient(#707070, #636363);
background-image: -webkit-linear-gradient(#707070, #636363);
background-image: linear-gradient(#707070, #636363);
color: #bdbdbd; }
/* line 165, ../sass/_mixins.scss */
.items-holder .item.grid-item:not(.disabled):hover.btn-menu .invoke-menu {
color: #949494; }
/* line 170, ../sass/_mixins.scss */
.items-holder .item.grid-item.btn-menu .invoke-menu {
color: #828282; }
/* line 46, ../sass/items/_item.scss */
.items-holder .item.grid-item:hover .item-main .item-type {
color: #0099cc !important; }
/* line 48, ../sass/items/_item.scss */
.items-holder .item.grid-item:hover .item-main .item-type .l-icon-link {
color: #49dedb; }
/* line 52, ../sass/items/_item.scss */
.items-holder .item.grid-item:hover .item-main .item-open {
opacity: 1; }
/* line 57, ../sass/items/_item.scss */
.items-holder .item.grid-item .contents {
top: 5px;
right: 5px;
bottom: 5px;
left: 5px; }
/* line 61, ../sass/items/_item.scss */
.items-holder .item.grid-item .bar.top-bar.abs {
bottom: auto;
height: 20px;
line-height: 20px;
z-index: 5; }
/* line 66, ../sass/items/_item.scss */
.items-holder .item.grid-item .bar.top-bar.abs .left, .items-holder .item.grid-item .bar.top-bar.abs .right {
width: auto; }
/* line 68, ../sass/items/_item.scss */
.items-holder .item.grid-item .bar.top-bar.abs .left .icon, .items-holder .item.grid-item .bar.top-bar.abs .right .icon {
margin-left: 3px; }
/* line 70, ../sass/items/_item.scss */
.items-holder .item.grid-item .bar.top-bar.abs .left .icon.l-icon-link, .items-holder .item.grid-item .bar.top-bar.abs .right .icon.l-icon-link {
color: #49dedb; }
/* line 76, ../sass/items/_item.scss */
.items-holder .item.grid-item .bar.bottom-bar.abs {
top: auto;
height: 30px;
padding: 5px; }
/* line 82, ../sass/items/_item.scss */
.items-holder .item.grid-item .item-main {
line-height: 160px;
z-index: 1; }
/* line 88, ../sass/items/_item.scss */
.items-holder .item.grid-item .item-main .item-type {
overflow: false;
position: absolute;
top: 40px;
right: 40px;
bottom: 40px;
left: 40px;
width: auto;
height: auto;
color: #737373;
text-align: center;
font-size: 96.9px;
line-height: 102px;
bottom: auto;
height: 102px;
top: 30px; }
/* line 100, ../sass/items/_item.scss */
.items-holder .item.grid-item .item-main .item-type .l-icon-link {
color: #1a8e8b;
height: 36px;
line-height: 36px;
position: absolute;
font-size: 32px;
left: 0px;
bottom: 10px;
z-index: 2; }
/* line 112, ../sass/items/_item.scss */
.items-holder .item.grid-item .item-main .item-open {
-moz-transition-property: "opacity";
-o-transition-property: "opacity";
-webkit-transition-property: "opacity";
transition-property: "opacity";
-moz-transition-duration: 200ms;
-o-transition-duration: 200ms;
-webkit-transition-duration: 200ms;
transition-duration: 200ms;
-moz-transition-timing-function: ease-in-out;
-o-transition-timing-function: ease-in-out;
-webkit-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
opacity: 0;
font-size: 3em;
left: auto;
width: 50px;
pointer-events: none;
text-align: right; }
/* line 124, ../sass/items/_item.scss */
.items-holder .item.grid-item .title {
text-shadow: rgba(0, 0, 0, 0.1) 0 1px 2px;
color: #cccccc;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis; }
/* line 132, ../sass/items/_item.scss */
.items-holder .item.grid-item .details {
font-size: 0.8em; }
/* line 135, ../sass/items/_item.scss */
.items-holder .item.grid-item.selected {
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzBhYzJmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwYjRmMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0ac2ff), color-stop(100%, #00b4f0));
background-image: -moz-linear-gradient(#0ac2ff, #00b4f0);
background-image: -webkit-linear-gradient(#0ac2ff, #00b4f0);
background-image: linear-gradient(#0ac2ff, #00b4f0);
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px;
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px;
box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px;
border: none;
border-top: 1px solid #14c4ff;
color: #999;
display: inline-block;
color: #80dfff; }
/* line 162, ../sass/_mixins.scss */
.items-holder .item.grid-item.selected:not(.disabled):hover {
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzJlY2JmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzE0YzRmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #2ecbff), color-stop(100%, #14c4ff));
background-image: -moz-linear-gradient(#2ecbff, #14c4ff);
background-image: -webkit-linear-gradient(#2ecbff, #14c4ff);
background-image: linear-gradient(#2ecbff, #14c4ff);
color: #bdbdbd; }
/* line 165, ../sass/_mixins.scss */
.items-holder .item.grid-item.selected:not(.disabled):hover.btn-menu .invoke-menu {
color: #75ddff; }
/* line 170, ../sass/_mixins.scss */
.items-holder .item.grid-item.selected.btn-menu .invoke-menu {
color: #52d4ff; }
/* line 140, ../sass/items/_item.scss */
.items-holder .item.grid-item.selected .item-type, .items-holder .item.grid-item.selected .top-bar .icon:not(.alert) {
color: #80dfff; }
/* line 141, ../sass/items/_item.scss */
.items-holder .item.grid-item.selected .item-main .item-open {
color: #80dfff; }
/* line 142, ../sass/items/_item.scss */
.items-holder .item.grid-item.selected .title {
color: white; }
/* line 144, ../sass/items/_item.scss */
.items-holder .item.grid-item.selected:hover .item-main .item-type {
color: white !important; }

View File

@ -1,120 +0,0 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT Web includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*
Syntax error: Undefined variable: "$colorBodyBg".
on line 66 of /Users/iMac/dev/nasa/wtd-dev/platform/sass/_effects.scss, in `boxOutline'
from line 7 of /Users/iMac/dev/nasa/wtd-dev/platform/sass/_effects.scss
from line 10 of /Users/iMac/dev/nasa/wtd-dev/platform/sass/main.scss
Backtrace:
/Users/iMac/dev/nasa/wtd-dev/platform/sass/_effects.scss:66:in `boxOutline'
/Users/iMac/dev/nasa/wtd-dev/platform/sass/_effects.scss:7
/Users/iMac/dev/nasa/wtd-dev/platform/sass/main.scss:10
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/script/variable.rb:49:in `_perform'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/script/node.rb:40:in `perform'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/script/funcall.rb:93:in `_perform'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/script/funcall.rb:93:in `map'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/script/funcall.rb:93:in `_perform'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/script/node.rb:40:in `perform'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:56:in `perform_arguments'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:50:in `zip'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:50:in `perform_arguments'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:261:in `visit_mixin'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:98:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:53:in `map'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:107:in `visit_children'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:119:in `with_environment'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:106:in `visit_children'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:318:in `visit_rule'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:98:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:225:in `visit_import'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:225:in `map'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:225:in `visit_import'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:98:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:53:in `map'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:107:in `visit_children'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:119:in `with_environment'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:106:in `visit_children'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:126:in `visit_root'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:98:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:7:in `send'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/visitors/perform.rb:7:in `visit'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/tree/root_node.rb:20:in `render'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/engine.rb:315:in `_render'
/Library/Ruby/Gems/1.8/gems/sass-3.2.5/lib/sass/../sass/engine.rb:262:in `render'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:140:in `compile'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:139:in `compile'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/logger.rb:45:in `red'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:138:in `compile'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_required'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:103:in `run'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `each'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `run'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:100:in `run'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:147:in `recompile'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `to_proc'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/path.rb:73:in `call'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/path.rb:73:in `run_callback'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/path.rb:55:in `callback_action'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/path.rb:35:in `update'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/state/directory.rb:39:in `modified'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/state/directory.rb:37:in `each'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/state/directory.rb:37:in `modified'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/state/directory.rb:18:in `refresh'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:17:in `run'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:17:in `each'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:17:in `run'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:15:in `loop'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:15:in `run'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm/monitor.rb:26:in `run'
/Library/Ruby/Gems/1.8/gems/fssm-0.2.9/lib/fssm.rb:70:in `monitor'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:87:in `perform'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:30
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44:in `call'
/Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44
/usr/bin/compass:23:in `load'
/usr/bin/compass:23
*/
body:before {
white-space: pre;
font-family: monospace;
content: "Syntax error: Undefined variable: \"$colorBodyBg\".\A on line 66 of /Users/iMac/dev/nasa/wtd-dev/platform/sass/_effects.scss, in `boxOutline'\A from line 7 of /Users/iMac/dev/nasa/wtd-dev/platform/sass/_effects.scss\A from line 10 of /Users/iMac/dev/nasa/wtd-dev/platform/sass/main.scss"; }

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