-
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
Plugin observations #6313
Comments
Adding visualizations that don't use the agg builder, but do fetch data
There are at least 4 things visualizations need to listen for when they are created outside the agg builder model. There are then some places that it is unclear if its even possible to hook into, such as the refresh button on the visualization page. I'd like to see the above code replaced with 2 events:
|
This block is required for most (all?) app plugins. The requirement for this leaks our internal implementation into plugins. We should just handle this. I'm actually not sure why the |
Modify UIExports (adding new items, removing new items) requires a full restart of the dev server. The autorestarts don't seem to handle it. To aid development, they should not require a full restart. |
I use injectVars to get the config values from the node server into the UI. It would actually be nice for a plugin that isn't an app to add injectVars to the app it is modifying. Or, for a way to mark config values to be available in the UI. |
There seems to be a number of things unsupported for visualizations that do their own search. I think the first order of business should be to declare that we support vis plugins that do their own search. From my recent experience developing this vis plugin: Visualization Refresh TLDR - you can't really do your own search without a bunch of tricks.
My vis:
My vis controller:
Index Pattern Selection TLDR - you can't really select an index pattern from the params controller without a couple tricks. Currently your visualization can declare that it
My visualization does it's own search, but requires an index pattern selection, so I considered submitting a PR against master to allow this, but after discussing with @spalger , realized that it would be easier to implement my own index selection using the existing indexPattern service. Additionally, should I have wanted to use the index pattern selection, I faced an additional problem - While I do require an index pattern, a saved search selection wouldn't make sense. Proceeding to use the indexPattern service to select from existing patterns, I hit another snag. When a new pattern is selected by my params controller, I need to somehow indicate to Kibana that the selected pattern is now the pattern in context. The selectionService itself does not appear to provide that feature, but luckily, the params controller gave me access to the
This method was very effective, and is bound to the UI / search bar as well. When I would switch from a time-based pattern to a non-time based pattern, the time search controls would come and go as expected. As a final note to this problem, I also had to set the indexPattern in |
Closing, no longer relevant with new platform |
Creating this as a meta/discussion ticket about the plugin system. Leave comments below with your observations of creating plugins.
One of our goals is to create a very simple plugin layer with a minimal number of gotchas and code fluff. Eg, if 90% of apps need
block-of-code-X
that code should simply be included in the underlying plugin system, with an option to turn off the feature if needed.For example, we expect 90% of applications to use our base style sheets, there should be no need to require them. In the case that advanced users do not wish to have those things auto loaded they can turn them off, but we should be optimizing for the usual case.
The text was updated successfully, but these errors were encountered: