Skip to content

Commit

Permalink
[Upgrade Assistant] New Kibana deprecations page (elastic#110101)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth authored and sabarasaba committed Oct 26, 2021
1 parent 254784a commit d562ef7
Show file tree
Hide file tree
Showing 46 changed files with 1,434 additions and 1,643 deletions.
36 changes: 1 addition & 35 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -25166,16 +25166,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 @@ -25212,16 +25202,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 @@ -25245,25 +25225,11 @@
"xpack.upgradeAssistant.esDeprecationStats.loadingText": "Elasticsearchの廃止統計情報を読み込んでいます...",
"xpack.upgradeAssistant.esDeprecationStats.noDeprecationsText": "警告なし。準備ができました。",
"xpack.upgradeAssistant.esDeprecationStats.statsTitle": "Elasticsearch",
"xpack.upgradeAssistant.esDeprecationStats.warningDeprecationsTitle": "警告",
"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廃止予定の取得中にエラーが発生しました。",
"xpack.upgradeAssistant.kibanaDeprecationStats.loadingText": "Kibana廃止予定統計情報を読み込んでいます…",
Expand Down
37 changes: 1 addition & 36 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -25595,16 +25595,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 @@ -25641,16 +25631,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 @@ -25674,26 +25654,11 @@
"xpack.upgradeAssistant.esDeprecationStats.loadingText": "正在加载 Elasticsearch 弃用统计……",
"xpack.upgradeAssistant.esDeprecationStats.noDeprecationsText": "无警告。已就绪!",
"xpack.upgradeAssistant.esDeprecationStats.statsTitle": "Elasticsearch",
"xpack.upgradeAssistant.esDeprecationStats.warningDeprecationsTitle": "警告",
"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} 个紧急{criticalDeprecations, plural, other {弃用}}",
"xpack.upgradeAssistant.kibanaDeprecationStats.criticalDeprecationsLabel": "Kibana 具有 {criticalDeprecations} 个关键弃用",
"xpack.upgradeAssistant.kibanaDeprecationStats.criticalDeprecationsTitle": "紧急",
"xpack.upgradeAssistant.kibanaDeprecationStats.getWarningDeprecationsMessage": "Kibana 有 {warningDeprecations} 个警告{warningDeprecations, plural, other {弃用}}",
"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

0 comments on commit d562ef7

Please sign in to comment.