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

[Workplace Search] Migrate SourceLogic from ent-search #83593

Merged

Commits on Nov 17, 2020

  1. Initial copy/paste of source logic

    Only changed lodash imports and import order for linting
    scottybollinger committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    5d6c3c6 View commit details
    Browse the repository at this point in the history
  2. Add types and route

    scottybollinger committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    82a1195 View commit details
    Browse the repository at this point in the history
  3. Update paths and typings

    Renamed IMeta -> Meta
    Used object instead of IObject
    scottybollinger committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    174d244 View commit details
    Browse the repository at this point in the history
  4. Remove internal flash messages in favor of globals

    - All instances of flashAPIErrors(e) are only placeholders until the later commit removing axios.
    
    - buttonLoading was set to false when the error flash messages were set. For now I added a `setButtonNotLoading` action to do this manually in a finally block. This will be refactored once axios is removed.
    
    - SourcesLogic is no longer needed because we set a queued flash message instead of trying to set it in SourcesLogic, which no longer has local flash messages
    scottybollinger committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    c5f6076 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ddb64a1 View commit details
    Browse the repository at this point in the history
  6. Update routes

    According to the API info getSourceReConnectData is supposed to send the source ID and not the service type. In the template, we are actually sending the ID but the logic file parameterizes it as serviceType. This is fixed here.
    
    Usage: https://github.com/elastic/ent-search/blob/master/app/javascript/workplace_search/ContentSources/components/AddSource/ReAuthenticate.tsx#L38
    scottybollinger committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    28b8942 View commit details
    Browse the repository at this point in the history
  7. Replace axios with HttpLogic

    Also removes using history in favor of KibanaLogic’s navigateToUrl
    scottybollinger committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    e5a39cb View commit details
    Browse the repository at this point in the history
  8. Fix incorrect type

    This selector is actually an array of strings
    scottybollinger committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    d9b78db View commit details
    Browse the repository at this point in the history
  9. Create GenericObject to satisfy TypeScript

    Previously in `ent-search`, we had a generic `IObject` interface that we could use on keyed objects. It was not migrated over since it uses `any` and Kibana has a generic `object` type we can use in most situations. However, when we are checking for keys in our code, `object` does not work. This commit is an attempt at making a generic interface we can use.
    scottybollinger committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    7832179 View commit details
    Browse the repository at this point in the history
  10. More strict object typing

    Removes GenericObject from last commit and adds stricter local typing
    scottybollinger committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    3cb5ad3 View commit details
    Browse the repository at this point in the history
  11. Add i18n

    Also added for already-merged SourcesLogic
    scottybollinger committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    70c5731 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2020

  1. Configuration menu
    Copy the full SHA
    4afbbef View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    62c7d15 View commit details
    Browse the repository at this point in the history