Commit Graph

350 Commits

Author SHA1 Message Date
Shefali Joshi
e53399495b
Legacy and new object providers work together (#3461)
* Strip mct namespace from ids when getting models from cache

* Revert PersistenceCapability to use legacy code
Enforce empty namespace for LegacyPersistenceAdapter for new object providers

* Reverts change to caching provider

* CouchObject provider is registered with the mct space.
When saving objects via the persistence capability use the mct space to find the couchdb object provider
2020-10-19 10:17:18 -07:00
Shefali Joshi
b6e0208e71
Reverting when cancelling out of edits works for both legacy and new object providers (#3435)
* Update persistence capability to use object api get
* Getting objects using the legacy object service provider will use the defaultSpace if necessary
2020-10-08 16:48:26 -07:00
David Tsay
97694fa29c
Bump copyright year to 2020 (#3169) 2020-09-14 11:17:31 -07:00
Joel McKinnon
4d560086dd
ESLint upgrade, implement additional rules (#3230)
* upgrade to ESLintv7, added overrides for rules violated
* removed overrides for spec files
* fixed no-prototype-builtins issues
* added rules for default-case-last, default-param-last, grouped-accessor-pairs, no-constructor-return, and added override for one violation

Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2020-08-10 11:23:35 -07:00
Andrew Henry
a09da30768
New eslint rules auto fix (#3058)
* no-implicit-coercion and no-unneeded-ternary

* End every line with a semicolon

* Spacing and formatting

* Enabled semi-spacing

* Applies npm run lint:fix to code after master merge

* Fix merge issues

* Switched operator-linebreak to 'before'

Co-authored-by: Joshi <simplyrender@gmail.com>
2020-07-31 12:11:03 -07:00
Andrew Henry
63bf856d89
Enable persistence operations from Object Providers (#3200)
* Implement 'save' method in Object API

* Refactor legacy persistence code to work with new save object API

* Added 'isPersistable' check to object API

* Fixed incompatibility between object API changes and composition policies

* Make save method private

Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
2020-07-17 09:58:03 -07:00
Joel McKinnon
43628ad9d6
Lodash upgrade and cleanup (#2990)
* Upgrades lodash
* Replaces some usage of lodash with native functions.
* Adds linting to catch cases where native functions could be used instead of lodash functions
* Renamed testTools to testUtils

Co-authored-by: Joshi <simplyrender@gmail.com>
Co-authored-by: David Tsay <david.e.tsay@nasa.gov>
Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
2020-05-27 10:59:02 -07:00
Andrew Henry
c83e44ff1c Merged from master 2019-12-06 09:45:21 -08:00
Andrew Henry
c51fd21847
Experimental unit tests for the Telemetry Table component (#2533)
* Initial commit of telemetry table spec
* Added example directory to linter paths. Fixed outstanding linting issues
2019-11-27 16:04:52 -08:00
Andrew Henry
d2e2d55caf Bring across fixes for #1468 and #2277 into TCR (#2386) 2019-04-24 16:01:45 -07:00
Andrew Henry
98c8e19d93 Only persist latest mutated model. (#2295)
* Only persist latest mutated model. Fixes #2277

* Updated tests

* Fixed style issues
2019-02-22 13:45:44 -08:00
Pete Richards
e5fe8fd975 Save As clears transaction while undirtying (#1471)
* mutation listener adds via transaction manager

Update the TransactingMutationListener to add items to a transaction
using the transactionManager so that they can be properly removed
from the transaction at a later date.

Prevents showing error dialogs during successful save, and also
prevents persisting duplicate objects.

Fixes #1468
2018-11-26 09:23:42 -08:00
Deep Tailor
33a4792531 do not show warning dialog when user moves an object from one location to another (#2142)
* dont show error dialog when user moves an object from one location to another

* add test for not showing blocking message on remove action

Fixes #2141
2018-08-10 10:06:40 -07:00
Pete Richards
0d53898af9 Build refactor to webpack (#2139)
* Move to webpack build
* Use webpack for building openmct.  Move SCSS to one folder and load
all core css up front.  Remove bower, begin removing gulp in favor
of npm run.
* Uses eslint instead of jshint and jscs.  Merge style checking rules
into .eshintrc.js, carrying over core parts of crockford style and
our adaptations.  Current code base fails to pass the linter, want
to separate linter changes from fixes to linting rules.
* Support for Vue SFC with example
* Remove outdated examples
* Use HTML loader for html (supports relative imports of resources e.g.
images) and raw-loader for when javascript must be loaded as text.
2018-08-07 14:47:50 -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
Nick Weingartner
c55eaeb193 [Copyright] Update copyright year across platform code references
Fixes #2034.
2018-05-14 15:46:17 -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
Henry
222f852af4 [Edit] Only persist on mutation if model has actually changed locally. Fixes #1482 2017-04-24 21:35:42 -07:00
Victor Woeltjen
185567cf29 [Licenses] Update copyright year to 2017
Fixes #1517
2017-04-05 14:52:46 -07:00
Henry
a867cd6be0 Removed contextualization warning. Removed now redundant Contextualize service. Fixes #1498 2017-04-04 15:39:10 -07:00
Andrew Henry
db33ab143e Merge pull request #1445 from nasa/api-updates
Api updates
2017-02-21 17:04:45 -08:00
Pete Richards
8e13819e1e [API] composition providers receive new-style objects
Ensure that composition providers get new-style objects (with id
included) so that they can properly check for applicability.
2017-02-21 11:21:08 -08:00
Pete Richards
aaedf5d576 cssclass is now cssClass
Make property name consistent with standard camelCase naming.
2017-02-21 11:14:46 -08:00
Andrew Henry
45de84c183 [Time Conductor] Prevent route change when time conductor values change (#1342)
* [Time Conductor] Prevent route change on setting search parameters. fixes #1341

* [Inspector] Fixed incorrect listener deregistration which was causing errors on scope destruction

* Bare route is redirect to browse

* [Browse] handle routing without breaking $route

Manage route transitions such that route changes are properly
prevented and navigation events occur while still updating the url.

Resolves a number of issues where path and search updates had
to be supported in a very hacky manner.

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

* [URL] Set search without hacks

Changes in previous commit allow the search parameters to be modified
without accidentally triggering a page reload.

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

* [Views] Update on location changes

If the user has a bookmark or tries to change the current view of an
object by specifying view=someView as a search parameter, the change would
not previously take effect.  This resolves that bug.

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

* [TC] Set query params to undefined

Instead of setting params to null, which would eventually result in those
parameters equaling undefined, set them to undefined to skip the extra
step.

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

* [Instantiate] Instantiate objects with context

Add context to instantiate objects so that they can be navigated
to for editing.

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

* [Tests] Update specs

Update specs to match new expectations.

* [Style] Fix style

* [TC] Remove unused dependency

Remove $route dependency from time conductor controller as it was
not being used.  Resolves review comments.

https://github.com/nasa/openmct/pull/1342#pullrequestreview-11449260
2016-12-07 13:33:53 -08:00
Henry
a3f5873501 [Edit Mode] Fix issue with navigation not triggering unsaved changes message for new objects. Removed logic that prevented mutation of new objects from triggering a transactional persist call. Fixes #1278 2016-12-05 15:52:14 -08:00
Henry
86b337ec88 Revert "[Edit Mode] Fix issue with navigation not triggering unsaved changes message for new objects. Removed logic that prevented mutation of new objects from triggering a transactional persist call. Fixes #1278"
This reverts commit 7dda85cc5f.
2016-12-05 15:49:50 -08:00
Henry
7dda85cc5f [Edit Mode] Fix issue with navigation not triggering unsaved changes message for new objects. Removed logic that prevented mutation of new objects from triggering a transactional persist call. Fixes #1278 2016-12-05 15:46:56 -08:00
Pete Richards
73b3ae7264 [Composition] Composition api improvements (#1332). Fixes #1322 and Fixes #1253
* [Composition] provide ids, sync via mutation

Composition provides ids, and we sync things via mutation.  This
simplifies the composition provider interface some, and also
fixes some issues with the previous default composition provider
related to #1322
fixes #1253

* [Style] Fix style, update jsdoc

Fix style, update jsdoc, clean up composition api changes for

Fixes #1322

* [Style] Tidy and JSDoc

* [Composition] Utilize new composition API

Ensures that composition provided by new API works in old API.

Some functionality is not present in both places, but for the
time being this is sufficient.

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

* [Utils] add tests, fix bugs

Add tests to objectUtils to ensure correctness.  This caught a bug
where character escapes were not properly applied or removed.  As
a result, any missing object that contained a colon in it's key
would cause an infinite loop and cause the application to crash.

Bug discovered in VISTA integration.

* [Style] Fix style

* [Roots] Depend on new api for ROOT

Depend on new API for ROOT model, ensuring consistency when
fetching ROOT model.

* [Style] Remove commented code
2016-11-30 12:00:01 -08:00
Pete Richards
4d3ec398c9 [Style] Fix style, disable tests
disable tests for later follow-up.
2016-11-08 16:21:38 -08:00
Pete Richards
b169089156 get rid of feel-good code 2016-11-08 16:07:53 -08:00
Pete Richards
66a6b6d89b Always put in cache on mutation, assuming persistence 2016-11-08 14:58:15 -08:00
Pete Richards
d74eba1922 Move mutation listening out of cache service 2016-11-08 14:14:56 -08:00
Pete Richards
9a7f69a614 Model Cache updates models on mutation 2016-11-08 13:54:31 -08:00
Pete Richards
0578a651da cache on instantiate 2016-11-08 13:51:50 -08:00
Pete Richards
f991dcfb76 Clear cache when no transactions active 2016-11-08 13:51:30 -08:00
Pete Richards
42c48cb93b disable cache 2016-11-08 11:20:34 -08:00
Pete Richards
2708562872 [Transaction] Sync mutation within transaction 2016-11-08 10:34:20 -08:00
Victor Woeltjen
9578fb0cd8 [Views] Update representations on mutation (#1312)
* [Core] Log errors from topic

Log full error (including stack trace) when catching errors
from the topic service. Aids debugging of #1303 (and should
aid in future debugging of any similar issues.)

* [API] Fix identifier usage in handleMutation

To address console errors observed in the context of #1303

* [Views] Listen to mutation

Listen for mutation instead of watching modified timestamp;
more reliable due to recent API changes. Fixes #1303.

* [Views] Update spec for mct-representation

...to reflect changes for #1303
2016-11-07 10:08:53 -08:00
Victor Woeltjen
70985c5dbd Revert "[Roots] Remove obsolete provider"
This reverts commit b49fef78f5.

Fixes #1284
2016-10-26 10:09:10 -07:00
Victor Woeltjen
9dec99824e Revert "[Roots] Remove obsolete spec"
This reverts commit 2cced53c97.
2016-10-26 10:08:35 -07:00
Victor Woeltjen
d4730e1656 Revert "[Roots] Remove legacy root model provider"
This reverts commit 7b0506bbdb.
2016-10-26 10:08:30 -07:00
Victor Woeltjen
b49fef78f5 [Roots] Remove obsolete provider 2016-10-19 17:02:12 -07:00
Victor Woeltjen
2cced53c97 [Roots] Remove obsolete spec 2016-10-19 16:54:26 -07:00
Victor Woeltjen
7b0506bbdb [Roots] Remove legacy root model provider 2016-10-19 16:19:11 -07:00
Victor Woeltjen
64ff463200 Revert "Revert "Async root registration"" 2016-10-19 14:55:07 -07:00
Victor Woeltjen
4eca80a770 Revert "Async root registration" 2016-10-18 10:48:26 -07:00
Pete Richards
891412bdb9 [Roots] Move my-items to separate bundle
My Items root is now opt-in, and does not need to be enabled for all
deployments.  My Items is enabled by default in the development edition.

https://github.com/nasa/openmct/issues/1251
2016-10-14 12:38:47 -07:00
Victor Woeltjen
1a88c9a651 Merge remote-tracking branch 'origin/master' into persist-on-mutation-825 2016-10-07 11:27:58 -07:00
Victor Woeltjen
7d950d067c Merge pull request #1194 from hudsonfoo/open1184
[Frontend] Add notes property to all item types
2016-09-27 15:28:49 -07:00
David Hudson
56267095cb [Forms] Add style for small textareas
Issue #1184. This allows for a generically sized text area in forms. I am
anticipating some potential feedback on this given the approach and the sizing
I chose may or may not be ideal for your requirements.
2016-09-18 01:47:07 +09:00