-
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
Adding "plugins" : proposed pull request #344
Comments
See description of changes here: (Ignore the '[dj]' plugin, this should be an empty list) |
Given that this doesn't modify any existing behavior, I think its probably a good idea. Might also make sense to change 'modules' to 'panels' in the config and document the different. What sort of new routes are you thinking of adding? |
Thanks for the reply, Rashid. The markdown in the original ticket got munged; the comment I added afterward links to a commit that makes the change clearer. In my fork, if Kibana gets a route of #/dj/(id) rather than #/dashboard/(type)/(id), then my controller constructs a dashboard model using a particular JSON format. I added some documentation to my fork’s README: The module implementation is here, still a work in progress: --Andy From: Rashid Khan [mailto:notifications@github.com] Given that this doesn't modify any existing behavior, I think its probably a good idea. Might also make sense to change 'modules' to 'panels' in the config and document the different. What sort of new routes are you thinking of adding? — |
Closing this, we're heading down a different path for being able to inject other applications besides the dashboard. |
Moved config protos to package; added UX protos
I have extended Kibana with a simple "plugin" mechanism modeled after the existing panel mechanism. The purpose is to support injecting new modules in a way that only has to touch config.js, rather than having to modify app.js . Since the intent is to support arbitrary modules, "panels" did not seem appropriate, but usage is the same.
As part of this, in order to allow plugins to register to handle routes without dashboard loading, I am also proposing to replace the "$routeChangeSuccess" listener in the services.js/dashboard with a proper controller.
The changes preserve all existing behavior, including the loading of the default dashboard if a nonsense fragment is entered. The difference is that I can also now add my own module that registers new routes with the $routeProvider, and I won't always get the dash loading behavior (since this is implemented in a "global" event listener).
The essential changes are below, but if you are favorable I'll submit a pull request so you can see the complete changes.
services.js: remove
$rootScope.$on('$routeChangeSuccess',function(){
// Clear the current dashboard to prevent reloading
self.current = {};
self.indices = [];
route();
});
controllers.js: add
_.each(config.plugins, function(v) {
labjs = labjs.script('plugins/'+v+'/module.js');
modules.push('kibana.'+v);
});
...
.controller('DashRouteCtrl', function (dashboard) {
// Invoked whenever the route changes in order to load the correct dashboard
dashboard.current = {};
dashboard.indices = [];
dashboard.route();
})
app.js: change
The text was updated successfully, but these errors were encountered: