Commit Graph

205 Commits

Author SHA1 Message Date
Pete Richards
7d8dc00996 Only listen on overlay plots
Only listen for mutations on overlay plots, as other mutations
should be ignored by plot configuration.

Fixes https://github.com/nasa/openmct/issues/1945
2018-04-13 16:52:27 -07:00
Pete Richards
a958055f50 Remove alarm set when removing series
Remove alarm marker sets when removing series, so that they don't
continue to display.

Fixes https://github.com/nasa/openmct/issues/1935
2018-04-13 16:46:10 -07:00
Pete Richards
1f86a5a131 Fallback to 2d on context lost
When webgl contexts are lost, fallback to 2d rendering context.

Because it's not possible for a canvas to generate a different
context after one has already been created, the canvas elements
must be recreated from scratch, and event handlers must also be
updated.

This resolves https://github.com/nasa/openmct/issues/1976
2018-04-13 16:28:28 -07:00
Pete Richards
8ad07fa8de cleanup chart controllers 2018-04-13 16:24:36 -07:00
Pete Richards
fa7298a752 [Plot] Wait for width before loading (#1975)
Plot waits for element to have width before loading.  Otherwise,
it may make a minmax request with an invalid size parameter.

Fixes https://github.com/nasa/openmct/issues/1974
2018-04-03 15:03:35 -07:00
Harry
4df6d6141b [Testing] Create unit tests for Types API (#1890)
* [Testing] Create unit tests for Tests API

* [Documentation] Fix spelling in TypeRegistry.js

* update TypeRegistrySpec to conform to code review
use .get() on typeRegistryInstance

Fixes #1514
2018-03-26 13:28:56 -07:00
Pete Richards
8db75bf41e [API] Support dynamic telemetry metadata (#1941)
* [API] Support dynamic telemetry metadata

Add support for dynamic telemetry metadata via custom telemetry
metadata providers.  

The metadata provider API should be considered unstable in it's
current invocation.

* Perform deprecation checking at runtime
* SWG uses telemetry metadata provider
* Don't throw with no matched metadata provider
* Update API docs
* Add license header
* Combine metadata providers with general telemetry providers
* Replace `TelemetryAPI.canProvideTelemetry` with
`TelemetryAPI.isTelemetryObject`.  
* CanProvideTelemetry is deprecated
* Change SWG inputs to numberfield
2018-03-21 14:18:08 -07:00
Pete Richards
f9060a485d [Plugin] Add imported root plugin (#1784)
* [Plugin] Add static root plugin

Add StaticRootPlugin, which allows a file exported with the ImportExport
plugin to be mounted as a static root in Open MCT.  Allows deployers
to configure standard displays for deployments by exporting displays they
have already created.

* Include all src files
2018-03-09 12:39:25 -08:00
Pete Richards
ce431848b3 Remove example plotOptions. (#1936)
Fixes https://github.com/nasa/openmct/issues/731
2018-03-02 15:52:02 -08:00
Pete Richards
5726fe6313 new-plot import (#1557)
Merge of new plot
* Introduces new Plot object and view
* Removes Old Plot
* Add LAD support and state type to generators
* Removes Telemetry Panel Type
* Telemetry API Updates
* UTCFormat.parse: passthrough numbers
* TelemetryAPI: default request arguments
* TelemetryAPI: fix enum formatting
* Markup and styling to support new plots
2018-03-02 14:29:34 -08:00
Pete Richards
12574a1333 Tests for Composition API providers 2018-02-20 09:40:57 -08:00
Pete Richards
0243aa6584 [API] provider support for dynamic composition is optional (#1915)
All views are expected to implement dynamic composition handling
by listening for the "add" and "remove" events and then calling
"collection.load()" when they are ready to handle these events.

However, it does not make sense that every composition provider will
be dynamic, so implementing support for dynamic composition should
not be a requirement.  This commit removes that requirement.

Fixes #1914
2018-02-13 18:00:35 -08:00
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