To make it possible to run Lens expressions on the Kibana server (for features like alerting), all expression functions have to be registered on the server as well as on the client. To do that, they have to be moved to a central common folder in the plugin folder, and imported and registered in the server side plugin as well as the current registration on the client side.
List of functions:
lens_time_scale
lens_counter_rate
lens_rename_columns
lens_format_column
lens_datatable_column
lens_datatable (relies on field formatter service)
lens_metric_chart
lens_pie
lens_xy_legendConfig
lens_xy_yConfig
lens_xy_tickLabelsConfig
lens_xy_gridlinesConfig
lens_xy_axisTitlesVisibilityConfig
lens_xy_layer
lens_xy_chart
We also have to move the suffix formatter to the server because the datatable function depends on field formatters x-pack/plugins/lens/public/indexpattern_datasource/suffix_formatter.ts
To make it possible to run Lens expressions on the Kibana server (for features like alerting), all expression functions have to be registered on the server as well as on the client. To do that, they have to be moved to a central
commonfolder in the plugin folder, and imported and registered in the server side plugin as well as the current registration on the client side.List of functions:
lens_time_scalelens_counter_ratelens_rename_columnslens_format_columnlens_datatable_columnlens_datatable(relies on field formatter service)lens_metric_chartlens_pielens_xy_legendConfiglens_xy_yConfiglens_xy_tickLabelsConfiglens_xy_gridlinesConfiglens_xy_axisTitlesVisibilityConfiglens_xy_layerlens_xy_chartWe also have to move the suffix formatter to the server because the datatable function depends on field formatters
x-pack/plugins/lens/public/indexpattern_datasource/suffix_formatter.ts