From 33aed0a6bdba070a37bc3002f4a86a81a0150677 Mon Sep 17 00:00:00 2001 From: Ashwin P Chandran Date: Wed, 19 Oct 2022 15:26:50 -0700 Subject: [PATCH] [Vis Builder] Update vislib params and misc fixes (#2610) * Updates bar, line, area visbuilder config Signed-off-by: Ashwin P Chandran * Misc fixes from functional testing Signed-off-by: Ashwin P Chandran * Adds Changelog entry Signed-off-by: Ashwin P Chandran Signed-off-by: Ashwin P Chandran --- CHANGELOG.md | 1 + .../embeddable/disabled_visualization.tsx | 2 +- .../embeddable/vis_builder_embeddable.tsx | 4 ++++ .../vis_builder_embeddable_factory.tsx | 3 --- .../vislib/area/area_vis_type.ts | 22 +++++++++++++++++++ .../vislib/histogram/histogram_vis_type.ts | 22 +++++++++++++++++++ .../vislib/line/line_vis_type.ts | 22 +++++++++++++++++++ .../components/visualize_listing.tsx | 4 +++- 8 files changed, 75 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90944d0b6438..017d697c4eac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * [Vis Builder] Fixes auto bounds for timeseries bar chart visualization ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) * [Vis Builder] Fixes visualization shift when editing agg ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) * [Vis Builder] Renames "Histogram" to "Bar" in vis type picker ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) +* [Vis Builder] Update vislib params and misc fixes ([2610](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2610)) * [MD] Add data source param to low-level search call in Discover ([#2431](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2431)) * [Multi DataSource] Skip data source view in index pattern step when pick default ([#2574](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2574)) diff --git a/src/plugins/vis_builder/public/embeddable/disabled_visualization.tsx b/src/plugins/vis_builder/public/embeddable/disabled_visualization.tsx index 7391589dd01d..be6072c105af 100644 --- a/src/plugins/vis_builder/public/embeddable/disabled_visualization.tsx +++ b/src/plugins/vis_builder/public/embeddable/disabled_visualization.tsx @@ -11,7 +11,7 @@ import './disabled_visualization.scss'; export function DisabledVisualization({ title }: { title: string }) { return ( -
+
{ try { const savedWizard = await getSavedWizardLoader().get(savedObjectId); - const editPath = `${EDIT_PATH}/${savedObjectId}`; - const editUrl = getHttp().basePath.prepend(`/app/${PLUGIN_ID}${editPath}`); - const isLabsEnabled = getUISettings().get(VISUALIZE_ENABLE_LABS_SETTING); if (!isLabsEnabled) { diff --git a/src/plugins/vis_builder/public/visualizations/vislib/area/area_vis_type.ts b/src/plugins/vis_builder/public/visualizations/vislib/area/area_vis_type.ts index 14b524bf008f..5a42492e862e 100644 --- a/src/plugins/vis_builder/public/visualizations/vislib/area/area_vis_type.ts +++ b/src/plugins/vis_builder/public/visualizations/vislib/area/area_vis_type.ts @@ -46,6 +46,28 @@ export const createAreaConfig = (): VisualizationTypeOptions { .then(({ total, hits }: { total: number; hits: object[] }) => ({ total, hits: hits.filter( - (result: any) => isLabsEnabled || result.type?.stage !== 'experimental' + (result: any) => + isLabsEnabled || + (result.type?.stage !== 'experimental' && result.stage !== 'experimental') ), })); },