Variables: Adds support for key/value mapping in Custom variable (#27829)

* Initial work on adding new mapping variable type

* Remove add button

* Update custom variable type to include key/value mapping

* Update custom variable docs

* Try to fix failing build

* Update reducer.ts

* Fix failing build

* Remove expansion of the colon

* Update docs

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
Sartaj Singh Baveja
2020-09-30 21:06:52 -07:00
committed by GitHub
parent c028d3047c
commit 4e4242d475
4 changed files with 27 additions and 7 deletions

View File

@ -26,7 +26,7 @@ For example, if you have server names or region names that never change, then yo
## Enter Custom Options
1. In the **Values separated by comma** list, enter the values for this variable in a comma-separated list. You can include numbers, strings, or other variables.
1. In the **Values separated by comma** list, enter the values for this variable in a comma-separated list. You can include numbers, strings, other variables or key/value pairs separated by a colon.
1. (optional) Enter [Selection Options]({{< relref "../variable-selection-options.md" >}}).
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
1. Click **Add** to add the variable to the dashboard.