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.
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.
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?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.