Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Upgrade Assistant] New Kibana deprecations page #110101

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -24811,16 +24811,6 @@
"xpack.upgradeAssistant.breadcrumb.esDeprecationsLabel": "Elasticsearchの廃止予定",
"xpack.upgradeAssistant.breadcrumb.kibanaDeprecationsLabel": "Kibanaの廃止予定",
"xpack.upgradeAssistant.breadcrumb.overviewLabel": "アップグレードアシスタント",
"xpack.upgradeAssistant.checkupTab.changeFiltersShowMoreLabel": "より多く表示させるにはフィルターを変更します。",
"xpack.upgradeAssistant.checkupTab.controls.filterBar.criticalButtonLabel": "重大",
"xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIndexLabel": "インデックス別",
"xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIssueLabel": "問題別",
"xpack.upgradeAssistant.checkupTab.deprecations.criticalActionTooltip": "アップグレード前にこの問題を解決してください。",
"xpack.upgradeAssistant.checkupTab.deprecations.criticalLabel": "重大",
"xpack.upgradeAssistant.checkupTab.deprecations.warningActionTooltip": "アップグレード前にこの問題を解決することをお勧めしますが、必須ではありません。",
"xpack.upgradeAssistant.checkupTab.deprecations.warningLabel": "警告",
"xpack.upgradeAssistant.checkupTab.noDeprecationsLabel": "説明がありません",
"xpack.upgradeAssistant.checkupTab.numDeprecationsShownLabel": "{total} 件中 {numShown} 件を表示中",
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.cancelButtonLabel": "キャンセル",
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.closeButtonLabel": "閉じる",
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.continueButtonLabel": "再インデックスを続ける",
Expand Down Expand Up @@ -24857,16 +24847,6 @@
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.destructiveCallout.calloutDetail": "続行する前に、インデックスをバックアップしてください。再インデックスを続行するには、各変更を承諾してください。",
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.destructiveCallout.calloutTitle": "このインデックスには元に戻すことのできない破壊的な変更が含まれています",
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.documentationLinkLabel": "ドキュメント",
"xpack.upgradeAssistant.deprecationGroupItem.docLinkText": "ドキュメンテーションを表示",
"xpack.upgradeAssistant.deprecationGroupItem.fixButtonLabel": "修正する手順を表示",
"xpack.upgradeAssistant.deprecationGroupItem.resolveButtonLabel": "クイック解決",
"xpack.upgradeAssistant.deprecationGroupItemTitle": "'{domainId}'は廃止予定の機能を使用しています",
"xpack.upgradeAssistant.deprecationListBar.collapseAllButtonLabel": "すべて縮小",
"xpack.upgradeAssistant.deprecationListBar.expandAllButtonLabel": "すべて拡張",
"xpack.upgradeAssistant.deprecationListSearchBar.filterErrorMessageLabel": "フィルター無効:{searchTermError}",
"xpack.upgradeAssistant.deprecationListSearchBar.placeholderAriaLabel": "フィルター",
"xpack.upgradeAssistant.deprecationListSearchBar.placeholderLabel": "フィルター",
"xpack.upgradeAssistant.deprecationListSearchBar.reloadButtonLabel": "再読み込み",
"xpack.upgradeAssistant.emptyPrompt.learnMoreDescription": "{nextMajor}への移行に関する詳細をご覧ください。",
"xpack.upgradeAssistant.emptyPrompt.title": "{uaVersion} アップグレードアシスタント",
"xpack.upgradeAssistant.emptyPrompt.upgradeAssistantDescription": "アップグレードアシスタントはクラスターの廃止予定の設定を特定し、アップグレード前に問題を解決できるようにします。Elastic {nextMajor}にアップグレードするときにここに戻って確認してください。",
Expand All @@ -24881,24 +24861,10 @@
"xpack.upgradeAssistant.esDeprecationStats.criticalDeprecationsTitle": "重大",
"xpack.upgradeAssistant.esDeprecationStats.loadingText": "Elasticsearchの廃止統計情報を読み込んでいます...",
"xpack.upgradeAssistant.esDeprecationStats.statsTitle": "Elasticsearch",
"xpack.upgradeAssistant.kibanaDeprecationErrors.loadingErrorDescription": "エラーについては、Kibanaサーバーログを確認してください。",
"xpack.upgradeAssistant.kibanaDeprecationErrors.loadingErrorTitle": "Kibana廃止予定を取得できませんでした",
"xpack.upgradeAssistant.kibanaDeprecationErrors.pluginErrorDescription": "エラーについては、Kibanaサーバーログを確認してください。",
"xpack.upgradeAssistant.kibanaDeprecationErrors.pluginErrorTitle": "一部のKibana廃止予定が正常に取得されませんでした",
"xpack.upgradeAssistant.kibanaDeprecations.deprecationLabel": "Kibana",
"xpack.upgradeAssistant.kibanaDeprecations.docLinkText": "ドキュメント",
"xpack.upgradeAssistant.kibanaDeprecations.errorMessage": "廃止予定の解決エラー",
"xpack.upgradeAssistant.kibanaDeprecations.loadingText": "廃止予定を読み込んでいます...",
"xpack.upgradeAssistant.kibanaDeprecations.pageDescription": "アップグレード前に、ここで一覧の問題を確認し、必要な変更を行ってください。アップグレード前に、重大な問題を解決する必要があります。",
"xpack.upgradeAssistant.kibanaDeprecations.pageTitle": "Kibana",
"xpack.upgradeAssistant.kibanaDeprecations.resolveConfirmationModal.cancelButtonLabel": "キャンセル",
"xpack.upgradeAssistant.kibanaDeprecations.resolveConfirmationModal.modalTitle": "'{domainId}'で廃止予定を解決しますか?",
"xpack.upgradeAssistant.kibanaDeprecations.resolveConfirmationModal.resolveButtonLabel": "解決",
"xpack.upgradeAssistant.kibanaDeprecations.stepsModal.closeButtonLabel": "閉じる",
"xpack.upgradeAssistant.kibanaDeprecations.stepsModal.docLinkLabel": "ドキュメンテーションを表示",
"xpack.upgradeAssistant.kibanaDeprecations.stepsModal.modalTitle": "'{domainId}'で廃止予定を解決",
"xpack.upgradeAssistant.kibanaDeprecations.stepsModal.stepTitle": "ステップ{step}",
"xpack.upgradeAssistant.kibanaDeprecations.successMessage": "廃止予定が解決されました",
"xpack.upgradeAssistant.kibanaDeprecationStats.criticalDeprecationsLabel": "Kibanaには{criticalDeprecations}個の重大な廃止予定があります",
"xpack.upgradeAssistant.kibanaDeprecationStats.criticalDeprecationsTitle": "重大",
"xpack.upgradeAssistant.kibanaDeprecationStats.loadingErrorMessage": "Kibana廃止予定の取得中にエラーが発生しました。",
Expand Down
34 changes: 0 additions & 34 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -25222,16 +25222,6 @@
"xpack.upgradeAssistant.breadcrumb.esDeprecationsLabel": "Elasticsearch 弃用",
"xpack.upgradeAssistant.breadcrumb.kibanaDeprecationsLabel": "Kibana 弃用",
"xpack.upgradeAssistant.breadcrumb.overviewLabel": "升级助手",
"xpack.upgradeAssistant.checkupTab.changeFiltersShowMoreLabel": "更改筛选以显示更多内容。",
"xpack.upgradeAssistant.checkupTab.controls.filterBar.criticalButtonLabel": "紧急",
"xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIndexLabel": "按索引",
"xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIssueLabel": "按问题",
"xpack.upgradeAssistant.checkupTab.deprecations.criticalActionTooltip": "请解决此问题后再升级。",
"xpack.upgradeAssistant.checkupTab.deprecations.criticalLabel": "紧急",
"xpack.upgradeAssistant.checkupTab.deprecations.warningActionTooltip": "建议在升级之前先解决此问题,但这不是必需的。",
"xpack.upgradeAssistant.checkupTab.deprecations.warningLabel": "警告",
"xpack.upgradeAssistant.checkupTab.noDeprecationsLabel": "无弃用内容",
"xpack.upgradeAssistant.checkupTab.numDeprecationsShownLabel": "显示 {numShown} 个,共 {total} 个",
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.cancelButtonLabel": "取消",
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.closeButtonLabel": "关闭",
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.continueButtonLabel": "继续重新索引",
Expand Down Expand Up @@ -25268,16 +25258,6 @@
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.destructiveCallout.calloutDetail": "继续前备份索引。要继续重新索引,请接受每个更改。",
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.destructiveCallout.calloutTitle": "此索引需要无法恢复的破坏性更改",
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.documentationLinkLabel": "文档",
"xpack.upgradeAssistant.deprecationGroupItem.docLinkText": "查看文档",
"xpack.upgradeAssistant.deprecationGroupItem.fixButtonLabel": "显示修复步骤",
"xpack.upgradeAssistant.deprecationGroupItem.resolveButtonLabel": "快速解决",
"xpack.upgradeAssistant.deprecationGroupItemTitle": "“{domainId}”正在使用弃用的功能",
"xpack.upgradeAssistant.deprecationListBar.collapseAllButtonLabel": "折叠全部",
"xpack.upgradeAssistant.deprecationListBar.expandAllButtonLabel": "展开全部",
"xpack.upgradeAssistant.deprecationListSearchBar.filterErrorMessageLabel": "筛选无效:{searchTermError}",
"xpack.upgradeAssistant.deprecationListSearchBar.placeholderAriaLabel": "筛选",
"xpack.upgradeAssistant.deprecationListSearchBar.placeholderLabel": "筛选",
"xpack.upgradeAssistant.deprecationListSearchBar.reloadButtonLabel": "重新加载",
"xpack.upgradeAssistant.emptyPrompt.learnMoreDescription": "详细了解如何迁移到 {nextMajor}。",
"xpack.upgradeAssistant.emptyPrompt.title": "{uaVersion} 升级助手",
"xpack.upgradeAssistant.emptyPrompt.upgradeAssistantDescription": "升级助手识别集群中弃用的设置,帮助您在升级前解决问题。需要升级到 Elastic {nextMajor} 时,回到这里查看。",
Expand All @@ -25292,24 +25272,10 @@
"xpack.upgradeAssistant.esDeprecationStats.criticalDeprecationsTitle": "紧急",
"xpack.upgradeAssistant.esDeprecationStats.loadingText": "正在加载 Elasticsearch 弃用统计……",
"xpack.upgradeAssistant.esDeprecationStats.statsTitle": "Elasticsearch",
"xpack.upgradeAssistant.kibanaDeprecationErrors.loadingErrorDescription": "请在 Kibana 服务器日志中查看错误。",
"xpack.upgradeAssistant.kibanaDeprecationErrors.loadingErrorTitle": "无法检索 Kibana 弃用",
"xpack.upgradeAssistant.kibanaDeprecationErrors.pluginErrorDescription": "请在 Kibana 服务器日志中查看错误。",
"xpack.upgradeAssistant.kibanaDeprecationErrors.pluginErrorTitle": "未成功检索全部的 Kibana 弃用",
"xpack.upgradeAssistant.kibanaDeprecations.deprecationLabel": "Kibana",
"xpack.upgradeAssistant.kibanaDeprecations.docLinkText": "文档",
"xpack.upgradeAssistant.kibanaDeprecations.errorMessage": "解决弃用时出错",
"xpack.upgradeAssistant.kibanaDeprecations.loadingText": "正在加载弃用……",
"xpack.upgradeAssistant.kibanaDeprecations.pageDescription": "在升级之前查看此处所列的问题并进行必要的更改。在升级之前必须解决紧急问题。",
"xpack.upgradeAssistant.kibanaDeprecations.pageTitle": "Kibana",
"xpack.upgradeAssistant.kibanaDeprecations.resolveConfirmationModal.cancelButtonLabel": "取消",
"xpack.upgradeAssistant.kibanaDeprecations.resolveConfirmationModal.modalTitle": "在“{domainId}”中解决弃用?",
"xpack.upgradeAssistant.kibanaDeprecations.resolveConfirmationModal.resolveButtonLabel": "解决",
"xpack.upgradeAssistant.kibanaDeprecations.stepsModal.closeButtonLabel": "关闭",
"xpack.upgradeAssistant.kibanaDeprecations.stepsModal.docLinkLabel": "查看文档",
"xpack.upgradeAssistant.kibanaDeprecations.stepsModal.modalTitle": "在“{domainId}”中解决弃用",
"xpack.upgradeAssistant.kibanaDeprecations.stepsModal.stepTitle": "步骤 {step}",
"xpack.upgradeAssistant.kibanaDeprecations.successMessage": "弃用已解决",
"xpack.upgradeAssistant.kibanaDeprecationStats.criticalDeprecationsLabel": "Kibana 具有 {criticalDeprecations} 个关键弃用",
"xpack.upgradeAssistant.kibanaDeprecationStats.criticalDeprecationsTitle": "紧急",
"xpack.upgradeAssistant.kibanaDeprecationStats.loadingErrorMessage": "检索 Kibana 弃用时发生错误。",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
createEsDeprecationsMockResponse,
} from './mocked_responses';

