* Initial copy/paste of components Changes for pre-commit hooks were: - Linting - Lodash imports - changed enum names in add_source because there were collistions with component names. So SaveConfig becomes SaveConfigStep because there is a component by the same name - replaced apostrophe’s with ‘'’ per lint rule Finally, the linter didn’t like this expression: asOauthRedirect ? onOauthFormSubmit() : onCredentialsFormSubmit(); … so I changed it to: const onSubmit = hasOauthRedirect ? onOauthFormSubmit : onCredentialsFormSubmit; onSubmit(); * Add route helper * Remove AppView, Sidebar navigation and FlashMessages Sidebar copy and breadcrumbs will be recreated at the top level in a separate PR * Update component paths * Use Kibana’s hasPlatinumLicense over minimumPlatinumLicense * Various TypeScript lint fixes * Fix index paths * Remove in-page breadcrumbs and move sidebar copy In Kibana, breadcrumbs will be at the top-level and not in the view Also, we have no sidebar with contextual copy. The Figma designs call for this copy to be above the main content. For now I am placing this in the existing ViewContentHeader component. This will be slightly broken because of the structure of ViewContentHeader but that is expected for now since it cannot be rendered in the browser yet to fix * Temporarily add parseQueryParams This is a placeholder until https://github.com/elastic/kibana/pull/83750 lands * Remove optional from isOrganization Looks like the value is always passed * Remove ‘!!’ |
||
---|---|---|
.. | ||
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