grafana/public/app/features
yenalsnavaj f830d8772a
Variables: Adds named capture groups to variable regex (#28625)
* 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>
2020-11-04 09:31:38 +01:00
..
admin Docs: Grafana Enterprise auditing feature (#28356) 2020-10-23 10:22:14 +02:00
alerting AlertRuleList: Add keys to alert rule items (#28735) 2020-11-02 12:35:23 +01:00
annotations Transformations: Use Observable (#27584) 2020-10-06 07:55:09 +02:00
api-keys ApiKeys: Fixes close('X') button layout issue (#27625) 2020-09-17 07:36:47 +02:00
dashboard Panel inspect: Interpolate variables in panel inspect title (#28779) 2020-11-04 09:27:59 +01:00
datasources AddDatasource: Improve plugin categories (#28584) 2020-10-28 08:15:32 +01:00
explore EventBus: Introduces new event bus with emitter backward compatible interface (#27564) 2020-11-03 13:08:54 +01:00
expressions GEL: Editor UI updates (#27859) 2020-09-28 16:44:52 +02:00
folders Fix: Redirect to correct url after creating a folder (#26160) 2020-07-09 14:38:47 +02:00
live Live: support real time measurements (alpha) (#28022) 2020-10-22 09:10:26 +02:00
manage-dashboards Live: broadcast events when dashboard is saved (#27583) 2020-10-01 10:46:14 -07:00
org Admin: Fix updating organization name not updating configuration subtitle (#26315) 2020-08-07 09:00:44 +02:00
panel Dependencies: Update angularjs to 1.8.2 (#28736) 2020-11-03 13:18:10 +01:00
playlist Chore: Upgrade typescript and related packages (#27316) 2020-09-25 15:48:41 +01:00
plugins Events: Remove unused or unnecessary events (#28783) 2020-11-03 15:29:43 +01:00
profile Fixes signup workflow and UI (#26263) 2020-09-07 18:24:46 +03:00
search Search: refactor tests to use react-testing-library (#27352) 2020-09-08 18:01:38 +03:00
teams BackendSrv: Queues data source requests but passes through api requests (#26947) 2020-08-20 11:32:10 +02:00
templating TemplateSrv: Fix interpolating strings with object variables (#28171) 2020-10-12 14:22:26 +02:00
users Add space after comma for placeholder text (#25931) 2020-07-01 10:34:36 +03:00
variables Variables: Adds named capture groups to variable regex (#28625) 2020-11-04 09:31:38 +01:00
all.ts Migration: Edit notification channel (#25980) 2020-09-09 12:46:19 +02:00