diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana.test.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana.test.ts
index 867440ae0d91..b14ec26e5c8a 100644
--- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana.test.ts
+++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana.test.ts
@@ -182,9 +182,7 @@ describe('Kibana deprecations', () => {
component.update();
expect(exists('kibanaRequestError')).toBe(true);
- expect(find('kibanaRequestError').text()).toContain(
- 'Could not retrieve Kibana deprecations.'
- );
+ expect(find('kibanaRequestError').text()).toContain('Could not retrieve Kibana deprecations');
});
test('handles deprecation service error', async () => {
@@ -217,7 +215,7 @@ describe('Kibana deprecations', () => {
// Verify top-level callout renders
expect(exists('kibanaPluginError')).toBe(true);
expect(find('kibanaPluginError').text()).toContain(
- 'Not all Kibana deprecations were retrieved successfully.'
+ 'Not all Kibana deprecations were retrieved successfully'
);
// Open all deprecations
diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/coming_soon_prompt.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/coming_soon_prompt.tsx
index b7869226a84b..14627f0b138b 100644
--- a/x-pack/plugins/upgrade_assistant/public/application/components/coming_soon_prompt.tsx
+++ b/x-pack/plugins/upgrade_assistant/public/application/components/coming_soon_prompt.tsx
@@ -16,7 +16,7 @@ export const ComingSoonPrompt: React.FunctionComponent = () => {
const { ELASTIC_WEBSITE_URL } = docLinks;
return (
-
+
-
-
- {i18nTexts.docLinkText}
- ,
- ]}
- >
-
-
- {i18nTexts.backupDataButton.label}
-
-
-
+ <>
+
+ {i18nTexts.docLinkText}
+ ,
+ ]}
+ >
+
+
+ {i18nTexts.backupDataButton.label}
+
+
+
-
- tab.id === tabName)}
- />
-
-
-
+
+
+ tab.id === tabName)}
+ />
+ >
);
}
);
diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecation_errors.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecation_errors.tsx
index e6ba83919c31..79ada21941b5 100644
--- a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecation_errors.tsx
+++ b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecation_errors.tsx
@@ -7,44 +7,67 @@
import React from 'react';
import { i18n } from '@kbn/i18n';
-import { EuiCallOut } from '@elastic/eui';
+import { EuiPageContent, EuiEmptyPrompt } from '@elastic/eui';
interface Props {
errorType: 'pluginError' | 'requestError';
}
const i18nTexts = {
- pluginError: i18n.translate('xpack.upgradeAssistant.kibanaDeprecationErrors.pluginErrorMessage', {
- defaultMessage:
- 'Not all Kibana deprecations were retrieved successfully. This list may be incomplete. Check the Kibana server logs for errors.',
- }),
- loadingError: i18n.translate(
- 'xpack.upgradeAssistant.kibanaDeprecationErrors.loadingErrorMessage',
- {
- defaultMessage:
- 'Could not retrieve Kibana deprecations. Check the Kibana server logs for errors.',
- }
- ),
+ pluginError: {
+ title: i18n.translate('xpack.upgradeAssistant.kibanaDeprecationErrors.pluginErrorTitle', {
+ defaultMessage: 'Not all Kibana deprecations were retrieved successfully',
+ }),
+ description: i18n.translate(
+ 'xpack.upgradeAssistant.kibanaDeprecationErrors.pluginErrorDescription',
+ {
+ defaultMessage: 'Check the Kibana server logs for errors.',
+ }
+ ),
+ },
+ loadingError: {
+ title: i18n.translate('xpack.upgradeAssistant.kibanaDeprecationErrors.loadingErrorTitle', {
+ defaultMessage: 'Could not retrieve Kibana deprecations',
+ }),
+ description: i18n.translate(
+ 'xpack.upgradeAssistant.kibanaDeprecationErrors.loadingErrorDescription',
+ {
+ defaultMessage: 'Check the Kibana server logs for errors.',
+ }
+ ),
+ },
};
export const KibanaDeprecationErrors: React.FunctionComponent = ({ errorType }) => {
if (errorType === 'pluginError') {
return (
-
+ >
+ {i18nTexts.pluginError.title}}
+ body={{i18nTexts.pluginError.description}
}
+ />
+
);
}
return (
-
+ >
+ {i18nTexts.loadingError.title}}
+ body={{i18nTexts.loadingError.description}
}
+ />
+
);
};
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 a9608109728b..31b5c80d5b37 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,14 +8,7 @@
import React, { useEffect, useState, useCallback } from 'react';
import { withRouter, RouteComponentProps } from 'react-router-dom';
-import {
- EuiButtonEmpty,
- EuiPageBody,
- EuiPageHeader,
- EuiPageContent,
- EuiPageContentBody,
- EuiSpacer,
-} from '@elastic/eui';
+import { EuiButtonEmpty, EuiPageContent, EuiPageHeader, EuiSpacer } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import type { DomainDeprecationDetails } from 'kibana/public';
@@ -135,46 +128,28 @@ export const KibanaDeprecationsContent = withRouter(({ history }: RouteComponent
getAllDeprecations();
}, [deprecations, getAllDeprecations]);
- const getPageContent = () => {
- if (kibanaDeprecations && kibanaDeprecations.length === 0) {
- return (
+ if (kibanaDeprecations && kibanaDeprecations.length === 0) {
+ return (
+
history.push('/overview')}
/>
- );
- }
-
- let content: React.ReactNode;
-
- if (isLoading) {
- content = {i18nTexts.isLoading};
- } else if (kibanaDeprecations?.length) {
- content = (
-
- );
- } else if (error) {
- content = ;
- }
+
+ );
+ }
+ if (isLoading) {
+ return (
+
+ {i18nTexts.isLoading}
+
+ );
+ } else if (kibanaDeprecations?.length) {
return (
-
- {content}
-
- );
- };
-
- return (
-
-
-
- {getPageContent()}
+
- {stepsModalContent && (
- toggleStepsModal()} modalContent={stepsModalContent} />
- )}
+
- {resolveModalContent && (
- toggleResolveModal()}
- resolveDeprecation={resolveDeprecation}
- isResolvingDeprecation={isResolvingDeprecation}
- deprecation={resolveModalContent}
- />
- )}
-
-
-
- );
+ {stepsModalContent && (
+ toggleStepsModal()} modalContent={stepsModalContent} />
+ )}
+
+ {resolveModalContent && (
+ toggleResolveModal()}
+ resolveDeprecation={resolveDeprecation}
+ isResolvingDeprecation={isResolvingDeprecation}
+ deprecation={resolveModalContent}
+ />
+ )}
+
+ );
+ } else if (error) {
+ return ;
+ }
+
+ return null;
});
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 6b3048b669aa..b77d4a337295 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
@@ -8,11 +8,9 @@
import React, { FunctionComponent, useEffect } from 'react';
import {
- EuiPageContent,
EuiPageContentBody,
EuiText,
EuiPageHeader,
- EuiPageBody,
EuiButtonEmpty,
EuiFlexItem,
EuiFlexGroup,
@@ -91,72 +89,68 @@ export const DeprecationsOverview: FunctionComponent = ({ history }) => {
}, [breadcrumbs]);
return (
-
-
-
- {i18nTexts.docLink}
- ,
- ]}
- />
+
+
+ {i18nTexts.docLink}
+ ,
+ ]}
+ />
-
- <>
-
- {i18nTexts.pageDescription}
-
+
-
+
+ <>
+ {/* Remove this in last minor of the current major (e.g., 7.15) */}
+
- {/* Remove this in last minor of the current major (e.g., 7.15) */}
-
+
-
+ {/* Deprecation stats */}
+
+
+
+
- {/* Deprecation stats */}
-
-
-
-
+
+
+
+
-
-
-
-
+
-
+ {/* Deprecation logging */}
+
+
+
+ {i18nTexts.deprecationLoggingTitle}
+
- {/* Deprecation logging */}
-
-
-
- {i18nTexts.deprecationLoggingTitle}
-
+
+
+ {i18nTexts.getDeprecationLoggingDescription(
+ `${nextMajor}.x`,
+ docLinks.links.elasticsearch.deprecationLogging
+ )}
+
+
-
-
- {i18nTexts.getDeprecationLoggingDescription(
- `${nextMajor}.x`,
- docLinks.links.elasticsearch.deprecationLogging
- )}
-
-
+
-
-
-
-
-
- >
-
-
-
+
+
+
+ >
+
+
);
};