* [Maps] fix duplicate ID's
* tslint cleanup
* use layer id instead of layer name for popover id
* tslint fixes
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Reconcile request helpers with eslint rules for React hooks.
- Add clearer cleanup logic for unmounted components.
- Align logic and comments in np_ready_request.ts and original request.ts.
* Reorganize modules and convert tests to TS.
- Split request.ts into send_request.ts and use_request.ts.
- Convert test files into TS.
- Relax SendRequestResponse type definition to type error as any instead of expecting an Error, since we weren't actually fulfilling this expectation.
* Convert everything to hooks and add test coverage for request behavior.
* Fix Watcher memoization bugs.
* fix URI decoding and editing of a policy which backs up all indices
* fix type issue
* fix general use of encoding and update decode algo
* fix serialisation of snapshots and added a test
* Fix test description name
* Update attempt_to_uri_decode.ts
* catch errors from decoding in the already throwing code
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Maps] fix Hotlink for EMS-add-data card do not working
* remove duplicate typing
* update ConfigSchema usage in region_map plugin
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [APM] Language-specific stacktrace formatting
* Add todos
* more
* add at prefix for java
* [APM] Fix overlapping transaction names
...in the table and the header. Did this by adding `word-break: break-all` to them.
Also:
* Rename List to TransactionList
* Add stories for TransactionList and ApmHeader
* Add missing type information to transactions based on sample transaction
*
Fixes#73960.
* fix read only issue with timeline
* fix no feeds url for kibana setting + remove the no-index-laert index from the timeline query so you do not have to add permissions to it
* Add test + add logic to not show advance settings if user does not have access
* remove no alert indices from the timeline query
* review I
* no needs of that
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Convert to using new status, and remove legacy plugin
* PR feedback
* Fix test
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add Kea 2.20.rc.3
* Remove Kea declarations
* Convert AppLogic files to use new syntax
- Utilizes MakeLogicType to type the logic file and remove bespoke typings
- Use object syntax for actions and reducers, instead of functions
- Add return types to actions in interface
- Remove interfaces from component (Kea does this automagically now)
- Also renamed IAppLogic* to IApp*
* Convert Workplace Search Overview files to use new syntax
- Utilizes MakeLogicType to type the logic file and remove bespoke typings
- Use object syntax for actions and reducers, instead of functions
- Add return types to actions in interface
- Remove interfaces from component (Kea does this automagically now)
- Also renamed mockLogic* to mockApp*
* Convert HttpLogic files to use new syntax
- Utilizes MakeLogicType to type the logic file and remove bespoke typings
- Use object syntax for actions and reducers, instead of functions
- Add return types to actions in interface
- Remove interfaces from component (Kea does this automagically now)
- Also renamed IHttpLogic* to IHttp*
* Convert FlashMessages files to use new syntax
- Utilizes MakeLogicType to type the logic file and remove bespoke typings
- Use object syntax for actions and reducers, instead of functions
- Add return types to actions in interface
- Remove interfaces from component (Kea does this automagically now)
* Remove hand-rolled Kea types
Bye-bye pretty code
* Upgrade to rc4 per author
From Kea author: “I’d suggest upgrading to rc.4 before merging though, as I seem to have committed some optional chaining operators ("?.") into the compiled JS output, which will cause errors if anyone is using an older browser. You can also wait for 2.2.0 final, but that might still be a week or more away…”
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* changing unit when legend is disabled
* changing unit when legend is disabled
* show individual units in the tooltip
* addressing PR comment
* increasing duration threshold
* change formatter based on available legends
* addressing PR comment
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* ILM public side changes to support frozen phase
This is a very faithful duplication of the cold phase. We are
also excluding the snapshot action as well as the unfollow action
as these are features that require higher than basic license
privilege.
* added "frozen" to the server side schema
* add frozen phases component
* fix i18n and update jest tests
* Slight restructuring to phase types and fix copy paste issues.
- also fixed TS error introduced after TS v4 upgrade (delete)
* fix hot phase type and remove type constraint from error messages
* update validation logic
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* remove advanced json for count agg
* Remove only advanced json from count agg
* use Constant from data plugin
* add the logic to data plugin
* remove json arg from function definition
* remove unecessary translations
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Refactor enterprise_search_request_handler to a class that stores config/log
- So that routes don't have to continuously pass it in - just params that actually change (paths, queries)
+ misc refactors/lint fixes from code review
* Update mocks/dependencies so other tests pass type checks
* Update /api/workplace_search/overview endpoint to use new request handler
* Update /api/app_search/engines route to use new handler
- This required updating the shared handler to accept custom params set by the route, since the engines route transmutes some param names
- createRequest mock also had to be updated to correctly reflect a curried function in order to get tests passing
* DRY out hasValidData to a reusable/cleaner call
* Update shared handler to output specific message for auth errors
- Check for /login URL (indicates auth issue)
- Refactor final catch return to allow being passed messages from previous throw
- Change hasValidData fallback to only log (potentially sensitive?) JSON data to server, not to client
- Minor test cleanup - move error tests to single describe block, minor URL/newline cleanup
* Update handler to pass method & body requests + pass back response code
- This will support future POST requests as well as support (e.g.) 404 responses
Minor test refactors:
- Set up new request defaults (method, empty body) + expected output & convert KibanaAuthHeader to string since they're set so close to one another
- group request pass tests into a describe block, remove response body portion of their tests (since we don't really care about that for those tests)
- group response tests into describe block
- clarify how passed handler params arg overrides request.params
* PR feedback: Update custom params arg to take an object instead of a query string
Read location.search from the redux store instead of a hook so that the entire view has a single (synchronized) source of truth.
Also, no longer pass `pushToQueryParams` function to various components.
* Closes#72636. Adds alerting integration for APM transaction duration anomalies.
* Code review feedback
* Display alert summary with the selected anomaly severity label instead of the anomaly score.
* - refactored ALL_OPTION and NOT_DEFINED_OPTION to be shared from common/environment_filter_values
- utilize getEnvironmentLabel in the alerting trigger components and added support for the 'All' label
* refactor get_all_environments to minimize exports and be more consistent and clean
* - Reorg the alerts menu for different alert types (threshold/anomaly)
- default environment alert settings to the selected filter
* - Filters default transaction type to only those supported in the APM anomaly detection jobs
- Removes Service name and transaction type from the set of expressions in the alerting setup
* - remove bell icon from alerts menu
* Adds target service back into the anomaly alert setup as a ready-only expression
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
Fixes bug found in 7.9.
**Current behavior:**
- Go to alerts page
- Select action to add exception item
- Select checkbox to close all alerts matching exception
- Click `Add exception`
- Note that the alerts table does not update until after you refresh or toggle between `Closed` and `Open`
**New behavior:**
- Go to alerts page
- Select action to add exception item
- Select checkbox to close all alerts matching exception
- Click `Add exception`
- Note that the alerts table updates
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.