grafana/public/app/core
Ben Sully 13d9fddd3e
Transformations: Add 'JSON' field type to ConvertFieldTypeTransformer (#42624)
* Add 'JSON' field type to ConvertFieldTypeTransformer

I've been playing around with #41994 and found that it requires fields
to contain array values, which can't be sent from a backend plugin. This
PR adds the ability for the ConvertFieldTypeTransformer to parse
JSON values and store the result in the transformed field.
The main use case for this right now is so that a field
containing a JSONified array can be transformed into a field
containing an actual array, which can in
turn be used for the table charts in #41994.

Supersedes #42521.

* Add second option to complex field conversion to increase flexibility

This avoids falsely equating 'JSON' with FieldType.other, and instead
allows multiple parsers to be used if the 'Complex' type is selected.

Currently only JSON parsing is implemented, but others could be
supported easily in future.

* Revert "Add second option to complex field conversion to increase flexibility"

This reverts commit 6314ce35eb.

* Improve test for object parsing of complex field transformer

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-12-16 11:18:11 +01:00
..
actions Routing NG: Replace Angular routing with react-router (#31463) 2021-03-10 18:03:36 +01:00
components Transformations: Add 'JSON' field type to ConvertFieldTypeTransformer (#42624) 2021-12-16 11:18:11 +01:00
copy Chore: Use uuid v4 as an identifier instead of Date.now() (#27178) 2020-08-26 11:38:39 +02:00
hooks Dependencies: Jest 27 (#42681) 2021-12-03 17:09:25 +00:00
navigation Links: Fixes issue with some links causing full page reload (#36631) 2021-07-12 10:28:49 +02:00
reducers Plugins: remove deprecated code (components) (#41686) 2021-11-19 13:42:26 +01:00
selectors Routing NG: Replace Angular routing with react-router (#31463) 2021-03-10 18:03:36 +01:00
services AccessControl: Add accesscontrol metadata to datasources DTOs (#42675) 2021-12-15 12:08:15 +01:00
specs Update dependency @testing-library/dom to v8 (#40990) 2021-10-27 16:57:20 +01:00
utils AccessControl: Add accesscontrol metadata to datasources DTOs (#42675) 2021-12-15 12:08:15 +01:00
app_events.ts EventBus: Introduces new event bus with emitter backward compatible interface (#27564) 2020-11-03 13:08:54 +01:00
config.ts VisualizationSelection: Real previews of suitable visualisation and options based on current data (#40527) 2021-10-25 13:55:06 +02:00
constants.ts PanelEditor: Present actionable suggestions when panel cannot visualize current data (#42083) 2021-11-25 09:41:03 +01:00
core.ts Angular: Isolate angular modal support from react modal support (#41788) 2021-11-17 13:12:18 +01:00
jquery_extended.ts Performance: Standardize lodash imports to use destructured members (#33040) 2021-04-21 09:38:00 +02:00
localisation.tsx I18N: Add Lingui core translation framework. (#41827) 2021-12-15 17:00:37 +01:00
lodash_extended.ts Performance: Standardize lodash imports to use destructured members (#33040) 2021-04-21 09:38:00 +02:00
logs_model.test.ts Elastic: Full range logs volume (#40700) 2021-11-02 11:53:47 +01:00
logs_model.ts Elasticsearch: Enable full range log volume histogram (#41202) 2021-11-10 11:20:30 +01:00
mod_defs.d.ts prettier: change to single quoting 2017-12-20 12:33:33 +01:00
profiler.ts Angular: Isolate angular more (#41440) 2021-11-10 11:05:36 +01:00
store.ts Explore: Improve local storage error handling when rich history is added (#39943) 2021-10-11 09:48:25 +02:00
table_model.ts Performance: Standardize lodash imports to use destructured members (#33040) 2021-04-21 09:38:00 +02:00
time_series2.ts Performance: Standardize lodash imports to use destructured members (#33040) 2021-04-21 09:38:00 +02:00