In some cases we have selectors returning thunks. The thunks need to be
called inside `useSelector` in order for a rerender to be reliably
triggered.
`useSelector` triggers a re-render if its return value changes. By calling the thunk inside of the selector passed to `useSelector`, we will trigger re-renders when needed.
* accessibility test for painless lab
* skipped a test due to aria-violation
* skipped tests due to aria-violation and added datatestsubj
* removed the unwanted import
* incorporate review comments
* feedback incorporated
* review comments incorporated
* removed unwanted expect
* Set up basic shared FlashMessages & FlashMessagesLogic
* Add top-level FlashMessagesProvider and history listener
- This ensures that:
- Our FlashMessagesLogic is a global state that persists throughout the entire app and only unmounts when the app itself does (allowing for persistent messages if needed)
- history.listen enables the same behavior as previously, where flash messages would be cleared between page views
* Set up queued messages that appear on page nav/load
* [AS] Add FlashMessages component to Engines Overview
+ add Kea/Redux context/state to mountWithContext (in order for tests to pass)
* Fix missing type exports, replace previous IFlashMessagesProps
* [WS] Remove flashMessages state in OverviewLogic
- in favor of either connecting it or using FlashMessagesLogic directly in the future
* PR feedback: DRY out EUI callout color type def
* PR Feedback: make flashMessages method names more explicit
* PR Feedback: Shorter FlashMessagesLogic type names
* PR feedback: Typing
Co-authored-by: Byron Hulcher <byronhulcher@gmail.com>
Co-authored-by: Byron Hulcher <byronhulcher@gmail.com>
* [Reporting/Download CSV] provide title even if panel \titles are hidden in the dashboard
* add functional test
* Update embeddable_panel.tsx
* Update download_csv.ts
In addition to a route for listing Credentials, this also adds a
utility function which helps create API routes which simply proxy
the App Search API.
The reasoning for this is as follows;
1. Creating new routes takes less effort and cognitive load if we
can simply just create proxy routes that use the APIs as is.
2. It keeps the App Search API as the source of truth. All logic is
implemented in the underlying API.
3. It makes unit testing routes much simpler. We do not need to verify
any connectivity to the underlying App Search API, because that is
already tested as part of the utility.
* KQL support in filter ratio in TSVB
Closes#67503
* Fix filter_ratio and filter_ratios tests
* fix JEST
* Refactor some code in filter_ratio, filter_ratios, filter_ratios.test
* Edit query value in filter_ratio and filter_ratios.test
* Refacor some code in filter_ratio.js and visualization_migrations.ts
* Remove duplications in vis_schema and refactor filter_ratio
* Refactor filter_ratio.js
* Update default query with getDefaultQuery()
* Fix filter_ratio and histogram_support tests
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* bump ts to v4
* MOAR RAM
* fix type errors for OSS
* first pass on x-pack errors
* second pass on x-pack type errors
* 3rd pass on x-pack type-errors
* mute errors if complex cases
* don't delete if spread suffices
* mute other complex cases
* make User fields optional
* fix optional types
* fix tests
* fix typings for time_range
* fix type errors in x-pack/tests
* rebuild kbn-pm
* remove leftovers from master update
* fix alert tests
* [Telemetry Checker] TS4 Fixes
* bump to 4.0.1-rc
* fix new errors in master
* bump typescript-eslint to version supporting TS v4 syntax
* fix merge commit errors
* update to the stable TS version 4.0.2
* bump ts-eslint to version supporting ts v4
* fix typo
* fix type errors after merge
* update ts in another new package.json
* TEMP: remove me
* Revert "TEMP: remove me"
This reverts commit dc0fc3bae6.
* [Telemetry] Update snapshot for new TS4 SyntaxKind
* bump prettier to support TS v4 syntax
* fix prettier rules
* last style change
* fix new type errors
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
* [Security Solution][Resolver] Word-break long titles in related event description lists
* word-break long titles at non-word boundaries
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
**Current behavior:**
- **Scenario 1:** User is in the exceptions viewer flow, they select to edit an exception item, but the list the item is associated with has since been deleted (let's say by another user) - a user is able to open modal to edit exception item and on save, an error toaster shows but no information is given to the user to indicate the issue.
- **Scenario 2:** User exports rules from space 'X' and imports into space 'Y'. The exception lists associated with their newly imported rules do not exist in space 'Y' - a user goes to add an exception item and gets a modal with an error, unable to add any exceptions.
- **Workaround:** current workaround exists only via API - user would need to remove the exception list from their rule via API
**New behavior:**
- **Scenario 1:** User is still able to oped edit modal, but on save they see an error explaining that the associated exception list does not exist and prompts them to remove the exception list --> now they're able to add exceptions to their rule
- **Scenario 2:** User navigates to exceptions after importing their rule, tries to add exception, modal pops up with error informing them that they need to remove association to missing exception list, button prompts them to do so --> now can continue adding exceptions to rule
* updates validation on 'from' param to prevent malformed datemath strings from being accepted
* fix imports
* copy paste is not my friend
* missed type check somehow
* forgot to mock common utils
* updates bodies for request validation tests
* Add new Workplace Search initial data properties
* Add app logic
* Refactor index to match App Search
Adds the easier-to-read ComponentConfigured and ComponentUnconfigured FCs with a ternary in the root compoenent
* Remove ‘Logic’ from interface names
* Extract initial data from WS into interface
This allows for breaking apart the app-specific data and also having an interface to extend in the app_logic file
* Destructuring FTW
* Trusted Apps initial setup for route registration
* Added types for TrustedApp entries
* trusted apps list API returns results
* use methods and const from latest PR merge to lists
* a quick generator for trusted apps entries
* support cli options for trusted app data loader
* Add mocked `createTrustedAppsList()` method to `ExceptionListClientMock`
* tests fro trusted apps route handlers
* tests for trusted apps schema
* Correct name of mock method
* Fix service to ensure return value of `getExceptionList` service throws if service not available
* Fix types
* Refactor TrustedApp type + code review feedback
Co-authored-by: Catherine Liu <catherine.liu@elastic.co>
Co-authored-by: Ryan Keairns <contactryank@gmail.com>
Co-authored-by: Catherine Liu <catherineqliu@outlook.com>
Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
* rename uuid service to environment service
* adapt resolve_uuid to directly use the configurations
* move data folder creation to core
* update generated doc
* fix types
* fix monitoring tests
* move instanceUuid to plugin initializer context
* update generated doc