Skip to content

Commit a2b42d2

Browse files
authored
[Upgrade Assistant] Removed "closed index" warning from reindex flyout (#114861)
* [Upgrade Assistant] Removed "closed index" warning that reindexing might take longer than usual, which is not the case * [Upgrade Assistant] Also deleted i18n strings that are not needed anymore
1 parent e934bb7 commit a2b42d2

File tree

5 files changed

+5
-78
lines changed

5 files changed

+5
-78
lines changed

x-pack/plugins/translations/translations/ja-JP.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25699,10 +25699,6 @@
2569925699
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.readonlyStepTitle": "古いインデックスを読み込み専用に設定中",
2570025700
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.reindexingDocumentsStepTitle": "ドキュメントを再インデックス中",
2570125701
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklistTitle": "プロセスを再インデックス中",
25702-
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails": "このインデックスは現在閉じています。アップグレードアシスタントが開き、再インデックスを実行してからインデックスを閉じます。 {reindexingMayTakeLongerEmph}。詳細については {docs} をご覧ください。",
25703-
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails.reindexingTakesLongerEmphasis": "再インデックスには通常よりも時間がかかることがあります",
25704-
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutTitle": "インデックスが閉じました",
25705-
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.openAndCloseDocumentation": "ドキュメンテーション",
2570625702
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.customTypeNameWarningDetail": "マッピングタイプは8.0ではサポートされていません。アプリケーションコードまたはスクリプトが{mappingType}に依存していないことを確認してください。",
2570725703
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.customTypeNameWarningTitle": "マッピングタイプ{mappingType}を{defaultType}で置き換えます",
2570825704
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.deprecatedIndexSettingsWarningDetail": "次の廃止予定のインデックス設定が検出されました。",

x-pack/plugins/translations/translations/zh-CN.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26133,10 +26133,6 @@
2613326133
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.readonlyStepTitle": "正在将旧索引设置为只读",
2613426134
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.reindexingDocumentsStepTitle": "正在重新索引文档",
2613526135
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklistTitle": "重新索引过程",
26136-
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails": "此索引当前已关闭。升级助手将打开索引,重新索引,然后关闭索引。{reindexingMayTakeLongerEmph}。请参阅文档{docs}以了解更多信息。",
26137-
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails.reindexingTakesLongerEmphasis": "重新索引可能比通常花费更多的时间",
26138-
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutTitle": "索引已关闭",
26139-
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.openAndCloseDocumentation": "文档",
2614026136
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.customTypeNameWarningDetail": "映射类型在 8.0 中不再受支持。确保没有应用程序代码或脚本依赖 {mappingType}。",
2614126137
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.customTypeNameWarningTitle": "将映射类型 {mappingType} 替换为 {defaultType}",
2614226138
"xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.deprecatedIndexSettingsWarningDetail": "检测到以下弃用的索引设置:",

x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/checklist_step.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ const buttonLabel = (status?: ReindexStatus) => {
6161
* Displays a flyout that shows the current reindexing status for a given index.
6262
*/
6363
export const ChecklistFlyoutStep: React.FunctionComponent<{
64-
renderGlobalCallouts: () => React.ReactNode;
6564
closeFlyout: () => void;
6665
reindexState: ReindexState;
6766
startReindex: () => void;
6867
cancelReindex: () => void;
69-
}> = ({ closeFlyout, reindexState, startReindex, cancelReindex, renderGlobalCallouts }) => {
68+
}> = ({ closeFlyout, reindexState, startReindex, cancelReindex }) => {
7069
const { loadingState, status, hasRequiredPrivileges } = reindexState;
7170
const loading = loadingState === LoadingState.Loading || status === ReindexStatus.inProgress;
7271
const isCompleted = status === ReindexStatus.completed;
@@ -116,7 +115,6 @@ export const ChecklistFlyoutStep: React.FunctionComponent<{
116115
</EuiCallOut>
117116
</>
118117
)}
119-
{renderGlobalCallouts()}
120118
<EuiCallOut
121119
title={
122120
<FormattedMessage

x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/container.tsx

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,10 @@
66
*/
77

88
import React, { useState } from 'react';
9-
import { DocLinksStart } from 'kibana/public';
10-
import { i18n } from '@kbn/i18n';
119
import { FormattedMessage } from '@kbn/i18n/react';
12-
import { EuiCallOut, EuiFlyoutHeader, EuiLink, EuiSpacer, EuiTitle } from '@elastic/eui';
10+
import { EuiFlyoutHeader, EuiSpacer, EuiTitle } from '@elastic/eui';
1311

14-
import {
15-
EnrichedDeprecationInfo,
16-
ReindexAction,
17-
ReindexStatus,
18-
} from '../../../../../../../common/types';
19-
import { useAppContext } from '../../../../../app_context';
12+
import { EnrichedDeprecationInfo, ReindexStatus } from '../../../../../../../common/types';
2013

2114
import type { ReindexStateContext } from '../context';
2215
import { ChecklistFlyoutStep } from './checklist_step';
@@ -33,47 +26,6 @@ export interface ReindexFlyoutProps extends ReindexStateContext {
3326
closeFlyout: () => void;
3427
}
3528

36-
const getOpenAndCloseIndexDocLink = (docLinks: DocLinksStart) => (
37-
<EuiLink target="_blank" href={`${docLinks.links.apis.openIndex}`}>
38-
{i18n.translate(
39-
'xpack.upgradeAssistant.checkupTab.reindexing.flyout.openAndCloseDocumentation',
40-
{ defaultMessage: 'documentation' }
41-
)}
42-
</EuiLink>
43-
);
44-
45-
const getIndexClosedCallout = (docLinks: DocLinksStart) => (
46-
<>
47-
<EuiCallOut
48-
title={i18n.translate(
49-
'xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutTitle',
50-
{ defaultMessage: 'Index closed' }
51-
)}
52-
color="warning"
53-
iconType="alert"
54-
>
55-
<p>
56-
<FormattedMessage
57-
id="xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails"
58-
defaultMessage="This index is currently closed. The Upgrade Assistant will open, reindex and then close the index. {reindexingMayTakeLongerEmph}. Please see the {docs} for more information."
59-
values={{
60-
docs: getOpenAndCloseIndexDocLink(docLinks),
61-
reindexingMayTakeLongerEmph: (
62-
<b>
63-
{i18n.translate(
64-
'xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails.reindexingTakesLongerEmphasis',
65-
{ defaultMessage: 'Reindexing may take longer than usual' }
66-
)}
67-
</b>
68-
),
69-
}}
70-
/>
71-
</p>
72-
</EuiCallOut>
73-
<EuiSpacer size="m" />
74-
</>
75-
);
76-
7729
export const ReindexFlyout: React.FunctionComponent<ReindexFlyoutProps> = ({
7830
reindexState,
7931
startReindex,
@@ -82,12 +34,8 @@ export const ReindexFlyout: React.FunctionComponent<ReindexFlyoutProps> = ({
8234
deprecation,
8335
}) => {
8436
const { status, reindexWarnings } = reindexState;
85-
const { index, correctiveAction } = deprecation;
86-
const {
87-
services: {
88-
core: { docLinks },
89-
},
90-
} = useAppContext();
37+
const { index } = deprecation;
38+
9139
// If there are any warnings and we haven't started reindexing, show the warnings step first.
9240
const [currentFlyoutStep, setCurrentFlyoutStep] = useState<ReindexFlyoutStep>(
9341
reindexWarnings && reindexWarnings.length > 0 && status === undefined
@@ -97,16 +45,10 @@ export const ReindexFlyout: React.FunctionComponent<ReindexFlyoutProps> = ({
9745

9846
let flyoutContents: React.ReactNode;
9947

100-
const globalCallout =
101-
(correctiveAction as ReindexAction).blockerForReindexing === 'index-closed' &&
102-
reindexState.status !== ReindexStatus.completed
103-
? getIndexClosedCallout(docLinks)
104-
: undefined;
10548
switch (currentFlyoutStep) {
10649
case ReindexFlyoutStep.reindexWarnings:
10750
flyoutContents = (
10851
<WarningsFlyoutStep
109-
renderGlobalCallouts={() => globalCallout}
11052
closeFlyout={closeFlyout}
11153
warnings={reindexState.reindexWarnings!}
11254
advanceNextStep={() => setCurrentFlyoutStep(ReindexFlyoutStep.checklist)}
@@ -116,7 +58,6 @@ export const ReindexFlyout: React.FunctionComponent<ReindexFlyoutProps> = ({
11658
case ReindexFlyoutStep.checklist:
11759
flyoutContents = (
11860
<ChecklistFlyoutStep
119-
renderGlobalCallouts={() => globalCallout}
12061
closeFlyout={closeFlyout}
12162
reindexState={reindexState}
12263
startReindex={startReindex}

x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/warnings_step.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ const warningToComponentMap: {
4141

4242
export const idForWarning = (id: number) => `reindexWarning-${id}`;
4343
interface WarningsConfirmationFlyoutProps {
44-
renderGlobalCallouts: () => React.ReactNode;
4544
closeFlyout: () => void;
4645
warnings: ReindexWarning[];
4746
advanceNextStep: () => void;
@@ -53,7 +52,6 @@ interface WarningsConfirmationFlyoutProps {
5352
*/
5453
export const WarningsFlyoutStep: React.FunctionComponent<WarningsConfirmationFlyoutProps> = ({
5554
warnings,
56-
renderGlobalCallouts,
5755
closeFlyout,
5856
advanceNextStep,
5957
}) => {
@@ -88,8 +86,6 @@ export const WarningsFlyoutStep: React.FunctionComponent<WarningsConfirmationFly
8886
return (
8987
<>
9088
<EuiFlyoutBody>
91-
{renderGlobalCallouts()}
92-
9389
<EuiCallOut
9490
title={
9591
<FormattedMessage

0 commit comments

Comments
 (0)