kibana/x-pack/plugins/enterprise_search
Constance 9992950855
[App Search] Add EngineLogic (#82992)
* Set up required types

- creating new schema types for now as part of engine details

+ update shared IEngine type

* Migrate EngineLogic file

- w/ basic Kea updates & http call update

* Opinionated cleanup / changes

- | {} is needed for typescript to stop linting but will result in significant code changes / requirements for existence checks downstream
- setIsLoading and dataLoading were previously not being used in ent-search but I plan to change that so that it is used.
- move some reducers to selectors as more applicable
- add hasSchemaConflicts in preparation for upcoming view conditional

* Update EngineLogic w/ recent ent-search changes

* Write tests for EngineLogic

* [PR feedback] Kea best practices
2020-11-10 16:57:12 -08:00
..
common [Enterprise Search] Tech debt/cleanup: remove I/E/T Typescript prefixes (#83099) 2020-11-10 14:00:53 -08:00
public [App Search] Add EngineLogic (#82992) 2020-11-10 16:57:12 -08:00
server [Enterprise Search] Tech debt/cleanup: remove I/E/T Typescript prefixes (#83099) 2020-11-10 14:00:53 -08:00
kibana.json
README.md [Enterprise Search] Update CODEOWNERS and README (#78809) 2020-09-29 11:44:07 -07:00

Enterprise Search

Overview

This plugin's goal is to provide a Kibana user interface to the Enterprise Search solution's products (App Search and Workplace Search). In it's current MVP state, the plugin provides the following with the goal of gathering user feedback and raising product awareness:

  • App Search: A basic engines overview with links into the product.
  • Workplace Search: A simple app overview with basic statistics, links to the sources, users (if standard auth), and product settings.

Development

  1. When developing locally, Enterprise Search should be running locally alongside Kibana on localhost:3002.
  2. Update config/kibana.dev.yml with enterpriseSearch.host: 'http://localhost:3002'
  3. For faster QA/development, run Enterprise Search on elasticsearch-native auth and log in as the elastic superuser on Kibana.

Kea

Enterprise Search uses Kea.js to manage our React/Redux state for us. Kea state is handled in our *Logic files and exposes values and actions for our components to get and set state with.

Advanced Kea usage

For the most part, we stick to the functionality described in Kea's core concepts. However, in some files, we also take advantage of props and events, as well as manually mounting some shared logic files on plugin init outside of React.

Debugging Kea

To debug Kea state in-browser, Kea recommends Redux Devtools. To facilitate debugging, we use the path key with snake_cased paths. The path key should always end with the logic filename (e.g. ['enterprise_search', 'some_logic']) to make it easy for devs to quickly find/jump to files via IDE tooling.

Testing

Unit tests

From kibana-root-folder/x-pack, run:

yarn test:jest plugins/enterprise_search

E2E tests

See our functional test runner README.