From 4960304f24fc8cb63d00a87a8831d01e2fdda5fc Mon Sep 17 00:00:00 2001 From: Alex Ruiz Becerra Date: Wed, 19 Apr 2023 20:11:58 +0200 Subject: [PATCH 1/4] Disable the overview app --- .../opensearch_dashboards_overview/common/index.ts | 2 +- .../opensearch_dashboards_overview/public/plugin.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/opensearch_dashboards_overview/common/index.ts b/src/plugins/opensearch_dashboards_overview/common/index.ts index 79a90f2794c1..ee84f13d19f1 100644 --- a/src/plugins/opensearch_dashboards_overview/common/index.ts +++ b/src/plugins/opensearch_dashboards_overview/common/index.ts @@ -30,5 +30,5 @@ export const PLUGIN_ID = 'opensearchDashboardsOverview'; export const PLUGIN_NAME = 'Overview'; -export const PLUGIN_PATH = `/app/opensearch_dashboards_overview`; +export const PLUGIN_PATH = ''; export const PLUGIN_ICON = 'inputOutput'; diff --git a/src/plugins/opensearch_dashboards_overview/public/plugin.ts b/src/plugins/opensearch_dashboards_overview/public/plugin.ts index e38282ff06d6..d8ac61c6d7e2 100644 --- a/src/plugins/opensearch_dashboards_overview/public/plugin.ts +++ b/src/plugins/opensearch_dashboards_overview/public/plugin.ts @@ -77,13 +77,13 @@ export class OpenSearchDashboardsOverviewPlugin return hasOpenSearchDashboardsApp; }), distinct(), - map((hasOpenSearchDashboardsApp) => { + map(() => { return () => { - if (!hasOpenSearchDashboardsApp) { - return { status: AppStatus.inaccessible, navLinkStatus: AppNavLinkStatus.hidden }; - } else { - return { status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.default }; - } + // Wazuh: Hide the OpenSearch Dashboards Overview app + return { + status: AppStatus.inaccessible, + navLinkStatus: AppNavLinkStatus.hidden, + }; }; }) ); From 84b696956c0b1df30ca9ebd0b822dc4162a872e9 Mon Sep 17 00:00:00 2001 From: Alex Ruiz Becerra Date: Wed, 19 Apr 2023 23:22:15 +0200 Subject: [PATCH 2/4] Update snapshot --- .../overview/__snapshots__/overview.test.tsx.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/opensearch_dashboards_overview/public/components/overview/__snapshots__/overview.test.tsx.snap b/src/plugins/opensearch_dashboards_overview/public/components/overview/__snapshots__/overview.test.tsx.snap index 198e0119ebd8..f33407d235c4 100644 --- a/src/plugins/opensearch_dashboards_overview/public/components/overview/__snapshots__/overview.test.tsx.snap +++ b/src/plugins/opensearch_dashboards_overview/public/components/overview/__snapshots__/overview.test.tsx.snap @@ -367,7 +367,7 @@ exports[`Overview render 1`] = ` ], } } - path="/app/opensearch_dashboards_overview" + path="" /> @@ -852,7 +852,7 @@ exports[`Overview without features 1`] = ` ], } } - path="/app/opensearch_dashboards_overview" + path="" /> @@ -1242,7 +1242,7 @@ exports[`Overview without solutions 1`] = ` ], } } - path="/app/opensearch_dashboards_overview" + path="" /> From 2d6f9fd081b78ecc2352a33441429560bb3120d4 Mon Sep 17 00:00:00 2001 From: Alex Ruiz Becerra Date: Fri, 21 Apr 2023 12:42:52 +0200 Subject: [PATCH 3/4] Revert removal of the overview app path It was causing the Discover app not to render --- src/plugins/opensearch_dashboards_overview/common/index.ts | 2 +- .../overview/__snapshots__/overview.test.tsx.snap | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/opensearch_dashboards_overview/common/index.ts b/src/plugins/opensearch_dashboards_overview/common/index.ts index ee84f13d19f1..79a90f2794c1 100644 --- a/src/plugins/opensearch_dashboards_overview/common/index.ts +++ b/src/plugins/opensearch_dashboards_overview/common/index.ts @@ -30,5 +30,5 @@ export const PLUGIN_ID = 'opensearchDashboardsOverview'; export const PLUGIN_NAME = 'Overview'; -export const PLUGIN_PATH = ''; +export const PLUGIN_PATH = `/app/opensearch_dashboards_overview`; export const PLUGIN_ICON = 'inputOutput'; diff --git a/src/plugins/opensearch_dashboards_overview/public/components/overview/__snapshots__/overview.test.tsx.snap b/src/plugins/opensearch_dashboards_overview/public/components/overview/__snapshots__/overview.test.tsx.snap index f33407d235c4..198e0119ebd8 100644 --- a/src/plugins/opensearch_dashboards_overview/public/components/overview/__snapshots__/overview.test.tsx.snap +++ b/src/plugins/opensearch_dashboards_overview/public/components/overview/__snapshots__/overview.test.tsx.snap @@ -367,7 +367,7 @@ exports[`Overview render 1`] = ` ], } } - path="" + path="/app/opensearch_dashboards_overview" /> @@ -852,7 +852,7 @@ exports[`Overview without features 1`] = ` ], } } - path="" + path="/app/opensearch_dashboards_overview" /> @@ -1242,7 +1242,7 @@ exports[`Overview without solutions 1`] = ` ], } } - path="" + path="/app/opensearch_dashboards_overview" /> From f663b395a2216ce23f090968cc227655a73c475c Mon Sep 17 00:00:00 2001 From: yenienserrano Date: Wed, 26 Apr 2023 11:55:17 +0200 Subject: [PATCH 4/4] Skip overview page test --- test/functional/apps/visualize/_custom_branding.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/functional/apps/visualize/_custom_branding.ts b/test/functional/apps/visualize/_custom_branding.ts index 37f07e932ee5..272e07c18940 100644 --- a/test/functional/apps/visualize/_custom_branding.ts +++ b/test/functional/apps/visualize/_custom_branding.ts @@ -28,7 +28,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const expectedWelcomeMessage = 'Welcome to OpenSearch'; describe('OpenSearch Dashboards branding configuration', function customHomeBranding() { - describe('should render overview page', async () => { + /** + * This test is skipped because the overview page is not available. + */ + describe.skip('should render overview page', async () => { this.tags('includeFirefox'); before(async function () {