Skip to content
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

Elasticsearch: Improve query type selection #63402

Merged
merged 5 commits into from
May 5, 2023
Merged

Conversation

gabor
Copy link
Contributor

@gabor gabor commented Feb 17, 2023

( fixes #62216 )

in the elasticsearch query editor, currently, when you want to run a logs-query or a raw-data-query or a raw-document-query, you choose it by finding the right option in the "metric" select-box. this is hard to discover.

this pull request moves the 4 query types (metric, logs, raw-data, raw-doc) to the top of the query editor. and makes sure the logs, raw-data and raw-doc options do not show up in the metric-list anymore.

please note, this is purely a visual change, the underlying ElasticQuery data model does not change.

additional changes:

  • we hide the alias-field when it is not used
  • renamed query to lucene query, and adjusted the text-field placeholder-text

future work: to decide which metric-options to hide we use the already existing isSingleMetric boolean. it already exists, because the reducers needed to know that when one of these (logs, raw-data, raw-doc) is chosen, all existing bucket-aggregations should be removed in the user-interface. i think we should rename it to something more descriptive, perhaps isSpecialMetric (naming ideas very welcome 👍 )... but did not want to make the PR more complex, so will do in a separate PR later.

how to test:

  • use the elastic query builder
  • make sure the 4 new radio-buttons work correctly
  • make sure the metric-list does not contain logs, raw-data and raw-doc
  • make sure, when choosing raw-doc, you get a notification that it is obsolete

@github-actions
Copy link
Contributor

Backend code coverage report for PR #63402
No changes

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2023

Frontend code coverage report for PR #63402

Plugin Main PR Difference
elasticsearch 78.75% 79.11% .36%

@grafanabot
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@grafanabot grafanabot added stale Issue with no recent activity and removed stale Issue with no recent activity labels Mar 25, 2023
@gabor
Copy link
Contributor Author

gabor commented Mar 27, 2023

keep it open please

@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration .github/workflows/pr-codeql-analysis-javascript.yml:analyze. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@gabor gabor force-pushed the gabor/elastic-better-ui branch 2 times, most recently from f1deb97 to 53b9d0a Compare April 27, 2023 12:33
@gabor gabor force-pushed the gabor/elastic-better-ui branch 3 times, most recently from 096e43f to 866ddec Compare May 3, 2023 12:01
@gabor gabor force-pushed the gabor/elastic-better-ui branch from 866ddec to b52b498 Compare May 4, 2023 15:30
@gabor gabor added this to the 10.1.x milestone May 4, 2023
@gabor gabor changed the title Elasticsearch: better mode-selection ui Elasticsearch: Improve query type selection May 4, 2023
@gabor gabor added add to changelog no-backport Skip backport of PR labels May 4, 2023
@gabor gabor marked this pull request as ready for review May 4, 2023 15:39
@gabor gabor requested a review from a team as a code owner May 4, 2023 15:39
@gabor gabor requested review from ivanahuckova and removed request for a team May 4, 2023 15:39
@gabor gabor merged commit af9176b into main May 5, 2023
@gabor gabor deleted the gabor/elastic-better-ui branch May 5, 2023 13:00
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

elasticsearch: query builder: offer logs/raw_data/raw_document/metric directly
4 participants