Hi,
I have a working Kibana plugin used in 6.7.1 and need to update this plugin or find another mechanism to provide the same functionality as we migrate to 7.x. I have reviewed the legacy plugin migration documentation, and I have also looked at the example plugins in 7.12. I'm stuck and not quite sure where to start in the new framework for Kibana ,or if what I am currently doing is even possible in the new framework right now (maybe in the future).
Some background...
My React application renders Kibana dashboards by leveraging the iframe element, which contains the Kibana URL in a ref attribute. The URL query string contains a date range and other query parameters (global and app data); including embed: true. The URL path is configured to use the dashboard's ID as in .../app/kibana#/dashboard/{id}?...
It is the plugin's responsibility to intercept any date range change caused by the user drilling down on a graph panel and changing the from and to values in the date range. That event is capture as a "route update" by the plugin and published as a custom message that can be received by the parent window (my React application).
const uiModules = require("ui/modules");
uiModules.get('app/dashboard', ['kibana/courier', 'ngRoute']).run(function ($rootScope, Private, $location) {
$rootScope.$on('$routeUpdate', () => {
if(parent) {
parent.postMessage("kibanaUpdateEvent##" + $location.url(), "*")
}
});
});
My application is only interested in the date range that is parsed from the updated location URL sent as an event from the plugin via this mechanism. The legacy "ui/modules" is not listed directly as a Kibana Platform service. Any help would be appreciated.
Thanks,
James