diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index a02a436d026f00..ae77a0d7d2857a 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -224,6 +224,7 @@ export class DocLinksService { mappingTermVector: `${ELASTICSEARCH_DOCS}term-vector.html`, mappingTypesRemoval: `${ELASTICSEARCH_DOCS}removal-of-types.html`, migrateIndexAllocationFilters: `${ELASTICSEARCH_DOCS}migrate-index-allocation-filters.html`, + migrationApiDeprecation: `${ELASTICSEARCH_DOCS}migration-api-deprecation.html`, nodeRoles: `${ELASTICSEARCH_DOCS}modules-node.html#node-roles`, releaseHighlights: `${ELASTICSEARCH_DOCS}release-highlights.html`, remoteClusters: `${ELASTICSEARCH_DOCS}remote-clusters.html`, diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/with_privileges.tsx b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/with_privileges.tsx index 6485bd7f45e559..16dffdb5d267db 100644 --- a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/with_privileges.tsx +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/with_privileges.tsx @@ -22,7 +22,7 @@ interface Props { isLoading: boolean; hasPrivileges: boolean; privilegesMissing: MissingPrivileges; - }) => JSX.Element; + }) => JSX.Element | null; } type Privilege = [string, string]; diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 3bf7cac69ece2e..4bd4f53cf6c9d4 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -27257,9 +27257,7 @@ "xpack.upgradeAssistant.overview.deprecationLogs.updateErrorMessage": "ログ状態を更新できませんでした。", "xpack.upgradeAssistant.overview.deprecationsCountCheckpointTitle": "廃止予定の問題を解決して変更を検証", "xpack.upgradeAssistant.overview.documentationLinkText": "ドキュメント", - "xpack.upgradeAssistant.overview.fixIssuesStepDescription": "Elastic 8.xとの互換になるように、ElasticsearchおよびKibanaデプロイを更新します。アップグレード前に、重大な問題を解決する必要があります。警告の問題は独自の裁量で無視できます。", "xpack.upgradeAssistant.overview.fixIssuesStepTitle": "廃止予定設定を確認し、問題を解決", - "xpack.upgradeAssistant.overview.identifyStepTitle": "廃止予定APIの使用を特定し、アプリケーションを更新", "xpack.upgradeAssistant.overview.loadingLogsLabel": "廃止予定ログ収集状態を読み込んでいます...", "xpack.upgradeAssistant.overview.observe.discoveryDescription": "廃止予定ログを検索およびフィルターし、必要な変更のタイプを把握します。", "xpack.upgradeAssistant.overview.observe.observabilityDescription": "使用中のAPIのうち廃止予定のAPIと、更新が必要なアプリケーションを特定できます。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index b28bb12e19927a..f76d411c0496d6 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -27722,9 +27722,7 @@ "xpack.upgradeAssistant.overview.deprecationLogs.updateErrorMessage": "无法更新日志记录状态。", "xpack.upgradeAssistant.overview.deprecationsCountCheckpointTitle": "解决弃用问题并验证您的更改", "xpack.upgradeAssistant.overview.documentationLinkText": "文档", - "xpack.upgradeAssistant.overview.fixIssuesStepDescription": "更新您的 Elasticsearch 和 Kibana 部署以兼容 Elastic 8.x。在升级之前必须解决紧急问题。您可以酌情忽略警告问题。", "xpack.upgradeAssistant.overview.fixIssuesStepTitle": "复查已弃用设置并解决问题", - "xpack.upgradeAssistant.overview.identifyStepTitle": "识别已弃用 API 的使用并更新您的应用程序", "xpack.upgradeAssistant.overview.loadingLogsLabel": "正在加载弃用日志收集状态……", "xpack.upgradeAssistant.overview.observe.discoveryDescription": "搜索并筛选弃用日志以了解需要进行的更改类型。", "xpack.upgradeAssistant.overview.observe.observabilityDescription": "深入了解正在使用哪些已弃用 API 以及需要更新哪些应用程序。", diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/app/cluster_upgrade.test.tsx b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/app/cluster_upgrade.test.tsx index 043c649b39bc21..7276d005844c26 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/app/cluster_upgrade.test.tsx +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/app/cluster_upgrade.test.tsx @@ -36,9 +36,14 @@ describe('Cluster upgrade', () => { }); }); + // The way we detect if we are currently upgrading or if the upgrade has been completed is if + // we ever get back a 426 error in *any* API response that UA makes. For that reason we can + // just mock one of the APIs that are being called from the overview page to return an error + // in order to trigger these interstitial states. In this case we're going to mock the + // `es deprecations` response. describe('when cluster is in the process of a rolling upgrade', () => { beforeEach(async () => { - httpRequestsMockHelpers.setLoadDeprecationLoggingResponse(undefined, { + httpRequestsMockHelpers.setLoadEsDeprecationsResponse(undefined, { statusCode: 426, message: '', attributes: { @@ -62,7 +67,7 @@ describe('Cluster upgrade', () => { describe('when cluster has been upgraded', () => { beforeEach(async () => { - httpRequestsMockHelpers.setLoadDeprecationLoggingResponse(undefined, { + httpRequestsMockHelpers.setLoadEsDeprecationsResponse(undefined, { statusCode: 426, message: '', attributes: { diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/es_deprecation_logs/es_deprecation_logs.helpers.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/es_deprecation_logs/es_deprecation_logs.helpers.ts new file mode 100644 index 00000000000000..11784d02695051 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/es_deprecation_logs/es_deprecation_logs.helpers.ts @@ -0,0 +1,80 @@ +/* + * 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 { act } from 'react-dom/test-utils'; +import { registerTestBed, TestBed, AsyncTestBedConfig } from '@kbn/test/jest'; +import { EsDeprecationLogs } from '../../../public/application/components/es_deprecation_logs'; +import { WithAppDependencies } from '../helpers'; + +const testBedConfig: AsyncTestBedConfig = { + memoryRouter: { + initialEntries: ['/es_deprecation_logs'], + componentRoutePath: '/es_deprecation_logs', + }, + doMountAsync: true, +}; + +export type EsDeprecationLogsTestBed = TestBed & { + actions: ReturnType; +}; + +const createActions = (testBed: TestBed) => { + /** + * User Actions + */ + + const clickDeprecationToggle = async () => { + const { find, component } = testBed; + + await act(async () => { + find('deprecationLoggingToggle').simulate('click'); + }); + + component.update(); + }; + + const clickRetryButton = async () => { + const { find, component } = testBed; + + await act(async () => { + find('retryButton').simulate('click'); + }); + + component.update(); + }; + + const clickResetButton = async () => { + const { find, component } = testBed; + + await act(async () => { + find('resetLastStoredDate').simulate('click'); + }); + + component.update(); + }; + + return { + clickDeprecationToggle, + clickRetryButton, + clickResetButton, + }; +}; + +export const setupESDeprecationLogsPage = async ( + overrides?: Record +): Promise => { + const initTestBed = registerTestBed( + WithAppDependencies(EsDeprecationLogs, overrides), + testBedConfig + ); + const testBed = await initTestBed(); + + return { + ...testBed, + actions: createActions(testBed), + }; +}; diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_logs_step/fix_logs_step.test.tsx b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/es_deprecation_logs/es_deprecation_logs.test.tsx similarity index 80% rename from x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_logs_step/fix_logs_step.test.tsx rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/es_deprecation_logs/es_deprecation_logs.test.tsx index 8b68f5ee449a85..8d97fc38973671 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_logs_step/fix_logs_step.test.tsx +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/es_deprecation_logs/es_deprecation_logs.test.tsx @@ -6,13 +6,24 @@ */ import { act } from 'react-dom/test-utils'; +import { + EsDeprecationLogsTestBed, + setupESDeprecationLogsPage, +} from './es_deprecation_logs.helpers'; +import { setupEnvironment, advanceTime } from '../helpers'; +import { DeprecationLoggingStatus } from '../../../common/types'; +import { + DEPRECATION_LOGS_INDEX, + DEPRECATION_LOGS_SOURCE_ID, + DEPRECATION_LOGS_COUNT_POLL_INTERVAL_MS, +} from '../../../common/constants'; // Once the logs team register the kibana locators in their app, we should be able // to remove this mock and follow a similar approach to how discover link is tested. // See: https://github.com/elastic/kibana/issues/104855 const MOCKED_TIME = '2021-09-05T10:49:01.805Z'; -jest.mock('../../../../public/application/lib/logs_checkpoint', () => { - const originalModule = jest.requireActual('../../../../public/application/lib/logs_checkpoint'); +jest.mock('../../../public/application/lib/logs_checkpoint', () => { + const originalModule = jest.requireActual('../../../public/application/lib/logs_checkpoint'); return { __esModule: true, @@ -21,83 +32,30 @@ jest.mock('../../../../public/application/lib/logs_checkpoint', () => { }; }); -import { DeprecationLoggingStatus } from '../../../../common/types'; -import { OverviewTestBed, setupOverviewPage } from '../overview.helpers'; -import { setupEnvironment, advanceTime } from '../../helpers'; -import { - DEPRECATION_LOGS_INDEX, - DEPRECATION_LOGS_SOURCE_ID, - DEPRECATION_LOGS_COUNT_POLL_INTERVAL_MS, -} from '../../../../common/constants'; - const getLoggingResponse = (toggle: boolean): DeprecationLoggingStatus => ({ isDeprecationLogIndexingEnabled: toggle, isDeprecationLoggingEnabled: toggle, }); -describe('Overview - Fix deprecation logs step', () => { - let testBed: OverviewTestBed; +describe('ES deprecation logs', () => { + let testBed: EsDeprecationLogsTestBed; const { server, httpRequestsMockHelpers } = setupEnvironment(); beforeEach(async () => { httpRequestsMockHelpers.setLoadDeprecationLoggingResponse(getLoggingResponse(true)); - testBed = await setupOverviewPage(); - - const { component } = testBed; - component.update(); + testBed = await setupESDeprecationLogsPage(); + testBed.component.update(); }); afterAll(() => { server.restore(); }); - describe('Step status', () => { - test(`It's complete when there are no deprecation logs since last checkpoint`, async () => { - httpRequestsMockHelpers.setLoadDeprecationLogsCountResponse({ count: 0 }); - - await act(async () => { - testBed = await setupOverviewPage(); - }); - - const { exists, component } = testBed; - - component.update(); - - expect(exists(`fixLogsStep-complete`)).toBe(true); - }); - - test(`It's incomplete when there are deprecation logs since last checkpoint`, async () => { - httpRequestsMockHelpers.setLoadDeprecationLogsCountResponse({ count: 5 }); - - await act(async () => { - testBed = await setupOverviewPage(); - }); - - const { exists, component } = testBed; - - component.update(); - - expect(exists(`fixLogsStep-incomplete`)).toBe(true); - }); - - test(`It's incomplete when log collection is disabled `, async () => { - httpRequestsMockHelpers.setLoadDeprecationLogsCountResponse({ count: 0 }); - - await act(async () => { - testBed = await setupOverviewPage(); - }); - - const { actions, exists, component } = testBed; - - component.update(); - - expect(exists(`fixLogsStep-complete`)).toBe(true); - - httpRequestsMockHelpers.setUpdateDeprecationLoggingResponse(getLoggingResponse(false)); - - await actions.clickDeprecationToggle(); + describe('Documentation link', () => { + test('Has a link for migration info api docs in page header', () => { + const { exists } = testBed; - expect(exists(`fixLogsStep-incomplete`)).toBe(true); + expect(exists('documentationLink')).toBe(true); }); }); @@ -123,7 +81,7 @@ describe('Overview - Fix deprecation logs step', () => { }); await act(async () => { - testBed = await setupOverviewPage(); + testBed = await setupESDeprecationLogsPage(); }); const { exists, component } = testBed; @@ -159,7 +117,7 @@ describe('Overview - Fix deprecation logs step', () => { httpRequestsMockHelpers.setLoadDeprecationLoggingResponse(undefined, error); await act(async () => { - testBed = await setupOverviewPage(); + testBed = await setupESDeprecationLogsPage(); }); const { component, exists } = testBed; @@ -176,7 +134,7 @@ describe('Overview - Fix deprecation logs step', () => { }); await act(async () => { - testBed = await setupOverviewPage(); + testBed = await setupESDeprecationLogsPage(); }); const { exists, component } = testBed; @@ -196,7 +154,7 @@ describe('Overview - Fix deprecation logs step', () => { test('Has a link to see logs in observability app', async () => { await act(async () => { - testBed = await setupOverviewPage({ + testBed = await setupESDeprecationLogsPage({ http: { basePath: { prepend: (url: string) => url, @@ -228,7 +186,7 @@ describe('Overview - Fix deprecation logs step', () => { test('Has a link to see logs in discover app', async () => { await act(async () => { - testBed = await setupOverviewPage(); + testBed = await setupESDeprecationLogsPage(); }); const { exists, component, find } = testBed; @@ -257,7 +215,7 @@ describe('Overview - Fix deprecation logs step', () => { }); await act(async () => { - testBed = await setupOverviewPage(); + testBed = await setupESDeprecationLogsPage(); }); const { find, exists, component } = testBed; @@ -274,7 +232,7 @@ describe('Overview - Fix deprecation logs step', () => { }); await act(async () => { - testBed = await setupOverviewPage(); + testBed = await setupESDeprecationLogsPage(); }); const { find, exists, component } = testBed; @@ -295,7 +253,7 @@ describe('Overview - Fix deprecation logs step', () => { httpRequestsMockHelpers.setLoadDeprecationLogsCountResponse(undefined, error); await act(async () => { - testBed = await setupOverviewPage(); + testBed = await setupESDeprecationLogsPage(); }); const { exists, actions, component } = testBed; @@ -319,7 +277,7 @@ describe('Overview - Fix deprecation logs step', () => { }); await act(async () => { - testBed = await setupOverviewPage(); + testBed = await setupESDeprecationLogsPage(); }); const { exists, actions, component } = testBed; @@ -351,7 +309,7 @@ describe('Overview - Fix deprecation logs step', () => { const addDanger = jest.fn(); await act(async () => { - testBed = await setupOverviewPage({ + testBed = await setupESDeprecationLogsPage({ services: { core: { notifications: { @@ -389,17 +347,17 @@ describe('Overview - Fix deprecation logs step', () => { count: 0, }); - testBed = await setupOverviewPage(); + testBed = await setupESDeprecationLogsPage(); }); afterEach(() => { jest.useRealTimers(); }); - test('renders step as incomplete when a success state is followed by an error state', async () => { + test('success state is followed by an error state', async () => { const { exists } = testBed; - expect(exists('fixLogsStep-complete')).toBe(true); + expect(exists('resetLastStoredDate')).toBe(true); // second request will error const error = { @@ -413,7 +371,7 @@ describe('Overview - Fix deprecation logs step', () => { await advanceTime(DEPRECATION_LOGS_COUNT_POLL_INTERVAL_MS); testBed.component.update(); - expect(exists('fixLogsStep-incomplete')).toBe(true); + expect(exists('errorCallout')).toBe(true); }); }); }); @@ -425,7 +383,7 @@ describe('Overview - Fix deprecation logs step', () => { test('It shows copy with compatibility api header advice', async () => { await act(async () => { - testBed = await setupOverviewPage(); + testBed = await setupESDeprecationLogsPage(); }); const { exists, component } = testBed; @@ -449,7 +407,7 @@ describe('Overview - Fix deprecation logs step', () => { test(`doesn't show analyze and resolve logs if it doesn't have the right privileges`, async () => { await act(async () => { - testBed = await setupOverviewPage({ + testBed = await setupESDeprecationLogsPage({ privileges: { hasAllPrivileges: false, missingPrivileges: { diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/overview.helpers.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/overview.helpers.ts index d8bd6a9ff5d83e..34abaed727bd34 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/overview.helpers.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/overview.helpers.ts @@ -27,36 +27,6 @@ const createActions = (testBed: TestBed) => { * User Actions */ - const clickDeprecationToggle = async () => { - const { find, component } = testBed; - - await act(async () => { - find('deprecationLoggingToggle').simulate('click'); - }); - - component.update(); - }; - - const clickRetryButton = async () => { - const { find, component } = testBed; - - await act(async () => { - find('retryButton').simulate('click'); - }); - - component.update(); - }; - - const clickResetButton = async () => { - const { find, component } = testBed; - - await act(async () => { - find('resetLastStoredDate').simulate('click'); - }); - - component.update(); - }; - const clickViewSystemIndicesState = async () => { const { find, component } = testBed; @@ -78,9 +48,6 @@ const createActions = (testBed: TestBed) => { }; return { - clickDeprecationToggle, - clickRetryButton, - clickResetButton, clickViewSystemIndicesState, clickRetrySystemIndicesButton, }; diff --git a/x-pack/plugins/upgrade_assistant/public/application/app.tsx b/x-pack/plugins/upgrade_assistant/public/application/app.tsx index 9ac90e5d81f486..70350b6d56ecad 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/app.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/app.tsx @@ -17,7 +17,13 @@ import { ClusterUpgradeState } from '../../common/types'; import { APP_WRAPPER_CLASS, GlobalFlyout, AuthorizationProvider } from '../shared_imports'; import { AppDependencies } from '../types'; import { AppContextProvider, useAppContext } from './app_context'; -import { EsDeprecations, ComingSoonPrompt, KibanaDeprecations, Overview } from './components'; +import { + EsDeprecations, + EsDeprecationLogs, + ComingSoonPrompt, + KibanaDeprecations, + Overview, +} from './components'; const { GlobalFlyoutProvider } = GlobalFlyout; @@ -112,6 +118,7 @@ const AppHandlingClusterUpgradeState: React.FunctionComponent = () => { + 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 new file mode 100644 index 00000000000000..f778566758294e --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/es_deprecation_logs.tsx @@ -0,0 +1,74 @@ +/* + * 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, { FunctionComponent, useEffect } from 'react'; + +import { + EuiPageHeader, + EuiButtonEmpty, + EuiSpacer, + EuiPageBody, + EuiPageContentBody, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { METRIC_TYPE } from '@kbn/analytics'; +import { FormattedMessage } from '@kbn/i18n/react'; + +import { useAppContext } from '../../app_context'; +import { uiMetricService, UIM_ES_DEPRECATION_LOGS_PAGE_LOAD } from '../../lib/ui_metric'; +import { FixDeprecationLogs } from './fix_deprecation_logs'; + +export const EsDeprecationLogs: FunctionComponent = () => { + const { + services: { + breadcrumbs, + core: { docLinks }, + }, + } = useAppContext(); + + useEffect(() => { + uiMetricService.trackUiMetric(METRIC_TYPE.LOADED, UIM_ES_DEPRECATION_LOGS_PAGE_LOAD); + }, []); + + useEffect(() => { + breadcrumbs.setBreadcrumbs('esDeprecationLogs'); + }, [breadcrumbs]); + + return ( + + + + + , + ]} + /> + + + + + + + ); +}; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecation_logging_toggle/_deprecation_logging_toggle.scss b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecation_logging_toggle/_deprecation_logging_toggle.scss similarity index 100% rename from x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecation_logging_toggle/_deprecation_logging_toggle.scss rename to x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecation_logging_toggle/_deprecation_logging_toggle.scss diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecation_logging_toggle/deprecation_logging_toggle.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecation_logging_toggle/deprecation_logging_toggle.tsx similarity index 100% rename from x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecation_logging_toggle/deprecation_logging_toggle.tsx rename to x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecation_logging_toggle/deprecation_logging_toggle.tsx diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecation_logging_toggle/index.ts b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecation_logging_toggle/index.ts similarity index 100% rename from x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecation_logging_toggle/index.ts rename to x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecation_logging_toggle/index.ts diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecations_count_checkpoint/deprecations_count_checkpoint.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecations_count_checkpoint/deprecations_count_checkpoint.tsx similarity index 89% rename from x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecations_count_checkpoint/deprecations_count_checkpoint.tsx rename to x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecations_count_checkpoint/deprecations_count_checkpoint.tsx index 6ce1fec32d66c0..c958eb68c86ec8 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecations_count_checkpoint/deprecations_count_checkpoint.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecations_count_checkpoint/deprecations_count_checkpoint.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { FunctionComponent, useEffect, useState } from 'react'; +import React, { FunctionComponent, useState } from 'react'; import moment from 'moment-timezone'; import { FormattedDate, FormattedTime, FormattedMessage } from '@kbn/i18n/react'; import { METRIC_TYPE } from '@kbn/analytics'; @@ -54,13 +54,11 @@ const i18nTexts = { interface Props { checkpoint: string; setCheckpoint: (value: string) => void; - setHasNoDeprecationLogs: (hasNoLogs: boolean) => void; } export const DeprecationsCountCheckpoint: FunctionComponent = ({ checkpoint, setCheckpoint, - setHasNoDeprecationLogs, }) => { const [isDeletingCache, setIsDeletingCache] = useState(false); const { @@ -96,16 +94,6 @@ export const DeprecationsCountCheckpoint: FunctionComponent = ({ setCheckpoint(now); }; - useEffect(() => { - // Loading shouldn't invalidate the previous state. - if (!isLoading) { - // An error should invalidate the previous state. - setHasNoDeprecationLogs(!error && !hasLogs); - } - // Depending upon setHasNoDeprecationLogs would create an infinite loop. - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [error, isLoading, hasLogs]); - if (isInitialRequest && isLoading) { return ; } diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecations_count_checkpoint/index.ts b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecations_count_checkpoint/index.ts similarity index 100% rename from x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/deprecations_count_checkpoint/index.ts rename to x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/deprecations_count_checkpoint/index.ts diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/external_links.test.ts b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.test.ts similarity index 100% rename from x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/external_links.test.ts rename to x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.test.ts diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/external_links.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx similarity index 100% rename from x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/external_links.tsx rename to x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/fix_logs_step.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/fix_deprecation_logs.tsx similarity index 80% rename from x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/fix_logs_step.tsx rename to x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/fix_deprecation_logs.tsx index a3e81f6edcd3a2..ff1cfc172905fd 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/fix_logs_step.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/fix_deprecation_logs.tsx @@ -9,7 +9,6 @@ import React, { FunctionComponent, useState, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiText, EuiSpacer, EuiLink, EuiCallOut, EuiCode } from '@elastic/eui'; -import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import { useAppContext } from '../../../app_context'; import { ExternalLinks } from './external_links'; @@ -17,14 +16,10 @@ import { DeprecationsCountCheckpoint } from './deprecations_count_checkpoint'; import { useDeprecationLogging } from './use_deprecation_logging'; import { DeprecationLoggingToggle } from './deprecation_logging_toggle'; import { loadLogsCheckpoint, saveLogsCheckpoint } from '../../../lib/logs_checkpoint'; -import type { OverviewStepProps } from '../../types'; import { DEPRECATION_LOGS_INDEX } from '../../../../../common/constants'; import { WithPrivileges, MissingPrivileges } from '../../../../shared_imports'; const i18nTexts = { - identifyStepTitle: i18n.translate('xpack.upgradeAssistant.overview.identifyStepTitle', { - defaultMessage: 'Identify deprecated API use and update your applications', - }), analyzeTitle: i18n.translate('xpack.upgradeAssistant.overview.analyzeTitle', { defaultMessage: 'Analyze deprecation logs', }), @@ -93,16 +88,11 @@ const i18nTexts = { }; interface Props { - setIsComplete: OverviewStepProps['setIsComplete']; hasPrivileges: boolean; privilegesMissing: MissingPrivileges; } -const FixLogsStep: FunctionComponent = ({ - setIsComplete, - hasPrivileges, - privilegesMissing, -}) => { +const FixDeprecationLogsUI: FunctionComponent = ({ hasPrivileges, privilegesMissing }) => { const { services: { core: { docLinks }, @@ -126,15 +116,6 @@ const FixLogsStep: FunctionComponent = ({ saveLogsCheckpoint(checkpoint); }, [checkpoint]); - useEffect(() => { - if (!isDeprecationLogIndexingEnabled) { - setIsComplete(false); - } - - // Depending upon setIsComplete would create an infinite loop. - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isDeprecationLogIndexingEnabled]); - return ( <> = ({

