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

Bugfix/fix 1032: Allow custom mapping of template variable value -> display text #19972

Closed
wants to merge 11 commits into from

Conversation

marcoklaassen
Copy link

@marcoklaassen marcoklaassen commented Oct 23, 2019

Fixes #1032
use a json array to define variable lists with mapping of value and display text.
if you don't need a mapping, you can use the feature as before (comma separated list).
there is also an additional info-box containing a description how to build the json array.

@CLAassistant
Copy link

CLAassistant commented Oct 23, 2019

CLA assistant check
All committers have signed the CLA.

@marcusolsson
Copy link
Contributor

Please provide a relevant title and description of the change in this pull request.

@marcusolsson marcusolsson added area/frontend pr/changes-needed pr/external This PR is from external contributor labels Nov 4, 2019
@marcoklaassen marcoklaassen changed the title Bugfix/fix 1032 Bugfix/fix 1032: Allow custom mapping of template variable value -> display text Nov 5, 2019
@siegmund42
Copy link

siegmund42 commented Nov 20, 2019

One comment for discussion (I like your pragmatic way):
Do we want to include this in that implicit way or add an extra variable type for being more explicit?

I really like to see some progress on this!

[EDIT] Bonus question: Is it then possible to refer to both $my_var.text and $my_var.value?

@marcoklaassen
Copy link
Author

One comment for discussion (I like your pragmatic way):
Do we want to include this in that implicit way or add an extra variable type for being more explicit?

I really like to see some progress on this!

[EDIT] Bonus question: Is it then possible to refer to both $my_var.text and $my_var.value?

Thanks for your comment.
I think we should start with an implicit way like this.
If our users like this feature and use ist more and more, we can introduce a new variable type later.

Bonus answer: no, $my_var.text is just used for any labels; $my_var.value is the value for the queries.

@maxilampert
Copy link

@torkelo @marcusolsson Any idea if that is something that can be merged as a starting point such feature would be really helpful to give more flexibility to the custom values without having to build a dummy datasource?

@stale
Copy link

stale bot commented Dec 25, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days 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!

@stale stale bot added the stale Issue with no recent activity label Dec 25, 2019
@siegmund42
Copy link

I would like to ping this for review - it's a pretty nice feature that was already demanded in several requests. The approach of @marcoklaassen is pragmatic and a good point to start from.

@stale stale bot removed the stale Issue with no recent activity label Jan 1, 2020
@stale
Copy link

stale bot commented Feb 4, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days 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!

@stale stale bot added the stale Issue with no recent activity label Feb 4, 2020
@stale
Copy link

stale bot commented Mar 5, 2020

This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot closed this Mar 5, 2020
@mareksimunek
Copy link

I really want this feature as many others. Could you please @marcusolsson check again? Or where it got stucked?

@sakjur sakjur reopened this Mar 9, 2020
@stale stale bot removed the stale Issue with no recent activity label Mar 9, 2020
@torkelo
Copy link
Member

torkelo commented Mar 9, 2020

Thanks for contributing!

I do not think this addresses #1032, this adds value & text support to the custom variable, #1032 is about dynamic query based id -> text lookup for query variable options.

We can't realy merge this, we are rewriting the template variable system to redux & react. #22434

Dont think json text in the input is the right answer here. Either a UI or support for CSV table (with text & vale columns) would be better.

@stale
Copy link

stale bot commented Mar 23, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days 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!

@stale stale bot added the stale Issue with no recent activity label Mar 23, 2020
@aknuds1 aknuds1 requested review from a team, torkelo and tskarhed and removed request for a team March 24, 2020 15:26
@stale stale bot removed the stale Issue with no recent activity label Mar 24, 2020
@aknuds1 aknuds1 added this to In Review in Frontend Platform Backlog via automation Mar 24, 2020
@stale
Copy link

stale bot commented Apr 7, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days 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!

@stale stale bot added the stale Issue with no recent activity label Apr 7, 2020
@stale
Copy link

stale bot commented May 7, 2020

This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot closed this May 7, 2020
Frontend Platform Backlog automation moved this from In Review to Done May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard/templating area/frontend pr/external This PR is from external contributor stale Issue with no recent activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow custom mapping of template variable value -> display text
8 participants