The analytics job page in the Kibana management section didn't have the context provided by React Router and Kibana's own history object so the page crashed on load. The context is necessary to construct the correct URLs to navigate to the ML plugin itself.
This PR fixes it by wrapping the management page in <Router history={history} />. Also adds functional tests to cover navigating to the jobs list pages in stack management.
Fixes#71461 regression since 7.7
New state syncing utils didn't properly handle errors,
Errors happening during URL parsing or writing wasn't handled, so state syncing could stop or in worth case blow out. (see #71461)
There are not much scenarios where missing proper error handling could really impact users, except the one described in #71461:
Kibana users state:storeInSessionStorage
Users often intuitively share hashed dashboard urls directly
When someone opens those urls - there is a blank screen with warning
In 7.6 - dashboard would still load with default state.
Since 7.7 these still could be achieved by removing query params for URL, but it is not obvious for regular users.
This PR makes sure that behaviour is similar to one we had before 7.7.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
All mappings in Elasticsearch support arrays. They can also return null values or be missing. For example, a `keyword` mapping could return `null` or `[null]` or `[]` or `'hi'`, or `['hi', 'there']`. We need to handle these cases in order to avoid throwing an error.
Specific and nuanced handling of these cases isn't the goal of this PR. This PR just introduces some helper types that can be used to assist you in writing defensive code.
When dealing with an value that comes from ES, wrap the underlying type in `ECSField`. For example, if you have a `keyword` or `text` value coming from ES, cast it to `ECSField<string>`.
### Added New Resolver specific types
`ResolverEvent` has a new safe equivalent `SafeResolverEvent`. The constituent parts of `ResolverEvent` also have safe equivalents: `SafeEndpointEvent` and `SafeLegacyEndpointEvent`. Use these in your code for added type safety.
### New safe event methods
The event methods accept the unsafe `ResolverEvent`. Create new methods that accept the safe `SafeResolverEvent`. By keeping copies of both methods around we can gradually transition to the safe versions:
* `isLegacyEvent` has `isLegacyEventSafeVersion`
* `eventTimestamp` has `timestampSafeVersion`
* `eventName` has `processNameSafeVersion`
* `eventId` has `eventIDSafeVersion`
* `entityId` has `entityIDSafeVersion`
* `parentEntityId` has `parentEntityIDSafeVersion`
Our jobs summary call returns all installed jobs regardless of group;
passing groups as jobIds does not perform group filtering.
This adds a helper predicate function on which to filter these results,
and updates tests accordingly.
* add edit analytics functional test
* adds edit test service
* update edit test wording for clarity
* check flyout closes after edit
* rename testSubj for consitency
Many changes went into the registry and the packages recently. This is updating to the most recent version of the registry distribution currently in production.
Co-authored-by: Sonja Krause-Harder <sonja.krause-harder@elastic.co>
* i18n refactor
- DRY out plugin details to constants and correctly i18n-ize front-end-facing strings
* DRY out new i18n constants
- refactor instances of i18n.translate to use new constants
* Fix non-i18n'd breadcrumb strings
* PR feedback: swap out more plugin ID strings for constants
This PR addresses two issues which caused several tests to be flaky in TM.
When `runNow` was introduced to TM we added a pinned query which returned specific tasks by ID.
This query does not have the filter applied to it which causes task to return when they're already marked as `running` but we didn't address these correctly which caused flakyness in the tests.
This didn't cause a broken beahviour, but it did cause beahviour that was hard to reason about - we now address them correctly.
It seems that sometimes, especially if the ES queue is overworked, it can take some time for the update to the underlying task to be visible (we don't user `refresh:true` on purpose), so adding a wait for the index to refresh to make sure the task is updated in time for the next stage of the test.
## Summary
- updates the builder nested entries so that the children do not display the parent path - so instead of `parent.child` it just shows `child`
- updates the builder to fix overflow issue
* [Ingest Manager] Adjust dataset aggs to use datastream fields instead
Elastic Agent and Elasticsearch are switching over from using dataset.* to datastream.*. This adjust the aggregation on the dataset page to get the datastreams.
For this to work properly, the most recent version of Elasticsearch 7.9 must be used and is pending updates on all the packages to ship also the datastream fields, see https://github.com/elastic/integrations/pull/213
* Update datastream to data_stream
* Update data stream name generation
* Fix typo
* Temporarily use datastream instead of data_stream
* updating to use `data_stream` instead of `datastream`
Co-authored-by: ruflin <spam@ruflin.com>
Co-authored-by: Jen Huang <its.jenetic@gmail.com>