Public keyword in controller

Hello,

I am trying to develop a simple visualization plugin for Kibana 6.6 but I encounter an issue when coding the controller.

I would like to access the data like this inside my controller:

$scope.esResponse.tables[0]

but apparently, the data is not in a tabify form (I read it was supposed to be by default, but apparently not) so the 'table' key is undefined.

To do this I should execute:
const tabifyAggResponse = Private(AggResponseTabifyProvider);

which requires the 'Private' keyword to be defined but for some reason I cannot add it like this like it is written in other modules found on the internet:
app.controller('CustomExportApp', function ($scope, Private) {
The error message is the following:
TypeError: Expected private module "undefined" to be a function

for the moment this line is like this and it works (But I need to define the Private keyword somehow):
app.controller('CustomExportApp', function ($scope) {

The full code can be found here:

What is wrong ?

@mikecote another question on tabify.

Thanks,
Bhavya

@timroes do you have some insight as to what may be happening?

Hi,

tabify has been stripped out of angular, so you would not need to pass that through Private anymore, but import the function from ui/tabify/tabify directly (you can check that file).

Nevertheless in 6.6 the incoming format should always be tabify, if you're using the default request handler (which you seem to use). You can also check this blog post for some information on the changes (that were mostly made in 6.5).

Cheers,
Tim

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.