* [APM] Make sure URL hooks are in sync with history.location
Previously, the `useUrlParams` and `useLocation` hooks were possibly running out of sync with history.location, as they maintained their own state. By listening to history changes, they would re-render their context providers with the updated values. However, the context providers are wrapped by the `Router` component which re-renders the context providers when the location changes. This means that the initial render after a location change would have the updated values in `history.location`, but not in the values returned from the `useUrlParams` and `useLocation` hooks. These hooks would then (both) queue another render with the updated values being passed to the context.
This change lets the hooks piggyback on the re-renders from the `Router` component, and uses `history.location` to pass their derived values to the context. This ensures that the values returned from the hooks and `history.location` are always in sync. It should also remove a few unnecessary renders.
Fix tests
- Passes history as a prop to URLParamsProvider, easier to test and consistent with usage of LocationProvider
- Do not test behaviour of history.replace & re-renders, only whether history.replace was called with the right Location values. This is because re-rendering is no longer a concern of URLParamsProvider, we leave that up to the Router component now.
Address review feedback:
- Use history/location from Router so we have one source of truth for routing info
- For UrlParamsContext, avoid use of history.replace. The behaviour w/ history.replace is incorrect. We now use useRef and trick React into re-rendering with an "empty" state update.
- Unit test for whether useUrlParams does not queue an unnecessary render.
Memoize context value of UrlParamsProvider
* Move infra items back to the top again
Piggybacking on this change to fix an order issue in TransactionActionMenu that was introduced w/ 2e3fbd24a8 (woops).
* [APM] Make sure conditions under which transaction menu items are shown are correct
- check for url.domain for uptime link
- always show discover link
- show log link when traceId is set
* Add more tests for TransactionActionMenu
* [feat] add reach-like functionality to object
In #36804 we need to validate a `Partial<HttpConfig>` object which may
or may not have all the required keys attached to it. This is the type
of use-case for `Joi.reach`, so we should expose a reach-like method on
the object validation class so that you can return the validator for a
specific key on an object.
* [fix] change to validateKey
* [fix] use throw error matcher
* [fix] use same interface for validate
* [fix] change test name]
* split large x-pack ciGroup5 into 3 groups
* split large x-pack ciGroup3 into 2 groups
* Add groups to the jenkins xpack ci group file
* Re-level some more work
* move es_search_source test to new describe block
* move es_search_source to first in ciGroup7
For many use cases a consumer of the QueryBarInput (or QueryBar) might only have an index pattern string in hand. Instead of forcing every consumer to reimplement the fetching logic to get a full pattern object, this PR updates the QueryBarInput to do the fetching itself if the indexPatterns array prop contains any strings. If a string does not exactly match the title of any of the saved objects then we return the default index pattern instead.
- Layout and message fixes for displaying error messages for the pivot preview in `ml/public/data_frame/components/define_pivot/pivot_preview.tsx
- Fixes list of available date field aggregations.
- Fix to make sure datepicker is always disabled for pivot wizard.
- Fixes incomplete job delete confirm modal message.
* Move propFilter from ui/filter to ui/agg_types/filter
* Return default value
* Make propFilter generic
* Convert propFilter from a mocha test to a jest test
* [ML] Sample ML jobs: Updates to make anomalies clearer
Minor updates to web logs data and ML job
definitions to make anomalous activity more
distinct.
* [ML] Sample ML jobs: Further updates to jobs and data
Adding missing files from previous commit and
changing job naming (removing weblog_* prefix etc.)
* [ML] Resolving PR review comments.
* [ML] Improve anomalies in Kibana sample data
Minor fixes:
- Rename job group to `kibana_sample_data` throughout
- Fix index pattern link in `sample_data_sets.ts`
- Fix log.json.gz count test
* Adds telemetry info for custom elements
* Addresses PR feedback, converts to TS
* Fix bad equality check
* Fix problem with errored query
* Fix eslint issue with typescript
* Switch from export * to stop eslint complaining
* Fix test
* Clean up TS and tests
* Remove unused imports
* auto interval
* [TSVB] Rollup Search - 'auto' interval is not working for Rollup Jobs which were created in Calendar intervals
* [TSVB] Rollup Search - 'auto' interval is not working for Rollup Jobs which were created in Calendar intervals
* fix issue
* fix broken tests
* fix pr comments
* fix pr comments
* [APM] Closes#34918, by listing service environments as badges. When
greater than 2 badges would be shown, condense into a summary badge with
a tooltip
* [APM] add i18n text for environment label