-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kibana app migration: Shim dashboard #48913
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM 👍 , tested locally comparing side by side the non-shimmed version, and since I merged it into my Discover PR, this was also tested this way. Just one note, the icon directive seems to be missing
Just add .directive('icon', reactDirective => reactDirective(EuiIcon))
to your inner angular directive to make it work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of @elastic/kibana-app-arch services, LGTM
I will follow up with a PR deprecating filter-bar
directives.
Good catch @kertal ! |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you shouldn't be exporting any legacy angular stuff from np_ready plugins. we plan to remove that soon, and if you depend on any of those items (as you plan to keep angular past 8.0) you should copy the relevant code inside your plugin.
@ppisljar PR #50661 will create a So instead of copying those code snippets into each separate plugin, we plan to just move them into this plugin. I just didn't do this as part of this PR because it is touching enough places already. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
Jenkins, test this. |
💚 Build Succeeded |
🎉 !!!! |
Shims dashboard app and uses local angular instance instead of references to global angular to be able to move this to the new platform without getting rid of angular first.
There are quite some changes outside of the dashboard app itself in here, so I'll try to put together a guide for how to review this:
uiModules
which we can't use in our local angular. This PR exports the raw direcrtive definitions so they can get registered in a local angular module as well.requireDefaultIndex
magic flag on the route got removed because this requires uiRoutes we won't carry over (not used in many places anyway). The replacement is a function that has to be called in the onlyresolve
of a route, if the returned promise resolves the actual data can be fetched. That slightly changes the code structure in discover because it was fetching the index pattern and the saved search in two separateresolve
props.requireDefaultIndex
helper function.ui/capabilities/route_setup
(KibanaApp/AppArch?): Got moved tosrc/legacy/ui/public/legacy_compat/angular_config.tsx
because it's currently also using theaddSetupWork
hook.legacy_compat
angular stuff (Platform?):configureAppAngularModule
was using NP dependencies directly, to be able to use the same function also in the new platform this was changed to take them via parameter - also be adjusted in legacy chromesrc/legacy/ui/public/chrome/api/angular.js
src/legacy/ui/public/timefilter/setup_router.ts
(AppArch?): Expose the logic to wire the global state instance with the NP data plugintimefilter
state so it's usable in the local (and make sure it's also unsubscribing correctly)navigation
dep through to the angular directive creation.Dev docs
The route flag
requireDefaultIndex
making sure there are index patterns and thedefaultIndex
advanced setting is set was removed.The same functionality can be achieved by using the helper function
ensureDefaultIndexPattern
fromui/legacy_compat
within theresolve
object of a route.