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

Add Field config units to the response #26

Merged
merged 6 commits into from
Jul 24, 2020

Conversation

ryantxu
Copy link
Contributor

@ryantxu ryantxu commented Jul 14, 2020

One feature I am super excited about is having datasources tell the UI what the units are so that panel authors do not need to know.

This shows an example how you can set the duration field to automatically show up as "ms" -- valid strings are anything you put in the editor. the defautls are: https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/valueFormats/categories.ts#L326, but if you put in an unknown string it will become a suffix for the display

@mikhail-vl mikhail-vl self-requested a review July 14, 2020 00:58
@mikhail-vl mikhail-vl added the enhancement New feature or request label Jul 14, 2020
@mikhail-vl mikhail-vl added this to the Version 1.1 milestone Jul 14, 2020
@mikhail-vl
Copy link
Contributor

Thanks again @ryantxu for the advice!

@danni-m
Copy link

danni-m commented Jul 14, 2020

@mikhailredis we probably want to apply that to RedisTimeSeries response as well.

@mikhail-vl mikhail-vl self-assigned this Jul 23, 2020
@mikhail-vl mikhail-vl changed the title add unit to the response Add Field config units to the response Jul 24, 2020
Copy link
Contributor

@mikhail-vl mikhail-vl left a comment

Choose a reason for hiding this comment

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

Works great!

@mikhail-vl
Copy link
Contributor

mikhail-vl commented Jul 24, 2020

@mikhailredis we probably want to apply that to RedisTimeSeries response as well.

@danni-m RedisTimeSeries responses in time.Time already.

@mikhail-vl mikhail-vl merged commit b326b84 into RedisGrafana:master Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants