[Console] Add ESQL autocomplete support#219980
Conversation
|
/ci |
|
Pinging @elastic/kibana-management (Team:Kibana Management) |
drewdaemon
left a comment
There was a problem hiding this comment.
This is a fabulous!
I suggest we look at using Monaco's existing language boundaries feature instead of trying to do it ourselves. More info in the other comments.
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
History
cc @ElenaStoeva |
sabarasaba
left a comment
There was a problem hiding this comment.
Nice work @ElenaStoeva! tested locally and kibana management changes lgtm 🚀
Dosant
left a comment
There was a problem hiding this comment.
sharedux code changes lgtm
|
Starting backport for target branches: 8.19 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Starting backport for target branches: 8.19 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
Closes elastic#208450 ## Summary This PR adds ESQL autocomplete support to Console. The ESQL suggestions are only displayed inside triple-quotes queries (`"query": """...`). **How to test:** 1. Open Kibana and load some data (e.g. the sample data sets). 2. Navigate to Dev Tools -> Console and type in the following query: ``` POST _query { "query": """ """ } ``` 3. Verify that ESQL suggestions are displayed inside the triple quotes and work as in the ESQL editor in Discover. Example ESQL query: `FROM kibana_sample_data_ecommerce | WHERE order_date >= ?_tstart AND order_date <= ?_tend | LIMIT 10` 4. Verify that no ESQL suggestions are displayed outside triple-quotes queries 5. Verify that no Console suggestions are displayed inside triple-quotes queries 6. Verify that the functionality also works in embeddable Console. https://github.com/user-attachments/assets/63f1b82d-50a2-4af4-b5ad-812eab9a55a5 ## Release notes These changes add autocompletion for ESQL query requests in Console. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co> Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com> (cherry picked from commit fe80f76) # Conflicts: # src/platform/packages/shared/kbn-monaco/src/languages/console/language.ts # src/platform/packages/shared/kbn-monaco/src/languages/index.ts # src/platform/packages/shared/kbn-monaco/src/xjson/index.ts # src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.ts # src/platform/plugins/shared/console/public/application/containers/editor/utils/index.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
# Backport This will backport the following commits from `main` to `8.19`: - [[Console] Add ESQL autocomplete support (#219980)](#219980) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"59341489+ElenaStoeva@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-18T09:25:20Z","message":"[Console] Add ESQL autocomplete support (#219980)\n\nCloses https://github.com/elastic/kibana/issues/208450\n\n## Summary\n\nThis PR adds ESQL autocomplete support to Console. The ESQL suggestions\nare only displayed inside triple-quotes queries (`\"query\": \"\"\"...`).\n\n**How to test:**\n1. Open Kibana and load some data (e.g. the sample data sets).\n2. Navigate to Dev Tools -> Console and type in the following query:\n```\nPOST _query\n{\n \"query\": \"\"\" \"\"\"\n}\n```\n3. Verify that ESQL suggestions are displayed inside the triple quotes\nand work as in the ESQL editor in Discover. Example ESQL query:\n`FROM kibana_sample_data_ecommerce | WHERE order_date >= ?_tstart AND\norder_date <= ?_tend | LIMIT 10`\n\n4. Verify that no ESQL suggestions are displayed outside triple-quotes\nqueries\n5. Verify that no Console suggestions are displayed inside triple-quotes\nqueries\n6. Verify that the functionality also works in embeddable Console.\n\n\n\nhttps://github.com/user-attachments/assets/63f1b82d-50a2-4af4-b5ad-812eab9a55a5\n\n\n\n## Release notes\nThese changes add autocompletion for ESQL query requests in Console.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>\nCo-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>","sha":"fe80f762f071681f981a62a1c47def45644be3d8","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana Management","release_note:feature","backport:version","v9.1.0","v8.19.0"],"title":"[Console] Add ESQL autocomplete support","number":219980,"url":"https://github.com/elastic/kibana/pull/219980","mergeCommit":{"message":"[Console] Add ESQL autocomplete support (#219980)\n\nCloses https://github.com/elastic/kibana/issues/208450\n\n## Summary\n\nThis PR adds ESQL autocomplete support to Console. The ESQL suggestions\nare only displayed inside triple-quotes queries (`\"query\": \"\"\"...`).\n\n**How to test:**\n1. Open Kibana and load some data (e.g. the sample data sets).\n2. Navigate to Dev Tools -> Console and type in the following query:\n```\nPOST _query\n{\n \"query\": \"\"\" \"\"\"\n}\n```\n3. Verify that ESQL suggestions are displayed inside the triple quotes\nand work as in the ESQL editor in Discover. Example ESQL query:\n`FROM kibana_sample_data_ecommerce | WHERE order_date >= ?_tstart AND\norder_date <= ?_tend | LIMIT 10`\n\n4. Verify that no ESQL suggestions are displayed outside triple-quotes\nqueries\n5. Verify that no Console suggestions are displayed inside triple-quotes\nqueries\n6. Verify that the functionality also works in embeddable Console.\n\n\n\nhttps://github.com/user-attachments/assets/63f1b82d-50a2-4af4-b5ad-812eab9a55a5\n\n\n\n## Release notes\nThese changes add autocompletion for ESQL query requests in Console.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>\nCo-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>","sha":"fe80f762f071681f981a62a1c47def45644be3d8"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/219980","number":219980,"mergeCommit":{"message":"[Console] Add ESQL autocomplete support (#219980)\n\nCloses https://github.com/elastic/kibana/issues/208450\n\n## Summary\n\nThis PR adds ESQL autocomplete support to Console. The ESQL suggestions\nare only displayed inside triple-quotes queries (`\"query\": \"\"\"...`).\n\n**How to test:**\n1. Open Kibana and load some data (e.g. the sample data sets).\n2. Navigate to Dev Tools -> Console and type in the following query:\n```\nPOST _query\n{\n \"query\": \"\"\" \"\"\"\n}\n```\n3. Verify that ESQL suggestions are displayed inside the triple quotes\nand work as in the ESQL editor in Discover. Example ESQL query:\n`FROM kibana_sample_data_ecommerce | WHERE order_date >= ?_tstart AND\norder_date <= ?_tend | LIMIT 10`\n\n4. Verify that no ESQL suggestions are displayed outside triple-quotes\nqueries\n5. Verify that no Console suggestions are displayed inside triple-quotes\nqueries\n6. Verify that the functionality also works in embeddable Console.\n\n\n\nhttps://github.com/user-attachments/assets/63f1b82d-50a2-4af4-b5ad-812eab9a55a5\n\n\n\n## Release notes\nThese changes add autocompletion for ESQL query requests in Console.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>\nCo-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>","sha":"fe80f762f071681f981a62a1c47def45644be3d8"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes #208450
Summary
This PR adds ESQL autocomplete support to Console. The ESQL suggestions are only displayed inside triple-quotes queries (
"query": """...).How to test:
Verify that ESQL suggestions are displayed inside the triple quotes and work as in the ESQL editor in Discover. Example ESQL query:
FROM kibana_sample_data_ecommerce | WHERE order_date >= ?_tstart AND order_date <= ?_tend | LIMIT 10Verify that no ESQL suggestions are displayed outside triple-quotes queries
Verify that no Console suggestions are displayed inside triple-quotes queries
Verify that the functionality also works in embeddable Console.
Screen.Recording.2025-06-13.at.17.49.18.mov
Release notes
These changes add autocompletion for ESQL query requests in Console.