* Dashboard: Add named capture groups to variable query regex
Variable query regex are able to use 'text' and 'value' named capture
groups to allow for separate display text to be extracted from the
query result. e.g.
Using a regex of /foo="(?<text>[^"]+)|bar="(?<value>[^"]+)/g on a query
result of metric{foo="FOO", bar="BAR"} would result in the variable
value being set to 'BAR' but display text being set to 'FOO'
Resolves#21076
* Improve regex capture group documentation
* Update docs/sources/variables/filter-variables-with-regex.md
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* Use text capture if value capture does not match
This is to keep the behaviour consistent with the current behavior. See
discussion https://github.com/grafana/grafana/pull/28625/files#r516490942
* Improve regex field placeholder and tooltip message
To make the feature more discoverable to users the place holder example
now includes the named capture groups. The tool tip message also
includes a reference and link to the documentation.
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Hi - I have observed Dot(.) is missing in many places of paragraphs in document. So raising this PR.
Added Dot(.) to below line
This page shows how to use regex to filter/modify values in the variable dropdown.
Thanks,
Ashish
* Changes. to metadata in Manage users
* changes to install section
* Added titile
* More changes.
* Updated administration folder metadata, moved 2 files from installation folder.
* Added links to Administration landing page, other metadata changes worked out.
* Updated alerting section metadata.
* Updated metadata of Auth section. Broke index and created separate Grafana Authentication section.
* Added correct weight.
* Updated metadata for the Best practices section.
* Updated metadata in templates, broke Overview topic.
* Updated subment Variable types metadata
* Fixed yaml file and H1 description of Variables syntax topic.
* Couple more metadata changes.
* Added aliases files, as suggested by Diana.
* Fixed so we try to use the variables in the redux store to replace values in template variables.
* First draft of working version.
* Including fieldPath when adding :text format.
* cleaned up code by introducing helper function.
* some minor refactoring.
* Added tests and support for multi variables.
* added test and code to handle the All scenario of a multivariable.
* fixed according to feedback.
* added docs.
* added text format to gdev dashboard.
* updated e2e tests.
* make sure we use the same function for formatting och variable lable.
* increased the number to 22.
* changed label for tests to be All.
* existing format should be respected.
* Correcting one of the usage in documentation
* Correcting usage of a word
* Correcting usage of a word in docs
* Correcting same word in 2 more occurrences
* Correcting a word in docs
* Correcting a word in docs
* Update docs/sources/variables/advanced-variable-format-options.md
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
* Incorporated reviewer's suggestion in other occurrences
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
* Moved templating.md
Moved file to a different folder, added alias information, updated menu.yaml
* Split out advanced variable format options from templating.md
* Reworked Advanced variable format options
* Update templating.md
* Moved global variables to another topic
* Moved template files
* Update global-variables.md
* Update global-variables.md
* Update templates-and-variables.md
* made new repeating panels and rows topic
* updated links and menu
* Update advanced-variable-format-options.md
* Update repeat-panels-or-rows.md
* Update menu.yaml
* Update prometheus.md
* Applied Daniel's edits