This repository has been archived by the owner on Jan 10, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,18 @@ | ||
export default function (kibana) { | ||
|
||
return new kibana.Plugin({ | ||
require: ['kibana'], | ||
uiExports: { | ||
app: { | ||
title: 'Test Visualize', | ||
description: 'This is a sample plugin to test using existing kibana visualizations', | ||
main: 'plugins/kibana_sample_plugin/test_vis_app', | ||
uses: [ // these are needed if you need to show exiting kibana visualizations | ||
'visTypes', | ||
'visResponseHandlers', | ||
'visRequestHandlers', | ||
'visEditorTypes', | ||
'savedObjectTypes', | ||
'spyModes', | ||
'fieldFormats', | ||
], | ||
injectVars: (server) => { | ||
return server.plugins.kibana.injectVars(server); | ||
} | ||
} | ||
}, | ||
init(server) { | ||
server.injectUiAppVars('kibana_sample_plugin', async () => { | ||
return await server.getInjectedUiAppVars('kibana'); | ||
}); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
require('ui/autoload/all'); | ||
require('ui/routes').enable(); | ||
require('ui/chrome'); | ||
|
||
// import the uiExports that we want to "use" | ||
import 'uiExports/visTypes'; | ||
import 'uiExports/visResponseHandlers'; | ||
import 'uiExports/visRequestHandlers'; | ||
import 'uiExports/visEditorTypes'; | ||
import 'uiExports/savedObjectTypes'; | ||
import 'uiExports/spyModes'; | ||
import 'uiExports/fieldFormats'; | ||
|
||
import './test_vis_app.less'; | ||
import './test_vis_app_controller.js'; | ||
|
||
const app = require('ui/modules').get('apps/kibana_sample_plugin', []); | ||
import chrome from 'ui/chrome'; | ||
|
||
import uiRoutes from 'ui/routes'; | ||
import template from './test_vis_app.html'; | ||
|
||
const app = require('ui/modules').get('apps/kibana_sample_plugin', ['kibana']); | ||
|
||
chrome.setRootTemplate(template); | ||
|
||
require('ui/routes').when('/', { | ||
template: require('./test_vis_app.html'), | ||
reloadOnSearch: false, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters