Commit Graph

193 Commits

Author SHA1 Message Date
Pegah Sarram
14894cf197 [Fixed Position] Modify fixed position to use the Selection API
Change method name to shouldSelect() as requested by the reviewer.

Fix tests.

Fixes #1848
2018-01-10 15:16:04 -08:00
Deep Tailor
aa8fa9168a add isDefined condition in condition Evaluator which fixes Issue 1860
Add appropriate tests
Fix for isUndefined not working as well
2018-01-04 10:43:05 -08:00
Pete Richards
3f1b7e0a87 Add test for identifier generation 2018-01-03 12:11:35 -08:00
Pete Richards
5ec3b98d1c [SummaryWidget] Use objectutil to get legacy id
Use objectUtils to get a proper legacy id so that namespaces are
properly handled.  Fixes https://github.com/nasa/openmct/issues/1858
2018-01-03 12:11:35 -08:00
Henry
2390278b97 [Telemetry Mean] Addressed code review issues 2017-12-11 10:44:07 -08:00
Henry
8a66731271 Added tests for MeanTelemetryProvider 2017-12-11 10:44:07 -08:00
Henry
0a9ea48355 Implemention of basic averaging telemetry filter 2017-12-11 10:44:07 -08:00
Pete Richards
1378b57567 Remove format/parse cache
Remove the cache for formatted and parsed values, as this was
a net performance loss due to a very low cache hit percentage.
2017-12-11 10:39:02 -08:00
Deep Tailor
284dec4903
Merge pull request #1834 from nasa/summary-widgets-ml
Summary widgets Memory Leak Fix
2017-12-07 14:19:16 -08:00
Pegah Sarram
425655bae0 [Layout] Support sub-object selection in layout (#1811)
Updates to sub object selection, first cut of selection APIs.

* [API] Add inspector view registry to register inspector view providers and show a view in the inspector.

[API] Modify the selection API to register the click event and handle the event. The API will add a class to the selected object and the immediate parent of the selected object.

[Directive] Implemenet mct-selectable directive for making an element selectable.

[Layout] Update the layout controller to use the Selection API. Also, add double click gesture to allow drilling into a selected object.

Populate the Elements pool with contained elements of the selected object. Update toolbar and inspector to listen for the changes in selection.

* [Frontend] Mods to markup and CSS for sub-object selection

* MCTSelectable allows selection in initialization, use to select on navigation

[Frontend] Show grid in first nested layout, hide from deeper nesting. Only show grids when applicable to relative selection.

* Fix checkstyle and lint errors

* Bring back the change that made mct-init-select work

* [Inspector] Make sure the right content is displayed based on whether a view provider exists or not.

* Only show table options when editing

* Make reviewers' requested changes

* Fix broken tests

* [Frontend] Cleanups and tweaks

Fixes #1811
- Cleanups between frame, editor and selecting.scss;
- Hover and selected borders visually pumped up a bit;
- Solid borders on hover and selecting when browsing;
- Dashed borders for layouts when editing;
- Fixed cursor to only show move capability when
element is selected;

* [Frontend] Tweaks to frame.no-frame layout

Fixes #1811
- Margin set to 0;
- Overflow set to hidden;

* [Frontend] Fixed position items border width fixed

Fixes #1811
- Set to 1px;

* Add tests for inspector controller and fix broken tests. Clean up code.

* [Fixed Position] Stop event propagation on click handlers in fixed position to avoid the event reaching the selection click handlers which caused issues with toolbar and selection."

* Fix tests

* Add tests

* Add test

* Remove element from document
2017-12-07 13:04:46 -08:00
Victor Woeltjen
50b4d5cb28 [Autoflow] Rewrite Autoflow Tabular using new APIs (#1816)
Rewrite Autoflow tabular using Vue and all new telemetry APIs.  Also adds LAD support to autoflow tabular. 


* [Autoflow] Add Vue dependency

...to begin refactor away from Angular, #1810

* [Autoflow] Add Vue to require config

...to support usage in refactoring Autoflow Tabular view.

* [Autoflow] Sketch in new plugin registration

* [Autoflow] Bring over template, without Angular

* [Autoflow] Add license headers

* [Autoflow] Add VueView

...to simplify addition of Vue-based views.

* [Autoflow] Add Vue bindings to template

* [Autoflow] Sketch in AutoflowTabularView

* [Autoflow] Include title for row names

* [Autoflow] Begin adding controller

* [Autoflow] Sketch in controller functionality

* [Autoflow] Support object filtering

* [Autoflow] Unlisten from controller on destroy

* [Autoflow] Track rows on an interval

* [Autoflow] Support column width changes

* [Autoflow] Expose new plugin through openmct.plugins

* [Autoflow] Fix run-time errors instantiating view

* [Autoflow] Fix row generation error

* [Autoflow] Fix row formatting

* [Autoflow] Utilize width

* [Autoflow] Update autoflow view when filter changes

* [Autoflow] Enable autoflow for telemetry panels

...in developer environment.

* [Autoflow] Bind data-value for rows

* [Autoflow] Include limit evaluations

* [Autoflow] Rename property rows to rowCount

* [Autoflow] Retain rows during update

* [Autoflow] Add bindings to clear autoflow filter

* [Autoflow] Show updated timestamp

* [Autoflow] Remove obsolete plugin

* [Autoflow] Load vue for tests

* [Autoflow] Begin adding spec for autoflow tabular plugin

* [Autoflow] Test plugin registration

* [Autoflow] Begin spec for AutoflowTabularView

* [Autoflow] Obey contract from VueView.show

...by populating a container, instead of replacing it.

* [Autoflow] Begin testing behavior

* [Autoflow] Get initial row heights

* [Autoflow] Verify unsubscription on destroy

* [Autoflow] Test column width button

* [Autoflow] Simplify controller activation/destruction

* [Autoflow] Verify data display

* [Autoflow] Test limit display

* [Autoflow] Fully initialize controller

* [Autoflow] Add missing semicolon

* [Autoflow] Separate out constants

...to access them from tests

* [Autoflow] Use constants from spec

* [Autoflow] Test autoflow behavior

* [Autoflow] Refactor test case

...to support tests for composition changes

* [Autoflow] Add test cases for composition change

* [Autoflow] Handle composition changes

* [Autoflow] Sketch in row controller

https://github.com/nasa/openmct/pull/1816/files#r153015544

* [Autoflow] Integrate row controller

https://github.com/nasa/openmct/pull/1816#pullrequestreview-79305103

* [Autoflow] Add tests for historical request

* [Autoflow] Request historical telemetry

* [Autoflow] Remove unused active flag

* [Autoflow] Clarify row destruction

...to avoid problems with binding destroy

* [Autoflow] Fix mistake in test

* [Autoflow] Simplify waiting for view updates in test

* [Autoflow] Move filtering, autoflow to view

* [Autoflow] Remove unused caching

* [Autoflow] Remove obsolete method reference

* [Autoflow] Fix lint errors

Add missing semicolon, remove unused vars

* [Autoflow] Refactor test to simplify emitting events

* [Autoflow] Emit add events during load for testing

...to simulate the actual behavior of this method.

* [Autoflow] Provide composition in mock

...to allow constructor-time usage of dependency from controller

* [Autoflow] Avoid intermittent errors

...by checking to see if tabularArea is available before
accessing its clientHeight; depending on the timing of
setInterval versus Vue's mount event, it may not be!

* [Autoflow] Use add/remove composition events from controller

...exclusively, instead of attempting to load again and triggering
an infiniute loop each time.

* [Autoflow] Test that composition does not reload

* [Autoflow] Expect identifiers for remove events

* [Autoflow] Simplify row-matching test

* [Autoflow] Combine down to a single integration test

* [Autoflow] Remove possible test race condition

* [Autoflow] Add JSDoc

* [Autoflow] Remove excess test case

...which is no longer needed after combining behavioral tests for
view into a single spec.

* [Autoflow] Remove unused destroy call

https://github.com/nasa/openmct/pull/1816/files#r154787335

* [Autoflow] Use requestAnimationFrame in tests

...to avoid brittle change detection.
https://github.com/nasa/openmct/pull/1816/files#r154785549

* [Autoflow] Use MCT instance for spies

...such that test case becomes sensitive to API changes in MCT.
2017-12-07 13:01:10 -08:00
Henry
bc62d7d5ae [Summary Widgets] Fixed memory leak involving dom event listeners not being cleaned up. 2017-12-07 11:02:57 -08:00
Henry
c0dcf4495e [API] Reset listeners array in MutableObject 2017-12-07 10:56:14 -08:00
Aaron Doubek-Kraft
4b07930305 Summary Widgets (#1668)
* [ViewAPI] Update view API with more support

Update view provider to allow metadata definitions and to play
nicely with old style views.

Spec out some updates to ViewProviders and ViewRegistry to
support further use of views.

* [Summary Widgets] Add summary widgets

Add a summary widget domain object type

Implement basic interface and style configuration for rules

* [Summary Widgets] Implementation for Rules

Add rule configuration inputs, populated with domain objects, metadata,
and appropriate operations for a given type

* [Inputs] Add implementation for icon palette

Issue #1644

Wire up icon palette inputs to widget, and make icon class a persistable
property of a rule

* [Summary Widgets] Implementation for conditions

Support configuring and persisting multiple conditions per rule

Issue #1644

* [Summary Widgets] Generate Rule Descriptions

Dynamically update the rule description based on the current state
of the rules' conditions

* [Summary Widgets] 'Any/All Telemetry' in conditions

Add UI and implemenetion for evaluating any telemetry or all telemetry
in an individual condition. Add related unit tests.

* [Summary Widgets] Rule Reorders

Implement drag and drop rule reorders using the native HTML5 API

* [Summary Widget] Test Data

Issue #1644

Add user-configurable mock data to test rules. Modify evaluator to
gracefully handle uninitialzed test data points.

* [Summary Widgets] Edit Mode

Enable edit mode for summary widgets, and make configuration interface
visible only when the user has entered edit mode

Fix collision between widget palettes and other interfaces where
palettes would permanently hide other menus

* [Summary Widgets] UI for scripted conditions

* [Sumamry Widgets] Destroy
Implement destroy

* [Summary Widgets] Cleanup
Remove unnecessary persist calls in Rule.js.
Remove generateDescription from refreshConditions and add it after refreshConditions to initCondition and deleteCondition
Throw error when unsupported callback is passed in condition.js, return summary widget instance in plugin.js instead of wrapping in new object for view
Add request properties to telemetry request for providers that support it
Remove check for editing when persisting, in SummaryWidget.js
2017-11-28 13:23:15 -08:00
Even Stensberg
91b150c064 icon -> cssClass 2017-11-24 10:04:59 -08:00
Even Stensberg
9506d309b0 [TEST] Add Unit Test for URLIndicator
Adds the first test for the URLIndicator.

[DOCS] fix docs api indenting

fix linting

fix linting

fix docs
2017-11-24 10:04:59 -08:00
Even Stensberg
c9bd60f50e [BUILD] Adds URLIndicator along with documentation
Adds URLIndicator to the build, testable adding

`openmct.install(new openmct.plugins.URLIndicatorPlugin({
url: 'http://localhost:8080/',
icon: 'check',
interval: 15000,
label: 'Localhost'
}))`

to the openmct file. Also added Documentation about the plugin.
2017-11-24 10:04:59 -08:00
Pete Richards
c533e10352 [API] get with keystring, mark methods not implemented
Update Object API such that get supports calls with either a keystring or an
identifier.

As save and delete are not implemented and  have different calling signatures,
implement them as separate methods so they can be documented separately.
2017-11-01 12:16:06 -07:00
Henry
d7b44f8d09 Initial functional view API implementation. See #1642 2017-10-20 12:40:21 -07:00
Victor Woeltjen
e59020fec7 [Views] Clear regions on destroy
Clear regions when a view is destroyed. This causes a view's
destroy method to be correctly invoked, allowing views to do
cleanup. Used by NSS heatmap view for sprint Alice,
https://github.com/nasa/openmct/projects/1
2017-10-19 10:57:53 -07:00
Charles Hacskaylo
bc7d92ee0d [Front-end] Menu tweaks
Fixes #1729
Mini super-menu and related description text
2017-09-25 12:08:04 -07:00
Victor Woeltjen
a3a55d3b48 [Build] Modify version info injection to fix sourcemaps (#1708)
* [Build] Preserve comments instead of adding header

...to avoid disrupting sourcemaps. Fixes #1707

[Build] Remove extraneous horizontal rule from header

[Build] Remove obsolete header-handling

...as this is handled by the replace task after fix for #1707

[Build] Move version headers into start.frag

...so that UMD boilerplate does not wrap it.

[Build] Handle version info entirely in start.frag

[Build] Replace build variables in start.frag explicitly

[Build] Inject build info dynamically

[Build] Test MCT.specifyBuildInfo

[Build] Mark BUILD_CONSTANTS as global for jshint

[Build] Give names to version line items

[Build] Fix specifyBuildInfo test case

* [Build] Update fix to sourcemaps for code review feedback

https://github.com/nasa/openmct/pull/1708

[Build] Move build info registration to plugin

https://github.com/nasa/openmct/pull/1708#discussion_r138999027

[Build] Use build info plugin

...instead of specifyBuildInfo

[Build] Revert changes to MCT, per code review
2017-09-20 11:50:17 -07:00
Victor Woeltjen
5b366e91c1 Merge pull request #1665 from nasa/import-export
[Import/Export] [WIP] Allows for import and export of domain objects

Fixes #593
2017-08-29 11:19:29 -07:00
Preston Crowe
3674808a13 [Import/Export] Adds Import and Export functionality
Added context actions for importing and exporting JSON representations of domain objects. Added FileInputService for triggering file picker and retrieving uploaded data. Also added a File Input form control for integration with MCTForms.
2017-08-25 19:28:29 -04:00
Pegah Sarram
019cdde1c6 Merge pull request #1655 from nasa/subscribe-once
[Telemetry API] many subscribes -> one provider subscribe
2017-08-17 16:24:57 -07:00
Pete Richards
c7e26a231a [Style] Remove unnecessary comments 2017-08-17 16:13:49 -07:00
Pete Richards
e8eb34f5c3 Merge pull request #1660 from sahajp23/master
Updated Hyperlink Domain Object with suggested changes
2017-08-11 14:10:25 -07:00
sahajp23
a5f6940d67 Updated version of hyperlink with suggested changes made
modified:   src/defaultRegistry.js
2017-08-01 11:51:42 -07:00
Pete Richards
4571205871 [Time] Handle missing time system gracefully
When loading the application and no time system is set,
the url handler should not cause multiple errors to be
logged.

This adds a test for the case but does not specify the
expected behavior in detail, other than "it should not
crash."

Fixes bugs as reported here.
2017-07-27 15:38:42 -07:00
Pete Richards
e45a686c5a [Telemetry] Combine subscriptions for points
The telemetry API detects when a subscription has already been made for a
given domain object and does not subscribe for that object a second time.
Removes a concern from those developing telemetry providers.

Also ensures that telemetry providers ALWAYS get request options, even if
no request options were provided.

Adds basic tests for the Telemetry API to validate this behavior.

Fixes https://github.com/nasa/openmct/issues/1594
2017-07-21 16:38:47 -07:00
Pete Richards
1ae62cde05 [Browse] Don't klobber params when preventing default
When browse controller is hijacking a browser navigation event,
it calls preventDefault on the route change.  This has the effect
of preventing all changes in the location (including search changes).

This change checks if other changes were made in the route change and
re-applies them after the navigation has completed.

Fixes a bug where navigating via a link that contained additional
search paramterers would have the effect of navigating but not
keeping the parameters in tact.

Discovered in the course of fixing #1636
2017-07-13 16:48:38 -07:00
Pete Richards
4e7e5bb783 [Time] Conductor changes based on click not scope
Update time conductor so that it triggers changes when the user
selects them instead of when the scope is updated.  Prevents spurious
changes from being triggered by the conductor when it updates
in response to a time API change.

Fixes #1636.
2017-07-13 16:48:38 -07:00
Pete Richards
cb242d8efb [TimeAPI] check for change before triggering
Update the TimeSettingsURLHandler to check for changes to the search
parameters and only trigger a bounds change when there is a change.

Added integration tests between Time API and settings url handler.

Prevents extraneous bounds events.

Fixes https://github.com/nasa/openmct/issues/1636
2017-07-04 15:09:56 -07:00
Victor Woeltjen
52f5bea215 [Time] Add clarifying comment to NULL_PARAMETERS 2017-06-22 12:58:14 -07:00
Victor Woeltjen
26b4e5498f [Time] Tolerate unset Time API properties
...from the URL handler. Fixes nasa/openmct-tutorial#14
2017-06-22 12:51:44 -07:00
Victor Woeltjen
ce733628b2 [Time] Add test cases for URL handler
To reproduce root cause of nasa/openmct-tutorial#14
2017-06-22 12:40:02 -07:00
Victor Woeltjen
0713941812 [Time] Encode time settings in URL (#1620)
* [Time Conductor] Skeleton class for URL handling

#1550

* [Time Conductor] Scaffold in param handling

* [Time Conductor] Finish sketching in URL handler

* [Time Conductor] Usage correct constants for bounds

* [Time Conductor] Use start/end for bounds/deltas

* [Time] Move URL handler

Per discussion, https://github.com/nasa/openmct/issues/1550#issuecomment-308849449

* [Time] Rename URL handler

* [Time] Rename URL handler script

* [Time] Use Time API from URL handler

* [Time] Utilize Time API

* [Time] Listen for changes, synchronize URL

* [Time] Move URL handler into adapter

...as it uses Angular constructs.

* [Time] Wire URL handler into adapter bundle

* [Time] Pass correct constructor arguments to URL handler

* [Time] Begin debugging URL handling

* [Time] Clarify and correct logic for bounds/deltas in URL

* [Time] Define timeSystem

* [Time] Pass start/end into time API as numbers

...instead of strings.

* [Time] Avoid creating redundant objects

* [Time] Restructure fixed vs clock logic

* [Time] Stop clock correctly for fixed mode

* [Time] Fix hasBounds/hasDeltas logic

...given that both inputs will be strings when read from search params,
_.isFinite was doomed to return false.

* [Time] Check for complete information

...before updating Time API to reflect search state. Additionally,
flatten logic to ease readability.

* [Time] Begin testing TimeSettingsURLHandler

* [Time] Test fixed mode query string updates

* [Time] Test realtime mode query string updates

* [Time] Test update of time API from query params

* [Time] Add missing semicolons

Satisfies JSHint; fixes #1550
2017-06-21 11:23:18 -07:00
Luis-Johannes Schubert
e2f0f61862 Implement new folder List view (#1610)
* refactored code for listView

* minimum viable folder list functionality

* moved listview directory inside of platform/features

* [Folder ListView] First Code Review Fixes

Changes made:
Updated listview icon as the hamburger menu.
Injecting listview template as textfile instead of using the template's url.
Added callback to $scope to listen for $destroy to release resources for the mutation listener and the gesture recognizer.
Refactored ListViewController formatting function to use map instead of foreach.
Added listview plugin to the default registry.
Updated table styling.

* working progress commit. ListViewControllerSpec is implemented and all tests are passing. MCTGestureSpec is not fully implemented. Testing the gestureService release is in progress.

* All tests in MCTGestureSpec and ListViewControllerSpec are passing.

* ListViewControllerSpec and MCTGesture Tests all passing.

* refactored variable names in ListviewController to make more sense.

* [Frontend] Styling of Luis's list view WIP

Fixes #1615
This will have conflicts with Luis's work,
be careful!

* [Folder ListView] Second Code Review Fixes

Changes made:
updated listview to utilize open-mct sorting style.
added license comments to all files.
modified mctgesture interface to use $scope.eval().

* [Frontend] Styling of Luis's list view WIP

Fixes #1615
New list-view glyph added

* [Frontend] Styling of Luis's list view WIP

Fixes #1615
Changed name of "Items" view to "Grid";

* [Frontend] Styling of Luis's list view WIP

Fixes #1615
Updated icomoon project file with new list-view
glyph e1042;

* [Folder ListView] Second Code Review Fixes

Changes made:
updated listview to utilize open-mct sorting style.
added license comments to all files.
modified mctgesture interface to use $scope.eval().

* [Frontend] Styling of Luis's list view WIP

Fixes #1615
Refined cursor CSS;

* [Frontend] Styling of Luis's list view WIP

Fixes #1615
Added logic to refine how sorting occurs:
now, clicking a table header that wasn't
the orderByField always sorts by its default;
2017-06-19 18:35:18 -07:00
Pete Richards
ecdcebce0c Merge pull request #1606 from nasa/headers-1541
[Build] Remove/reorganize version headers
2017-06-19 18:22:17 -07:00
Victor Woeltjen
c1128c3156 [Build] Move version comment header into template file
Fixes #1541
2017-06-02 12:40:23 -07:00
Victor Woeltjen
6de5f73d78 [Build] Remove obsolete version header 2017-06-02 12:19:37 -07:00
Pete Richards
26a7fee869 Convert example imagery to plugin 2017-05-22 14:48:12 -07:00
Pete Richards
04c2eac9ef [Layout] Add view large button for zooming
Fixes #1437
Markup and CSS for `view large` button in frame context;
Sass formatting cleanups; removed unused styles from
_layout.scss; mods to MCTTriggerModal.js to remove
button label functionality;

Added new "icon-expand" glyph and class;

Fixes #1437
Fixes #1423
New overlay > l-dialog and l-large-view classes;
Fix context-menu z-index to allow context menu
to appear in the overlay;
.object-top-bar refactored and replaced with
.object-browse-bar;
frame > hover now only displays local controls for
proper level, handles nested layout situation;
Fixed font-weight display issues;
MCTTriggerModal.js modified to do the following:
- Remove .frame classes when displaying object in overlay
- Allow click on this overlay .blocker to dismiss overlay

Fixed min-width issue incorrectly targeting .object-browse-bar in frame context;

Added expand anim to large view holder;
Changed close button icon

Significant mobile styling and cleanups;
Markup mods for overlay.html;
Handles dialog on top of large view;
Form validation now displays better in mobile;
Updated /src/api/ui/dialog.html to be in-line
with /platform/commonUI/dialog/res/templates/overlay.html;
Moved border-radius from containerBase to btnBase mixins;

Animate with scale for GPU acceleration

Change desktop animation to use scale, so that it is hardware
accelerated and buttery smooth.  Also fixes text anti-aliasing
to improve readability.

Moved mobile/overlay/_overlay.scss styles into
overlay/_overlay.scss; removed mobile/overlay/_overlay.scss;
Cleanups in _overlay.scss; restored max-width/max-height
to dialogs (removed in #1376 for #1298) and added
min-width;

[Frontend] Mobile fixes in overlay and related

Fixes #1437
Added mobile-specific styling to _messages.scss;
Fixed button layout and margins in _overlay.scss;
Fixed message.html to not default to major style
buttons;

[Frontend] Timing tweaks

Fixes #1437
Moved large view expand transition duration
into theme _constants files; shortened anim
duration

Fix Style errors

[mctTriggerModal] correct scope for toggle

Correct scope for toggleFunction such that #1503 no longer occurs.

Fixes #1503

[Style] Add copyright header
2017-05-18 18:18:19 -07:00
Pete Richards
f4df84bfa1 [Style] correct style 2017-05-16 17:26:29 -07:00
Pete Richards
0dc65f5dfb [Style] Remove trailing commas
Remove trailing commas that snuck through in #1564.
2017-05-16 15:12:37 -07:00
Pete Richards
6e4abcfed8 [Style] Fix style 2017-05-16 15:08:05 -07:00
Pete Richards
b70501a7ed [Time] conditional timeSystem change without bounds
Allow timeSystem to be changed without specifying bounds when
a clock is present and can provide bounds.  This simplifies
bootstrap code.

https://github.com/nasa/openmct/issues/1581
2017-05-16 14:31:20 -07:00
Pete Richards
9f32b4b9cd [Spec] Update spec for new usage
Add a test for new bounds setting behavior, update other tests
to provide correct mocks for new usage of APIs.

https://github.com/nasa/openmct/issues/1582
2017-05-16 13:49:12 -07:00
Pete Richards
fbf736aaf7 [Conductor] improve validation, properly set defaults
Update conductor validation logic to trigger easier-to-understand
error messages for bad configurations.

Update default-setting-behavior to properly set clock and offsets
when the default option is clock-based menu option.

Only set defaults when timeSystem has not already been configured.

fixes https://github.com/nasa/openmct/issues/1580
2017-05-16 13:07:17 -07:00
Pete Richards
344a325cb5 [Time] Tick when clock set
Update time API to tick immediately after setting a clock using
the currentValue of the clock.  This ensures that bounds will
be set when the clock is set, instead of waiting for the next
tick to occur.

fixes https://github.com/nasa/openmct/issues/1582
2017-05-16 12:39:16 -07:00