Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.69 KB

README.md

File metadata and controls

52 lines (33 loc) · 1.69 KB

kibana-API

Kibana-API is an extension to Kibana that lets you tap in to the dashboard management board from your app and change the visualizations dynamically.

Demo

alt text

postMessage

The plugin uses Window.postMessage() method (https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage), to connect between the applicaion and the kibana iframe

var iframe = document.getElementById('Iframe');

in javascript use:
var iWindow=iframe.contentWindow

in typescript use:
var iWindow = (<HTMLIFrameElement>iframe).contentWindow;

iWindow.postMessage({}, '*');

Events

setVisualization

(https://github.com/Webiks/kibana-API/wiki)

In order to create a visualization you need to call the plugin with the visualization state. Kibana-API is able to recieve all the visualization's properties (isFullState = true) - fullState. In case you do not wish to define all the visualization's properties (isFullState = false), you can pass some and Kibana-API will automatically fill-in the rest. partial visState

Add visualization

Replace visualization

Install

Kibana 5.4

./bin/kibana-plugin install https://github.com/Webiks/kibana-API/releases/download/5.4/kibana_api_5.4.zip

Development

Build plugin

  • clone git repo in kibana_home/plugins
  • cd kibana_home/plugins/kibana-API
  • npm install

Run unit test

npm test