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

[Enterprise Search] Create HttpLogic Kea store, add http interceptors, and manage error connecting at top app-level #75790

Merged
merged 7 commits into from
Aug 24, 2020

Commits on Aug 24, 2020

  1. [Setup] Change error connecting status code to 502

    - For clearer error handling
    cee-chen committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    c8dd2e8 View commit details
    Browse the repository at this point in the history
  2. Set up new HttpProvider/Logic Kea store & listeners

    - This allows us to:
      - connect() directly to HttpLogic in other Kea logic files that need to make http calls, instead of passing in http manually via args
      - Set http interceptors & remove them interceptors on unmount within Kea
      - Share state derived from http (e.g. errorConnecting, readOnlyMode) between both AS & WS (but allow each app to handle that state differently if needed)
    
    + Refactors necessary for these changes:
      - Kea types - add events key, clarify that mount returns an unmount function, fix reducer state type
      - ReactDOM unmount - remove resetContext({}), was preventing logic from unmounting properly
    cee-chen committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    93d3e01 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e25ccc2 View commit details
    Browse the repository at this point in the history
  4. [WS] Remove errorConnecting logic & http arg from Overview

    - Since main app is now handling errorConnecting
    - http can now be connected directly from HttpLogic Kea store, so no need to pass it
    + minor cleanup in logic_overview.test.ts - remove unneeded unmount(), act(), switch to HttpLogic mock
    cee-chen committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    5f2bcc2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0874cb3 View commit details
    Browse the repository at this point in the history
  6. [AS] Clean up/move EngineOverview child components into subfolder

    - delete old ErrorState component
    - move LoadingState, EmptyState, and EngineOverviewHeader into subfolders in engine_overview
    cee-chen committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    ed83457 View commit details
    Browse the repository at this point in the history
  7. PR feedback: Update test assertions 404 copy

    Constance committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    d6263cb View commit details
    Browse the repository at this point in the history