AppPlugin: add an init function (#17150)

This commit is contained in:
Ryan McKinley
2019-05-20 13:05:23 -07:00
committed by GitHub
parent 458bb3b0e3
commit 7e3ac4ebde
3 changed files with 77 additions and 1 deletions

View File

@@ -26,6 +26,13 @@ export class AppPlugin extends GrafanaPlugin<AppPluginMeta> {
// Old style pages
angularPages?: { [component: string]: any };
/**
* Called after the module has loaded, and before the app is used.
* This function may be called multiple times on the same instance.
* The first time, `this.meta` will be undefined
*/
init(meta: AppPluginMeta) {}
/**
* Set the component displayed under:
* /a/${plugin-id}/*