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

Dashboard: Update query group options #63138

Merged
merged 7 commits into from
Jun 22, 2023
Merged

Conversation

songhn233
Copy link
Contributor

What is this feature?

  • In the dashboard, tooltips have been added to some of the options in , see Grafana's documentation for a description of these options
  • Minutiae: The switch component is centered in the row
  • Modified the placeholder for Relative time and Time shift, the exact values may need to be discussed, my modifications are what I think is appropriate.

Why do we need this feature?

Modified the placeholder

Max data points and Min interval (or all fields except for the time-related field) are real values, otherwise, they are a null text description (No limit is displayed when Min interval is missing)

So two fields about time originally set to 1h may lead to the interpretation that they take exactly 1h (but are null) in this context, and such a placeholder setting may lead to misunderstandings, so it can be set to a null literal like No limit.

For Time shift set to 0h because it runs as 0h when it is null, and also implies the format of the input (math string)

Before:

image

After:

image

tooltip and center styles

Other fields have corresponding descriptions, while the meaning of the time-related fields is not quite easy to understand, so some of the descriptions are quoted from the documentation.

@songhn233 songhn233 requested a review from a team as a code owner February 8, 2023 19:13
@songhn233 songhn233 requested review from dprokop and kaydelaney and removed request for a team February 8, 2023 19:13
@CLAassistant
Copy link

CLAassistant commented Feb 8, 2023

CLA assistant check
All committers have signed the CLA.

@grafanabot grafanabot added area/frontend pr/external This PR is from external contributor labels Feb 8, 2023
@songhn233
Copy link
Contributor Author

@dprokop Hello, would you mind assisting with reviewing this change?

@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 16, 2023
@songhn233
Copy link
Contributor Author

songhn233 commented Mar 20, 2023

@JoaoSilvaGrafana @kaydelaney. Hey, Would you be able to take a look and provide some feedback? Thank you for the time.

@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 Apr 22, 2023
@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 May 24, 2023
Copy link
Member

@dprokop dprokop left a comment

Choose a reason for hiding this comment

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

Thanks for your contibution @songhn233, and sorry for such a long wait time!

I've left some nits to fix, other than that the PR looks good!

@dprokop dprokop added this to the 10.0.x milestone May 26, 2023
@dprokop dprokop added the no-changelog Skip including change in changelog/release notes label May 26, 2023
@grafanabot

This comment was marked as resolved.

@dprokop dprokop added no-backport Skip backport of PR product-approved Pull requests that are approved by product/managers and are allowed to be backported and removed backport v10.0.x missing-labels labels May 26, 2023
@songhn233
Copy link
Contributor Author

@dprokop Thanks for your reply and code review. I have committed the changes according to your suggestions.

I also added a comment. Could you please review to see if any further modifications are necessary?

@songhn233 songhn233 requested a review from dprokop May 27, 2023 03:01
Copy link
Member

@axelavargas axelavargas left a comment

Choose a reason for hiding this comment

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

Hey @songhn233 👋🏾, thank you for your contribution. I've reviewed the PR and it looks good to me. However, there's a minor change that needs to be addressed. Also, please make sure to merge this branch with the latest main branch. :D

tooltip={
<>
Overrides the relative time range for individual panels, which causes them to be different than what is
selected in the dashboard time picker in the top-right corner of the dashboard.
Copy link
Member

Choose a reason for hiding this comment

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

🤔 I think we could add an example of values that we support. This will help the user to know what is possible and what kind of relative format they should put. Maybe, something like:

For example to configure the Last 5 minutes the Relative time should be now-5m

Copy link
Contributor Author

@songhn233 songhn233 Jun 13, 2023

Choose a reason for hiding this comment

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

Hey, I made some minor changes including adding examples and updating the time shift placeholder to match the other configurations.

@axelavargas axelavargas changed the title Dashboard: update query group options Dashboards: update query group options Jun 13, 2023
@axelavargas axelavargas changed the title Dashboards: update query group options Dashboard: Update query group options Jun 13, 2023
@songhn233 songhn233 changed the title Dashboard: Update query group options Dashboard: Optimize query group options tooltips and placeholder Jun 13, 2023
@songhn233 songhn233 changed the title Dashboard: Optimize query group options tooltips and placeholder Dashboard: Update query group options tooltips and placeholder Jun 13, 2023
@songhn233 songhn233 changed the title Dashboard: Update query group options tooltips and placeholder Dashboard: Update query group options Jun 13, 2023
@songhn233 songhn233 requested a review from axelavargas June 13, 2023 17:12
@songhn233
Copy link
Contributor Author

songhn233 commented Jun 13, 2023

Hey @axelavargas, Thanks for your review. I have added some additional explanations for interval field, because its calculation is not exactly equal to the Time range / max data points described on the right.

Copy link
Member

@axelavargas axelavargas left a comment

Choose a reason for hiding this comment

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

Hey @songhn233 👋🏾, thank you once again for implementing the updates. I dedicated some time to review the modifications you made concerning the placeholders and have left a few comments 😄.

Copy link
Member

@axelavargas axelavargas left a comment

Choose a reason for hiding this comment

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

Hey @songhn233 , thanks for the updates on the changes – they look fantastic! 🌟 From my perspective, this PR is ready. We just need @dprokop to grant approval (since he requested changes earlier, and we can't merge without it 🙂).

@dprokop dprokop merged commit c455b01 into grafana:main Jun 22, 2023
LudoVio pushed a commit that referenced this pull request Jun 26, 2023
* Dashboard: update query group options

* chore: remove unused `console`

Co-authored-by: Dominik Prokop <[email protected]>

* fix: update placeholder

Co-authored-by: Dominik Prokop <[email protected]>

* feat(QueryGroupOptions): add tooltip example values

* feat(QueryGroupOptions): update interval tooltip

* Update public/app/features/query/components/QueryGroupOptions.tsx

Co-authored-by: Dominik Prokop <[email protected]>

* Update QueryGroupOptions.tsx

---------

Co-authored-by: Dominik Prokop <[email protected]>
@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
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants