Kibana 7.8: modifying the dashboard_grid.js file for our customization is not reflecting in dashboard_plugin.js file

Hi,

I have custom modified the dashboard_grid.js file for for 7.0, 7.6 and prev versions, and it used to get reflected in kibana.plugin.js/dashboard.plugin.js file, after removing the optimize directory completely and rebooting the kibana server.

But in kibana 7.8 same approach is not working, do we have to do anything extra to get the modified js file changes to be seen in browser.

path for the file i am trying to modify
src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.js
and its not getting reflected in any bundle plugins, even after deleting the optimize directory and rebooting kibana server.

Thanks

Kibana is actively refactoring internals with the Kibana platform Introducing a new architecture for Kibana | Elastic Blog which doesn't rely on the optimizer. Even more: we are about to remove optimizer from the built version of Kibana.
I'd suggest creating your custom plugin instead of tweaking Kibana internals since it's an error-prone approach without any compatibility guarantees.
If you still need to tweak Kibana internal code, you should build Kibana from sources with yarn build.

Hi,

Thanks for responding, is there any otherway other than yarn build for Kibana 7.8? like modifying the bundle file dashboard_plugin.js itself ? or something else? I removed the dashboard_plugin.js file itself from the location, but in the browser I can see it got loaded, though not found in kibana server end.

Do you mean to modify the built version of the file? It could work. Although, you need to make sure your browser doesn't use the old cached version. Starting from v7.8 Kibana serves plugin bundles with cache-control: max-ager=31536000 header.

Why you want to customize the dashboard plugin? Do you need to adjust CSS or JS functionality?

Modifying the built-in version of file works..I am trying to customise the querybar and the edit controls as per the privilages of the user.

Thanks for the help

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