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

Case-insensitive sorting for template values #11128

Closed
cross opened this issue Mar 6, 2018 · 5 comments
Closed

Case-insensitive sorting for template values #11128

cross opened this issue Mar 6, 2018 · 5 comments

Comments

@cross
Copy link
Contributor

cross commented Mar 6, 2018

In grafana 4.1.1, there are options for sorting template values alphabetically or numerically, ascending or descending. However, one of my sets of values for a template includes mostly capitalized words and a smaller number of all-lower-case words. So that people can easily find the lower-case values, I'd like to sort in a case-insensitive manner. Otherwise, my "a" strings are below the 40+ strings starting with capital letters.

Searching around for information suggests this has not been added in more recent versions, so I wanted to submit the request here. It would be easy to add as an option. Is there something that I've failed to configure in my installation that already supports it?

Thank you.

@bergquist
Copy link
Contributor

Any chance you can transform the result to lower/upper case in your datasource?

@bergquist bergquist added the needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc label Mar 7, 2018
@bergquist bergquist changed the title [Feature request] Case-insensitive sorting for template values Case-insensitive sorting for template values Mar 7, 2018
@cross
Copy link
Contributor Author

cross commented Mar 13, 2018

It's using graphite as a data source. So, the actual source of the data that's being put into graphite could be changed, but I don't think I'm likely to convince someone of that. (and that would still leave the older data in Graphite/carbon wrong) These are strings that are displayed to humans, and therefore subject to concerns beyond data cleanliness. :-)

@bergquist bergquist added help wanted type/feature-request area/dashboard/templating and removed needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc labels Mar 15, 2018
@bergquist
Copy link
Contributor

I guess this makes sense. But I'm afraid it won't be a high prio for a while.

@cross
Copy link
Contributor Author

cross commented Mar 16, 2018

Okay. I'll look at adding it myself, I have recently made a test server running grafana 5.x.

Question for you, adding new variable sort values. It would make visual/conceptual sense to put these between "alphabetical" and "numeric" in the current list of sortOptions. But, if that [numeric] value is stored, then it would mess with people when they upgraded. Should I put the new pair of case-insensitive alphabetical options at the end, with new/higher numeric values?

@daniellee
Copy link
Contributor

Closed by #11280

daniellee added a commit that referenced this issue Apr 3, 2018
ryantxu added a commit to NatelEnergy/grafana that referenced this issue Apr 4, 2018
* grafana/master:
  changelog: adds note for grafana#11128
  variables: adds test for variable sorting
  Add case-insensitive sort for variables.
  graphite: fixes grafana#11434
  settings: fixes test
  changed variable for tabbed close btn hover, and changed text-strong variable for lighttheme, removed commented out variable
  mssql: typos in help sections
  Webpack Grafana plugin template project to links (grafana#11457)
  print to stderr since logger might not exist
  settings: return error instead of ignoring it
  fixed graphpanel editmode and custom width for right side legend for IE11
  fixed alignment in search + fixed issue ie popup
  sidemenu fix for internet explorer 11, changed icon width/height to pixels and added height to logo
  styled login page for ie11
ryantxu added a commit to ryantxu/grafana that referenced this issue Apr 5, 2018
* grafana/master: (51 commits)
  Use curly brackets around hyperlink help text grafana#11478 (grafana#11479)
  migrated playlist-routes to ts
  migrated last all.js to ts
  Notes for closing grafana#7119
  changelog: adds note for grafana#11128
  variables: adds test for variable sorting
  Add case-insensitive sort for variables.
  graphite: fixes grafana#11434
  settings: fixes test
  changed from margin to padding
  changed variable for tabbed close btn hover, and changed text-strong variable for lighttheme, removed commented out variable
  mssql: typos in help sections
  Webpack Grafana plugin template project to links (grafana#11457)
  rm panel.type  constrain from threshold_mapper.ts (grafana#11448)
  No need for node_modules/bin in npm run-script (grafana#11449)
  changelog: adds note about closing grafana#11555
  add article
  fix some typos
  migrated graph_tooltip to ts
  started migration to ts
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants