## Summary
Temporarily addresses https://github.com/elastic/kibana/issues/88450
A follow PR will address full fix.
### Issue
Exceptions table search not functioning as expected.
### Diagnostic
The exception list SO properties are mapped as keywords, meaning ES does not tokenize them. Need to add a `text` mapping for fields we want to search on in order for search to work as expected. Expectations for exceptions table search being:
- I can search `Endpoint Security` and get results that match `Endpoint` or `Security`
- I can search `"Endpoint Security"` and it will conduct an exact match search
It's too late in the release cycle for mappings updates - a follow up PR will properly fix search.
### Without Search
<img width="1766" alt="Screen Shot 2021-01-19 at 7 52 01 PM" src="https://user-images.githubusercontent.com/10927944/105112279-aed64300-5a90-11eb-95fc-1922eb2055e9.png">
### Checklist
- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
* Add AnalyticsUnavailable component
* Add AnalyticsHeader component
+ update AnalyticsLogic to store allTags prop passed by API
+ convertTagsToSelectOptions util helper
* Add AnalyticsLayout that all subroutes will utilize
- Handles shared concerns of:
- Loading state & unavailable state
- Flash messages & log retention callout
- Reusing the header component
- Fetching data
- Reloading data based on filter updates
* Add very basic subroute views that utilize AnalyticsLayout
* Update QueryDetail pages to set breadcrumbs
* Fix QueryDetail breadcrumbs to not 404 on the 'Query' crumb
Redirect to the /analytics overview since we don't actually have a /query_details overview
* [PR feedback] Enforce date range defaults on the client side
- instead of using coincidence to sync our client side default range & server default range
- tags remain ''/undefined as default
* [PR feedback] Add explicit query vs analytics view prop
- to help devs more quickly distinguish at a glance whether a view will fetch analytics data or query data
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Making kibanaFeatures an optional parameter and catching error on plugin start
* Gracefully handle 404 errors when no access to features endpoint
* Adding functional test
* Only render location status badge when there are actually locations to display.
* Add aria-label to describe location section.
* Update test data to reflect real-world data better. Refactor enzyme tests.
* Refactor component test.
* Fix test names.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Addresses issue issue 87110
**Issue**
When prepackaged rules were created during the Endpoint Security enrollment flow, the endpoint exceptions list was failing to be created. As a result, when a user navigated to the `Endpoint Security` rule to add an exception it would display errors and not allow a user to add exceptions.
* Await promises to ensure promise rejection does not crash kibana
* Fix test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* partial failure if unmapped timestamp override field or unmapped @timestamp field
* fixes unit tests
* fix threat match rules integration tests
* unskip integration test for partial failure when not all indices have timestamp override field
* replace ts-expect-error in test with a partial type
* use destructured param and != null for ternary
* fix typo in utils.test.ts
* remove unnecessary optional chaining
* replace logger.debug with logger.error and update test case for threat match integration test to search auditbeat-* instead of empty index causing it to search wrong indicies like .kibana, etc..
* adds unit test to write a success when all shard failure messages are no mapping found for a timestamp field, moves privilege check and timestamp field cap check into utility functions and updates code to be more functional
* need to write an error, not a partial failure, if the rule cannot read ANY of the indices provided
* use isEmpty for checking timestamp override field param and remove let from hasReadIndexPrivileges util function
* replace references to helpers/toPromise | toError to use common/fp_utils, remove unnecessary flow wrappers, no need for checking if timestampField is null since it is typed as string and we do the checking beforehand, add a const bool to clean up logic for getting timestampFieldOverride
* replace usage of flow with pipe to make arguments explicit
* set width
* cleanup
* add show scale toggle in map settings
* tslint
* remove unmapped css comment
* move scale for full screen mode so they do not collide
* change default and add unit test for scale_control
* simplify scale
* add tilda to label
* update jest expects
* eslint
* eslint
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Update older tests mocking useValues to setMockValues
* Update older logic tests to use newer LogicMounter helper
- NOTE: shared logic files are still using resetContext however, in order to not accidentally override/mock kea + since they should be testing their own mount helpers
* Merge/DRY kea.mock helpers into a single import
* Remove unnecessary kea.mock file imports
- the automock already happens when you import something from the kea.mock file
- in some cases in WS the mock just wasn't needed
* Newline linting
- Do I need a hobby? yes
- Is this my hobby? ...maybe
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
A user received a `407` response when using a `registryProxyUrl` format like `http://user:pass@host:port`
I believe the issue is we're not including the [`auth` property as described in this issue](https://github.com/TooTallNate/node-https-proxy-agent/issues/12#issuecomment-216098644).
Add tests to ensure it only adds `auth` if username & password are given.
### Checklist
Delete any items that are not applicable to this PR.
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
```
getProxyAgentOptions
auth property
present & correct if given username and password
✓ proxy url is http (1 ms)
✓ proxy url is https
missing if not given username and password
✓ proxy url is http
✓ proxy url is https
```
* Initial copy/paste of component tree
Only does linting changes and lodash import
* Replace withRouter HOC with hooks
Use useLocation and no longer pass around history, using the KibanaLogic navigateToUrl method instead
* Migrate LicenseCallout component
* Update paths
Also change name of component to OauthApplication as the default import was named that before
* Remove conditional and passed in flash messages
This is no longer needed with the Kibana syntax. Flash messages are set globally and only render when present.
* Replace removed ConfirmModal
In Kibana, we use the Eui components directly
* Use internal tools for determining license
* Fix a bunch of type issues
* Remove telemetry settings section
We no longer control telemetry in Workplace Search. It is handled by Kibana itself
* Add SettingsSubNav component
* Add route and update nav
* Remove legacy AppView and sidenav
* Clear flash messages globally
* Remove global name change method call
The global org name is not used anywhere outside of this section so we no longer need to update the global organization object as it is re-fetched when this section is entered.
Previously, we displayed the org name in the sidebar but that has been removed in Kibana
* Refactor saveUpdatedConfig
We recently split out the logic from SourceLogic to the new AddSourceLogic and in settings, we were calling the saveSourceConfig method from the SourceLogic (now in AddSourceLogic) file and passing a callback that set the flash messages from that component’s state.
Now, we set the flash messages globally and no longer need to have a saveUpdatedConfig method in the logic file, but can call it directly in the component and the flash messages will be set globally.
* Update logic file to use global flash messages
* Update server routes
* Replace Rails http with kibana http
* Fix subnav
* Update routes to use consistent syntax
We use this method across both Enterprise Search products in Kibana
* Shorten nav item copy
This would be the only place in the sidebar with a nav item breaking to a second line.
* Fix some random typos
* Replace React Router Link with helper
* Add i18n
* Remove redundant clearing of flash messages
This happens automatically now in the global flash messages logic; route changes trigger clearing of messages
* Add unit tests for components
* Add tests for router
* Store oauthApplication in mock for reuse
* Add tests for SettingsLogic
* Fix typo
* Remove unncessary imports
Copied from this PR:
https://github.com/elastic/kibana/pull/88525
* Refactor to use new helpers when mocking
See https://github.com/elastic/kibana/pull/88494
* Update logic test to use error helper
See https://github.com/elastic/kibana/pull/88422
* Fix type issue
* Fix whitespace lint issue
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add type
Our code allows for an array but the type did not.
* Add exampleResult mock
* Add test-subj attrs
* Remove FIXMEs for linter errors
The linter was complaining when these were initially migrated, stating that a11y required all mouse events to have focus and blur events. This commit uses the hover events for those. EuiColorPicker was added in error and removing them does not disrupt the linter.
* Add tests for components
* Add test for router
Also updates routes to use consistent syntax and remove the render prop
* Use helper instead of history.push
* Remove redundant resetDisplaySettingsState method
Since all this does is wrap the clearFlashMessages function, we can just call it directly. Also use the new clearFlashMessages helper instead of using FlashMessageLogic directly insideof toggleFieldEditorModal
* Add tests for DisplaySettings container
* Fix a typo and associated tests
Also adds ‘subtitleField’ that is needed in a future test
* Add constants from PR to test
https://github.com/elastic/kibana/pull/88477
* Add tests for DisplaySettingsLogic
* Remove unused imports and use new mocks
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* 🐛 Make sure to check incomplete columns before saved ones
* ⚗️ Try a different approach
* 🐛 Isolate the fullRef to field transition and trigger the removal + tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>