From b57208f80db2020ecd729b5a1cbf7a4d0c5d728f Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 15:21:02 -0700 Subject: [PATCH] [Visualizations] Adds visConfig.title and uiState to build pipeline function (#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 Signed-off-by: fbaligand (cherry picked from commit 140c56f7ec6645f2b877b688a18dfb5123118c89) Co-authored-by: Fabien Baligand Co-authored-by: Josh Romero --- 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) {