From 4f24f96bb22adb4e62d9af5dbc90e030504329f0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 18 Oct 2024 20:06:08 +0000 Subject: [PATCH] Observability Overview page rework (#2210) * rework the obs overview page adding dismiss to cards, and changing ui Signed-off-by: Adam Tackett * hide new setting for showCards based on workspace Signed-off-by: Adam Tackett * small integrations ui adjustment Signed-off-by: Adam Tackett * Update snapshots Signed-off-by: Adam Tackett * fix lint Signed-off-by: Adam Tackett * capitalize Page Signed-off-by: Adam Tackett --------- Signed-off-by: Adam Tackett Signed-off-by: Adam Tackett <105462877+TackAdam@users.noreply.github.com> Co-authored-by: Adam Tackett (cherry picked from commit 90a2baffa35c8297da0cc16dd4841393e90058c6) Signed-off-by: github-actions[bot] --- common/constants/overview.ts | 3 +- common/utils/core_services.ts | 2 + ...installed_integrations_table.test.tsx.snap | 35 +- ...ilable_integration_card_view.test.tsx.snap | 11 +- ...lable_integration_table_view.test.tsx.snap | 36 +- .../available_integration_card_view.tsx | 3 +- .../available_integration_table.tsx | 5 +- .../add_dashboard_callout.test.tsx.snap | 558 ++++++++++--- .../dashboard_controls.test.tsx.snap | 558 ++++++++++--- .../select_dashboard_flyout.test.tsx.snap | 785 +++++++++++------- .../components/add_dashboard_callout.tsx | 100 ++- .../components/assets/SampleDataDark.png | Bin 0 -> 293222 bytes .../components/assets/SampleDataLight.png | Bin 0 -> 373361 bytes .../components/assets/SelectDashboard.svg | 363 ++++++++ .../components/dashboard_controls.tsx | 14 - .../components/select_dashboard_flyout.tsx | 79 +- .../components/overview/components/utils.tsx | 13 +- public/components/overview/home.tsx | 236 +++++- public/plugin.tsx | 4 +- public/plugin_helpers/plugin_overview.tsx | 24 +- server/plugin.ts | 12 + 21 files changed, 2168 insertions(+), 673 deletions(-) create mode 100644 public/components/overview/components/assets/SampleDataDark.png create mode 100644 public/components/overview/components/assets/SampleDataLight.png create mode 100644 public/components/overview/components/assets/SelectDashboard.svg diff --git a/common/constants/overview.ts b/common/constants/overview.ts index 905c86cf00..14358c7134 100644 --- a/common/constants/overview.ts +++ b/common/constants/overview.ts @@ -3,6 +3,5 @@ * SPDX-License-Identifier: Apache-2.0 */ -export const alertsPluginID = 'alerting'; -export const anomalyPluginID = 'anomalyDetection'; export const observabilityDashboardsKey = 'observability:defaultDashboard'; +export const observabilityShowCardsKey = 'observability:overviewCardsDisplay'; diff --git a/common/utils/core_services.ts b/common/utils/core_services.ts index 3b772d2254..750d25225d 100644 --- a/common/utils/core_services.ts +++ b/common/utils/core_services.ts @@ -10,6 +10,7 @@ import { SavedObjectsClientContract, ToastInput, } from '../../../../src/core/public'; +import { Page } from '../../../../src/plugins/content_management/public'; import { createGetterSetter } from '../../../../src/plugins/opensearch_dashboards_utils/common'; import PPLService from '../../public/services/requests/ppl'; import { QueryManager } from '../query_manager'; @@ -39,3 +40,4 @@ export const [getOSDSavedObjectsClient, setOSDSavedObjectsClient] = createGetter SavedObjectsClientContract >('SavedObjectsClient'); export const [getQueryManager, setQueryManager] = createGetterSetter('QueryManager'); +export const [getOverviewPage, setOverviewPage] = createGetterSetter('Page'); diff --git a/public/components/datasources/components/__tests__/__snapshots__/installed_integrations_table.test.tsx.snap b/public/components/datasources/components/__tests__/__snapshots__/installed_integrations_table.test.tsx.snap index b5e6a2f5ce..7adb3ead2c 100644 --- a/public/components/datasources/components/__tests__/__snapshots__/installed_integrations_table.test.tsx.snap +++ b/public/components/datasources/components/__tests__/__snapshots__/installed_integrations_table.test.tsx.snap @@ -937,13 +937,10 @@ exports[`Installed Integrations Table test Renders the installed integrations ta
-
@@ -1087,13 +1084,10 @@ exports[`Installed Integrations Table test Renders the installed integrations ta
-
@@ -1169,13 +1163,10 @@ exports[`Installed Integrations Table test Renders the installed integrations ta
-
@@ -1251,13 +1242,10 @@ exports[`Installed Integrations Table test Renders the installed integrations ta
-
@@ -1321,13 +1309,10 @@ exports[`Installed Integrations Table test Renders the installed integrations ta
-
@@ -1459,23 +1444,19 @@ exports[`Installed Integrations Table test Renders the installed integrations ta >
- -
- diff --git a/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap index 7610f0880a..a3beb8f6c4 100644 --- a/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap +++ b/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap @@ -463,9 +463,11 @@ exports[`Available Integration Card View Test Renders nginx integration card vie
- +
- -
-
diff --git a/public/components/integrations/components/__tests__/__snapshots__/available_integration_table_view.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/available_integration_table_view.test.tsx.snap index cbfa6d9204..d8aa34bc13 100644 --- a/public/components/integrations/components/__tests__/__snapshots__/available_integration_table_view.test.tsx.snap +++ b/public/components/integrations/components/__tests__/__snapshots__/available_integration_table_view.test.tsx.snap @@ -62,23 +62,19 @@ exports[`Available Integration Table View Test Renders nginx integration table v >
- -
- @@ -210,6 +208,7 @@ exports[`Available Integration Table View Test Renders nginx integration table v
@@ -310,7 +310,7 @@ exports[`Available Integration Table View Test Renders nginx integration table v className="euiFormControlLayoutIcons" >