From 4a31dfcc9cb1469945a78aa987c349a33e2bef4a Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Fri, 7 Feb 2020 22:19:49 -0500 Subject: [PATCH 1/7] Moved all of the show/hide toggles outside of ordered lists. --- .../policy_form/steps/step_review.tsx | 48 ++++++++-------- .../steps/step_review.tsx | 48 ++++++++-------- .../policy_details/tabs/tab_summary.tsx | 56 +++++++++---------- .../snapshot_details/tabs/tab_summary.tsx | 50 +++++++++-------- 4 files changed, 101 insertions(+), 101 deletions(-) diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx index 3ddbcd94009ac..ad44c1cac42e6 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx @@ -177,32 +177,30 @@ export const PolicyStepReview: React.FunctionComponent = ({ ))} - {hiddenIndicesCount ? ( -
  • - - {isShowingFullIndicesList ? ( - setIsShowingFullIndicesList(false)}> - {' '} - - - ) : ( - setIsShowingFullIndicesList(true)}> - {' '} - - - )} - -
  • - ) : null} + {hiddenIndicesCount ? ( + + {isShowingFullIndicesList ? ( + setIsShowingFullIndicesList(false)}> + {' '} + + + ) : ( + setIsShowingFullIndicesList(true)}> + {' '} + + + )} + + ) : null} ) : ( = ({ ))} - {hiddenIndicesCount ? ( -
  • - - {isShowingFullIndicesList ? ( - setIsShowingFullIndicesList(false)}> - {' '} - - - ) : ( - setIsShowingFullIndicesList(true)}> - {' '} - - - )} - -
  • - ) : null} + {hiddenIndicesCount ? ( + + {isShowingFullIndicesList ? ( + setIsShowingFullIndicesList(false)}> + {' '} + + + ) : ( + setIsShowingFullIndicesList(true)}> + {' '} + + + )} + + ) : null} ) : ( = ({ policy }) => { ))} - {hiddenIndicesCount ? ( -
  • - - setIsShowingFullIndicesList(true)}> - {' '} - - - -
  • - ) : null} + {hiddenIndicesCount ? ( +
    + + setIsShowingFullIndicesList(true)}> + {' '} + + + +
    + ) : null} ) : ( = ({ policy }) => { ))} - {hiddenIndicesCount ? ( -
  • - - setIsShowingFullIndicesList(false)}> - {' '} - - - -
  • - ) : null} + {hiddenIndicesCount ? ( +
    + + setIsShowingFullIndicesList(false)}> + {' '} + + + +
    + ) : null} ) : null; diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx index d3d32cb149064..f329dc52250bc 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx @@ -56,29 +56,31 @@ export const TabSummary: React.FC = ({ snapshotDetails }) => { const [isShowingFullIndicesList, setIsShowingFullIndicesList] = useState(false); const hiddenIndicesCount = indices.length > 10 ? indices.length - 10 : 0; const shortIndicesList = indices.length ? ( -
      - {[...indices].splice(0, 10).map((index: string) => ( -
    • - - {index} - -
    • - ))} + +
        + {[...indices].splice(0, 10).map((index: string) => ( +
      • + + {index} + +
      • + ))} +
      {hiddenIndicesCount ? ( -
    • +
      setIsShowingFullIndicesList(true)}> {' '} -
    • + ) : null} -
    + ) : ( = ({ snapshotDetails }) => { ); const fullIndicesList = indices.length && indices.length > 10 ? ( -
      - {indices.map((index: string) => ( -
    • - - {index} - -
    • - ))} + +
        + {indices.map((index: string) => ( +
      • + + {index} + +
      • + ))} +
      {hiddenIndicesCount ? ( -
    • +
      setIsShowingFullIndicesList(false)}> = ({ snapshotDetails }) => { -
    • + ) : null} -
    + ) : null; // Reset indices list state when clicking through different snapshots From 56b79d3f09e480b8853261c653ff6f5f7ecde572 Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Tue, 11 Feb 2020 14:01:40 -0500 Subject: [PATCH 2/7] Fixed styling issues for indice list. --- .../components/policy_form/steps/step_review.tsx | 9 +++++---- .../restore_snapshot_form/steps/step_review.tsx | 9 +++++---- .../policy_details/tabs/tab_summary.tsx | 14 ++++++++------ .../snapshot_details/tabs/tab_summary.tsx | 15 +++++++++------ 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx index ad44c1cac42e6..36abe273ad4f6 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx @@ -165,7 +165,7 @@ export const PolicyStepReview: React.FunctionComponent = ({ {displayIndices ? ( - +
      {(isShowingFullIndicesList ? displayIndices @@ -178,8 +178,9 @@ export const PolicyStepReview: React.FunctionComponent = ({ ))}
    + {hiddenIndicesCount ? ( - + {isShowingFullIndicesList ? ( setIsShowingFullIndicesList(false)}> = ({ )} - + ) : null} - +
    ) : ( = ({ {displayIndices ? ( - +
      {(isShowingFullIndicesList ? displayIndices @@ -102,8 +102,9 @@ export const RestoreSnapshotStepReview: React.FunctionComponent = ({ ))}
    + {hiddenIndicesCount ? ( - + {isShowingFullIndicesList ? ( setIsShowingFullIndicesList(false)}> = ({ )} - + ) : null} - +
    ) : ( = ({ policy }) => { ))} + {hiddenIndicesCount ? (
    - + setIsShowingFullIndicesList(true)}> = ({ policy }) => { />{' '} - +
    ) : null}
    @@ -96,7 +97,7 @@ export const TabSummary: React.FunctionComponent = ({ policy }) => { ); const fullIndicesList = displayIndices && displayIndices.length && displayIndices.length > 10 ? ( - +
      {displayIndices.map((index: string) => (
    • @@ -106,9 +107,10 @@ export const TabSummary: React.FunctionComponent = ({ policy }) => {
    • ))}
    + {hiddenIndicesCount ? (
    - + setIsShowingFullIndicesList(false)}> = ({ policy }) => { />{' '} - +
    ) : null} - +
    ) : null; // Reset indices list state when clicking through different policies diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx index f329dc52250bc..28a8c55466636 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx @@ -17,6 +17,7 @@ import { EuiText, EuiTitle, EuiIcon, + EuiSpacer, } from '@elastic/eui'; import { SnapshotDetails } from '../../../../../../../common/types'; @@ -66,9 +67,10 @@ export const TabSummary: React.FC = ({ snapshotDetails }) => { ))} + {hiddenIndicesCount ? (
    - + setIsShowingFullIndicesList(true)}> = ({ snapshotDetails }) => { />{' '} - +
    ) : null}
    @@ -89,7 +91,7 @@ export const TabSummary: React.FC = ({ snapshotDetails }) => { ); const fullIndicesList = indices.length && indices.length > 10 ? ( - +
      {indices.map((index: string) => (
    • @@ -99,9 +101,10 @@ export const TabSummary: React.FC = ({ snapshotDetails }) => {
    • ))}
    + {hiddenIndicesCount ? (
    - + setIsShowingFullIndicesList(false)}> = ({ snapshotDetails }) => { />{' '} - +
    ) : null} - +
    ) : null; // Reset indices list state when clicking through different snapshots From 3ae9eee570ce5b9aaa7dbd1d8940a9623aa3ba18 Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Tue, 11 Feb 2020 15:52:57 -0500 Subject: [PATCH 3/7] Fixed i10n tag that I accidentally changed. --- .../home/snapshot_list/snapshot_details/tabs/tab_summary.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx index 28a8c55466636..78287b4eb6ef9 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx @@ -73,7 +73,7 @@ export const TabSummary: React.FC = ({ snapshotDetails }) => { setIsShowingFullIndicesList(true)}> {' '} From 152ebeefe613e6974d48c30ca1db84f16f287587 Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Thu, 13 Feb 2020 19:01:56 -0500 Subject: [PATCH 4/7] Added component to show/hide indices. --- .../public/app/components/index.ts | 1 + .../policy_form/steps/step_review.tsx | 4 +- .../app/components/show_hide_indices.tsx | 78 +++++++++ .../snapshot_details/tabs/tab_summary.tsx | 154 +++++++++--------- 4 files changed, 160 insertions(+), 77 deletions(-) create mode 100644 x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/index.ts b/x-pack/legacy/plugins/snapshot_restore/public/app/components/index.ts index 32b45c05d5cb3..d460350043845 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/index.ts +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/index.ts @@ -16,6 +16,7 @@ export { SnapshotDeleteProvider } from './snapshot_delete_provider'; export { RestoreSnapshotForm } from './restore_snapshot_form'; export { PolicyExecuteProvider } from './policy_execute_provider'; export { PolicyDeleteProvider } from './policy_delete_provider'; +export { ShowHideIndices } from './show_hide_indices'; export { RetentionSettingsUpdateModalProvider, UpdateRetentionSettings, diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx index 36abe273ad4f6..1434e1245f435 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx @@ -180,7 +180,7 @@ export const PolicyStepReview: React.FunctionComponent = ({ {hiddenIndicesCount ? ( - +
    {isShowingFullIndicesList ? ( setIsShowingFullIndicesList(false)}> = ({ )} - +
    ) : null} ) : ( diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx new file mode 100644 index 0000000000000..91d1b5ca7346f --- /dev/null +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx @@ -0,0 +1,78 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React, { useState } from 'react'; +import { + EuiDescriptionListDescription, + EuiTitle, + EuiSpacer, + EuiText, + EuiLink, + EuiIcon, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/target/types/react'; + +interface Props { + indices: string[] | string; + defaultState: boolean; + i18nId: string; +} + +export const ShowHideIndices: React.FunctionComponent = ({ + indices, + defaultState, + i18nId, +}) => { + const [isShowingFullIndicesList, setIsShowingFullIndicesList] = useState(defaultState); + const displayIndices = indices + ? typeof indices === 'string' + ? indices.split(',') + : indices + : undefined; + const hiddenIndicesCount = + displayIndices && displayIndices.length > 10 ? displayIndices.length - 10 : 0; + return ( + + {displayIndices ? ( +
    +
      + {(isShowingFullIndicesList ? displayIndices : [...displayIndices].splice(0, 10)).map( + index => ( +
    • + + {index} + +
    • + ) + )} +
    + + {hiddenIndicesCount ? ( + + setIsShowingFullIndicesList(false)}> + {' '} + + + + ) : null} +
    + ) : ( + + )} +
    + ); +}; diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx index 78287b4eb6ef9..d78be9063950b 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { useState, useEffect } from 'react'; +import React from 'react'; import { EuiDescriptionList, @@ -15,15 +15,12 @@ import { EuiLink, EuiLoadingSpinner, EuiText, - EuiTitle, - EuiIcon, - EuiSpacer, } from '@elastic/eui'; import { SnapshotDetails } from '../../../../../../../common/types'; import { SNAPSHOT_STATE } from '../../../../../constants'; import { useAppDependencies } from '../../../../../index'; -import { DataPlaceholder, FormattedDateTime } from '../../../../../components'; +import { DataPlaceholder, FormattedDateTime, ShowHideIndices } from '../../../../../components'; import { linkToPolicy } from '../../../../../services/navigation'; import { SnapshotState } from './snapshot_state'; @@ -54,77 +51,78 @@ export const TabSummary: React.FC = ({ snapshotDetails }) => { } = snapshotDetails; // Only show 10 indices initially - const [isShowingFullIndicesList, setIsShowingFullIndicesList] = useState(false); - const hiddenIndicesCount = indices.length > 10 ? indices.length - 10 : 0; - const shortIndicesList = indices.length ? ( - -
      - {[...indices].splice(0, 10).map((index: string) => ( -
    • - - {index} - -
    • - ))} -
    - - {hiddenIndicesCount ? ( -
    - - setIsShowingFullIndicesList(true)}> - {' '} - - - -
    - ) : null} -
    - ) : ( - - ); - const fullIndicesList = - indices.length && indices.length > 10 ? ( -
    -
      - {indices.map((index: string) => ( -
    • - - {index} - -
    • - ))} -
    - - {hiddenIndicesCount ? ( -
    - - setIsShowingFullIndicesList(false)}> - {' '} - - - -
    - ) : null} -
    - ) : null; + // const shortIndicesList = indices.length ? ( + + // ) : null; + + // const hiddenIndicesCount = indices.length > 10 ? indices.length - 10 : 0; + // const shortIndicesList = indices.length ? ( + // + //
      + // {[...indices].splice(0, 10).map((index: string) => ( + //
    • + // + // {index} + // + //
    • + // ))} + //
    + // + // {hiddenIndicesCount ? ( + //
    + // + // setIsShowingFullIndicesList(true)}> + // {' '} + // + // + // + //
    + // ) : null} + //
    + // ) : ( + // + // ); + // const fullIndicesList = + // indices.length && indices.length > 10 ? ( + //
    + //
      + // {indices.map((index: string) => ( + //
    • + // + // {index} + // + //
    • + // ))} + //
    + // + // {hiddenIndicesCount ? ( + //
    + // setIsShowingFullIndicesList(false)}> + // {' '} + // + // + //
    + // ) : null} + //
    + // ) : null; // Reset indices list state when clicking through different snapshots - useEffect(() => { - return () => { - setIsShowingFullIndicesList(false); - }; - }, []); + // useEffect(() => { + // return () => { + // setIsShowingFullIndicesList(false); + // }; + // }, []); return ( @@ -205,7 +203,13 @@ export const TabSummary: React.FC = ({ snapshotDetails }) => { - {isShowingFullIndicesList ? fullIndicesList : shortIndicesList} + + + From ecf05726597f41777a2c7896967f03d1a30d2e4f Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Thu, 13 Feb 2020 21:37:08 -0500 Subject: [PATCH 5/7] Abstracted out some of the common parts of the Show Hide component and implemented the general component in the pages. Also made conditional for the i18n tags. --- .../policy_form/steps/step_review.tsx | 61 ++----------- .../steps/step_review.tsx | 62 ++----------- .../app/components/show_hide_indices.tsx | 51 ++++++----- .../policy_details/tabs/tab_summary.tsx | 84 ++---------------- .../snapshot_details/tabs/tab_summary.tsx | 87 ++----------------- 5 files changed, 49 insertions(+), 296 deletions(-) diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx index 1434e1245f435..bee7d004d891f 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx @@ -13,7 +13,6 @@ import { EuiDescriptionListDescription, EuiSpacer, EuiTabbedContent, - EuiText, EuiTitle, EuiLink, EuiIcon, @@ -22,6 +21,7 @@ import { import { serializePolicy } from '../../../../../common/lib'; import { useAppDependencies } from '../../../index'; import { StepProps } from './'; +import { ShowHideIndices } from '../../show_hide_indices'; export const PolicyStepReview: React.FunctionComponent = ({ policy, @@ -39,15 +39,6 @@ export const PolicyStepReview: React.FunctionComponent = ({ partial: undefined, }; - const [isShowingFullIndicesList, setIsShowingFullIndicesList] = useState(false); - const displayIndices = indices - ? typeof indices === 'string' - ? indices.split(',') - : indices - : undefined; - const hiddenIndicesCount = - displayIndices && displayIndices.length > 10 ? displayIndices.length - 10 : 0; - const serializedPolicy = serializePolicy(policy); const { retention: serializedRetention } = serializedPolicy; @@ -164,51 +155,11 @@ export const PolicyStepReview: React.FunctionComponent = ({ /> - {displayIndices ? ( -
    -
      - {(isShowingFullIndicesList - ? displayIndices - : [...displayIndices].splice(0, 10) - ).map(index => ( -
    • - - {index} - -
    • - ))} -
    - - {hiddenIndicesCount ? ( -
    - {isShowingFullIndicesList ? ( - setIsShowingFullIndicesList(false)}> - {' '} - - - ) : ( - setIsShowingFullIndicesList(true)}> - {' '} - - - )} -
    - ) : null} -
    - ) : ( - - )} +
    diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/restore_snapshot_form/steps/step_review.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/restore_snapshot_form/steps/step_review.tsx index a517d1c4de030..e5e9840805ccb 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/restore_snapshot_form/steps/step_review.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/restore_snapshot_form/steps/step_review.tsx @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import React, { useState, Fragment } from 'react'; +import React, { Fragment } from 'react'; import { EuiCodeEditor, EuiFlexGrid, @@ -23,6 +23,7 @@ import { import { serializeRestoreSettings } from '../../../../../common/lib'; import { useAppDependencies } from '../../../index'; import { StepProps } from './'; +import { ShowHideIndices } from '../../show_hide_indices'; export const RestoreSnapshotStepReview: React.FunctionComponent = ({ restoreSettings, @@ -44,15 +45,6 @@ export const RestoreSnapshotStepReview: React.FunctionComponent = ({ const serializedRestoreSettings = serializeRestoreSettings(restoreSettings); const { index_settings: serializedIndexSettings } = serializedRestoreSettings; - const [isShowingFullIndicesList, setIsShowingFullIndicesList] = useState(false); - const displayIndices = restoreIndices - ? typeof restoreIndices === 'string' - ? restoreIndices.split(',') - : restoreIndices - : undefined; - const hiddenIndicesCount = - displayIndices && displayIndices.length > 10 ? displayIndices.length - 10 : 0; - const renderSummaryTab = () => ( @@ -88,51 +80,11 @@ export const RestoreSnapshotStepReview: React.FunctionComponent = ({ /> - {displayIndices ? ( -
    -
      - {(isShowingFullIndicesList - ? displayIndices - : [...displayIndices].splice(0, 10) - ).map(index => ( -
    • - - {index} - -
    • - ))} -
    - - {hiddenIndicesCount ? ( - - {isShowingFullIndicesList ? ( - setIsShowingFullIndicesList(false)}> - {' '} - - - ) : ( - setIsShowingFullIndicesList(true)}> - {' '} - - - )} - - ) : null} -
    - ) : ( - - )} +
    diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx index 91d1b5ca7346f..9fde1e1f91452 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx @@ -5,27 +5,24 @@ */ import React, { useState } from 'react'; -import { - EuiDescriptionListDescription, - EuiTitle, - EuiSpacer, - EuiText, - EuiLink, - EuiIcon, -} from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n/target/types/react'; - +import { EuiDescriptionListDescription, EuiTitle, EuiLink, EuiIcon } from '@elastic/eui'; interface Props { - indices: string[] | string; + indices: string[] | string | undefined; defaultState: boolean; i18nId: string; } +import { useAppDependencies } from '../index'; + export const ShowHideIndices: React.FunctionComponent = ({ indices, defaultState, i18nId, }) => { + const { + core: { i18n }, + } = useAppDependencies(); + const { FormattedMessage } = i18n; const [isShowingFullIndicesList, setIsShowingFullIndicesList] = useState(defaultState); const displayIndices = indices ? typeof indices === 'string' @@ -49,22 +46,24 @@ export const ShowHideIndices: React.FunctionComponent = ({ ) )} - {hiddenIndicesCount ? ( - - setIsShowingFullIndicesList(false)}> - {' '} - - - + + isShowingFullIndicesList + ? setIsShowingFullIndicesList(false) + : setIsShowingFullIndicesList(true) + } + > + {' '} + + ) : null} ) : ( diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_details/tabs/tab_summary.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_details/tabs/tab_summary.tsx index 5016d7796bc46..c06ec03f5dfdf 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_details/tabs/tab_summary.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_details/tabs/tab_summary.tsx @@ -23,7 +23,7 @@ import { import { SlmPolicy } from '../../../../../../../common/types'; import { useAppDependencies } from '../../../../../index'; -import { FormattedDateTime } from '../../../../../components'; +import { FormattedDateTime, ShowHideIndices } from '../../../../../components'; import { linkToSnapshots, linkToRepository } from '../../../../../services/navigation'; interface Props { @@ -56,82 +56,6 @@ export const TabSummary: React.FunctionComponent = ({ policy }) => { partial: undefined, }; - // Only show 10 indices initially - const [isShowingFullIndicesList, setIsShowingFullIndicesList] = useState(false); - const displayIndices = typeof indices === 'string' ? indices.split(',') : indices; - const hiddenIndicesCount = - displayIndices && displayIndices.length > 10 ? displayIndices.length - 10 : 0; - const shortIndicesList = - displayIndices && displayIndices.length ? ( - -
      - {[...displayIndices].splice(0, 10).map((index: string) => ( -
    • - - {index} - -
    • - ))} -
    - - {hiddenIndicesCount ? ( -
    - - setIsShowingFullIndicesList(true)}> - {' '} - - - -
    - ) : null} -
    - ) : ( - - ); - const fullIndicesList = - displayIndices && displayIndices.length && displayIndices.length > 10 ? ( -
    -
      - {displayIndices.map((index: string) => ( -
    • - - {index} - -
    • - ))} -
    - - {hiddenIndicesCount ? ( -
    - - setIsShowingFullIndicesList(false)}> - {' '} - - - -
    - ) : null} -
    - ) : null; - - // Reset indices list state when clicking through different policies - useEffect(() => { - return () => { - setIsShowingFullIndicesList(false); - }; - }, []); - return ( {isManagedPolicy ? ( @@ -316,7 +240,11 @@ export const TabSummary: React.FunctionComponent = ({ policy }) => { - {isShowingFullIndicesList ? fullIndicesList : shortIndicesList} + diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx index d78be9063950b..821cf93e21fb6 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx @@ -14,7 +14,6 @@ import { EuiFlexItem, EuiLink, EuiLoadingSpinner, - EuiText, } from '@elastic/eui'; import { SnapshotDetails } from '../../../../../../../common/types'; @@ -50,80 +49,6 @@ export const TabSummary: React.FC = ({ snapshotDetails }) => { policyName, } = snapshotDetails; - // Only show 10 indices initially - // const shortIndicesList = indices.length ? ( - - // ) : null; - - // const hiddenIndicesCount = indices.length > 10 ? indices.length - 10 : 0; - // const shortIndicesList = indices.length ? ( - // - //
      - // {[...indices].splice(0, 10).map((index: string) => ( - //
    • - // - // {index} - // - //
    • - // ))} - //
    - // - // {hiddenIndicesCount ? ( - //
    - // - // setIsShowingFullIndicesList(true)}> - // {' '} - // - // - // - //
    - // ) : null} - //
    - // ) : ( - // - // ); - // const fullIndicesList = - // indices.length && indices.length > 10 ? ( - //
    - //
      - // {indices.map((index: string) => ( - //
    • - // - // {index} - // - //
    • - // ))} - //
    - // - // {hiddenIndicesCount ? ( - //
    - // setIsShowingFullIndicesList(false)}> - // {' '} - // - // - //
    - // ) : null} - //
    - // ) : null; - - // Reset indices list state when clicking through different snapshots - // useEffect(() => { - // return () => { - // setIsShowingFullIndicesList(false); - // }; - // }, []); - return ( @@ -203,13 +128,11 @@ export const TabSummary: React.FC = ({ snapshotDetails }) => { - - - + From 2edaacbc3d1e2efdd38dd1cf1116e9d8c35bfefe Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Fri, 14 Feb 2020 17:35:49 -0500 Subject: [PATCH 6/7] Fixed changes per comments. Restored to fix the issue with the bullet points. Updated the i18n tags to be more generic. Created 2 components for formatted message. --- .../components/collapsible_indices_list.tsx | 81 +++++++++++++++++++ .../public/app/components/index.ts | 2 +- .../policy_form/steps/step_review.tsx | 10 +-- .../steps/step_review.tsx | 8 +- .../app/components/show_hide_indices.tsx | 77 ------------------ .../policy_details/tabs/tab_summary.tsx | 12 +-- .../snapshot_details/tabs/tab_summary.tsx | 12 +-- 7 files changed, 96 insertions(+), 106 deletions(-) create mode 100644 x-pack/legacy/plugins/snapshot_restore/public/app/components/collapsible_indices_list.tsx delete mode 100644 x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/collapsible_indices_list.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/collapsible_indices_list.tsx new file mode 100644 index 0000000000000..96224ec1283e2 --- /dev/null +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/collapsible_indices_list.tsx @@ -0,0 +1,81 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React, { useState } from 'react'; +import { EuiTitle, EuiLink, EuiIcon, EuiText, EuiSpacer } from '@elastic/eui'; +interface Props { + indices: string[] | string | undefined; +} + +import { useAppDependencies } from '../index'; + +export const CollapsibleIndicesList: React.FunctionComponent = ({ indices }) => { + const { + core: { i18n }, + } = useAppDependencies(); + const { FormattedMessage } = i18n; + const [isShowingFullIndicesList, setIsShowingFullIndicesList] = useState(false); + const displayIndices = indices + ? typeof indices === 'string' + ? indices.split(',') + : indices + : undefined; + const hiddenIndicesCount = + displayIndices && displayIndices.length > 10 ? displayIndices.length - 10 : 0; + return ( + <> + {displayIndices ? ( + <> + +
      + {(isShowingFullIndicesList ? displayIndices : [...displayIndices].splice(0, 10)).map( + index => ( +
    • + + {index} + +
    • + ) + )} +
    +
    + {hiddenIndicesCount ? ( + <> + + + isShowingFullIndicesList + ? setIsShowingFullIndicesList(false) + : setIsShowingFullIndicesList(true) + } + > + {isShowingFullIndicesList ? ( + + ) : ( + + )}{' '} + + + + ) : null} + + ) : ( + + )} + + ); +}; diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/index.ts b/x-pack/legacy/plugins/snapshot_restore/public/app/components/index.ts index d460350043845..a7038ebd71578 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/index.ts +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/index.ts @@ -16,7 +16,7 @@ export { SnapshotDeleteProvider } from './snapshot_delete_provider'; export { RestoreSnapshotForm } from './restore_snapshot_form'; export { PolicyExecuteProvider } from './policy_execute_provider'; export { PolicyDeleteProvider } from './policy_delete_provider'; -export { ShowHideIndices } from './show_hide_indices'; +export { CollapsibleIndicesList } from './collapsible_indices_list'; export { RetentionSettingsUpdateModalProvider, UpdateRetentionSettings, diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx index bee7d004d891f..a7f7748b7d72f 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_review.tsx @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import React, { Fragment, useState } from 'react'; +import React, { Fragment } from 'react'; import { EuiCodeBlock, EuiFlexGroup, @@ -21,7 +21,7 @@ import { import { serializePolicy } from '../../../../../common/lib'; import { useAppDependencies } from '../../../index'; import { StepProps } from './'; -import { ShowHideIndices } from '../../show_hide_indices'; +import { CollapsibleIndicesList } from '../../collapsible_indices_list'; export const PolicyStepReview: React.FunctionComponent = ({ policy, @@ -155,11 +155,7 @@ export const PolicyStepReview: React.FunctionComponent = ({ /> - +
    diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/restore_snapshot_form/steps/step_review.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/restore_snapshot_form/steps/step_review.tsx index e5e9840805ccb..0d2c2398c6012 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/restore_snapshot_form/steps/step_review.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/restore_snapshot_form/steps/step_review.tsx @@ -23,7 +23,7 @@ import { import { serializeRestoreSettings } from '../../../../../common/lib'; import { useAppDependencies } from '../../../index'; import { StepProps } from './'; -import { ShowHideIndices } from '../../show_hide_indices'; +import { CollapsibleIndicesList } from '../../collapsible_indices_list'; export const RestoreSnapshotStepReview: React.FunctionComponent = ({ restoreSettings, @@ -80,11 +80,7 @@ export const RestoreSnapshotStepReview: React.FunctionComponent = ({ /> - + diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx deleted file mode 100644 index 9fde1e1f91452..0000000000000 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/show_hide_indices.tsx +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import React, { useState } from 'react'; -import { EuiDescriptionListDescription, EuiTitle, EuiLink, EuiIcon } from '@elastic/eui'; -interface Props { - indices: string[] | string | undefined; - defaultState: boolean; - i18nId: string; -} - -import { useAppDependencies } from '../index'; - -export const ShowHideIndices: React.FunctionComponent = ({ - indices, - defaultState, - i18nId, -}) => { - const { - core: { i18n }, - } = useAppDependencies(); - const { FormattedMessage } = i18n; - const [isShowingFullIndicesList, setIsShowingFullIndicesList] = useState(defaultState); - const displayIndices = indices - ? typeof indices === 'string' - ? indices.split(',') - : indices - : undefined; - const hiddenIndicesCount = - displayIndices && displayIndices.length > 10 ? displayIndices.length - 10 : 0; - return ( - - {displayIndices ? ( -
    -
      - {(isShowingFullIndicesList ? displayIndices : [...displayIndices].splice(0, 10)).map( - index => ( -
    • - - {index} - -
    • - ) - )} -
    - {hiddenIndicesCount ? ( - - isShowingFullIndicesList - ? setIsShowingFullIndicesList(false) - : setIsShowingFullIndicesList(true) - } - > - {' '} - - - ) : null} -
    - ) : ( - - )} -
    - ); -}; diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_details/tabs/tab_summary.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_details/tabs/tab_summary.tsx index c06ec03f5dfdf..1f63115c3a5fb 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_details/tabs/tab_summary.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_details/tabs/tab_summary.tsx @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import React, { useState, useEffect, Fragment } from 'react'; +import React, { Fragment } from 'react'; import { EuiCallOut, EuiFlexGroup, @@ -13,8 +13,6 @@ import { EuiDescriptionList, EuiDescriptionListTitle, EuiDescriptionListDescription, - EuiIcon, - EuiText, EuiPanel, EuiStat, EuiSpacer, @@ -23,7 +21,7 @@ import { import { SlmPolicy } from '../../../../../../../common/types'; import { useAppDependencies } from '../../../../../index'; -import { FormattedDateTime, ShowHideIndices } from '../../../../../components'; +import { FormattedDateTime, CollapsibleIndicesList } from '../../../../../components'; import { linkToSnapshots, linkToRepository } from '../../../../../services/navigation'; interface Props { @@ -240,11 +238,7 @@ export const TabSummary: React.FunctionComponent = ({ policy }) => { - + diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx index 821cf93e21fb6..c71fead0a6fc2 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_details/tabs/tab_summary.tsx @@ -19,7 +19,11 @@ import { import { SnapshotDetails } from '../../../../../../../common/types'; import { SNAPSHOT_STATE } from '../../../../../constants'; import { useAppDependencies } from '../../../../../index'; -import { DataPlaceholder, FormattedDateTime, ShowHideIndices } from '../../../../../components'; +import { + DataPlaceholder, + FormattedDateTime, + CollapsibleIndicesList, +} from '../../../../../components'; import { linkToPolicy } from '../../../../../services/navigation'; import { SnapshotState } from './snapshot_state'; @@ -128,11 +132,7 @@ export const TabSummary: React.FC = ({ snapshotDetails }) => { - + From 2fbcd1f665bd8200f77efdab23764ffa14938caa Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Wed, 19 Feb 2020 14:55:57 -0500 Subject: [PATCH 7/7] Fixed internalization issues.. --- x-pack/plugins/translations/translations/ja-JP.json | 12 ------------ x-pack/plugins/translations/translations/zh-CN.json | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index bb488c0a7b1fb..b171863f26c21 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -11551,7 +11551,6 @@ "xpack.snapshotRestore.home.snapshotRestoreTitle": "スナップショットリポジドリ", "xpack.snapshotRestore.home.snapshotsTabTitle": "スナップショット", "xpack.snapshotRestore.policies.breadcrumbTitle": "ポリシー", - "xpack.snapshotRestore.policyDetails.allIndicesLabel": "すべてのインデックス", "xpack.snapshotRestore.policyDetails.closeButtonLabel": "閉じる", "xpack.snapshotRestore.policyDetails.deleteButtonLabel": "削除", "xpack.snapshotRestore.policyDetails.editButtonLabel": "編集", @@ -11565,9 +11564,7 @@ "xpack.snapshotRestore.policyDetails.includeGlobalStateFalseLabel": "いいえ", "xpack.snapshotRestore.policyDetails.includeGlobalStateLabel": "グローバルステータスを含める", "xpack.snapshotRestore.policyDetails.includeGlobalStateTrueLabel": "はい", - "xpack.snapshotRestore.policyDetails.indicesCollapseAllLink": "{count, plural, one {# インデックス} other {# インデックス}}を非表示", "xpack.snapshotRestore.policyDetails.indicesLabel": "インデックス", - "xpack.snapshotRestore.policyDetails.indicesShowAllLink": "{count}その他の{count, plural, one {インデックス} other {インデックス}}を表示", "xpack.snapshotRestore.policyDetails.inProgressSnapshotLinkText": "「{snapshotName}」が進行中", "xpack.snapshotRestore.policyDetails.lastFailure.dateLabel": "日付", "xpack.snapshotRestore.policyDetails.lastFailure.detailsAriaLabel": "ポリシー「{name}」の前回のエラーの詳細", @@ -11667,7 +11664,6 @@ "xpack.snapshotRestore.policyForm.stepReview.retentionTab.maxCountLabel": "最高カウント", "xpack.snapshotRestore.policyForm.stepReview.retentionTab.minCountLabel": "最低カウント", "xpack.snapshotRestore.policyForm.stepReview.retentionTab.sectionRetentionTitle": "スナップショットの保存", - "xpack.snapshotRestore.policyForm.stepReview.summaryTab.allIndicesValue": "すべてのインデックス", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.editStepTooltip": "編集", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.ignoreUnavailableFalseLabel": "いいえ", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.ignoreUnavailableLabel": "利用不可能なインデックスを無視", @@ -11675,9 +11671,7 @@ "xpack.snapshotRestore.policyForm.stepReview.summaryTab.includeGlobalStateFalseLabel": "いいえ", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.includeGlobalStateLabel": "グローバルステータスを含める", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.includeGlobalStateTrueLabel": "はい", - "xpack.snapshotRestore.policyForm.stepReview.summaryTab.indicesCollapseAllLink": "{count, plural, one {# インデックス} other {# インデックス}}を非表示", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.indicesLabel": "インデックス", - "xpack.snapshotRestore.policyForm.stepReview.summaryTab.indicesShowAllLink": "{count}その他の{count, plural, one {インデックス} other {インデックス}}を表示", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.nameLabel": "ポリシー名", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.partialFalseLabel": "いいえ", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.partialLabel": "部分シャードを許可", @@ -12069,16 +12063,13 @@ "xpack.snapshotRestore.restoreForm.stepLogisticsTitle": "詳細を復元", "xpack.snapshotRestore.restoreForm.stepReview.jsonTab.jsonAriaLabel": "実行する設定を復元", "xpack.snapshotRestore.restoreForm.stepReview.jsonTabTitle": "JSON", - "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.allIndicesValue": "すべてのインデックス", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.editStepTooltip": "編集", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.ignoreIndexSettingsLabel": "リセット", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.includeGlobalStateFalseValue": "いいえ", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.includeGlobalStateLabel": "グローバル状態の復元", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.includeGlobalStateTrueValue": "はい", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.indexSettingsLabel": "修正", - "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.indicesCollapseAllLink": "{count, plural, one {# インデックス} other {# インデックス}}を非表示", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.indicesLabel": "インデックス", - "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.indicesShowAllLink": "{count}その他の{count, plural, one {インデックス} other {インデックス}}を表示", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.noSettingsValue": "インデックス設定の修正はありません", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.partialFalseValue": "いいえ", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.partialLabel": "部分復元", @@ -12169,10 +12160,7 @@ "xpack.snapshotRestore.snapshotDetails.itemIncludeGlobalStateLabel": "グローバルステータスを含める", "xpack.snapshotRestore.snapshotDetails.itemIncludeGlobalStateNoLabel": "いいえ", "xpack.snapshotRestore.snapshotDetails.itemIncludeGlobalStateYesLabel": "はい", - "xpack.snapshotRestore.snapshotDetails.itemIndicesCollapseAllLink": "{count, plural, one {# インデックス} other {# インデックス}}を非表示", "xpack.snapshotRestore.snapshotDetails.itemIndicesLabel": "インデックス ({indicesCount})", - "xpack.snapshotRestore.snapshotDetails.itemIndicesNoneLabel": "-", - "xpack.snapshotRestore.snapshotDetails.itemIndicesShowAllLink": "{count}その他の{count, plural, one {インデックス} other {インデックス}}を表示", "xpack.snapshotRestore.snapshotDetails.itemStartTimeLabel": "開始時刻", "xpack.snapshotRestore.snapshotDetails.itemStateLabel": "ステータス", "xpack.snapshotRestore.snapshotDetails.itemUuidLabel": "UUID", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 402ddd8288830..050e9bd40f58d 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -11550,7 +11550,6 @@ "xpack.snapshotRestore.home.snapshotRestoreTitle": "快照存储库", "xpack.snapshotRestore.home.snapshotsTabTitle": "快照", "xpack.snapshotRestore.policies.breadcrumbTitle": "策略", - "xpack.snapshotRestore.policyDetails.allIndicesLabel": "所有索引", "xpack.snapshotRestore.policyDetails.closeButtonLabel": "关闭", "xpack.snapshotRestore.policyDetails.deleteButtonLabel": "删除", "xpack.snapshotRestore.policyDetails.editButtonLabel": "编辑", @@ -11564,9 +11563,7 @@ "xpack.snapshotRestore.policyDetails.includeGlobalStateFalseLabel": "否", "xpack.snapshotRestore.policyDetails.includeGlobalStateLabel": "包括全局状态", "xpack.snapshotRestore.policyDetails.includeGlobalStateTrueLabel": "是", - "xpack.snapshotRestore.policyDetails.indicesCollapseAllLink": "隐藏 {count, plural, one {# 个索引} other {# 个索引}}", "xpack.snapshotRestore.policyDetails.indicesLabel": "索引", - "xpack.snapshotRestore.policyDetails.indicesShowAllLink": "再显示 {count} 个 {count, plural, one {索引} other {索引}}", "xpack.snapshotRestore.policyDetails.inProgressSnapshotLinkText": "“{snapshotName}”正在进行中", "xpack.snapshotRestore.policyDetails.lastFailure.dateLabel": "日期", "xpack.snapshotRestore.policyDetails.lastFailure.detailsAriaLabel": "策略“{name}”的上次失败详情", @@ -11666,7 +11663,6 @@ "xpack.snapshotRestore.policyForm.stepReview.retentionTab.maxCountLabel": "最大计数", "xpack.snapshotRestore.policyForm.stepReview.retentionTab.minCountLabel": "最小计数", "xpack.snapshotRestore.policyForm.stepReview.retentionTab.sectionRetentionTitle": "快照保留", - "xpack.snapshotRestore.policyForm.stepReview.summaryTab.allIndicesValue": "所有索引", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.editStepTooltip": "编辑", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.ignoreUnavailableFalseLabel": "否", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.ignoreUnavailableLabel": "忽略不可用索引", @@ -11674,9 +11670,7 @@ "xpack.snapshotRestore.policyForm.stepReview.summaryTab.includeGlobalStateFalseLabel": "否", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.includeGlobalStateLabel": "包括全局状态", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.includeGlobalStateTrueLabel": "是", - "xpack.snapshotRestore.policyForm.stepReview.summaryTab.indicesCollapseAllLink": "隐藏 {count, plural, one {# 个索引} other {# 个索引}}", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.indicesLabel": "索引", - "xpack.snapshotRestore.policyForm.stepReview.summaryTab.indicesShowAllLink": "再显示 {count} 个 {count, plural, one {索引} other {索引}}", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.nameLabel": "策略名称", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.partialFalseLabel": "否", "xpack.snapshotRestore.policyForm.stepReview.summaryTab.partialLabel": "允许部分分片", @@ -12068,16 +12062,13 @@ "xpack.snapshotRestore.restoreForm.stepLogisticsTitle": "还原详情", "xpack.snapshotRestore.restoreForm.stepReview.jsonTab.jsonAriaLabel": "还原要执行的设置", "xpack.snapshotRestore.restoreForm.stepReview.jsonTabTitle": "JSON", - "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.allIndicesValue": "所有索引", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.editStepTooltip": "缂栬緫", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.ignoreIndexSettingsLabel": "重置", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.includeGlobalStateFalseValue": "否", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.includeGlobalStateLabel": "还原全局状态", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.includeGlobalStateTrueValue": "鏄", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.indexSettingsLabel": "修改", - "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.indicesCollapseAllLink": "隐藏 {count, plural, one {# 个索引} other {# 个索引}}", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.indicesLabel": "索引", - "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.indicesShowAllLink": "再显示 {count} 个 {count, plural, one {索引} other {索引}}", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.noSettingsValue": "无索引设置修改", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.partialFalseValue": "否", "xpack.snapshotRestore.restoreForm.stepReview.summaryTab.partialLabel": "部分还原", @@ -12168,10 +12159,7 @@ "xpack.snapshotRestore.snapshotDetails.itemIncludeGlobalStateLabel": "包括全局状态", "xpack.snapshotRestore.snapshotDetails.itemIncludeGlobalStateNoLabel": "否", "xpack.snapshotRestore.snapshotDetails.itemIncludeGlobalStateYesLabel": "是", - "xpack.snapshotRestore.snapshotDetails.itemIndicesCollapseAllLink": "隐藏 {count, plural, one {# 个索引} other {# 个索引}}", "xpack.snapshotRestore.snapshotDetails.itemIndicesLabel": "索引 ({indicesCount})", - "xpack.snapshotRestore.snapshotDetails.itemIndicesNoneLabel": "-", - "xpack.snapshotRestore.snapshotDetails.itemIndicesShowAllLink": "再显示 {count} 个 {count, plural, one {索引} other {索引}}", "xpack.snapshotRestore.snapshotDetails.itemStartTimeLabel": "开始时间", "xpack.snapshotRestore.snapshotDetails.itemStateLabel": "状态", "xpack.snapshotRestore.snapshotDetails.itemUuidLabel": "UUID",