elasticsearch4idea icon indicating copy to clipboard operation
elasticsearch4idea copied to clipboard

Add a toggle to format script sources in result window

Open tomekred opened this issue 1 year ago • 1 comments

Is your feature request related to a problem?

When displaying the script source using GET /_scripts/<name_of_a_script>, the source of a script is not formatted - it is displayed in one line as escaped string. elastic_escaped

When doing the same in Kibana Dev Console, the response is already formatted, which is very convenient, but outside the IDE. elastic_dev_tools

Describe the solution you'd like

I would like to have a toggle button (or some checkbox in settings) that would allow me to turn on the formatting of a source in a script in similar way as in Kibana Dev Tools.

Additional context

I have a growing list of scripts in elasticsearch instance which needs to be tuned every now and then and also scripted fields that would be much more readable if there would be formatting applied.

tomekred avatar Aug 05 '24 09:08 tomekred

Thanks for the suggestion! I will consider adding this in the future.

AntonShuvaev avatar Feb 12 '25 06:02 AntonShuvaev

Added in 2025.1.0

AntonShuvaev avatar Oct 25 '25 19:10 AntonShuvaev

Thanks for looking into it. How can I toggle formatting on? I can't see any controls and I've got ver 2025.1.1-252

tomekred avatar Nov 26 '25 12:11 tomekred