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

Commits on Oct 5, 2021

  1. [Workplace Search] Migrate Objects and assets from Source settings to…

    … 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
    scottybollinger authored and kibanamachine committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    f24717b View commit details
    Browse the repository at this point in the history