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

Prometheus: More consistently allows for multi-line queries in editor #18362

Merged
merged 2 commits into from
Aug 14, 2019

Conversation

kaydelaney
Copy link
Contributor

What this PR does / why we need it:
Allows a user to hit shift+enter to create a new line in the query field, even
when the autocomplete suggestions are displayed.

Which issue(s) this PR fixes:
Closes #18341

@kaydelaney kaydelaney requested review from torkelo and davkal August 6, 2019 12:58
Copy link
Contributor

@davkal davkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well! But needs a rebase, sorry for the delay!

Allows a user to hit shift+enter to create a new line in the query field, even
when the autocomplete suggestions are displayed.
Also fixes an issue where a new line was inserted when selecting a suggestion
Closes #18341
Copy link
Contributor

@davkal davkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running queries with Return should work, in this branch it currently does a new line (same as Shift+Return).

Also adds test to verify this behavior
@kaydelaney kaydelaney requested a review from davkal August 12, 2019 15:19
@davkal
Copy link
Contributor

davkal commented Aug 14, 2019

Looks good to merge now.

@kaydelaney kaydelaney merged commit d66601a into master Aug 14, 2019
@kaydelaney kaydelaney deleted the issue-18341 branch August 14, 2019 12:37
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 14, 2019
* grafana/master:
  CI: Fail build if yarn.lock is not up to date (grafana#18555)
  Chore: Updates react-dependant packages to address react warnings (grafana#18549)
  Prometheus: Fix regression of rerunning query on legend/interval change (grafana#18147)
  Explore/Prometheus: More consistently allows for multi-line queries (grafana#18362)
  Login: Fixes undefined redirect (grafana#18545)
@davkal davkal added this to the 6.3.3 milestone Aug 15, 2019
@marefr marefr changed the title Explore/Prometheus: More consistently allows for multi-line queries Prometheus: More consistently allows for multi-line queries in editor Aug 15, 2019
marefr pushed a commit that referenced this pull request Aug 15, 2019
…18362)

* Explore/Prometheus: More consistently allows for multi-line queries
Allows a user to hit shift+enter to create a new line in the query field, even
when the autocomplete suggestions are displayed.
Also fixes an issue where a new line was inserted when selecting a suggestion
Closes #18341

* Fixes behavior where query wasn't running on pressing Enter
Also adds test to verify this behavior

(cherry picked from commit d66601a)
marefr pushed a commit that referenced this pull request Aug 15, 2019
…18362)

* Explore/Prometheus: More consistently allows for multi-line queries
Allows a user to hit shift+enter to create a new line in the query field, even
when the autocomplete suggestions are displayed.
Also fixes an issue where a new line was inserted when selecting a suggestion
Closes #18341

* Fixes behavior where query wasn't running on pressing Enter
Also adds test to verify this behavior

(cherry picked from commit d66601a)
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 15, 2019
* grafana/master:
  DataFrame: convert from row based to a columnar value format (grafana#18391)
  Packages: Temporarily skip canary releases if packages build fail (grafana#18577)
  Update latest.json to latest stable version (grafana#18575)
  Docs: Update changelog for v6.3.3 (grafana#18569)
  Graph: Fixed issue clicking on series line icon (grafana#18563)
  grafana/toolkit: Unpublish previous "next" version when releasing a new one (grafana#18552)
  Toolkit: write PR report to a folder with the circle build number (grafana#18560)
  CI: Fail build if yarn.lock is not up to date (grafana#18555)
  Chore: Updates react-dependant packages to address react warnings (grafana#18549)
  Prometheus: Fix regression of rerunning query on legend/interval change (grafana#18147)
  Explore/Prometheus: More consistently allows for multi-line queries (grafana#18362)
  Login: Fixes undefined redirect (grafana#18545)
  Plugins: expose react-redux, redux (grafana#18501)
  TimeSeries: assume values are all numbers (grafana#18540)
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 15, 2019
* grafana/master:
  DataFrame: convert from row based to a columnar value format (grafana#18391)
  Packages: Temporarily skip canary releases if packages build fail (grafana#18577)
  Update latest.json to latest stable version (grafana#18575)
  Docs: Update changelog for v6.3.3 (grafana#18569)
  Graph: Fixed issue clicking on series line icon (grafana#18563)
  grafana/toolkit: Unpublish previous "next" version when releasing a new one (grafana#18552)
  Toolkit: write PR report to a folder with the circle build number (grafana#18560)
  CI: Fail build if yarn.lock is not up to date (grafana#18555)
  Chore: Updates react-dependant packages to address react warnings (grafana#18549)
  Prometheus: Fix regression of rerunning query on legend/interval change (grafana#18147)
  Explore/Prometheus: More consistently allows for multi-line queries (grafana#18362)
  Login: Fixes undefined redirect (grafana#18545)
  Plugins: expose react-redux, redux (grafana#18501)
  TimeSeries: assume values are all numbers (grafana#18540)
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 15, 2019
* grafana/master: (156 commits)
  DataFrame: convert from row based to a columnar value format (grafana#18391)
  Packages: Temporarily skip canary releases if packages build fail (grafana#18577)
  Update latest.json to latest stable version (grafana#18575)
  Docs: Update changelog for v6.3.3 (grafana#18569)
  Graph: Fixed issue clicking on series line icon (grafana#18563)
  grafana/toolkit: Unpublish previous "next" version when releasing a new one (grafana#18552)
  Toolkit: write PR report to a folder with the circle build number (grafana#18560)
  CI: Fail build if yarn.lock is not up to date (grafana#18555)
  Chore: Updates react-dependant packages to address react warnings (grafana#18549)
  Prometheus: Fix regression of rerunning query on legend/interval change (grafana#18147)
  Explore/Prometheus: More consistently allows for multi-line queries (grafana#18362)
  Login: Fixes undefined redirect (grafana#18545)
  Plugins: expose react-redux, redux (grafana#18501)
  TimeSeries: assume values are all numbers (grafana#18540)
  Login: Angular to React (grafana#18116)
  InfoTooltip: Info icon with tooltip (grafana#18478)
  Annotations: Fix failing annotation query when time series query is cancelled (grafana#18532)
  remotecache: support SSL with redis (grafana#18511)
  QueryData: Handle that response data must be array (grafana#18504)
  React: Rename deprecated UNSAFE_componentWillReceiveProps (grafana#18526)
  ...
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.

New Prometheus query editor and multi-line queries
4 participants