mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 10:23:14 -04:00
allow apps to push variables from the server to the client
This commit is contained in:
parent
153e1957c1
commit
ea4f0cd474
8 changed files with 36 additions and 15 deletions
|
@ -47,6 +47,12 @@ module.exports = class Plugin {
|
|||
let register = (server, options, next) => {
|
||||
this.server = server;
|
||||
|
||||
// bind the server and options to all
|
||||
// apps created by this plugin
|
||||
for (let app of this.apps) {
|
||||
app.getInjectedVars = _.partial(app.getInjectedVars, server, options);
|
||||
}
|
||||
|
||||
server.log(['plugins', 'debug'], {
|
||||
tmpl: 'Initializing plugin <%= plugin.id %>',
|
||||
plugin: this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue