Two group-by or aggregation names could result in conflicting nested fields which would return an error for pivot previews. For example, two names like responsetime and responsetime.avg are not allowed.
This PR fixes the issue by extending the tests whether a configuration is allowed to be added to the list of group-by and aggregation configurations. If a conflict is detected, a toast notification gets triggered and the configuration won't be added.
With insufficient privileges, a user would be redirected to the ML plugin's access-denied page which mentions the required user roles to access the pages. Since data frames introduces new user roles these messages were not correct.
This PR fixes it by redirecting to a specific access-denied page for data frames. To avoid to much refactoring as a fix, the page is a copy and port to React of the original one. In a follow up for 7.3, we should merge the two pages and it should have options to display required user roles given a certain context like anomaly detection or data frames.
* Adding a read only access section to the infrastructure docs
* Adjusting where the infrastructure read only access section is and
adding the logs readonly access section
* Fixing grammar
- 7.0 introduced indices.query.bool.max_clause_count which defaults to 1024. This can break certain queries (e.g. simple_query) for indices which have more than 1024 fields (e.g. certain beats indices). The optional data frames query uses simple_query and could therefor break the source index preview as well the pivot preview and pivot job itself given these conditions.
- Originally the default query (* used for simple_query) was always applied for source index previews and pivot previews. A new check isDefaultQuery() will now allow a) the source index preview to use a more efficient match_all query and b) avoid adding the query to the pivot config. This avoids triggering the max_clause_count when no optional query is set.
- If an index has more than 1024 fields, the input form for an optional query will be hidden. A helper text explains the reasoning. This avoids triggering max_clause_count related errors from within the UI. A user can still copy a UI created config to the clipboard and add an optional query in Kibana dev console.
- Additionally, this PR adds a fix to format date fields in the source index preview table using moment-timezone and formatHumanReadableDateTimeSeconds to display dates with the correct timezone.
Add flexibility to alignment of multiple gauge vis by supporting the following alignments: automatic, horizontal, vertical. the default is: automatic, it aligns the gauges depending on screen space to horizontal or vertical
Further Adaptions
- sample data
- migration of saved objects
- removal of jquery as depencency
- adaptions of rendering to prevent clipping
Closes#34080
For whatever reason, `Style.it` is unwrapping and dropping the root node of the component it wraps. No idea why. This simply wraps the tree up in a sacrificial `<div/>` for `Style.it` to eat.
* [APM] Navigate to default transaction sample
If the distribution data changes, and the currently selected transaction sample is no longer available, we navigate to the default sample of the latest distribution data.
Previously, a displayed sample would "stick" if the new distribution data did not have a default sample.
Readability improvements
Use location primitives
Simplifies hook logic in TransactionDetails/Distribution by only passing the necessary primitives (pathname, hash, search) to the history.replace() call rather than the full location object. Removes the need for memoization w/ useRef too.
Fix lint error
* Remove unused translations
* Simplify redirectToDefaultSample callback
* Use history.location instead of location prop
* [Code] improve project status polling management
* [Code] Use make repository status polling cancellable
* change back to 1000ms polling interval
* deduplicate repository status polling runner before run
Fixes an issue where long field names would overflow the aggregation item of the pivot config list. This fix was already done for the group-by-items, now brought over to aggregations too.
* [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