From cd138193ee47ecb511cd5b50eccc38813e730bdf Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Thu, 14 Apr 2022 12:33:15 +0200 Subject: [PATCH] add link to UI --- .../management/components/i18n_texts.tsx | 6 ++--- .../components/report_info_flyout_content.tsx | 23 +++++++++++-------- .../management/mount_management_section.tsx | 1 + x-pack/plugins/reporting/public/types.ts | 9 ++++---- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/x-pack/plugins/reporting/public/management/components/i18n_texts.tsx b/x-pack/plugins/reporting/public/management/components/i18n_texts.tsx index a8066e72a1ed1..fd13b8beb0375 100644 --- a/x-pack/plugins/reporting/public/management/components/i18n_texts.tsx +++ b/x-pack/plugins/reporting/public/management/components/i18n_texts.tsx @@ -15,13 +15,13 @@ export const i18nTexts = { insufficientMemoryError: (helpUrl: string) => ( {i18n.translate( 'xpack.reporting.listing.infoPanel.callout.cloud.insufficientMemoryError.urlLink', - { defaultMessage: 'this documentation' } + { defaultMessage: 'See minimum RAM requirements' } )} ), diff --git a/x-pack/plugins/reporting/public/management/components/report_info_flyout_content.tsx b/x-pack/plugins/reporting/public/management/components/report_info_flyout_content.tsx index f4cc0861c6932..f5ade052eb1a7 100644 --- a/x-pack/plugins/reporting/public/management/components/report_info_flyout_content.tsx +++ b/x-pack/plugins/reporting/public/management/components/report_info_flyout_content.tsx @@ -43,7 +43,7 @@ const createDateFormatter = (format: string, tz: string) => (date: string) => { export const ReportInfoFlyoutContent: FunctionComponent = ({ info }) => { const { - services: { uiSettings }, + services: { uiSettings, docLinks }, } = useKibana(); const timezone = @@ -195,20 +195,23 @@ export const ReportInfoFlyoutContent: FunctionComponent = ({ info }) => { * should only occur on cloud. */ info.error_code === VisualReportingSoftDisabledError.code - ? i18nTexts.cloud.insufficientMemoryError('#') + ? i18nTexts.cloud.insufficientMemoryError(docLinks.links.reporting.cloudMinimumRequirements) : info.getError(); return ( <> {Boolean(errored) && ( - - {errored} - + <> + + {errored} + + + )} {Boolean(warnings) && ( <> diff --git a/x-pack/plugins/reporting/public/management/mount_management_section.tsx b/x-pack/plugins/reporting/public/management/mount_management_section.tsx index 6d888c6071a78..2d20227bfe951 100644 --- a/x-pack/plugins/reporting/public/management/mount_management_section.tsx +++ b/x-pack/plugins/reporting/public/management/mount_management_section.tsx @@ -34,6 +34,7 @@ export async function mountManagementSection( http: coreSetup.http, application: coreStart.application, uiSettings: coreStart.uiSettings, + docLinks: coreStart.docLinks, }} > diff --git a/x-pack/plugins/reporting/public/types.ts b/x-pack/plugins/reporting/public/types.ts index 25b7738ff1981..d14fe741c3f4f 100644 --- a/x-pack/plugins/reporting/public/types.ts +++ b/x-pack/plugins/reporting/public/types.ts @@ -5,10 +5,11 @@ * 2.0. */ -import type { HttpSetup, ApplicationStart, CoreSetup } from 'src/core/public'; +import type { CoreSetup, CoreStart } from 'src/core/public'; export interface KibanaContext { - http: HttpSetup; - application: ApplicationStart; - uiSettings: CoreSetup['uiSettings']; + http: CoreSetup['http']; + application: CoreStart['application']; + uiSettings: CoreStart['uiSettings']; + docLinks: CoreStart['docLinks']; }