You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently home, discover, dashboard, visualize, lens and dev tools are registering itself with the kibana_legacy plugin instead of the core application service. This happens to be able to render within the legacy platform because not everything is migrated yet.
Switch to core application service
Once all of the apps are moved to the new platform (#60097), it's possible to switch these registrations to the actual core.applications service. By rendering in the new platform directly, it will be possible to switch between individual apps without a page reload (including solution apps).
core.applications.register({id: 'discover',title: 'Discover',updater$: this.appStateUpdater.asObservable(),// navLinkId is not required anymore, this is just necessary for the legacy app renderer// ...
Redirect old urls
However this also means the URL structure changes, because e.g. discover will be rendered under app/discover instead of app/kibana#/discover. To keep old URLs (e.g. from short urls or bookmarks) working, kibana_legacy should make sure to redirect them properly to their new target. In the hash path, the app name prefix can be removed, e.g. app/kibana#/discover should redirect to app/discover#/
To implement this, the already existing forwardApp method of kibana_legacy can be extended to cover existing use cases. The only existing usages so far (src/legacy/core_plugins/kibana/public/kibana.js) should be moved to the discover plugin.
Dashboard URL structure
The dashboard app is currently in a weird state because it uses both dashboards and dashboard as prefix. In the new platform, there should be only app/dashboard, redirecting everything else like described here: #49060
Fix existing URL builders
In several places URLs to these apps are built locally (e.g. x-pack/plugins/ml/public/application/components/anomalies_table/links_menu.js, x-pack/plugins/searchprofiler/public/plugin.ts, x-pack/plugins/ml/public/application/datavisualizer/file_based/components/results_links/results_links.tsx, ... - not complete).
In case this task takes too long, it can also be solved after the cutover, but it would be better to fix it in the same release to avoid unnecessary page reloads.
Removal of kibanaLegacy.registerLegacyApp
The kibana_legacy application service currently also renders the management app and all individual sections. When everything in the legacy kibana plugin is completely migrated, it can be removed and the NP kibana_legacy platform can take over the kibana app id to continue to redirect legacy URLs. This is tracked in #61308.
All visualizations and all four applications have to be moved to the platform before this can be implemented (because the legacy platform won't be loaded if the current app is rendered via core application service).
The maps application (or at least the visTypeAlias definition) has to be moved to the new platform for it to show up in the vis modal.
The text was updated successfully, but these errors were encountered:
flash1293
changed the title
Switch Discover/Dashboard/Visualize/Dev Tools to core application service
Switch Discover/Dashboard/Visualize/Lens/Dev Tools to core application service
Mar 26, 2020
flash1293
changed the title
Switch Discover/Dashboard/Visualize/Lens/Dev Tools to core application service
Switch Home/Discover/Dashboard/Visualize/Lens/Dev Tools to core application service
Apr 6, 2020
Currently home, discover, dashboard, visualize, lens and dev tools are registering itself with the
kibana_legacy
plugin instead of the core application service. This happens to be able to render within the legacy platform because not everything is migrated yet.Switch to core application service
Once all of the apps are moved to the new platform (#60097), it's possible to switch these registrations to the actual
core.applications
service. By rendering in the new platform directly, it will be possible to switch between individual apps without a page reload (including solution apps).Current:
After switch:
Redirect old urls
However this also means the URL structure changes, because e.g. discover will be rendered under
app/discover
instead ofapp/kibana#/discover
. To keep old URLs (e.g. from short urls or bookmarks) working,kibana_legacy
should make sure to redirect them properly to their new target. In the hash path, the app name prefix can be removed, e.g.app/kibana#/discover
should redirect toapp/discover#/
To implement this, the already existing
forwardApp
method ofkibana_legacy
can be extended to cover existing use cases. The only existing usages so far (src/legacy/core_plugins/kibana/public/kibana.js
) should be moved to thediscover
plugin.Dashboard URL structure
The dashboard app is currently in a weird state because it uses both
dashboards
anddashboard
as prefix. In the new platform, there should be onlyapp/dashboard
, redirecting everything else like described here: #49060Fix existing URL builders
In several places URLs to these apps are built locally (e.g.
x-pack/plugins/ml/public/application/components/anomalies_table/links_menu.js
,x-pack/plugins/searchprofiler/public/plugin.ts
,x-pack/plugins/ml/public/application/datavisualizer/file_based/components/results_links/results_links.tsx
, ... - not complete).As this is inherently brittle, all apps once registered under their new location should register an url generator (https://github.com/elastic/kibana/tree/master/src/plugins/share/public/url_generators) in the
share
plugin which is consumed by the plugins currently building URLs manually.For dashboard that's already done, in this case the existing generator has to be adjusted: https://github.com/elastic/kibana/blob/master/src/plugins/dashboard/public/plugin.tsx#L94
In case this task takes too long, it can also be solved after the cutover, but it would be better to fix it in the same release to avoid unnecessary page reloads.
Removal of
kibanaLegacy.registerLegacyApp
The
kibana_legacy
application service currently also renders the management app and all individual sections. When everything in the legacykibana
plugin is completely migrated, it can be removed and the NPkibana_legacy
platform can take over thekibana
app id to continue to redirect legacy URLs. This is tracked in #61308.Blockers
AppUpdater
to change URL for app in Nav #56027The text was updated successfully, but these errors were encountered: