From 39f0d13ddaae8fca637e720128cfa1e54626b097 Mon Sep 17 00:00:00 2001 From: Fabien Baligand Date: Tue, 6 Sep 2022 19:54:17 +0200 Subject: [PATCH] [Visualizations] Adds visConfig.title and uiState to build pipeline function (#2192) 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 Signed-off-by: fbaligand (cherry picked from commit 140c56f7ec6645f2b877b688a18dfb5123118c89) --- 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) {