From 6261a5db1b5ff324e45b05b7efddda0acc5520ec Mon Sep 17 00:00:00 2001 From: Fabien Baligand Date: Wed, 24 Aug 2022 00:14:31 +0200 Subject: [PATCH] [Visualizations] Adds visConfig.title and uiState to build pipeline function 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 --- src/plugins/visualizations/public/legacy/build_pipeline.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/visualizations/public/legacy/build_pipeline.ts b/src/plugins/visualizations/public/legacy/build_pipeline.ts index ae7f3bbe7a29..7a28ae7ac394 100644 --- a/src/plugins/visualizations/public/legacy/build_pipeline.ts +++ b/src/plugins/visualizations/public/legacy/build_pipeline.ts @@ -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) {