From 7d00ff8fd974830241a82e335c58a82cc6a2f636 Mon Sep 17 00:00:00 2001 From: Dzmitry Tamashevich Date: Thu, 3 Nov 2022 18:40:09 +0300 Subject: [PATCH] [Discover] fix functionals --- .../main/components/layout/discover_main_content.tsx | 8 ++++---- test/functional/apps/discover/group1/_discover.ts | 2 +- x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx | 2 +- .../lens/public/datasources/form_based/field_item.tsx | 2 +- x-pack/plugins/lens/public/plugin.ts | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx b/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx index 70ca210e87c81..d36623dc58515 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx @@ -52,6 +52,10 @@ export interface DiscoverMainContentProps { searchSessionManager: DiscoverSearchSessionManager; } +const resetSearchButtonWrapper = css` + overflow: hidden; +`; + export const DiscoverMainContent = ({ isPlainRecord, dataView, @@ -115,10 +119,6 @@ export const DiscoverMainContent = ({ searchSessionManager, }); - const resetSearchButtonWrapper = css` - overflow: hidden; - `; - return ( { if (!activeDatasourceId || !discoverLocator) { diff --git a/x-pack/plugins/lens/public/datasources/form_based/field_item.tsx b/x-pack/plugins/lens/public/datasources/form_based/field_item.tsx index 36727780944ac..35bd95dd7c9f1 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/field_item.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/field_item.tsx @@ -309,7 +309,7 @@ function FieldItemPopoverContents( [indexPattern], getEsQueryConfig(services.uiSettings) ); - const discoverLocator = services.share?.url.locators.get('discover'); + const discoverLocator = services.share?.url.locators.get('DISCOVER_APP_LOCATOR'); if (!discoverLocator || !services.application.capabilities.discover.show) { return; } diff --git a/x-pack/plugins/lens/public/plugin.ts b/x-pack/plugins/lens/public/plugin.ts index b178e9e776000..8a12a58f16087 100644 --- a/x-pack/plugins/lens/public/plugin.ts +++ b/x-pack/plugins/lens/public/plugin.ts @@ -317,7 +317,7 @@ export class LensPlugin { visualizations.registerAlias(getLensAliasConfig()); - const discoverLocator = share?.url.locators.get('discover'); + const discoverLocator = share?.url.locators.get('DISCOVER_APP_LOCATOR'); if (discoverLocator) { uiActionsEnhanced.registerDrilldown( @@ -499,7 +499,7 @@ export class LensPlugin { visualizeAggBasedVisAction(core.application) ); - const discoverLocator = startDependencies.share?.url.locators.get('discover'); + const discoverLocator = startDependencies.share?.url.locators.get('DISCOVER_APP_LOCATOR'); if (discoverLocator) { startDependencies.uiActions.addTriggerAction(