Skip to content

Commit

Permalink
[Upgrade Assistant] Fixed i18n strings and step 3 wording
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliacech committed Oct 19, 2021
1 parent 46af644 commit 58eea7c
Showing 1 changed file with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ const ReindexingDocumentsStepTitle: React.FunctionComponent<{
</>
);
}

// step is in progress after the new index is created and while it's not completed yet
const stepInProgress =
status === ReindexStatus.inProgress &&
(lastCompletedStep === ReindexStep.newIndexCreated ||
lastCompletedStep === ReindexStep.reindexStarted);
// but the reindex can only be cancelled after it has started
const showCancelLink =
status === ReindexStatus.inProgress && lastCompletedStep === ReindexStep.reindexStarted;

Expand Down Expand Up @@ -89,10 +96,17 @@ const ReindexingDocumentsStepTitle: React.FunctionComponent<{
return (
<EuiFlexGroup component="span">
<EuiFlexItem grow={false}>
<FormattedMessage
id="xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.reindexingDocumentsStepTitle"
defaultMessage="Reindexing documents."
/>
{stepInProgress ? (
<FormattedMessage
id="xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.inProgress.reindexingDocumentsStepTitle"
defaultMessage="Reindexing documents."
/>
) : (
<FormattedMessage
id="xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.reindexingDocumentsStepTitle"
defaultMessage="Reindex documents."
/>
)}
</EuiFlexItem>
{showCancelLink && (
<EuiFlexItem>
Expand All @@ -119,15 +133,15 @@ const getStepTitle = (step: ReindexStep, inProgress?: boolean): ReactNode => {
/>
) : (
<FormattedMessage
id="xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.inProgress.readonlyStepTitle"
id="xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.readonlyStepTitle"
defaultMessage="Set original index to read-only."
/>
);
}
if (step === ReindexStep.newIndexCreated) {
return inProgress ? (
<FormattedMessage
id="xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.inPrgress.createIndexStepTitle"
id="xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.inProgress.createIndexStepTitle"
defaultMessage="Creating new index."
/>
) : (
Expand Down

0 comments on commit 58eea7c

Please sign in to comment.