[ML] Migrate to React BrowserRouter and Kibana provided History.#71941
[ML] Migrate to React BrowserRouter and Kibana provided History.#71941walterra merged 37 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/ml-ui (:ml) |
|
@jgowdyelastic Did the following fixes: |
| }; | ||
|
|
||
| const navigateToPath = (path: string | undefined) => | ||
| navigateToUrl(getUrlForApp('ml', { path: `${path}${getUrlParams()}` })); |
There was a problem hiding this comment.
seeing as we use this function combination a lot, could this be wrapped in a provider function that just takes the path and supplied by useMlContext ?
it should also use PLUGIN_ID from kibana/x-pack/plugins/ml/common/constants/app.ts
There was a problem hiding this comment.
As discussed, decided to do it in this PR, we now have useNavigateToPath() based on useMlContext(), available via contexts/kibana. Update in fad85ec.
|
@elasticmachine merge upstream |
| window.open(fullUrl, '_blank'); | ||
| // If `url` is a relative path, we need to prefix the base path. | ||
| if (url.charAt(0) !== '/') { | ||
| url = `${basePath}${isKibanaUrl(urlConfig) ? '/app/' : '/'}${url}`; |
There was a problem hiding this comment.
Looks like we need to add the security app URLs to this check. Currently this is trying to open up e.g.
1:46
http://localhost:5601/pgy/security/hosts/ml-hosts?_g=()&query=(query:%27process.name%20:%20%22filebeat%22%27,language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:%272019-08-20T23:00:00.000Z%27,kind:absolute,to:%272019-08-21T22:59:59.999Z%27)),timeline:(linkTo:!(global),timerange:(from:%272019-08-20T23:00:00.000Z%27,kind:absolute,to:%272019-08-21T22:59:59.999Z%27)))
which is missing the app part before security.
peteharverson
left a comment
There was a problem hiding this comment.
Tested latest edits and LGTM
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
page load bundle size
History
To update your PR or re-run it, just comment with: |
…stic#71941) - Migrate to React BrowserRouter and Kibana provided History including a fallback to redirect legacy hash based URLs. - Migrate breadcrumbs away from hash based URLs. - Make sure relative custom urls still work after migration.
* master: (54 commits) [ML] Migrate to React BrowserRouter and Kibana provided History. (elastic#71941) [Discover] Improve saveSearch functional test handling (elastic#73626) [Metrics UI] Fix all threshold alert conditions disappearing due to alert prefill (elastic#73708) [Metrics UI] Fix alert previews of ungrouped alerts (elastic#73735) [SIEM] Fixes "include building block button" to operate (elastic#73900) [Metrics UI] Fix alert management to open without refresh (elastic#73739) [Security Solution][Lists] - Tests cleanup and remove unnecessary import (elastic#73865) [Ingest Management] main branch uses epr-snapshot. Others production (elastic#73555) [Canvas][tech-debt] Fix SVG not shrinking vertically properly (elastic#73867) [Maps] upgrade turf (elastic#73816) [Security Solution][Telemetry] Concurrent telemetry requests (elastic#73558) [Security Solution][Exceptions] - Update how nested entries are displayed in exceptions viewer (elastic#73745) [Security Solution][Exceptions] Adds autocomplete workaround for .text fields (elastic#73761) [Metrics UI] Fix previewing of No Data results (elastic#73753) Closes elastic#72914 by hiding anomaly detection settings links when the ml plugin is disabled. (elastic#73638) [Ingest Manager] Fix config selection in enrollment flyout from config list page (elastic#73833) [DOCS] Fixes typo in Alerting actions (elastic#73756) [APM] fixes linking errors to ML and Discover (elastic#73758) Handle promise rejections when building artifacts (elastic#73831) [Security Solution][Detections] Change from sha1 to sha256 (elastic#73741) ...
) (#73919) - Migrate to React BrowserRouter and Kibana provided History including a fallback to redirect legacy hash based URLs. - Migrate breadcrumbs away from hash based URLs. - Make sure relative custom urls still work after migration.
* master: (38 commits) [Discover] Context unskip date nanos functional tests (elastic#73781) [ML] Migrate to React BrowserRouter and Kibana provided History. (elastic#71941) [Discover] Improve saveSearch functional test handling (elastic#73626) [Metrics UI] Fix all threshold alert conditions disappearing due to alert prefill (elastic#73708) [Metrics UI] Fix alert previews of ungrouped alerts (elastic#73735) [SIEM] Fixes "include building block button" to operate (elastic#73900) [Metrics UI] Fix alert management to open without refresh (elastic#73739) [Security Solution][Lists] - Tests cleanup and remove unnecessary import (elastic#73865) [Ingest Management] main branch uses epr-snapshot. Others production (elastic#73555) [Canvas][tech-debt] Fix SVG not shrinking vertically properly (elastic#73867) [Maps] upgrade turf (elastic#73816) [Security Solution][Telemetry] Concurrent telemetry requests (elastic#73558) [Security Solution][Exceptions] - Update how nested entries are displayed in exceptions viewer (elastic#73745) [Security Solution][Exceptions] Adds autocomplete workaround for .text fields (elastic#73761) [Metrics UI] Fix previewing of No Data results (elastic#73753) Closes elastic#72914 by hiding anomaly detection settings links when the ml plugin is disabled. (elastic#73638) [Ingest Manager] Fix config selection in enrollment flyout from config list page (elastic#73833) [DOCS] Fixes typo in Alerting actions (elastic#73756) [APM] fixes linking errors to ML and Discover (elastic#73758) Handle promise rejections when building artifacts (elastic#73831) ...



Summary
Part of #72013
Checklist
For maintainers