describe('Deprecations table', () => {
describe('ES deprecations table', () => {
let testBed: ElasticsearchTestBed;
const { server, httpRequestsMockHelpers } = setupEnvironment();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
/*
* 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 { deprecationsServiceMock } from 'src/core/public/mocks';

import { setupEnvironment } from '../helpers';
import { KibanaTestBed, setupKibanaPage } from './kibana_deprecations.helpers';
import { kibanaDeprecationsMockResponse } from './mocked_responses';

describe('Kibana deprecation details flyout', () => {
let testBed: KibanaTestBed;
const { server } = setupEnvironment();
const deprecationService = deprecationsServiceMock.createStartContract();

afterAll(() => {
server.restore();
});

beforeEach(async () => {
await act(async () => {
deprecationService.getAllDeprecations = jest
.fn()
.mockReturnValue(kibanaDeprecationsMockResponse);

testBed = await setupKibanaPage({
services: {
core: {
deprecations: deprecationService,
},
},
});
});

testBed.component.update();
});

describe('Deprecation with manual steps', () => {
test('renders flyout with manual steps only', async () => {
const { find, exists, actions } = testBed;
const manualDeprecation = kibanaDeprecationsMockResponse[1];

await actions.table.clickDeprecationAt(1);

expect(exists('kibanaDeprecationDetails')).toBe(true);
expect(find('kibanaDeprecationDetails.flyoutTitle').text()).toBe(manualDeprecation.title);
expect(find('manualStepsList').find('li').length).toEqual(
manualDeprecation.correctiveActions.manualSteps.length
);

// Quick resolve callout and button should not display
expect(exists('quickResolveCallout')).toBe(false);
expect(exists('resolveButton')).toBe(false);
});
});

describe('Deprecation with automatic resolution', () => {
test('resolves deprecation successfully', async () => {
const { find, exists, actions } = testBed;
const quickResolveDeprecation = kibanaDeprecationsMockResponse[0];

await actions.table.clickDeprecationAt(0);

expect(exists('kibanaDeprecationDetails')).toBe(true);
expect(find('kibanaDeprecationDetails.flyoutTitle').text()).toBe(
quickResolveDeprecation.title
);
expect(find('manualStepsList').find('li').length).toEqual(
quickResolveDeprecation.correctiveActions.manualSteps.length
);

// Quick resolve callout and button should display
expect(exists('quickResolveCallout')).toBe(true);
expect(exists('resolveButton')).toBe(true);

await actions.flyout.clickResolveButton();

// Flyout should close after button click
expect(exists('kibanaDeprecationDetails')).toBe(false);

// Reopen the flyout
await actions.table.clickDeprecationAt(0);

// Resolve information should not display and Quick resolve button should be disabled
expect(exists('resolveSection')).toBe(false);
expect(find('resolveButton').props().disabled).toBe(true);
expect(find('resolveButton').text()).toContain('Resolved');
});

test('handles resolve failure', async () => {
const { find, exists, actions } = testBed;
const quickResolveDeprecation = kibanaDeprecationsMockResponse[0];

deprecationService.resolveDeprecation.mockReturnValue(
Promise.resolve({
status: 'fail',
reason: 'resolve failed',
})
);

await actions.table.clickDeprecationAt(0);

expect(exists('kibanaDeprecationDetails')).toBe(true);
expect(find('kibanaDeprecationDetails.flyoutTitle').text()).toBe(
quickResolveDeprecation.title
);

// Quick resolve callout and button should display
expect(exists('quickResolveCallout')).toBe(true);
expect(exists('resolveButton')).toBe(true);

await actions.flyout.clickResolveButton();

// Flyout should close after button click
expect(exists('kibanaDeprecationDetails')).toBe(false);

// Reopen the flyout
await actions.table.clickDeprecationAt(0);

// Verify error displays
expect(exists('quickResolveError')).toBe(true);
// Resolve information should display and Quick resolve button should be enabled
expect(exists('resolveSection')).toBe(true);
expect(find('resolveButton').props().disabled).toBe(false);
expect(find('resolveButton').text()).toContain('Try again');
});
});
});
Loading