Skip to content

Commit

Permalink
[Visualizations] Adds visConfig.title and uiState to build pipeline f…
Browse files Browse the repository at this point in the history
…unction (#2192) (#2272)

In pipeline building, this PR adds `visConfig.title` and `uiState` properties for "visualization" function.

This aims 2 goals:
-    To be consistent with pipelines built with "buildPipelineVisFunction".
-    To provide "title" and "uiState" informations for visualizations.

This is currently a missing information for community plugins.

Signed-off-by: fbaligand <fbaligand@gmail.com>

Signed-off-by: fbaligand <fbaligand@gmail.com>
(cherry picked from commit 140c56f)

Co-authored-by: Fabien Baligand <fbaligand@gmail.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
  • Loading branch information
3 people authored Sep 7, 2022
1 parent 90a456e commit b57208f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugins/visualizations/public/legacy/build_pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,10 @@ export const buildPipeline = async (vis: Vis, params: BuildPipelineParams) => {
} else {
const visConfig = { ...vis.params };
visConfig.dimensions = schemas;
visConfig.title = title;
pipeline += `visualization type='${vis.type.name}'
${prepareJson('visConfig', visConfig)}
${prepareJson('uiState', uiState)}
metricsAtAllLevels=${vis.isHierarchical()}
partialRows=${vis.params.showPartialRows || false} `;
if (indexPattern) {
Expand Down

0 comments on commit b57208f

Please sign in to comment.