grafana/public/app/features/variables
Kristina aa857e2a4f
Explore: Show log line if there is an interpolated link (#62926)
* bring in source from database

* bring in transformations from database

* add regex transformations to scopevar

* Consolidate types, add better example, cleanup

* Add var only if match

* Change ScopedVar to not require text, do not leak transformation-made variables between links

* Add mappings and start implementing logfmt

* Add mappings and start implementing logfmt

* Remove mappings, turn off global regex

* Add example yaml and omit transformations if empty

* Fix the yaml

* Add logfmt transformation

* Cleanup transformations and yaml

* add transformation field to FE types and use it, safeStringify logfmt values

* Add tests, only safe stringify if non-string, fix bug with safe stringify where it would return empty string with false value

* Add test for transformation field

* Do not add null transformations object

* Add provisioning (to be removed) and show log lines with links

* Only display links if change to query was made

* Break out transformation logic, add tests to backend code

* Fix lint errors I understand 😅

* Fix the backend lint error

* Remove unnecessary code and mark new Transformations object as internal

* Add support for named capture groups

* Remove type assertion

* Remove variable name from transformation

* Add test for overriding regexes

* Add back variable name field, but change to mapValue

* fix go api test

* Change transformation types to enum, add better provisioning checks for bad type name and format

* Change transformation types to enum, add better provisioning checks for bad type name and format

* Check for expression with regex transformations

* Remove isInterpolated variable, add option to always use format function

* Add template variable check to links

* Use new functions

* Filter log line at render, remove extra createSpanLink imports

* Add scrollable to long log messages

* Remove test that is no longer accurate

* Remove test correlation

* Add tests, fix duplicate key issue

* WIP: show log line links key/value pairs

* Some not great style changes

* Change LogDetailsRow for better multi value formatting

* Cleanup

* Add additional information around variable regex, implement PR feedback

* Display name with fieldPath if applicable

* Add variables with fieldPaths to test

* Count empty string as undefined variable

* Add better commented version of function, fix tests by removing new variable

* Modify when links show

* Remove sample yaml

* If a link has no variables, set value to field name, and some formatting issues

* Add comments and change variable names to be more clear, add back logic where needed, add test coverage for new scenario

* Fix formatting of replaceInVariableRegex comment

* Remove changes from Grafana-data, move logic into explore

* Rename function and property to match similar format

* Move types to type files and consolidate definitions, rename functions, change field definitions to accept arrays of keys/values, move function to parser, hide actions on multi key/value rows

* Add tests to logParser’s new function
2023-03-22 08:01:04 -05:00
..
adhoc Chore: Avoid explicit React.FC<Props> when possible (#64722) 2023-03-14 16:38:21 +02:00
constant VariableEditor: Use new form styles (#56326) 2022-10-12 09:43:41 +01:00
custom VariableEditor: Use new form styles (#56326) 2022-10-12 09:43:41 +01:00
datasource grafana/data: Move getPanelOptionsWithDefaults from core (#60813) 2022-12-29 05:48:22 -08:00
editor Chore: Avoid explicit React.FunctionComponent<Props> when possible (round 3) (#64839) 2023-03-16 16:56:26 +02:00
inspect Chore: Avoid explicit React.FC<Props> when possible (#64722) 2023-03-14 16:38:21 +02:00
interval VariableEditor: Use new form styles (#56326) 2022-10-12 09:43:41 +01:00
pickers Chore: Refactor to introduce VARIABLE_PREFIX constant (#62980) 2023-03-21 10:46:18 +01:00
query Chore: fix type errors in tests (#63270) 2023-02-14 16:46:42 +01:00
shared Correlations: Add CorrelationSettings Page (#53821) 2022-08-26 11:27:28 +01:00
state Chore: Refactor to introduce VARIABLE_PREFIX constant (#62980) 2023-03-21 10:46:18 +01:00
system Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
textbox Chore: Refactor to introduce VARIABLE_PREFIX constant (#62980) 2023-03-21 10:46:18 +01:00
adapters.ts Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
constants.ts Chore: Refactor to introduce VARIABLE_PREFIX constant (#62980) 2023-03-21 10:46:18 +01:00
getAllVariableValuesForUrl.test.ts Chore: fix type errors in tests (#63270) 2023-02-14 16:46:42 +01:00
getAllVariableValuesForUrl.ts Chore: Refactor to introduce VARIABLE_PREFIX constant (#62980) 2023-03-21 10:46:18 +01:00
guard.test.ts Chore: fix type errors in tests (#63270) 2023-02-14 16:46:42 +01:00
guard.ts Typed variables pt6: Clean up and test variable type guards (take 2) (#54025) 2022-08-22 14:45:40 +01:00
types.ts Typed variables pt1: Use discriminated union for variable model (#52981) 2022-08-02 10:15:25 +01:00
utils.test.ts Explore: Show log line if there is an interpolated link (#62926) 2023-03-22 08:01:04 -05:00
utils.ts Explore: Show log line if there is an interpolated link (#62926) 2023-03-22 08:01:04 -05:00