{i18nTexts.deprecationsCountCheckpointTitle}

- + @@ -213,23 +190,15 @@ const FixLogsStep: FunctionComponent = ({ ); }; -export const getFixLogsStep = ({ isComplete, setIsComplete }: OverviewStepProps): EuiStepProps => { - const status = isComplete ? 'complete' : 'incomplete'; - - return { - status, - title: i18nTexts.identifyStepTitle, - 'data-test-subj': `fixLogsStep-${status}`, - children: ( - - {({ hasPrivileges, privilegesMissing, isLoading }) => ( - - )} - - ), - }; +export const FixDeprecationLogs = () => { + return ( + + {({ hasPrivileges, privilegesMissing, isLoading }) => ( + + )} + + ); }; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/index.ts b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/index.ts new file mode 100644 index 00000000000000..c0af5524e3a147 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { FixDeprecationLogs } from './fix_deprecation_logs'; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/use_deprecation_logging.ts b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/use_deprecation_logging.ts similarity index 100% rename from x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/use_deprecation_logging.ts rename to x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/use_deprecation_logging.ts diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/index.ts b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/index.ts similarity index 81% rename from x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/index.ts rename to x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/index.ts index 8a9a9faa6d0984..336aa14642f7d0 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_logs_step/index.ts +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { getFixLogsStep } from './fix_logs_step'; +export { EsDeprecationLogs } from './es_deprecation_logs'; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/index.ts b/x-pack/plugins/upgrade_assistant/public/application/components/index.ts index 8924fa2d355a15..b84af8695ddb13 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/index.ts +++ b/x-pack/plugins/upgrade_assistant/public/application/components/index.ts @@ -7,5 +7,6 @@ export { KibanaDeprecations } from './kibana_deprecations'; export { EsDeprecations } from './es_deprecations'; +export { EsDeprecationLogs } from './es_deprecation_logs'; export { ComingSoonPrompt } from './coming_soon_prompt'; export { Overview } from './overview'; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_issues_step/fix_issues_step.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_issues_step/fix_issues_step.tsx index 61d25404b2aeee..410eb695240f98 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_issues_step/fix_issues_step.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_issues_step/fix_issues_step.tsx @@ -7,11 +7,13 @@ import React, { FunctionComponent, useState, useEffect } from 'react'; -import { EuiText, EuiFlexItem, EuiFlexGroup, EuiSpacer } from '@elastic/eui'; +import { EuiText, EuiFlexItem, EuiFlexGroup, EuiSpacer, EuiLink } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import { DEPRECATION_LOGS_INDEX } from '../../../../../common/constants'; +import { WithPrivileges } from '../../../../shared_imports'; import type { OverviewStepProps } from '../../types'; import { EsDeprecationIssuesPanel, KibanaDeprecationIssuesPanel } from './components'; @@ -49,10 +51,48 @@ const FixIssuesStep: FunctionComponent = ({ setIsComplete }) => { ); }; +interface CustomProps { + navigateToEsDeprecationLogs: () => void; +} + +const AccessDeprecationLogsMessage = ({ navigateToEsDeprecationLogs }: CustomProps) => { + return ( + + {({ hasPrivileges, isLoading }) => { + if (isLoading || !hasPrivileges) { + // Don't show the message with the link to access deprecation logs + // to users who can't access the UI anyways. + return null; + } + + return ( + + {i18n.translate('xpack.upgradeAssistant.overview.esDeprecationLogsLink', { + defaultMessage: 'Elasticsearch deprecation logs', + })} + + ), + }} + /> + ); + }} + + ); +}; + export const getFixIssuesStep = ({ isComplete, setIsComplete, -}: OverviewStepProps): EuiStepProps => { + navigateToEsDeprecationLogs, +}: OverviewStepProps & CustomProps): EuiStepProps => { const status = isComplete ? 'complete' : 'incomplete'; return { @@ -65,7 +105,14 @@ export const getFixIssuesStep = ({

+ ), + }} />

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 1e7961f8ea7827..900c89671315d7 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 @@ -5,7 +5,7 @@ * 2.0. */ -import React, { FunctionComponent, useEffect, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { EuiSteps, @@ -15,23 +15,23 @@ import { EuiSpacer, EuiLink, EuiPageBody, - EuiPageContent, + EuiPageContentBody, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { METRIC_TYPE } from '@kbn/analytics'; import { FormattedMessage } from '@kbn/i18n/react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; import { useAppContext } from '../../app_context'; import { uiMetricService, UIM_OVERVIEW_PAGE_LOAD } from '../../lib/ui_metric'; import { getBackupStep } from './backup_step'; import { getFixIssuesStep } from './fix_issues_step'; -import { getFixLogsStep } from './fix_logs_step'; import { getUpgradeStep } from './upgrade_step'; import { getMigrateSystemIndicesStep } from './migrate_system_indices'; -type OverviewStep = 'backup' | 'migrate_system_indices' | 'fix_issues' | 'fix_logs'; +type OverviewStep = 'backup' | 'migrate_system_indices' | 'fix_issues'; -export const Overview: FunctionComponent = () => { +export const Overview = withRouter(({ history }: RouteComponentProps) => { const { services: { breadcrumbs, @@ -52,7 +52,6 @@ export const Overview: FunctionComponent = () => { backup: false, migrate_system_indices: false, fix_issues: false, - fix_logs: false, }); const isStepComplete = (step: OverviewStep) => completedStepsMap[step]; @@ -65,7 +64,7 @@ export const Overview: FunctionComponent = () => { return ( - + { getFixIssuesStep({ isComplete: isStepComplete('fix_issues'), setIsComplete: setCompletedStep.bind(null, 'fix_issues'), - }), - getFixLogsStep({ - isComplete: isStepComplete('fix_logs'), - setIsComplete: setCompletedStep.bind(null, 'fix_logs'), + navigateToEsDeprecationLogs: () => history.push('/es_deprecation_logs'), }), getUpgradeStep(), ]} /> - + ); -}; +}); diff --git a/x-pack/plugins/upgrade_assistant/public/application/lib/breadcrumbs.ts b/x-pack/plugins/upgrade_assistant/public/application/lib/breadcrumbs.ts index 3e30ffd06db15a..dd1cc013556961 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/lib/breadcrumbs.ts +++ b/x-pack/plugins/upgrade_assistant/public/application/lib/breadcrumbs.ts @@ -18,6 +18,9 @@ const i18nTexts = { esDeprecations: i18n.translate('xpack.upgradeAssistant.breadcrumb.esDeprecationsLabel', { defaultMessage: 'Elasticsearch deprecation issues', }), + esDeprecationLogs: i18n.translate('xpack.upgradeAssistant.breadcrumb.esDeprecationLogsLabel', { + defaultMessage: 'Elasticsearch deprecation logs', + }), kibanaDeprecations: i18n.translate( 'xpack.upgradeAssistant.breadcrumb.kibanaDeprecationsLabel', { @@ -48,6 +51,15 @@ export class BreadcrumbService { text: i18nTexts.breadcrumbs.esDeprecations, }, ], + esDeprecationLogs: [ + { + text: i18nTexts.breadcrumbs.overview, + href: '/', + }, + { + text: i18nTexts.breadcrumbs.esDeprecationLogs, + }, + ], kibanaDeprecations: [ { text: i18nTexts.breadcrumbs.overview, @@ -65,7 +77,9 @@ export class BreadcrumbService { this.setBreadcrumbsHandler = setBreadcrumbsHandler; } - public setBreadcrumbs(type: 'overview' | 'esDeprecations' | 'kibanaDeprecations'): void { + public setBreadcrumbs( + type: 'overview' | 'esDeprecations' | 'esDeprecationLogs' | 'kibanaDeprecations' + ): void { if (!this.setBreadcrumbsHandler) { throw new Error('Breadcrumb service has not been initialized'); } diff --git a/x-pack/plugins/upgrade_assistant/public/application/lib/ui_metric.ts b/x-pack/plugins/upgrade_assistant/public/application/lib/ui_metric.ts index 394f046a8bafeb..1ac34ae53194d0 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/lib/ui_metric.ts +++ b/x-pack/plugins/upgrade_assistant/public/application/lib/ui_metric.ts @@ -12,6 +12,7 @@ export const UIM_APP_NAME = 'upgrade_assistant'; export const UIM_ES_DEPRECATIONS_PAGE_LOAD = 'es_deprecations_page_load'; export const UIM_KIBANA_DEPRECATIONS_PAGE_LOAD = 'kibana_deprecations_page_load'; export const UIM_OVERVIEW_PAGE_LOAD = 'overview_page_load'; +export const UIM_ES_DEPRECATION_LOGS_PAGE_LOAD = 'es_deprecation_logs_page_load'; export const UIM_REINDEX_OPEN_FLYOUT_CLICK = 'reindex_open_flyout_click'; export const UIM_REINDEX_CLOSE_FLYOUT_CLICK = 'reindex_close_flyout_click'; export const UIM_REINDEX_START_CLICK = 'reindex_start_click'; diff --git a/x-pack/test/accessibility/apps/upgrade_assistant.ts b/x-pack/test/accessibility/apps/upgrade_assistant.ts index e387eed65d3fdb..9f0ba39aff6850 100644 --- a/x-pack/test/accessibility/apps/upgrade_assistant.ts +++ b/x-pack/test/accessibility/apps/upgrade_assistant.ts @@ -52,8 +52,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const es = getService('es'); const log = getService('log'); - // Failing: See https://github.com/elastic/kibana/issues/115859 - describe.skip('Upgrade Assistant', () => { + describe('Upgrade Assistant', () => { before(async () => { await PageObjects.upgradeAssistant.navigateToPage(); @@ -86,6 +85,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); + it('has no accessibility issues', async () => { + await a11y.testAppSnapshot(); + }); + }); + + describe('ES deprecations logs page', () => { + beforeEach(async () => { + await PageObjects.upgradeAssistant.navigateToEsDeprecationLogs(); + }); + it('with logs collection disabled', async () => { await a11y.testAppSnapshot(); }); @@ -122,7 +131,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await a11y.testAppSnapshot(); }); - it('Index settings deprecation flyout', async () => { + // Failing: See https://github.com/elastic/kibana/issues/115859 + it.skip('Index settings deprecation flyout', async () => { await PageObjects.upgradeAssistant.clickEsDeprecation( 'indexSettings' // An index setting deprecation was added in the before() hook so should be guaranteed ); diff --git a/x-pack/test/functional/apps/upgrade_assistant/es_deprecation_logs_page.ts b/x-pack/test/functional/apps/upgrade_assistant/es_deprecation_logs_page.ts new file mode 100644 index 00000000000000..2ba3531486fff1 --- /dev/null +++ b/x-pack/test/functional/apps/upgrade_assistant/es_deprecation_logs_page.ts @@ -0,0 +1,45 @@ +/* + * 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 { FtrProviderContext } from '../../ftr_provider_context'; + +export default function upgradeAssistantESDeprecationLogsPageFunctionalTests({ + getService, + getPageObjects, +}: FtrProviderContext) { + const PageObjects = getPageObjects(['upgradeAssistant', 'common']); + const security = getService('security'); + const testSubjects = getService('testSubjects'); + const es = getService('es'); + + describe('ES deprecation logs page', function () { + this.tags('skipFirefox'); + + before(async () => { + await security.testUser.setRoles(['superuser']); + // Access to system indices will be deprecated and should generate a deprecation log + await es.indices.get({ index: '.kibana' }); + }); + + after(async () => { + await security.testUser.restoreDefaults(); + }); + + beforeEach(async () => { + await PageObjects.upgradeAssistant.navigateToEsDeprecationLogs(); + }); + + it('Shows warnings callout if there are deprecations', async () => { + testSubjects.exists('hasWarningsCallout'); + }); + + it('Shows no warnings callout if there are no deprecations', async () => { + await PageObjects.upgradeAssistant.clickResetLastCheckpointButton(); + testSubjects.exists('noWarningsCallout'); + }); + }); +} diff --git a/x-pack/test/functional/apps/upgrade_assistant/index.ts b/x-pack/test/functional/apps/upgrade_assistant/index.ts index d99d1cd033327f..d1ab46463e9307 100644 --- a/x-pack/test/functional/apps/upgrade_assistant/index.ts +++ b/x-pack/test/functional/apps/upgrade_assistant/index.ts @@ -14,5 +14,6 @@ export default function upgradeCheckup({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./feature_controls')); loadTestFile(require.resolve('./deprecation_pages')); loadTestFile(require.resolve('./overview_page')); + loadTestFile(require.resolve('./es_deprecation_logs_page')); }); } diff --git a/x-pack/test/functional/apps/upgrade_assistant/overview_page.ts b/x-pack/test/functional/apps/upgrade_assistant/overview_page.ts index 8294f0cdc7a7b0..a26811cfd0b85b 100644 --- a/x-pack/test/functional/apps/upgrade_assistant/overview_page.ts +++ b/x-pack/test/functional/apps/upgrade_assistant/overview_page.ts @@ -15,7 +15,6 @@ export default function upgradeAssistantOverviewPageFunctionalTests({ const retry = getService('retry'); const security = getService('security'); const testSubjects = getService('testSubjects'); - const es = getService('es'); describe('Overview Page', function () { this.tags('skipFirefox'); @@ -39,37 +38,7 @@ export default function upgradeAssistantOverviewPageFunctionalTests({ it('Should render all steps', async () => { testSubjects.exists('backupStep-incomplete'); testSubjects.exists('fixIssuesStep-incomplete'); - testSubjects.exists('fixLogsStep-incomplete'); testSubjects.exists('upgradeStep'); }); - - describe('fixLogsStep', () => { - before(async () => { - await PageObjects.upgradeAssistant.navigateToPage(); - // Access to system indices will be deprecated and should generate a deprecation log - await es.indices.get({ index: '.kibana' }); - // Only click deprecation logging toggle if its not already enabled - if (!(await testSubjects.isDisplayed('externalLinksTitle'))) { - await PageObjects.upgradeAssistant.clickDeprecationLoggingToggle(); - } - - await retry.waitFor('UA external links title to be present', async () => { - return testSubjects.isDisplayed('externalLinksTitle'); - }); - }); - - beforeEach(async () => { - await PageObjects.upgradeAssistant.navigateToPage(); - }); - - it('Shows warnings callout if there are deprecations', async () => { - testSubjects.exists('hasWarningsCallout'); - }); - - it('Shows no warnings callout if there are no deprecations', async () => { - await PageObjects.upgradeAssistant.clickResetLastCheckpointButton(); - testSubjects.exists('noWarningsCallout'); - }); - }); }); } diff --git a/x-pack/test/functional/page_objects/upgrade_assistant_page.ts b/x-pack/test/functional/page_objects/upgrade_assistant_page.ts index 54d7f3d4521236..f795a5fd441cd2 100644 --- a/x-pack/test/functional/page_objects/upgrade_assistant_page.ts +++ b/x-pack/test/functional/page_objects/upgrade_assistant_page.ts @@ -29,6 +29,21 @@ export class UpgradeAssistantPageObject extends FtrService { }); } + async navigateToEsDeprecationLogs() { + return await this.retry.try(async () => { + await this.common.navigateToApp('settings'); + await this.testSubjects.click('upgrade_assistant'); + await this.testSubjects.click('viewElasticsearchDeprecationLogs'); + await this.retry.waitFor( + 'url to contain /upgrade_assistant/es_deprecation_logs', + async () => { + const url = await this.browser.getCurrentUrl(); + return url.includes('/es_deprecation_logs'); + } + ); + }); + } + async clickEsDeprecationsPanel() { return await this.retry.try(async () => { await this.testSubjects.click('esStatsPanel');