Kibana Dashboard gets stuck

Hello,

I am trying to build dynamic dashboards of Kibana through my own web application. I have succeeded to create new visualizations dynamically with user-defined params using the Kibana API Plugin by Webiks.

The problem I am hitting is after I create these visualizations, and try to save it through the REST call to Kibana saved objects, the browser tab gets stuck and become completely unresponsive. This problem occurs only after trying to save the second visualization. The first visualization gets saved to the Dashboard easily.
As the browser gets stuck there, I am not being able to see any logs in the console as well.

Kibana API Endpoint:

POST localhost:5601/api/saved_objects/dashboard/${dashboard.id}?overwrite=true

and in this call, I send the dashboard attributes object.

Kibana Version: 6.1.2

Any help would be much appreciated.

Strange, I'm seeing the same thing locally in master too. I tried to add all the various headers to the request that Kibana uses, but no luck, the request never completes. Seems like a bug though, the server should respond with something. I encourage you to open an issue about it on the Kibana issue tracker.

EDIT: Actually, I think it was a problem in the software I was using... it works when I just use curl. I get an error saying I need to add the kbn-xsrf header, and when I do that, it works.

Maybe there's a bug in that kibana-API library you're using?

I am already providing kbn-xsrf header

But its working for the first time (as I have stated).

Okay, I figured it out.
The problem was with the object visualization object. I was sending the following object in the body of the REST call, previously:
{ id: "abc", type: 'visualization' }
oblivious to the fact that grid data is also a somewhat necessary object to save visualization within the dashboard.
I have now updated the object as follows and it's working perfectly fine now.

{       
 col: 1,
 row: 1,
 id: "abc",
 panelIndex: 1,
 size_x: 6,
 size_y: 4,
 type: "visualization"
}

Hope, it may help others too. Thanks.

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