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

Sort regions list for regions template variable presented by logging data source plugin #42

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

jvinaya
Copy link
Member

@jvinaya jvinaya commented Sep 27, 2022

As a user of Grafana dashboards that leverage the OCI logging data source plugin
I want to be easily select the regions I want the data panels on a dashboard to use in their queries
and see a sorted list of the possible regions in the regions template variable dropdown list
so that it is easier for me to locate the region(s) I am interested in within the regions list without necessarily typing in each region name.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 27, 2022
@jvinaya
Copy link
Member Author

jvinaya commented Sep 27, 2022

@huskerdhf @nagarnar , Here is my MR for the story - CDSCRS-27813.

pkg/datasource.go Outdated Show resolved Hide resolved
pkg/datasource.go Outdated Show resolved Hide resolved
for _, item := range res.Items {
frame.AppendRow(*(item.Name))
var regions []string
for _, regionName := range res.Items {
Copy link
Member

Choose a reason for hiding this comment

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

My comment related to the use of the item variable name was only about the for loop starting on line 327. Here the item variable name makes sense since the variable being looped over is res.Items. It is up to you whether you go back and revert this variable name change.

Copy link
Member

Choose a reason for hiding this comment

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

I've approved the PR but if you go back and revert this variable name then I'll re-approve it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Understood. I have changed the variable name.

@mamorett mamorett merged commit 7a24602 into oracle:main Oct 6, 2022
@jvinaya jvinaya deleted the sort-regions branch August 29, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants