diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index a0856a9d8de8d..e75c7d5da2d8b 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -25793,7 +25793,6 @@ "xpack.inventory.badgeFilterWithPopover.filterForButtonEmptyLabel": "Filtrer sur", "xpack.inventory.badgeFilterWithPopover.openPopoverBadgeLabel": "Ouvrir la fenêtre contextuelle", "xpack.inventory.data_view.creation_failed": "Une erreur s'est produite lors de la création de la vue de données", - "xpack.inventory.eemEnablement.errorTitle": "Erreur lors de l'activation du nouveau modèle d'entité", "xpack.inventory.entitiesGrid.euiDataGrid.alertsLabel": "Alertes", "xpack.inventory.entitiesGrid.euiDataGrid.alertsTooltip": "Le nombre d'alertes actives", "xpack.inventory.entitiesGrid.euiDataGrid.entityNameLabel": "Nom de l'entité", @@ -25810,13 +25809,6 @@ "xpack.inventory.home.serviceAlertsTable.tooltip.activeAlertsExplanation": "Alertes actives", "xpack.inventory.inventoryLinkTitle": "Inventory", "xpack.inventory.inventoryPageHeaderLabel": "Inventory", - "xpack.inventory.noData.card.button": "Activer", - "xpack.inventory.noData.card.description": "L’{inventoryLink} utilise le {link} pour afficher l'ensemble des entités observées en un seul endroit.", - "xpack.inventory.noData.card.description.inventory": "Inventory", - "xpack.inventory.noData.card.description.link": "Modèle d'entité Elastic", - "xpack.inventory.noData.page.description": "L'inventaire affichera toutes vos entités observées en un seul endroit afin que vous puissiez détecter et résoudre les problèmes liés à celles-ci plus rapidement !", - "xpack.inventory.noData.page.title": "Tout ce que vous avez en un seul endroit !", - "xpack.inventory.noData.solutionName": "Observabilité", "xpack.inventory.noEntitiesEmptyState.actions.title": "Commencez à observer vos entités :", "xpack.inventory.noEntitiesEmptyState.body.description": "Visualisez toutes vos entités observées en un seul endroit en collectant des données.", "xpack.inventory.noEntitiesEmptyState.callout.title": "C'est votre premier essai ?", @@ -25827,16 +25819,6 @@ "xpack.inventory.shareLink.shareButtonLabel": "Partager", "xpack.inventory.shareLink.shareToastFailureLabel": "Les URL courtes ne peuvent pas être copiées.", "xpack.inventory.shareLink.shareToastSuccessLabel": "URL courte copiée dans le presse-papiers !", - "xpack.inventory.unauthorised.body": "Vous n'avez pas les autorisations nécessaires pour activer le modèle d'entité Elastic. Veuillez demander à votre administrateur de l'activer pour vous afin que vous puissiez voir toutes vos ressources en un seul endroit.", - "xpack.inventory.unauthorised.button": "OK", - "xpack.inventory.unauthorised.image.at,": "Image de la nouvelle interface de l'inventaire des entités, montrant les services, les hôtes et les conteneurs", - "xpack.inventory.unauthorised.title": "Permissions insuffisantes", - "xpack.inventory.unauthorized.linkLabel": "En savoir plus", - "xpack.inventory.welcome.body": "L'inventaire affichera toutes vos entités observées en un seul endroit pour que vous puissiez détecter et résoudre les problèmes plus rapidement.", - "xpack.inventory.welcome.button": "OK", - "xpack.inventory.welcome.image.alt": "Image de la nouvelle interface de l'inventaire des entités, montrant les services, les hôtes et les conteneurs", - "xpack.inventory.welcome.linkLabel": "En savoir plus", - "xpack.inventory.welcome.title": "Tout ce que vous avez en un seul endroit !", "xpack.investigateApp.addFromLibraryButtonLabel": "Importer depuis la bibliothèque", "xpack.investigateApp.addInvestigationItem.errorMessage": "une erreur s'est produite", "xpack.investigateApp.addInvestigationItem.errorTitle": "Erreur", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index 08a6b2022e08f..eaecad312844b 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -25652,7 +25652,6 @@ "xpack.inventory.badgeFilterWithPopover.filterForButtonEmptyLabel": "フィルター", "xpack.inventory.badgeFilterWithPopover.openPopoverBadgeLabel": "ポップオーバーを開く", "xpack.inventory.data_view.creation_failed": "データビューの作成中にエラーが発生しました", - "xpack.inventory.eemEnablement.errorTitle": "新しいエンティティモデルの有効化エラー", "xpack.inventory.entitiesGrid.euiDataGrid.alertsLabel": "アラート", "xpack.inventory.entitiesGrid.euiDataGrid.alertsTooltip": "アクティブなアラートの件数", "xpack.inventory.entitiesGrid.euiDataGrid.entityNameLabel": "エンティティ名", @@ -25669,13 +25668,6 @@ "xpack.inventory.home.serviceAlertsTable.tooltip.activeAlertsExplanation": "アクティブアラート", "xpack.inventory.inventoryLinkTitle": "インベントリ", "xpack.inventory.inventoryPageHeaderLabel": "インベントリ", - "xpack.inventory.noData.card.button": "有効にする", - "xpack.inventory.noData.card.description": "{inventoryLink}は、{link}を使用して、観測されたエンティティをすべて一元的に表示します。", - "xpack.inventory.noData.card.description.inventory": "インベントリ", - "xpack.inventory.noData.card.description.link": "Elasticエンティティモデル", - "xpack.inventory.noData.page.description": "インベントリでは、観測されたすべてのエンティティが一元的に表示されるため、それらの問題をより迅速に検出および解決することができます!", - "xpack.inventory.noData.page.title": "すべてを一元的に確認できます!", - "xpack.inventory.noData.solutionName": "Observability", "xpack.inventory.noEntitiesEmptyState.actions.title": "エンティティの観測を開始:", "xpack.inventory.noEntitiesEmptyState.body.description": "いくつかのデータを収集することで、観測されたエンティティをすべて一元的に確認できます。", "xpack.inventory.noEntitiesEmptyState.callout.title": "初めて試す場合", @@ -25686,16 +25678,6 @@ "xpack.inventory.shareLink.shareButtonLabel": "共有", "xpack.inventory.shareLink.shareToastFailureLabel": "短縮URLをコピーできません。", "xpack.inventory.shareLink.shareToastSuccessLabel": "短縮URLがクリップボードにコピーされました!", - "xpack.inventory.unauthorised.body": "Elasticエンティティモデルをオンにする権限がありません。すべてを一元的に確認できるように、管理者にこの機能を有効にするよう依頼してください。", - "xpack.inventory.unauthorised.button": "OK", - "xpack.inventory.unauthorised.image.at,": "サービス、ホスト、コンテナーを表示する、エンティティの在庫の新しいエクスペリエンスの図", - "xpack.inventory.unauthorised.title": "パーミッションがありません", - "xpack.inventory.unauthorized.linkLabel": "詳細", - "xpack.inventory.welcome.body": "インベントリでは、観測されたすべてのエンティティが一元的に表示されるため、それらの問題をより迅速に検出および解決することができます。", - "xpack.inventory.welcome.button": "OK", - "xpack.inventory.welcome.image.alt": "サービス、ホスト、コンテナーを表示する、エンティティの在庫の新しいエクスペリエンスの図", - "xpack.inventory.welcome.linkLabel": "詳細", - "xpack.inventory.welcome.title": "すべてを一元的に確認できます!", "xpack.investigateApp.addFromLibraryButtonLabel": "ライブラリからインポート", "xpack.investigateApp.addInvestigationItem.errorMessage": "エラーが発生しました", "xpack.investigateApp.addInvestigationItem.errorTitle": "エラー", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index 1f522395a38b2..6cda136de7b0a 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -25219,7 +25219,6 @@ "xpack.inventory.badgeFilterWithPopover.filterForButtonEmptyLabel": "筛留", "xpack.inventory.badgeFilterWithPopover.openPopoverBadgeLabel": "打开弹出框", "xpack.inventory.data_view.creation_failed": "创建数据视图时出错", - "xpack.inventory.eemEnablement.errorTitle": "启用新实体模型时出错", "xpack.inventory.entitiesGrid.euiDataGrid.alertsLabel": "告警", "xpack.inventory.entitiesGrid.euiDataGrid.alertsTooltip": "活动告警计数", "xpack.inventory.entitiesGrid.euiDataGrid.entityNameLabel": "实体名称", @@ -25236,13 +25235,6 @@ "xpack.inventory.home.serviceAlertsTable.tooltip.activeAlertsExplanation": "活动告警", "xpack.inventory.inventoryLinkTitle": "库存", "xpack.inventory.inventoryPageHeaderLabel": "库存", - "xpack.inventory.noData.card.button": "启用", - "xpack.inventory.noData.card.description": "{inventoryLink} 使用 {link} 在一个位置显示您观察到的所有实体。", - "xpack.inventory.noData.card.description.inventory": "库存", - "xpack.inventory.noData.card.description.link": "Elastic 实体模型", - "xpack.inventory.noData.page.description": "库存将在一个位置显示您观察到的所有实体,以便您更快检测并解决它们存在的问题!", - "xpack.inventory.noData.page.title": "在一个位置查看您的所有内容!", - "xpack.inventory.noData.solutionName": "Observability", "xpack.inventory.noEntitiesEmptyState.actions.title": "开始观察您的实体:", "xpack.inventory.noEntitiesEmptyState.body.description": "通过收集某些数据,在一个位置查看您观察到的所有实体。", "xpack.inventory.noEntitiesEmptyState.callout.title": "第一次尝试?", @@ -25253,16 +25245,6 @@ "xpack.inventory.shareLink.shareButtonLabel": "共享", "xpack.inventory.shareLink.shareToastFailureLabel": "无法复制短 URL。", "xpack.inventory.shareLink.shareToastSuccessLabel": "短 URL 已复制到剪贴板!", - "xpack.inventory.unauthorised.body": "您无权打开 Elastic 实体模型。请联系管理员为您启用此模型,以便在一个位置查看您的所有内容。", - "xpack.inventory.unauthorised.button": "确定", - "xpack.inventory.unauthorised.image.at,": "实体库存新体验的图像,显示服务、主机和容器", - "xpack.inventory.unauthorised.title": "权限不足", - "xpack.inventory.unauthorized.linkLabel": "了解详情", - "xpack.inventory.welcome.body": "库存将在一个位置显示您观察到的所有实体,以便您更快检测并解决它们存在的问题。", - "xpack.inventory.welcome.button": "确定", - "xpack.inventory.welcome.image.alt": "实体库存新体验的图像,显示服务、主机和容器", - "xpack.inventory.welcome.linkLabel": "了解详情", - "xpack.inventory.welcome.title": "在一个位置查看您的所有内容!", "xpack.investigateApp.addFromLibraryButtonLabel": "从库中导入", "xpack.investigateApp.addInvestigationItem.errorMessage": "发生错误", "xpack.investigateApp.addInvestigationItem.errorTitle": "错误", diff --git a/x-pack/solutions/observability/plugins/inventory/public/assets/entities_inventory_dark.png b/x-pack/solutions/observability/plugins/inventory/public/assets/entities_inventory_dark.png deleted file mode 100644 index 991abf611a005..0000000000000 Binary files a/x-pack/solutions/observability/plugins/inventory/public/assets/entities_inventory_dark.png and /dev/null differ diff --git a/x-pack/solutions/observability/plugins/inventory/public/assets/entities_inventory_light.png b/x-pack/solutions/observability/plugins/inventory/public/assets/entities_inventory_light.png deleted file mode 100644 index f313d3df54842..0000000000000 Binary files a/x-pack/solutions/observability/plugins/inventory/public/assets/entities_inventory_light.png and /dev/null differ diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/entity_enablement/enable_entity_model_button.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/entity_enablement/enable_entity_model_button.tsx deleted file mode 100644 index 7941881ff2c51..0000000000000 --- a/x-pack/solutions/observability/plugins/inventory/public/components/entity_enablement/enable_entity_model_button.tsx +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { EuiButton } from '@elastic/eui'; -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'; - -export function EnableEntityModelButton({ onSuccess }: { onSuccess: () => void }) { - const { - services: { entityManager, notifications }, - } = useKibana(); - - const [isLoading, setIsLoading] = useState(false); - const [showModal, setModalVisible] = useState(false); - - const handleEnablement = async () => { - setIsLoading(true); - try { - const response = await entityManager.entityClient.enableManagedEntityDiscovery(); - - if (response.success) { - setIsLoading(false); - onSuccess(); - } else { - throw new Error(response.message); - } - } catch (error) { - setIsLoading(false); - - if (error instanceof EntityManagerUnauthorizedError) { - setModalVisible(true); - return; - } - - const err = error as Error | IHttpFetchError; - notifications.toasts.addDanger({ - title: i18n.translate('xpack.inventory.eemEnablement.errorTitle', { - defaultMessage: 'Error while enabling the new entity model', - }), - text: 'response' in err ? err.body?.message ?? err.response?.statusText : err.message, - }); - } - }; - - return ( - <> - } - iconSide="right" - > - {i18n.translate('xpack.inventory.noData.card.button', { - defaultMessage: 'Enable', - })} - - {showModal ? setModalVisible(false)} /> : null} - - ); -} diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/entity_enablement/unauthorized_modal.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/entity_enablement/unauthorized_modal.tsx deleted file mode 100644 index 790240e66e433..0000000000000 --- a/x-pack/solutions/observability/plugins/inventory/public/components/entity_enablement/unauthorized_modal.tsx +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { i18n } from '@kbn/i18n'; -import { - EuiButton, - EuiConfirmModal, - EuiFlexGroup, - EuiFlexItem, - EuiIcon, - EuiImage, - EuiLink, - EuiPanel, - EuiSpacer, - EuiText, - EuiTitle, - useEuiTheme, - COLOR_MODES_STANDARD, -} from '@elastic/eui'; -import inventoryLight from '../../assets/entities_inventory_light.png'; -import inventoryDark from '../../assets/entities_inventory_dark.png'; - -export function Unauthorized({ onClose }: { onClose: () => void }) { - const { colorMode } = useEuiTheme(); - - return ( - - {i18n.translate('xpack.inventory.unauthorised.button', { - defaultMessage: 'OK', - })} - - } - cancelButtonText={ - - {i18n.translate('xpack.inventory.unauthorized.linkLabel', { - defaultMessage: 'Learn more', - })} - - } - defaultFocusedButton="confirm" - > - - - - - - - -

- {i18n.translate('xpack.inventory.unauthorised.title', { - defaultMessage: 'Insufficient permissions', - })} -

-
-
-
-
- - - -

- {i18n.translate('xpack.inventory.unauthorised.body', { - defaultMessage: - "You don't have permissions to turn on the Elastic Entity Model. Please ask your administrator to enable this for you so you can see everything you have in one place.", - })} -

-
-
- - - - -
- ); -} diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/entity_enablement/welcome_modal.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/entity_enablement/welcome_modal.tsx deleted file mode 100644 index 18adc9f87c43e..0000000000000 --- a/x-pack/solutions/observability/plugins/inventory/public/components/entity_enablement/welcome_modal.tsx +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { i18n } from '@kbn/i18n'; -import { - EuiButton, - EuiConfirmModal, - EuiFlexGroup, - EuiFlexItem, - EuiIcon, - EuiImage, - EuiLink, - EuiPanel, - EuiSpacer, - EuiText, - EuiTitle, - useEuiTheme, - COLOR_MODES_STANDARD, -} from '@elastic/eui'; -import inventoryLight from '../../assets/entities_inventory_light.png'; -import inventoryDark from '../../assets/entities_inventory_dark.png'; - -export function Welcome({ onClose, onConfirm }: { onClose: () => void; onConfirm: () => void }) { - const { colorMode } = useEuiTheme(); - - return ( - - {i18n.translate('xpack.inventory.welcome.button', { - defaultMessage: 'OK', - })} - - } - cancelButtonText={ - - {i18n.translate('xpack.inventory.welcome.linkLabel', { - defaultMessage: 'Learn more', - })} - - } - defaultFocusedButton="confirm" - > - - - - - - - -

- {i18n.translate('xpack.inventory.welcome.title', { - defaultMessage: 'See everything you have in one place!', - })} -

-
-
-
-
- - - -

- {i18n.translate('xpack.inventory.welcome.body', { - defaultMessage: - 'The inventory will show all of your observed entities in one place so you can detect and resolve problems with them faster.', - })} -

-
-
- - - - -
- ); -} diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/inventory_page_template/index.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/inventory_page_template/index.tsx index 476451370fa12..0e5b5ca695aa0 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/inventory_page_template/index.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/inventory_page_template/index.tsx @@ -13,9 +13,6 @@ import { } from '@kbn/observability-shared-plugin/public'; import { useKibana } from '../../hooks/use_kibana'; import { SearchBar } from '../search_bar'; -import { getEntityManagerEnablement } from './no_data_config'; -import { useEntityManager } from '../../hooks/use_entity_manager'; -import { Welcome } from '../entity_enablement/welcome_modal'; import { useInventoryAbortableAsync } from '../../hooks/use_inventory_abortable_async'; import { EmptyState } from '../empty_states/empty_state'; import { useIsLoadingComplete } from '../../hooks/use_is_loading_complete'; @@ -41,19 +38,6 @@ export function InventoryPageTemplate({ children }: { children: React.ReactNode } = useKibana(); const { PageTemplate: ObservabilityPageTemplate } = observabilityShared.navigation; - const { - isEntityManagerEnabled, - isEnablementLoading, - refresh, - showWelcomedModal, - toggleWelcomedModal, - } = useEntityManager(); - - const handleSuccess = () => { - refresh(); - toggleWelcomedModal(); - }; - const { value = { hasData: false }, loading: hasDataLoading } = useInventoryAbortableAsync( ({ signal }) => { return inventoryAPIClient.fetch('GET /internal/inventory/has_data', { @@ -64,23 +48,19 @@ export function InventoryPageTemplate({ children }: { children: React.ReactNode ); const isLoadingComplete = useIsLoadingComplete({ - loadingStates: [isEnablementLoading, hasDataLoading], + loadingStates: [hasDataLoading], }); useEffect(() => { if (isLoadingComplete) { - const viewState = isEntityManagerEnabled - ? value.hasData - ? 'populated' - : 'empty' - : 'eem_disabled'; + const viewState = value.hasData ? 'populated' : 'empty'; telemetry.reportEntityInventoryViewed({ view_state: viewState, }); } - }, [isEntityManagerEnabled, value.hasData, telemetry, isLoadingComplete]); + }, [value.hasData, telemetry, isLoadingComplete]); - if (isEnablementLoading || hasDataLoading) { + if (hasDataLoading) { return ( , ], }} - noDataConfig={getEntityManagerEnablement({ - enabled: isEntityManagerEnabled, - loading: isEnablementLoading, - onSuccess: handleSuccess, - })} > {value.hasData ? ( - - {children} - {showWelcomedModal ? ( - - ) : null} - + {children} ) : ( diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/inventory_page_template/no_data_config.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/inventory_page_template/no_data_config.tsx deleted file mode 100644 index 79db53f39c346..0000000000000 --- a/x-pack/solutions/observability/plugins/inventory/public/components/inventory_page_template/no_data_config.tsx +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiLink } from '@elastic/eui'; -import { EnableEntityModelButton } from '../entity_enablement/enable_entity_model_button'; - -export function getEntityManagerEnablement({ - enabled, - loading, - onSuccess, -}: { - enabled: boolean; - loading: boolean; - onSuccess: () => void; -}) { - if (enabled || loading) { - return; - } - - return { - solution: i18n.translate('xpack.inventory.noData.solutionName', { - defaultMessage: 'Observability', - }), - action: { - elasticAgent: { - description: ( - - {i18n.translate('xpack.inventory.noData.card.description.inventory', { - defaultMessage: 'Inventory', - })} - - ), - link: ( - - {i18n.translate('xpack.inventory.noData.card.description.link', { - defaultMessage: 'Elastic Entity Model', - })} - - ), - }} - /> - ), - button: , - onClick: (event: React.MouseEvent) => { - event.preventDefault(); - }, - }, - }, - pageTitle: i18n.translate('xpack.inventory.noData.page.title', { - defaultMessage: 'See everything you have in one place!', - }), - pageDescription: i18n.translate('xpack.inventory.noData.page.description', { - defaultMessage: - 'The inventory will show all of your observed entities in one place so you can detect and resolve problems with them faster!', - }), - }; -} diff --git a/x-pack/solutions/observability/plugins/inventory/public/hooks/use_entity_manager.ts b/x-pack/solutions/observability/plugins/inventory/public/hooks/use_entity_manager.ts deleted file mode 100644 index 740c88eb8a9b0..0000000000000 --- a/x-pack/solutions/observability/plugins/inventory/public/hooks/use_entity_manager.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { useAbortableAsync } from '@kbn/observability-utils-browser/hooks/use_abortable_async'; -import { useState } from 'react'; -import { useKibana } from './use_kibana'; - -export const useEntityManager = () => { - const { - services: { entityManager }, - } = useKibana(); - - const [showWelcomedModal, setWelcomedModal] = useState(false); - - const { - value = { enabled: false }, - loading, - refresh, - } = useAbortableAsync( - ({ signal }) => { - return entityManager.entityClient.isManagedEntityDiscoveryEnabled(); - }, - [entityManager] - ); - - return { - isEntityManagerEnabled: value.enabled, - isEnablementLoading: loading, - refresh, - showWelcomedModal, - toggleWelcomedModal: () => setWelcomedModal((state) => !state), - }; -};