Commit Graph

91 Commits

Author SHA1 Message Date
Pete Richards
4a046b3eea Adapter consolidation & fix incorrect export to window (#2114)
* Merge adapter bundles

Merge adapter bundles into consistent location.

Update telemetry API to not incorrectly expose the format service
on window.

* openmct available on window for developers

* remove offending comma
2018-07-17 13:57:38 -07:00
Andrew Henry
3246480f82 Indicators api (#1837)
* [API] Added Indicators API

* [Indicators] Converted Follow Indicator to new Indicators API

* [Indicators] Converted URL Indicator to new Indicators API

* [Indicators] Changes to some legacy indicators for compatibility with new Indicators API

* [Indicators] Addressed code review items from https://github.com/nasa/openmct/pull/1837

* Updated tests for URL Indicator

* Adding Indicator API spec

* Address linting issues

* Switched to direct DOM manipulation rather than template compilation to avoid an unnecessary extra holder element

* Updated documentation to reflect changes to API

* Indicators api styling (#2076)

Updated styling for Indicators

* Update API TOC

* Fix color of items w-mct-example areas of Style Guide

Fixes #1837

* Status class refactoring and cleanups

Fixes #1837
- Significant cleanups and name refactoring to allow more
concise selector definitions, with changes in js, html and scss files;
- Updates in Style Guide > Status page, with some content
reorganization and clarification;

* Corrected out of date API

* de-zeptoed Indicator API test spec

* Remove promise from URLIndicator

* Separated legacy indicators support

* Updated Indicator specs to Jasmine 3

* Fixed checkstyle and lint issues

* Moved legacy indicators support to adapter folder

* Various fixes for Indicators

Fixes #1837
- Added SASS constants for Indicator colors;
- Removed commented code;
- Removed unused indicator classes from _messages.scss
- Fixed missing s-status-on class;

* Significant revisions to Style Guide Indicators content

Fixes #1837
- Better documentation including recommendations;
- Better and more concrete examples;

* Style Guide example tweaks

Fixes #1837

* Refinement to Style Guide Status and Limits content

Fixes #1837
- More detail and clarification on Status and Limits;

* Cleanup code

Fixes #1837
- Remove commented styles;
- Line return refinements;
2018-07-16 15:21:38 -07:00
Andrew Henry
433dee0314 Update test specs to use Jasmine 3 (#2089)
* Updated Karma and Jasmine versions

* Added DOMObserver class. Supports promise-based testing of DOM changes

Update asynchronous test specs to use promises or done() instead of waitsFor/runs

* Modified ActionCapability to duplicate context object properties as own properties for better object equality comparisons

* Global find + replace to fix syntax issues

* Fixed various issues caused by non-deterministic runtime order of tests in Jasmine 3. Fixed issues caused by changes to determination of object equality

* Addressed review comments

* Resolved merge conflicts with master

* Fixed style errors

* Use spy.calls.count() instead of manually tracking
2018-06-29 17:32:59 -07:00
Pete Richards
013eba744d Basic sprintf support (#1965)
Implement optional format strings for valueMetadata which allows
developers to use c-style sprintf formatters as desired. Fixes #1562
2018-06-29 15:52:15 -07:00
Andrew Henry
07fb20c32f Json export fix (#2043)
* Refactoring export to json to use new style objects

* Added convenience function to Object API to get identifiers as strings

* Updated tests for ExportAsJSON

* Fixed bug with parent composition not being updated with new ID. Also rewrite IDs in configuration etc. Fixes #2042
2018-06-28 17:45:14 -07:00
Pegah Sarram
73e38f1955 [Toolbar] Implement a public API for adding toolbars (#1908)
* [API] Implement a toolbar registry and a plugin to allow providing a toolbar for a selected object.
* Modify the mct-toolbar directive to get the toolbar structure from a provider based on selection.
* Implements the layout toolbar in the layout bundle
2018-06-27 13:30:01 -07:00
Nick Weingartner
c55eaeb193 [Copyright] Update copyright year across platform code references
Fixes #2034.
2018-05-14 15:46:17 -07:00
Pete Richards
865b99f445 Handle string states (#2019)
* State generator realtime uses strings

Change the state generator's realtime data to return string values
instead of number values.  This exercises an edge case where
enumerations could be a string instead of a number.  Exposes #2018.

* [Telemetry] handle string enumeration value

Don't treat all strings as properly formatted enumeration values.

Instead, check any input value against known enumerations and if
one matches, return it.  Otherwise, return input.

Fixes #2018
2018-05-02 11:42:42 -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
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
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
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
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
Pete Richards
c7e26a231a [Style] Remove unnecessary comments 2017-08-17 16:13:49 -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
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
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
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
Vikash Agrawal
57d3965fa6 chore: Remove unsed variables from codebase 2017-05-16 08:55:21 +05:30
Pete Richards
6310be623a [Telem] ensure request has minimum fields
Ensure telemetry request options always have a certain number
of fields-- start, end, and domain.  This allows telemetry providers
to implement necessary filtering for these types of requests.
2017-05-10 17:22:01 -07:00
Victor Woeltjen
6481ddbd7f Merge pull request #1573 from nasa/we-dont-depreciate
[Typo] Fix deprecation warning
2017-05-10 14:54:37 -07:00
Pete Richards
258020624c Merge pull request #1571 from nasa/standardize-type-name
[Types] label -> name
2017-05-10 14:51:25 -07:00
Pete Richards
31a605c153 [Typo] Fix deprecation warning
we don't depreciate... we deprecate code.
2017-05-10 14:48:55 -07:00
Pete Richards
08a8207f64 Correct Typo, check with hasOwnProperty
Update warning message with correct wording, and change
check for label property such that a blank label will also
trigger the deprecation warning.

Addresses feedback from https://github.com/nasa/openmct/pull/1571
2017-05-10 14:39:47 -07:00
Pete Richards
0a3d51c6b5 [Telem] add backwards compat and warning
Add backwards compatibility for x/y hints, and log a warning to
console when x/y hints are encountered.

Fixes https://github.com/nasa/openmct/issues/1546
2017-05-09 19:20:03 -07:00
Pete Richards
3df7e30d2c [Telemetry] x/y -> domain/range
Update source to use domain/range instead of x/y.

https://github.com/nasa/openmct/issues/1546
2017-05-09 18:51:57 -07:00
Pete Richards
c5161887e2 [Types] label -> name
Change label to name, log a warning to console if a typeDef
is registered with a label.

Fixes https://github.com/nasa/openmct/issues/1568.
2017-05-09 17:55:15 -07:00
Pete Richards
1f250dd8e7 Merge pull request #1553 from nasa/time-api-redo
[Time API] V1.0 Time API and associated refactoring
2017-05-01 17:11:19 -07:00
Henry
abb7230231 [Time Conductor] Fixed or disabled failing tests 2017-05-01 16:19:11 -07:00
Henry
92d2ec7cf4 [Time Conductor] Addressing comments from code review 2017-05-01 15:01:24 -07:00
Henry
46a51bd8db [Time API] Fixed static code analysis issues 2017-05-01 13:29:14 -07:00
Henry
0793442518 [Time API] Provided 'AddFormat' method for registering new formats 2017-04-30 23:21:13 -07:00
Henry
6628f93823 [Time API] Updated documentation for Time API 2017-04-29 16:01:20 -07:00
Henry
52b6815687 Removed redundant undefined check, and renamed allTimeSystems to getAllTimeSystems 2017-04-28 16:27:07 -07:00
Henry
f17417a541 [Time API] Modified public Time API to support registration of time systems and clocks, setting of active clock, simplification of clocks and time systems, setting of offsets(deltas) and other changes as per #1265 and #1474. Refactoring of UI code to support changes. 2017-04-28 16:03:59 -07:00
Pete Richards
910d746002 [API] track composition before notifying listeners
Track the updated composition of an object before notifying any
listeners.  Otherwise, any composition listener that mutates the
object would cause an infinite loop.

Detected in implementation of the new plot.
2017-04-27 14:19:38 -07:00
Victor Woeltjen
185567cf29 [Licenses] Update copyright year to 2017
Fixes #1517
2017-04-05 14:52:46 -07:00
Henry
af622599a5 [Docs] Updated API docs to reflect V1 public API
Cleaned up docs. Addresses #1473
2017-03-28 12:03:00 -07:00
Henry
b3cf7a5d93 Added support for new style telemetry providers from old screens. Converted SWG to new style data adapter 2017-02-23 09:58:46 -08:00
Andrew Henry
db33ab143e Merge pull request #1445 from nasa/api-updates
Api updates
2017-02-21 17:04:45 -08:00
Pete Richards
8c77d4006a Pass options to support checks 2017-02-21 17:03:16 -08:00
Andrew Henry
e61f04663a Merge pull request #1444 from nasa/consistent-css-class
cssclass is now cssClass
2017-02-21 16:36:30 -08:00
Pete Richards
d9f8622459 [Telemetry] Update TelemetryProvider API
Based on feedback from tutorial sprint, update provider API,
formatter API, and legacy adapter code.

Providers can now implement separate checks for providing realtime
and historical data, and providers are not registered with a specific
strategy.  Strategy is instead intended to be an attribute in the
request options.

Removed unused code in the telemetry API and simplify limitEvaluators.
2017-02-21 11:51:32 -08:00