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

[7.x] [Workplace Search] Migrate Objects and assets from Source settings to Synchronization section (#113982) #114015

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

kibanamachine
Copy link
Contributor

Backports the following commits to 7.x:

… Synchronization section (elastic#113982)

* Rename method

We have to set the source from the sync logic file and this naming makes more sense

* Wire up Enable Synchronization toggle

* Remove sync controls from source settings

* Refactor to pass in contentSource as prop

Because we have a child logic file, SynchronizationLogic, we have to pass the content source into it for reading its values from SourceLogic. There are 3 ways to do this:

1. Access the source directly at SourceLogic.values.contentSource
  - This how we normally do it. The problem here is that SourceLogic is not mounted when the default values are set in the reducers. This caused the UI to break and I could not find a way to safely mount SourceLogic before this logic file needed it.

2. Use the connect property and connect to Sourcelogic to access contentSource
  - This actually worked great but our test helper does not work well with it and after an hour or so trying to make it work, I punted and decided to go with elastic#3 below.

3. Pass the contentSource as a prop
  - This works great and is easy to test. The only drawback is that all other components that use the SynchronizationLogic file have to also pass in the content source. This commit does just that.

* Add logic for Objects and assets view

* Add content to Objects and assets view

* Add fallback for `nextStart` that is in the past

This is slightly beyond the scope of this PR but trying to make the final PR more manageable.

There is an edge case where a running job lists the nextStart in the past if it is is running. After a lengthy Slack convo, it was decided to catch these in the UI and show a fallback string instead of something like “Next run 3 hours ago”

* reduce -> map

From previous PR feedback

* Fix casing on i18n ID
@kibanamachine
Copy link
Contributor Author

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 1.3MB 1.3MB +2.3KB

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @scottybollinger

@kibanamachine kibanamachine merged commit 3e05797 into elastic:7.x Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants