Plugin porting doesn't work - 6.4.4 => 7.0.0

Hi everyone,
I’m getting a strange issue porting an AngularJS plugin from kibana 6.4.4 (it works fine with this release) to kibana 7.0.0; when I try to instantiate my plugin on a Visualize I get immediately the error shown in the picture below (“Error in visualization – column is undefined”). Kibana doesn’t log anything.

Kibana_error

Environment: ELK 7.0.0 runs on a VM Ubuntu 18.04.2 LTS 64bit.

Any help will be appriciated.

Thanks.

Hmm, not exactly sure what's happening here but could you try changing your require statement to an import?

Thanks for your reply, Lukas!

I made some correction in sm_status_light_vis.js and now, strangely, the error turned in "Error: Cannot read property 'aggConfig' of undefined" (showed once the first time after selecting an index, two time if I press the Refresh button):

image

I solved the error just putting

defaults: [
{ type: 'count', schema: 'metric' }

in group: 'metrics'
...but..
I'don't see any drawing on Visual canvas, obviously after populating all necessary field as I did in 6.4.4 environment.

I put some console.log statements in sm_status_light_controller.js (updated on gist) but nothing is displayed in terminal where I've started kibana (yarn start from kibana dir): is it normal ?

Hi,
finally I've understand how to debug with DevTools...
I found the error :

"angular.js:14800 TypeError: Cannot read property '0' of undefined"

on this line:

    // Retrieve the id of the configured tags aggregation
    var statusAggId = $scope.vis.aggs.bySchemaName['status'][0].id;

Is it possible to know how to fix it ?

Thanks.

Hi All,
the error shown above occur only the first time, when metric is properly configured but no bucket is define and I think it's quiet normal...

If i configure a single bucket, debugging the source code i found that the following line:

var buckets = resp.aggregations[statusAggId].buckets;

shows that no key called aggregations is defined for resp object:

maybe something is changed passing from 6.4.4 to 7.0.0... but I can't figure out where the buckets object is now located under resp object.

Please, any help will be appriciated.

Thanks.

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