From b9c5775d5fc1b36e45a0e45f0bb8c5b809da1f40 Mon Sep 17 00:00:00 2001 From: Kate Patticha Date: Tue, 15 Oct 2024 18:40:11 +0300 Subject: [PATCH 1/3] [Inventory] Add TP icon and link to docs --- .../entity_enablement/enable_entity_model_button.tsx | 2 ++ .../inventory_page_template/no_data_config.tsx | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/inventory/public/components/entity_enablement/enable_entity_model_button.tsx b/x-pack/plugins/observability_solution/inventory/public/components/entity_enablement/enable_entity_model_button.tsx index 6f13c33585bc..6e5d3d480999 100644 --- a/x-pack/plugins/observability_solution/inventory/public/components/entity_enablement/enable_entity_model_button.tsx +++ b/x-pack/plugins/observability_solution/inventory/public/components/entity_enablement/enable_entity_model_button.tsx @@ -10,6 +10,7 @@ import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; import { EntityManagerUnauthorizedError } from '@kbn/entityManager-plugin/public'; import type { IHttpFetchError, ResponseErrorBody } from '@kbn/core/public'; +import { TechnicalPreviewBadge } from '@kbn/observability-shared-plugin/public'; import { useKibana } from '../../hooks/use_kibana'; import { Unauthorized } from './unauthorized_modal'; @@ -61,6 +62,7 @@ export function EnableEntityModelButton({ onSuccess }: { onSuccess: () => void } {i18n.translate('xpack.inventory.noData.card.button', { defaultMessage: 'Enable', })} + {showModal ? setModalVisible(false)} /> : null} diff --git a/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/no_data_config.tsx b/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/no_data_config.tsx index 3b12e11d2ba7..075089a4d6e9 100644 --- a/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/no_data_config.tsx +++ b/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/no_data_config.tsx @@ -33,8 +33,18 @@ export function getEntityManagerEnablement({ description: ( + {i18n.translate('xpack.inventory.noData.card.description.inventory', { + defaultMessage: 'inventory', + })} + + ), link: ( Date: Wed, 16 Oct 2024 11:51:32 +0300 Subject: [PATCH 2/3] Open link in a new tab --- .../components/inventory_page_template/no_data_config.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/no_data_config.tsx b/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/no_data_config.tsx index 075089a4d6e9..79db53f39c34 100644 --- a/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/no_data_config.tsx +++ b/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/no_data_config.tsx @@ -39,9 +39,11 @@ export function getEntityManagerEnablement({ {i18n.translate('xpack.inventory.noData.card.description.inventory', { - defaultMessage: 'inventory', + defaultMessage: 'Inventory', })} ), From 9f3ebabe3be029e55108dedf46b5e6c91efc4bbd Mon Sep 17 00:00:00 2001 From: Kate Patticha Date: Wed, 16 Oct 2024 13:04:17 +0300 Subject: [PATCH 3/3] Use iconType instead --- .../entity_enablement/enable_entity_model_button.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/inventory/public/components/entity_enablement/enable_entity_model_button.tsx b/x-pack/plugins/observability_solution/inventory/public/components/entity_enablement/enable_entity_model_button.tsx index 6e5d3d480999..7941881ff2c5 100644 --- a/x-pack/plugins/observability_solution/inventory/public/components/entity_enablement/enable_entity_model_button.tsx +++ b/x-pack/plugins/observability_solution/inventory/public/components/entity_enablement/enable_entity_model_button.tsx @@ -58,11 +58,12 @@ export function EnableEntityModelButton({ onSuccess }: { onSuccess: () => void } data-test-subj="inventoryInventoryPageTemplateFilledButton" fill onClick={handleEnablement} + iconType={() => } + iconSide="right" > {i18n.translate('xpack.inventory.noData.card.button', { defaultMessage: 'Enable', })} - {showModal ? setModalVisible(false)} /> : null}