-
Notifications
You must be signed in to change notification settings - Fork 890
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
[Data Explorer] Adding PPL to query language selector #5623
[Data Explorer] Adding PPL to query language selector #5623
Conversation
0cf4507
to
fb3fcb8
Compare
fb3fcb8
to
65db3a9
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5623 +/- ##
==========================================
- Coverage 67.02% 67.01% -0.02%
==========================================
Files 3294 3294
Lines 63309 63328 +19
Branches 10071 10076 +5
==========================================
+ Hits 42435 42440 +5
- Misses 18430 18442 +12
- Partials 2444 2446 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this a lot simpler? Like all we want is a simple if condition where the existing pop over is placed to be replaced with a new popp er with the new options if the current app is data explorer and observability APIs are available. Feel like the whole change should be contained in just a single file that we can remove when this hard coded logic isn't needed.
Also add a to-do with an issue that call out that this is a temporary solution and needs to be removed ASAP and add the issue URL to the code comment
src/plugins/data/public/ui/query_string_input/language_switcher.tsx
Outdated
Show resolved
Hide resolved
src/plugins/data/public/ui/query_string_input/language_switcher.tsx
Outdated
Show resolved
Hide resolved
Created a follow-up issue for this: #5628 |
d42e7a1
to
aaa775e
Compare
const { application } = opensearchDashboards.services; | ||
const currentApp$ = application?.currentAppId$; | ||
let useNewQuerySelector; | ||
application?.applications$.subscribe((applications) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This subscribe should be wrapped inside a useEffect I suppose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
}); | ||
}); | ||
|
||
const dataExplorerOptions = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add an enum for these language options like
enum ENUM_LANGUAGES { DQL = "DQL" }
? And I suggest adding an id field inside options though under context of language, label no need to wrapped by i18n.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will still need i18n since its purpose is to individually identify the language name. e.g. data.query.queryBar.dqlLanguageName
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
80ede38
to
5bf8243
Compare
Signed-off-by: abbyhu2000 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 2 minor changes, the rest of the code looks good to me :)
Taking off the 2.12 tag since the team decided to leave this out of 2.12 release. |
Only adds the quick startup for OpenSearch cluster with a SQL plugin and observability with: ``` yarn opensearch snapshot --sql ``` Also, adds SQL to the language selector stolen shamelessly from opensearch-project#5623 Next steps to intercept and send to SQL API or just transform basic syntax to DSL Signed-off-by: Kawika Avilla <[email protected]>
Only adds the quick startup for OpenSearch cluster with a SQL plugin and observability with: ``` yarn opensearch snapshot --sql ``` Also, adds SQL to the language selector stolen shamelessly from opensearch-project#5623 Next steps to intercept and send to SQL API or just transform basic syntax to DSL Signed-off-by: Kawika Avilla <[email protected]>
Close this PR since we want to build a more unified experience for query language. |
Only adds the quick startup for OpenSearch cluster with a SQL plugin and observability with: ``` yarn opensearch snapshot --sql ``` Also, adds SQL to the language selector stolen shamelessly from opensearch-project#5623 Next steps to intercept and send to SQL API or just transform basic syntax to DSL Signed-off-by: Kawika Avilla <[email protected]>
Only adds the quick startup for OpenSearch cluster with a SQL plugin and observability with: ``` yarn opensearch snapshot --sql ``` Also, adds SQL to the language selector stolen shamelessly from opensearch-project#5623 Next steps to intercept and send to SQL API or just transform basic syntax to DSL Signed-off-by: Kawika Avilla <[email protected]>
Only adds the quick startup for OpenSearch cluster with a SQL plugin and observability with: ``` yarn opensearch snapshot --sql ``` Also, adds SQL to the language selector stolen shamelessly from opensearch-project#5623 Next steps to intercept and send to SQL API or just transform basic syntax to DSL Signed-off-by: Kawika Avilla <[email protected]>
Only adds the quick startup for OpenSearch cluster with a SQL plugin and observability with: ``` yarn opensearch snapshot --sql ``` Also, adds SQL to the language selector stolen shamelessly from opensearch-project#5623 Next steps to intercept and send to SQL API or just transform basic syntax to DSL Signed-off-by: Kawika Avilla <[email protected]> Working query enhance Signed-off-by: Kawika Avilla <[email protected]> Reget search enhance Signed-off-by: Kawika Avilla <[email protected]> data frames Signed-off-by: Kawika Avilla <[email protected]> temp state need to pass df Signed-off-by: Kawika Avilla <[email protected]> sending data frame Signed-off-by: Kawika Avilla <[email protected]> gets df type Signed-off-by: Kawika Avilla <[email protected]> add some small ui things Signed-off-by: Kawika Avilla <[email protected]> move back query language switcher Signed-off-by: Kawika Avilla <[email protected]> updating side panel Signed-off-by: Kawika Avilla <[email protected]> add ui config on query enhancement Signed-off-by: Kawika Avilla <[email protected]> support query string input Signed-off-by: Kawika Avilla <[email protected]> update to say search bar Signed-off-by: Kawika Avilla <[email protected]> update ppl to call once Signed-off-by: Kawika Avilla <[email protected]> update when fields update Signed-off-by: Kawika Avilla <[email protected]> add unknown Signed-off-by: Kawika Avilla <[email protected]>
Only adds the quick startup for OpenSearch cluster with a SQL plugin and observability with: ``` yarn opensearch snapshot --sql ``` Also, adds SQL to the language selector stolen shamelessly from opensearch-project#5623 Next steps to intercept and send to SQL API or just transform basic syntax to DSL Signed-off-by: Kawika Avilla <[email protected]> Working query enhance Signed-off-by: Kawika Avilla <[email protected]> Reget search enhance Signed-off-by: Kawika Avilla <[email protected]> data frames Signed-off-by: Kawika Avilla <[email protected]> temp state need to pass df Signed-off-by: Kawika Avilla <[email protected]> sending data frame Signed-off-by: Kawika Avilla <[email protected]> gets df type Signed-off-by: Kawika Avilla <[email protected]> add some small ui things Signed-off-by: Kawika Avilla <[email protected]> move back query language switcher Signed-off-by: Kawika Avilla <[email protected]> updating side panel Signed-off-by: Kawika Avilla <[email protected]> add ui config on query enhancement Signed-off-by: Kawika Avilla <[email protected]> support query string input Signed-off-by: Kawika Avilla <[email protected]> update to say search bar Signed-off-by: Kawika Avilla <[email protected]> update ppl to call once Signed-off-by: Kawika Avilla <[email protected]> update when fields update Signed-off-by: Kawika Avilla <[email protected]> add unknown Signed-off-by: Kawika Avilla <[email protected]>
* [MQL] support different query languages Only adds the quick startup for OpenSearch cluster with a SQL plugin and observability with: ``` yarn opensearch snapshot --sql ``` Also, adds SQL to the language selector stolen shamelessly from #5623 Next steps to intercept and send to SQL API or just transform basic syntax to DSL Signed-off-by: Kawika Avilla <[email protected]> Working query enhance Signed-off-by: Kawika Avilla <[email protected]> Reget search enhance Signed-off-by: Kawika Avilla <[email protected]> data frames Signed-off-by: Kawika Avilla <[email protected]> temp state need to pass df Signed-off-by: Kawika Avilla <[email protected]> sending data frame Signed-off-by: Kawika Avilla <[email protected]> gets df type Signed-off-by: Kawika Avilla <[email protected]> add some small ui things Signed-off-by: Kawika Avilla <[email protected]> move back query language switcher Signed-off-by: Kawika Avilla <[email protected]> updating side panel Signed-off-by: Kawika Avilla <[email protected]> add ui config on query enhancement Signed-off-by: Kawika Avilla <[email protected]> support query string input Signed-off-by: Kawika Avilla <[email protected]> update to say search bar Signed-off-by: Kawika Avilla <[email protected]> update ppl to call once Signed-off-by: Kawika Avilla <[email protected]> update when fields update Signed-off-by: Kawika Avilla <[email protected]> add unknown Signed-off-by: Kawika Avilla <[email protected]> * clean up Signed-off-by: Kawika Avilla <[email protected]> * more clean up Signed-off-by: Kawika Avilla <[email protected]> * clean up licenses Signed-off-by: Kawika Avilla <[email protected]> --------- Signed-off-by: Kawika Avilla <[email protected]>
* [MQL] support different query languages Only adds the quick startup for OpenSearch cluster with a SQL plugin and observability with: ``` yarn opensearch snapshot --sql ``` Also, adds SQL to the language selector stolen shamelessly from opensearch-project#5623 Next steps to intercept and send to SQL API or just transform basic syntax to DSL Signed-off-by: Kawika Avilla <[email protected]> Working query enhance Signed-off-by: Kawika Avilla <[email protected]> Reget search enhance Signed-off-by: Kawika Avilla <[email protected]> data frames Signed-off-by: Kawika Avilla <[email protected]> temp state need to pass df Signed-off-by: Kawika Avilla <[email protected]> sending data frame Signed-off-by: Kawika Avilla <[email protected]> gets df type Signed-off-by: Kawika Avilla <[email protected]> add some small ui things Signed-off-by: Kawika Avilla <[email protected]> move back query language switcher Signed-off-by: Kawika Avilla <[email protected]> updating side panel Signed-off-by: Kawika Avilla <[email protected]> add ui config on query enhancement Signed-off-by: Kawika Avilla <[email protected]> support query string input Signed-off-by: Kawika Avilla <[email protected]> update to say search bar Signed-off-by: Kawika Avilla <[email protected]> update ppl to call once Signed-off-by: Kawika Avilla <[email protected]> update when fields update Signed-off-by: Kawika Avilla <[email protected]> add unknown Signed-off-by: Kawika Avilla <[email protected]> * clean up Signed-off-by: Kawika Avilla <[email protected]> * more clean up Signed-off-by: Kawika Avilla <[email protected]> * clean up licenses Signed-off-by: Kawika Avilla <[email protected]> --------- Signed-off-by: Kawika Avilla <[email protected]> Cleanup unused helper function Signed-off-by: Kawika Avilla <[email protected]> create index pattern somewhat working Signed-off-by: Kawika Avilla <[email protected]>
Description
A quick solution for adding navigation from data explorer page to log explorer page by adding the option of choosing PPL in the query language selector in the top nav bar.
Issues Resolved
resolves part of #5504
Screenshot
Testing the changes
Check List
yarn test:jest
yarn test:jest_integration