* Update id of second sources mock to be unique Both were originally set to ‘123’ * Remove unused types from interface These were never used and were only uncovered while testing. These both exist on `group` but not at the top level. * Add group mock * Fix typo in reducer name * Add tests for group_logic * Remove redundant messages check This is not needed with global flash messages, as the component will not render with no messages. * Add tests for group_router * Add group mock * Add tests for groups_logic * Convert groups_router to use children This allow for testing the component visiblity and aligns with other usage of React Router * Add tests for groups_router * Refactor pagination logic This commit removes the useDidUpdateEffect custom hook and moves the logic to fetch the search results to a listener inside of Kea. * dd tests for main groups container * Lint fixes * Fix broken test and remove comment The issue was that the delay needed to be in the catch block to properly execute. * Add comments and make test explicit In other places in the tests, we explicitly test for an error string in the catch block. Changing this to match. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
common | ||
public | ||
server | ||
kibana.json | ||
README.md |
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
- When developing locally, Enterprise Search should be running locally alongside Kibana on
localhost:3002
. - Update
config/kibana.dev.yml
withenterpriseSearch.host: 'http://localhost:3002'
- 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_case
d 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