Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition sets only persist if actively editing #4262

Merged
merged 7 commits into from
Sep 28, 2021

Conversation

shefalijoshi
Copy link
Contributor

@shefalijoshi shefalijoshi commented Sep 27, 2021

Previously, the motivation to update a condition's description and save to the persistence store was that the condition description was shared by the condition set view as well as the Styles tab view (as we were trying to avoid calling object.get for telemetry endpoints in the Styles view)
Since this persistence is causing conflicts on couchDB when multiple users are using Open MCT, now we only save the summary for conditions if there is a user initiated operation.
Loading the composition of a condition set will still update the condition summaries to the condition set domain object but not save them to the persistence store. This should ensure that if telemetry endpoints go missing after a condition set is created, the summary reflects this correctly.

Resolves #4146

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? Will users need to change how they are calling the API, or how they've extended core plugins such as Tables or Plots?

Author Checklist

  • Changes address original issue?
  • Unit tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue?

Copy link
Contributor

@nikhilmandlik nikhilmandlik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, Small changes/questions

@@ -139,10 +146,17 @@ export default class ConditionManager extends EventEmitter {
}
}

getConditionDescription(condition) {
condition.updateDescription();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getConditionDescription is calling updateDescription on condition, feels incorrect. May be rename something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I could call this updateConditionDescription.

@@ -220,7 +230,7 @@ export default class ConditionManager extends EventEmitter {
this.conditionSetDomainObject.configuration.conditionCollection.unshift(newCondition);
}

this.initCondition(newCondition, index);
this.initCondition(newCondition, index, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be can call 'init' and then 'update'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's no harm in assigning the summary all the time. I'm going to remove the 3rd parameter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, ll it trigger mutate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no it won't

Copy link
Contributor

@nikhilmandlik nikhilmandlik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nikhilmandlik nikhilmandlik merged commit 476128c into 1.7.8 Sep 28, 2021
@nikhilmandlik nikhilmandlik deleted the fix-conditionset-persistence branch September 28, 2021 19:43
@nikhilmandlik
Copy link
Contributor

nikhilmandlik commented Sep 28, 2021

Reviewer Checklist

  • Changes appear to address issue?
  • Appropriate unit tests included?
  • Code style and in-line documentation are appropriate?
  • Commit messages meet standards?
  • Has associated issue been labelled unverified? (only applicable if this PR closes the issue)

@nikhilmandlik nikhilmandlik linked an issue Sep 28, 2021 that may be closed by this pull request
5 tasks
shefalijoshi added a commit that referenced this pull request Oct 26, 2021
* Notebook conflict auto retry 1.7.7 (#4230)
* Use timeFormatter.parse to get the timestamp of imagery since the source could be something other than key (#4238)
* If there is a pending create request for an id, queue a duplicate request. (#4243)
* [Telemetry Tables] Handling Request Loading (#4245)

* Fix file selection on pressing enter key (#4246)

* starting loading as false, since that makes sense (#4247)

* Hide independent time conductor mode if only 1 mode option is available. (#4250)

* Fix bargraph color selection (#4253)

* snapshot clicked while in edit mode should open in preview mode #4115 (#4257)

* Fix missing object handling in several vues (#4259)

* Flexible Layouts display Condition Sets as their editing/browsing interface (#4179)

* Flexible Layouts display Condition Sets as their editing/browsing interface #4141

* [Telemetry Table] Progress bar tests (#4249)

* Remove alert styling and hide pause button if in Fixed Time mode. (#4263)

* [Table/Collection Fixes] Clearing correctly, no mutating options, no duplicate requests (#4261)

* Condition sets only persist if actively editing (#4262)

* Imagery views should follow time context (#4264)

* Equal stacked plot y widths for all it's sub-plots (#4267)

* Fix Bar Graph related CSS (#4270)

* Bar graph review comment fixes (#4232)

* Mct4196 - Fixes Conditional Styling not being applied when editing a Condition Widget (#4255)

* Fix plot zoom when child of time strip (#4272)

* Resume plot if no pan, zoom, or drag action is taken (#4138) (#4256)

* [Telemetry Collection] No duplicate requests on load (#4274)

* doing the easy thing first (#4278)

* Bargraph time metadata should consider 'source' (#4289)

* Show clicked image in large view (#4280)

* added icon for inspector (#4275)

* Bar graph style nullcheck (#4291)

* Stacked plots need to align the Y axis  (#4286)

* Duplicate Request Fixes (#4295)

* Add braintree sanitize url lib and sanitize form urls (#4296)

* Mct4177 fix for telemetry endpoints with '.' in the key (#4308)

* Remove additional request to load plots when mounted. (#4314)

* Fix plots dup requests (#4324)

* Merging 1.7.8 into master.

Co-authored-by: Andrew Henry <[email protected]>
Co-authored-by: Jamie V <[email protected]>
Co-authored-by: Nikhil <[email protected]>
Co-authored-by: Khalid Adil <[email protected]>
Co-authored-by: Charles Hacskaylo <[email protected]>
Co-authored-by: Scott Bell <[email protected]>
Co-authored-by: Michael Rogers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Persistence errors in Condition Sets when editing Condition Widgets
2 participants