Create data views from within Kibana apps.
You first need to add in your kibana.json the "dataViewEditor
" plugin as a required dependency of your plugin.
You will then receive in the start contract of the dataViewEditor plugin the following API:
Convenience method that uses the core.application.capabilities
api to determine whether the user can create or edit the data view.
Use this method to display the data view editor to create a data view.
onSave: (dataView: DataView) => void
(required)
You must provide an onSave
handler to be notified when a data vuew has been created/updated. This handler is called after the dataview has been persisted as a saved object.
onCancel: () => void;
(optional)
You can optionally pass an onCancel
handler which is called when the index pattern creation flyout is closed wihtout creating an index pattern.
defaultTypeIsRollup: boolean
(optional, default false)
The default index pattern type can be optionally specified as rollup
.
requireTimestampField: boolean
(optional, default false)
The editor can require a timestamp field on the index pattern.
editData: DataView
(optional)
Data View object passed to edit an existing Data View.
This the React component interface equivalent to openEditor
. It takes the same arguments -
<IndexPatternEditorComponent
onSave={...}
onCancel={...}
defaultTypeIsRollup={false}
requireTimestampField={false}
editData={...}
/>