diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/not_authorized_section.tsx b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/not_authorized_section.tsx index da3454b5faa3f..f896826eca6d5 100644 --- a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/not_authorized_section.tsx +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/not_authorized_section.tsx @@ -12,8 +12,14 @@ import { EuiEmptyPrompt } from '@elastic/eui'; interface Props { title: React.ReactNode; message: React.ReactNode | string; + dataTestSubj?: string; } -export const NotAuthorizedSection = ({ title, message }: Props) => ( - {title}} body={

{message}

} /> +export const NotAuthorizedSection = ({ title, message, dataTestSubj }: Props) => ( + {title}} + body={

{message}

} + /> ); diff --git a/x-pack/plugins/upgrade_assistant/public/application/app.tsx b/x-pack/plugins/upgrade_assistant/public/application/app.tsx index a61468e2e5ebe..90de3755c0d76 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/app.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/app.tsx @@ -11,11 +11,7 @@ import { Redirect } from 'react-router-dom'; import { Router, Routes, Route } from '@kbn/shared-ux-router'; import { FormattedMessage } from '@kbn/i18n-react'; -import { - EuiEmptyPrompt, - EuiPageContent_Deprecated as EuiPageContent, - EuiLoadingSpinner, -} from '@elastic/eui'; +import { EuiLoadingSpinner, EuiPageTemplate } from '@elastic/eui'; import { ScopedHistory } from '@kbn/core/public'; import { API_BASE_PATH } from '../../common/constants'; @@ -52,94 +48,72 @@ const AppHandlingClusterUpgradeState: React.FunctionComponent = () => { if (missingManageSpacesPrivilege) { return ( - - - } - message={ - - } - /> - + + } + message={ + + } + /> ); } if (clusterUpgradeState === 'isUpgrading') { return ( - - - - - } - body={ -

- + + + } + body={ +

+ -

- } - data-test-subj="emptyPrompt" - /> -
+ /> +

+ } + data-test-subj="isUpgradingMessage" + /> ); } if (clusterUpgradeState === 'isUpgradeComplete') { return ( - + + + } + body={ +

+ +

+ } data-test-subj="isUpgradeCompleteMessage" - > - - - - } - body={ -

- -

- } - data-test-subj="emptyPrompt" - /> -
+ /> ); } @@ -170,16 +144,7 @@ export const App = ({ history }: { history: ScopedHistory }) => { // Prevent flicker of the underlying UI while we wait for the status to fetch. if (isLoading && isInitialRequest) { - return ( - - } /> - - ); + return } />; } return ( diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/es_deprecation_logs.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/es_deprecation_logs.tsx index e9025783a94d5..fedde5a0bdc6a 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/es_deprecation_logs.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/es_deprecation_logs.tsx @@ -12,7 +12,7 @@ import { EuiButtonEmpty, EuiSpacer, EuiPageBody, - EuiPageContentBody_Deprecated as EuiPageContentBody, + EuiPageSection, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { METRIC_TYPE } from '@kbn/analytics'; @@ -40,7 +40,7 @@ export const EsDeprecationLogs: FunctionComponent = () => { return ( - + { - + ); }; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx index 7674fab8be2d5..adb6feeba1cbf 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx @@ -8,13 +8,7 @@ import React, { useEffect, useMemo } from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { - EuiPageHeader, - EuiSpacer, - EuiPageContent_Deprecated as EuiPageContent, - EuiLink, - EuiCallOut, -} from '@elastic/eui'; +import { EuiPageHeader, EuiSpacer, EuiLink, EuiCallOut } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { DocLinksStart } from '@kbn/core/public'; @@ -155,21 +149,15 @@ export const EsDeprecations = withRouter(({ history }: RouteComponentProps) => { } if (isLoading) { - return ( - - {i18nTexts.isLoading} - - ); + return {i18nTexts.isLoading}; } if (esDeprecations?.deprecations?.length === 0) { return ( - - history.push('/overview')} - /> - + history.push('/overview')} + /> ); } diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx index b28fa1180bda9..25e96108044c8 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx @@ -8,12 +8,7 @@ import React, { useEffect, useState, useCallback, useMemo } from 'react'; import { v4 as uuidv4 } from 'uuid'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { - EuiPageContent_Deprecated as EuiPageContent, - EuiPageHeader, - EuiSpacer, - EuiCallOut, -} from '@elastic/eui'; +import { EuiPageHeader, EuiSpacer, EuiCallOut } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { METRIC_TYPE } from '@kbn/analytics'; @@ -234,21 +229,15 @@ export const KibanaDeprecations = withRouter(({ history }: RouteComponentProps) } if (isLoading) { - return ( - - {i18nTexts.isLoading} - - ); + return {i18nTexts.isLoading}; } if (kibanaDeprecations?.length === 0) { return ( - - history.push('/overview')} - /> - + history.push('/overview')} + /> ); } diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/overview.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/overview/overview.tsx index 878f84864c302..cc28b2e152e23 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/overview/overview.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/overview/overview.tsx @@ -15,7 +15,7 @@ import { EuiSpacer, EuiLink, EuiPageBody, - EuiPageContentBody_Deprecated as EuiPageContentBody, + EuiPageSection, } from '@elastic/eui'; import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; @@ -69,7 +69,7 @@ export const Overview = withRouter(({ history }: RouteComponentProps) => { return ( - + { ].filter(Boolean) as EuiStepProps[] } /> - + ); }); diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/shared/deprecations_page_loading_error.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/shared/deprecations_page_loading_error.tsx index 79556766c0dfe..171dc50bcb6b8 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/shared/deprecations_page_loading_error.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/shared/deprecations_page_loading_error.tsx @@ -6,7 +6,7 @@ */ import React, { FunctionComponent } from 'react'; -import { EuiPageContent_Deprecated as EuiPageContent, EuiEmptyPrompt } from '@elastic/eui'; +import { EuiPageTemplate } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { DeprecationSource } from '../../../../common/types'; @@ -20,23 +20,18 @@ export const DeprecationsPageLoadingError: FunctionComponent = ({ deprecationSource, message, }) => ( - - - {i18n.translate('xpack.upgradeAssistant.deprecationsPageLoadingError.title', { - defaultMessage: 'Could not retrieve {deprecationSource} deprecation issues', - values: { deprecationSource }, - })} - - } - body={message} - /> - + title={ +

+ {i18n.translate('xpack.upgradeAssistant.deprecationsPageLoadingError.title', { + defaultMessage: 'Could not retrieve {deprecationSource} deprecation issues', + values: { deprecationSource }, + })} +

+ } + body={message} + /> ); diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/shared/no_deprecations.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/shared/no_deprecations.tsx index 6e06ffe03f904..dda89bfd45f1a 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/shared/no_deprecations.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/shared/no_deprecations.tsx @@ -7,7 +7,7 @@ import React, { FunctionComponent } from 'react'; -import { EuiLink, EuiEmptyPrompt } from '@elastic/eui'; +import { EuiLink, EuiPageTemplate } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -46,7 +46,7 @@ export const NoDeprecationsPrompt: FunctionComponent = ({ navigateToOverviewPage, }) => { return ( - {i18nTexts.getEmptyPromptTitle(deprecationType)}}