-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Console] Triple quotes doesn't work for string longer than 2000 chars #136300
Comments
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
The bug seems to have been there for a very long time, I could reproduce it in v7.0.1 |
@yuliacech Did you solve it? |
I also met this question, v7.10.2 |
Hi @zishiguo this is still an open issue. |
The text editor used for console is still based on the Ace text editor, this editor has a hardcoded limit for tokenizing lines and its capped at 2000 characters because otherwise will make the browser too slow. This constraint makes the syntax highlighting fail (will be capped at 2000 characters) and the query delimiters fail too which means that when we select the query with a very long text the "send request" button will be placed on the body of the query instead of the query method and the query body: As a workaround for now, you can click on the query method instead of the body to correctly highlight the full query: We have plans of moving the editor to Monaco at some point which will solve this issue (and many others!) but for now I dont think we will be able to fix this. |
Thanks for the investigation @sabarasaba! |
Kibana version:
Current main branch be61682
Elasticsearch version:
Current es snapshot
Server OS version:
macOS Monterey 12.4
Browser version:
Google Chrome Version 103.0.5060.114 (Official Build) (x86_64)
Browser OS version:
macOS Monterey 12.4
Original install method (e.g. download page, yum, from source, etc.):
source code
Describe the bug:
It's not possible to use triple quotes in a Console request if the string is longer than 2000 characters. The bug only occurs if the string has no new lines.
Steps to reproduce:
NOTE: If you insert a line break by hitting Enter in the middle of the long string, the highlighting works again as expected and the request will complete successfully.
Workaround:
If the triple quotes are replaced with single quotes, the request works even if the string length is extended.
Expected behavior:
The request should work as expected.
Screenshots (if relevant):
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
Any additional context:
The text was updated successfully, but these errors were encountered: