From 17985c3f17d9b7f2927e5b2d9d26331f235c0d71 Mon Sep 17 00:00:00 2001
From: Joe Portner <5295965+jportner@users.noreply.github.com>
Date: Thu, 3 Sep 2020 15:32:48 -0400
Subject: [PATCH 1/6] Updated non-dev usages of node-forge
We have a direct dependency on node-forge `0.9.1`, and a also a
transitive dependency via:
@elastic/request-crypto@1.1.4 > node-jose@1.1.0 > node-forge@0.7.6
This commit updates both of these to `0.10.0`.
---
package.json | 5 +++--
yarn.lock | 21 ++++++++-------------
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/package.json b/package.json
index cbf8fd6bc3bd1..ff487510f7a32 100644
--- a/package.json
+++ b/package.json
@@ -92,6 +92,7 @@
"**/istanbul-instrumenter-loader/schema-utils": "1.0.0",
"**/image-diff/gm/debug": "^2.6.9",
"**/load-grunt-config/lodash": "^4.17.20",
+ "**/node-jose/node-forge": "^0.10.0",
"**/react-dom": "^16.12.0",
"**/react": "^16.12.0",
"**/react-test-renderer": "^16.12.0",
@@ -191,7 +192,7 @@
"moment-timezone": "^0.5.27",
"mustache": "2.3.2",
"node-fetch": "1.7.3",
- "node-forge": "^0.9.1",
+ "node-forge": "^0.10.0",
"opn": "^5.5.0",
"oppsy": "^2.0.0",
"p-map": "^4.0.0",
@@ -305,7 +306,7 @@
"@types/moment-timezone": "^0.5.12",
"@types/mustache": "^0.8.31",
"@types/node": ">=10.17.17 <10.20.0",
- "@types/node-forge": "^0.9.0",
+ "@types/node-forge": "^0.9.5",
"@types/normalize-path": "^3.0.0",
"@types/opn": "^5.1.0",
"@types/pegjs": "^0.10.1",
diff --git a/yarn.lock b/yarn.lock
index 57a2a9d8bc506..b518bf62734ec 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4268,10 +4268,10 @@
dependencies:
"@types/node" "*"
-"@types/node-forge@^0.9.0":
- version "0.9.0"
- resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-0.9.0.tgz#e9f678ec09283f9f35cb8de6c01f86be9278ac08"
- integrity sha512-J00+BIHJOfagO1Qs67Jp5CZO3VkFxY8YKMt44oBhXr+3ZYNnl8wv/vtcJyPjuH0QZ+q7+5nnc6o/YH91ZJy2pQ==
+"@types/node-forge@^0.9.5":
+ version "0.9.5"
+ resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-0.9.5.tgz#648231d79da197216290429020698d4e767365a0"
+ integrity sha512-rrN3xfA/oZIzwOnO3d2wRQz7UdeVkmMMPjWUCfpPTPuKFVb3D6G10LuiVHYYmvrivBBLMx4m0P/FICoDbNZUMA==
dependencies:
"@types/node" "*"
@@ -20591,15 +20591,10 @@ node-forge@0.9.0:
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579"
integrity sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==
-node-forge@^0.7.6:
- version "0.7.6"
- resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.6.tgz#fdf3b418aee1f94f0ef642cd63486c77ca9724ac"
- integrity sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw==
-
-node-forge@^0.9.1:
- version "0.9.1"
- resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.1.tgz#775368e6846558ab6676858a4d8c6e8d16c677b5"
- integrity sha512-G6RlQt5Sb4GMBzXvhfkeFmbqR6MzhtnT7VTHuLadjkii3rdYHNdw0m8zA4BTxVIh68FicCQ2NSUANpsqkr9jvQ==
+node-forge@^0.10.0, node-forge@^0.7.6:
+ version "0.10.0"
+ resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3"
+ integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==
node-gyp@^3.8.0:
version "3.8.0"
From 84cc53a3df74f14ee15de8cd3288f41ede250b32 Mon Sep 17 00:00:00 2001
From: Joe Portner <5295965+jportner@users.noreply.github.com>
Date: Fri, 4 Sep 2020 16:57:01 -0400
Subject: [PATCH 2/6] Update saved object management UI text
---
.../__snapshots__/flyout.test.tsx.snap | 2 +-
.../__snapshots__/header.test.tsx.snap | 2 +-
.../objects_table/components/flyout.tsx | 2 +-
.../objects_table/components/header.tsx | 5 +--
.../components/import_mode_control.tsx | 12 +++---
.../components/import_summary.test.tsx | 6 +--
.../components/import_summary.tsx | 23 ++++++++----
.../components/overwrite_modal.test.tsx | 4 +-
.../components/overwrite_modal.tsx | 6 +--
.../components/copy_mode_control.tsx | 16 ++++----
.../components/copy_status_indicator.tsx | 26 +++++--------
.../copy_status_summary_indicator.tsx | 6 +--
.../components/copy_to_space_flyout.test.tsx | 2 +-
.../components/copy_to_space_form.tsx | 2 +-
.../components/processing_copy_to_space.tsx | 4 +-
.../components/selectable_spaces_control.tsx | 2 +-
.../unauthorized_prompt.test.tsx.snap | 2 +-
.../unauthorized_prompt.tsx | 2 +-
.../components/share_to_space_flyout.tsx | 37 ++++++++++++++-----
.../components/share_to_space_form.tsx | 6 +--
.../share_saved_objects_to_space_column.tsx | 2 +-
.../translations/translations/ja-JP.json | 7 ----
.../translations/translations/zh-CN.json | 7 ----
23 files changed, 92 insertions(+), 91 deletions(-)
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
index 9ad82723c1161..4963b0d7ac259 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
@@ -553,7 +553,7 @@ exports[`Flyout should render import step 1`] = `
hasEmptyLabelSpace={false}
label={
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap
index 642a5030e4ec0..038e1aaf2d8f5 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap
@@ -92,7 +92,7 @@ exports[`Header should render normally 1`] = `
color="subdued"
>
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
index eddca18f9e283..351bb530cb8d4 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
@@ -729,7 +729,7 @@ export class Flyout extends Component {
label={
}
>
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/header.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/header.tsx
index 7a9584f08d632..582801c7b9957 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/header.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/header.tsx
@@ -101,10 +101,7 @@ export const Header = ({
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx
index ac8099893d00e..7a3288d654431 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx
@@ -51,8 +51,7 @@ const createNewCopiesDisabled = {
tooltip: i18n.translate(
'savedObjectsManagement.objectsTable.importModeControl.createNewCopies.disabledText',
{
- defaultMessage:
- 'Check if each object was previously copied or imported into the destination space.',
+ defaultMessage: 'Check if objects were previously copied or imported into the space.',
}
),
};
@@ -64,21 +63,24 @@ const createNewCopiesEnabled = {
),
tooltip: i18n.translate(
'savedObjectsManagement.objectsTable.importModeControl.createNewCopies.enabledText',
- { defaultMessage: 'All imported objects will be created with new random IDs.' }
+ {
+ defaultMessage:
+ 'This option enables you to create multiple copies of the object in the same space.',
+ }
),
};
const overwriteEnabled = {
id: 'overwriteEnabled',
label: i18n.translate(
'savedObjectsManagement.objectsTable.importModeControl.overwrite.enabledLabel',
- { defaultMessage: 'Automatically try to overwrite conflicts' }
+ { defaultMessage: 'Automatically overwrite conflicts' }
),
};
const overwriteDisabled = {
id: 'overwriteDisabled',
label: i18n.translate(
'savedObjectsManagement.objectsTable.importModeControl.overwrite.disabledLabel',
- { defaultMessage: 'Request action when conflict occurs' }
+ { defaultMessage: 'Request action on conflict' }
),
};
const importOptionsTitle = i18n.translate(
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.test.tsx
index ed65131b0fc6b..20ac5a903ef22 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.test.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.test.tsx
@@ -70,7 +70,7 @@ describe('ImportSummary', () => {
const wrapper = shallowWithI18nProvider();
expect(findHeader(wrapper).childAt(0).props()).toEqual(
- expect.objectContaining({ values: { importCount: 1 } })
+ expect.not.objectContaining({ values: expect.anything() }) // no importCount for singular
);
const countCreated = findCountCreated(wrapper);
expect(countCreated).toHaveLength(1);
@@ -90,7 +90,7 @@ describe('ImportSummary', () => {
const wrapper = shallowWithI18nProvider();
expect(findHeader(wrapper).childAt(0).props()).toEqual(
- expect.objectContaining({ values: { importCount: 1 } })
+ expect.not.objectContaining({ values: expect.anything() }) // no importCount for singular
);
expect(findCountCreated(wrapper)).toHaveLength(0);
const countOverwritten = findCountOverwritten(wrapper);
@@ -110,7 +110,7 @@ describe('ImportSummary', () => {
const wrapper = shallowWithI18nProvider();
expect(findHeader(wrapper).childAt(0).props()).toEqual(
- expect.objectContaining({ values: { importCount: 1 } })
+ expect.not.objectContaining({ values: expect.anything() }) // no importCount for singular
);
expect(findCountCreated(wrapper)).toHaveLength(0);
expect(findCountOverwritten(wrapper)).toHaveLength(0);
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.tsx
index 7949f7d18d350..e2ce3c3695b17 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.tsx
@@ -141,7 +141,7 @@ const getCountIndicators = (importItems: ImportItem[]) => {
);
};
-const getStatusIndicator = ({ outcome, errorMessage }: ImportItem) => {
+const getStatusIndicator = ({ outcome, errorMessage = 'Error' }: ImportItem) => {
switch (outcome) {
case 'created':
return (
@@ -168,8 +168,8 @@ const getStatusIndicator = ({ outcome, errorMessage }: ImportItem) => {
type={'alert'}
color={'danger'}
content={i18n.translate('savedObjectsManagement.importSummary.errorOutcomeLabel', {
- defaultMessage: 'Error{message}',
- values: { message: errorMessage ? `: ${errorMessage}` : '' },
+ defaultMessage: '{errorMessage}',
+ values: { errorMessage },
})}
/>
);
@@ -194,11 +194,18 @@ export const ImportSummary = ({ failedImports, successfulImports }: ImportSummar
}
>
-
+ {importItems.length === 1 ? (
+
+ ) : (
+
+ )}
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx
index c93bc9e5038df..1b9d6f9a6a6ae 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx
@@ -40,7 +40,7 @@ describe('OverwriteModal', () => {
const wrapper = shallowWithI18nProvider();
expect(wrapper.find('p').text()).toMatchInlineSnapshot(
- `"\\"baz\\" conflicts with an existing object, are you sure you want to overwrite it?"`
+ `"\\"baz\\" conflicts with an existing object, overwrite it?"`
);
expect(wrapper.find('EuiSuperSelect')).toHaveLength(0);
});
@@ -82,7 +82,7 @@ describe('OverwriteModal', () => {
const wrapper = shallowWithI18nProvider();
expect(wrapper.find('p').text()).toMatchInlineSnapshot(
- `"\\"baz\\" conflicts with multiple existing objects, do you want to overwrite one of them?"`
+ `"\\"baz\\" conflicts with multiple existing objects, overwrite one?"`
);
expect(wrapper.find('EuiSuperSelect')).toHaveLength(1);
});
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx
index dbe95161cbeae..2225c9a345b48 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx
@@ -98,15 +98,13 @@ export const OverwriteModal = ({ conflict, onFinish }: OverwriteModalProps) => {
const bodyText =
error.type === 'conflict'
? i18n.translate('savedObjectsManagement.objectsTable.overwriteModal.body.conflict', {
- defaultMessage:
- '"{title}" conflicts with an existing object, are you sure you want to overwrite it?',
+ defaultMessage: '"{title}" conflicts with an existing object, overwrite it?',
values: { title },
})
: i18n.translate(
'savedObjectsManagement.objectsTable.overwriteModal.body.ambiguousConflict',
{
- defaultMessage:
- '"{title}" conflicts with multiple existing objects, do you want to overwrite one of them?',
+ defaultMessage: '"{title}" conflicts with multiple existing objects, overwrite one?',
values: { title },
}
);
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx
index 42fbf8954396e..e250cbc705084 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx
@@ -37,8 +37,7 @@ const createNewCopiesDisabled = {
tooltip: i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.disabledText',
{
- defaultMessage:
- 'Check if each object was previously copied or imported into the destination space.',
+ defaultMessage: 'Check if objects were previously copied or imported into the space.',
}
),
};
@@ -50,33 +49,36 @@ const createNewCopiesEnabled = {
),
tooltip: i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.enabledText',
- { defaultMessage: 'All copied objects will be created with new random IDs.' }
+ {
+ defaultMessage:
+ 'This option enables you to create multiple copies of the object in the same space.',
+ }
),
};
const overwriteEnabled = {
id: 'overwriteEnabled',
label: i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.overwrite.enabledLabel',
- { defaultMessage: 'Automatically try to overwrite conflicts' }
+ { defaultMessage: 'Automatically overwrite conflicts' }
),
};
const overwriteDisabled = {
id: 'overwriteDisabled',
label: i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.overwrite.disabledLabel',
- { defaultMessage: 'Request action when conflict occurs' }
+ { defaultMessage: 'Request action on conflict' }
),
};
const includeRelated = {
id: 'includeRelated',
text: i18n.translate('xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.title', {
- defaultMessage: 'Include related saved objects',
+ defaultMessage: 'Include related objects',
}),
tooltip: i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.text',
{
defaultMessage:
- 'This will copy any other objects this has references to -- for example, a dashboard may have references to multiple visualizations.',
+ 'Copy this object and its related objects. For dashboards, related visualizations, index patterns, and saved searches are also copied.',
}
),
};
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
index 158d7a9a43ef6..cfbe580835008 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
@@ -36,13 +36,13 @@ export const CopyStatusIndicator = (props: Props) => {
// the object was overwritten
) : (
// the object was not overwritten
);
return ;
@@ -53,19 +53,19 @@ export const CopyStatusIndicator = (props: Props) => {
// this is an "automatic overwrite", e.g., the "Overwrite all conflicts" option was selected
) : pendingObjectRetry?.overwrite ? (
// this is a manual overwrite, e.g., the individual "Overwrite?" switch was enabled
) : (
// this object is pending success, but it will not result in an overwrite
);
return ;
@@ -96,15 +96,7 @@ export const CopyStatusIndicator = (props: Props) => {
-
-
}
@@ -121,17 +113,17 @@ export const CopyStatusIndicator = (props: Props) => {
overwrite ? (
) : conflict ? (
) : (
)
}
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_summary_indicator.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_summary_indicator.tsx
index 4bc7e5cfaf31a..4dfb14e756cd6 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_summary_indicator.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_summary_indicator.tsx
@@ -55,7 +55,7 @@ const renderIcon = (props: Props) => {
content={
}
@@ -93,7 +93,7 @@ const renderIcon = (props: Props) => {
content={
}
@@ -119,7 +119,7 @@ const renderIcon = (props: Props) => {
content={
}
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx
index dfc908d81887a..e84a7f7534d24 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx
@@ -510,7 +510,7 @@ describe('CopyToSpaceFlyout', () => {
Object {
"color": "warning",
"content": ,
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_form.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_form.tsx
index fdc8d8c73e324..551573feebcdb 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_form.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_form.tsx
@@ -51,7 +51,7 @@ export const CopyToSpaceForm = (props: Props) => {
label={
}
fullWidth
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx
index ceaa1dc9f5e21..b0ccafec21f84 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx
@@ -48,12 +48,12 @@ const renderCopyOptions = ({ createNewCopies, overwrite, includeRelated }: CopyO
const overwriteLabel = overwrite ? (
) : (
);
const includeRelatedLabel = includeRelated ? (
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/selectable_spaces_control.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/selectable_spaces_control.tsx
index 2a8b5e660f38c..d4e12b31b5b4f 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/selectable_spaces_control.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/selectable_spaces_control.tsx
@@ -31,7 +31,7 @@ export const SelectableSpacesControl = (props: Props) => {
content={
}
position="left"
diff --git a/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/__snapshots__/unauthorized_prompt.test.tsx.snap b/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/__snapshots__/unauthorized_prompt.test.tsx.snap
index b53b4d6ec7caf..1e761a0f14fc9 100644
--- a/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/__snapshots__/unauthorized_prompt.test.tsx.snap
+++ b/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/__snapshots__/unauthorized_prompt.test.tsx.snap
@@ -7,7 +7,7 @@ exports[`UnauthorizedPrompt renders as expected 1`] = `
data-test-subj="permissionDeniedMessage"
>
diff --git a/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/unauthorized_prompt.tsx b/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/unauthorized_prompt.tsx
index dd3f96d94eab4..50f10ec3860df 100644
--- a/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/unauthorized_prompt.tsx
+++ b/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/unauthorized_prompt.tsx
@@ -24,7 +24,7 @@ export const UnauthorizedPrompt = () => (
}
diff --git a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx
index 10cc5777cdcff..63bc7b89a0bd5 100644
--- a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx
+++ b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx
@@ -104,20 +104,27 @@ export const ShareSavedObjectsToSpaceFlyout = (props: Props) => {
const title =
currentNamespaces.length === 1
? i18n.translate('xpack.spaces.management.shareToSpace.shareNewSuccessTitle', {
- defaultMessage: 'Saved Object is now shared!',
+ defaultMessage: 'Object is now shared',
})
: i18n.translate('xpack.spaces.management.shareToSpace.shareEditSuccessTitle', {
- defaultMessage: 'Saved Object updated',
+ defaultMessage: 'Object is updated',
});
if (spacesToAdd.length > 0) {
await spacesManager.shareSavedObjectAdd({ type, id }, spacesToAdd);
const spaceNames = spacesToAdd.map(
(spaceId) => spaces.find((space) => space.id === spaceId)!.name
);
- const text = i18n.translate('xpack.spaces.management.shareToSpace.shareAddSuccessText', {
- defaultMessage: `'{object}' was added to the following spaces:\n{spaces}`,
- values: { object: meta.title, spaces: spaceNames.join(', ') },
- });
+ const spaceCount = spaceNames.length;
+ const text =
+ spaceCount === 1
+ ? i18n.translate('xpack.spaces.management.shareToSpace.shareAddSuccessTextSingular', {
+ defaultMessage: `'{object}' was added to 1 space.`,
+ values: { object: meta.title },
+ })
+ : i18n.translate('xpack.spaces.management.shareToSpace.shareAddSuccessTextPlural', {
+ defaultMessage: `'{object}' was added to {spaceCount} spaces.`,
+ values: { object: meta.title, spaceCount },
+ });
toastNotifications.addSuccess({ title, text });
}
if (spacesToRemove.length > 0) {
@@ -125,10 +132,20 @@ export const ShareSavedObjectsToSpaceFlyout = (props: Props) => {
const spaceNames = spacesToRemove.map(
(spaceId) => spaces.find((space) => space.id === spaceId)!.name
);
- const text = i18n.translate('xpack.spaces.management.shareToSpace.shareRemoveSuccessText', {
- defaultMessage: `'{object}' was removed from the following spaces:\n{spaces}`,
- values: { object: meta.title, spaces: spaceNames.join(', ') },
- });
+ const spaceCount = spaceNames.length;
+ const text =
+ spaceCount === 1
+ ? i18n.translate(
+ 'xpack.spaces.management.shareToSpace.shareRemoveSuccessTextSingular',
+ {
+ defaultMessage: `'{object}' was removed from 1 space.`,
+ values: { object: meta.title },
+ }
+ )
+ : i18n.translate('xpack.spaces.management.shareToSpace.shareRemoveSuccessTextPlural', {
+ defaultMessage: `'{object}' was removed from {spaceCount} spaces.`,
+ values: { object: meta.title, spaceCount },
+ });
toastNotifications.addSuccess({ title, text });
}
onObjectUpdated();
diff --git a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx
index 24402fec8d771..b6810c1f01715 100644
--- a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx
+++ b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx
@@ -35,14 +35,14 @@ export const ShareToSpaceForm = (props: Props) => {
title={
}
color="warning"
>
{
label={
}
labelAppend={
diff --git a/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx b/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx
index e8649faa120be..93d7bb0170519 100644
--- a/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx
+++ b/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx
@@ -52,7 +52,7 @@ const ColumnDisplay = ({ namespaces, data }: ColumnDataProps) => {
const unauthorizedCount = (namespaces?.filter((namespace) => namespace === '?') ?? []).length;
const unauthorizedTooltip = i18n.translate(
'xpack.spaces.management.shareToSpace.columnUnauthorizedLabel',
- { defaultMessage: 'You do not have permission to view these spaces' }
+ { defaultMessage: `You don't have permission to view these spaces.` }
);
const displayedSpaces = isExpanded
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index eacb1febd20ff..529dd71196096 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -2880,7 +2880,6 @@
"savedObjectsManagement.objectsTable.flyout.renderConflicts.columnSampleOfAffectedObjectsDescription": "影響されるオブジェクトのサンプル",
"savedObjectsManagement.objectsTable.flyout.renderConflicts.columnSampleOfAffectedObjectsName": "影響されるオブジェクトのサンプル",
"savedObjectsManagement.objectsTable.flyout.resolveImportErrorsFileErrorMessage": "ファイルを処理できませんでした。",
- "savedObjectsManagement.objectsTable.flyout.selectFileToImportFormRowLabel": "インポートするファイルを選択してください",
"savedObjectsManagement.objectsTable.header.exportButtonLabel": "{filteredCount, plural, one{# オブジェクト} other {# オブジェクト}}をエクスポート",
"savedObjectsManagement.objectsTable.header.importButtonLabel": "インポート",
"savedObjectsManagement.objectsTable.header.refreshButtonLabel": "更新",
@@ -17602,8 +17601,6 @@
"xpack.spaces.management.copyToSpace.actionTitle": "スペースにコピー",
"xpack.spaces.management.copyToSpace.copyErrorTitle": "保存されたオブジェクトのコピー中にエラーが発生",
"xpack.spaces.management.copyToSpace.copyResultsLabel": "コピー結果",
- "xpack.spaces.management.copyToSpace.copyStatus.conflictsMessage": "このスペースには同じID({id})の保存されたオブジェクトが既に存在します。",
- "xpack.spaces.management.copyToSpace.copyStatus.conflictsOverwriteMessage": "「上書き」をクリックしてこのバージョンをコピーされたバージョンに置き換えます。",
"xpack.spaces.management.copyToSpace.copyStatus.pendingOverwriteMessage": "保存されたオブジェクトは上書きされます。「スキップ」をクリックしてこの操作をキャンセルします。",
"xpack.spaces.management.copyToSpace.copyStatus.successMessage": "保存されたオブジェクトがコピーされました。",
"xpack.spaces.management.copyToSpace.copyStatus.unresolvableErrorMessage": "この保存されたオブジェクトのコピー中にエラーが発生しました。",
@@ -17613,7 +17610,6 @@
"xpack.spaces.management.copyToSpace.copyToSpacesButton": "{spaceCount} {spaceCount, plural, one {スペース} other {スペース}}にコピー",
"xpack.spaces.management.copyToSpace.disabledCopyToSpacesButton": "コピー",
"xpack.spaces.management.copyToSpace.dontIncludeRelatedLabel": "関連性のある保存されたオブジェクトを含みません",
- "xpack.spaces.management.copyToSpace.dontOverwriteLabel": "保存されたオブジェクトを上書きしません",
"xpack.spaces.management.copyToSpace.finishCopyToSpacesButton": "終了",
"xpack.spaces.management.copyToSpace.finishedButtonLabel": "コピーが完了しました。",
"xpack.spaces.management.copyToSpace.finishPendingOverwritesCopyToSpacesButton": "{overwriteCount}件のオブジェクトを上書き",
@@ -17621,10 +17617,8 @@
"xpack.spaces.management.copyToSpace.inProgressButtonLabel": "コピーが進行中です。お待ちください。",
"xpack.spaces.management.copyToSpace.noSpacesBody": "コピーできるスペースがありません。",
"xpack.spaces.management.copyToSpace.noSpacesTitle": "スペースがありません",
- "xpack.spaces.management.copyToSpace.overwriteLabel": "保存されたオブジェクトを自動的に上書きしています",
"xpack.spaces.management.copyToSpace.resolveCopyErrorTitle": "保存されたオブジェクトの矛盾の解決中にエラーが発生",
"xpack.spaces.management.copyToSpace.resolveCopySuccessTitle": "上書き成功",
- "xpack.spaces.management.copyToSpace.selectSpacesLabel": "コピー先のスペースを選択してください",
"xpack.spaces.management.copyToSpace.spacesLoadErrorTitle": "利用可能なスペースを読み込み中にエラーが発生",
"xpack.spaces.management.copyToSpaceFlyoutFooter.errorCount": "エラー",
"xpack.spaces.management.copyToSpaceFlyoutFooter.pendingCount": "保留中",
@@ -17703,7 +17697,6 @@
"xpack.spaces.management.spacesGridPage.spacesTitle": "スペース",
"xpack.spaces.management.spacesGridPage.spaceSuccessfullyDeletedNotificationMessage": "「{spaceName}」 スペースが削除されました。",
"xpack.spaces.management.toggleAllFeaturesLink": "(すべて変更)",
- "xpack.spaces.management.unauthorizedPrompt.permissionDeniedDescription": "スペースを管理するパーミッションがありません。",
"xpack.spaces.management.unauthorizedPrompt.permissionDeniedTitle": "パーミッションが拒否されました",
"xpack.spaces.management.validateSpace.describeMaxLengthErrorMessage": "説明は 2000 文字以内でなければなりません。",
"xpack.spaces.management.validateSpace.nameMaxLengthErrorMessage": "名前はは 1024 文字以内でなければなりません。",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index bd30703dd5bd6..dfc6f591784d0 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -2881,7 +2881,6 @@
"savedObjectsManagement.objectsTable.flyout.renderConflicts.columnSampleOfAffectedObjectsDescription": "受影响对象样例",
"savedObjectsManagement.objectsTable.flyout.renderConflicts.columnSampleOfAffectedObjectsName": "受影响对象样例",
"savedObjectsManagement.objectsTable.flyout.resolveImportErrorsFileErrorMessage": "无法处理该文件。",
- "savedObjectsManagement.objectsTable.flyout.selectFileToImportFormRowLabel": "请选择要导入的文件",
"savedObjectsManagement.objectsTable.header.exportButtonLabel": "导出 {filteredCount, plural, one{# 个对象} other {# 个对象}}",
"savedObjectsManagement.objectsTable.header.importButtonLabel": "导入",
"savedObjectsManagement.objectsTable.header.refreshButtonLabel": "刷新",
@@ -17612,8 +17611,6 @@
"xpack.spaces.management.copyToSpace.actionTitle": "复制到工作区",
"xpack.spaces.management.copyToSpace.copyErrorTitle": "复制已保存对象时出错",
"xpack.spaces.management.copyToSpace.copyResultsLabel": "复制结果",
- "xpack.spaces.management.copyToSpace.copyStatus.conflictsMessage": "具有匹配 ID ({id}) 的已保存对象在此工作区中已存在。",
- "xpack.spaces.management.copyToSpace.copyStatus.conflictsOverwriteMessage": "单击“覆盖”可将此版本替换为复制的版本。",
"xpack.spaces.management.copyToSpace.copyStatus.pendingOverwriteMessage": "已保存对象将被覆盖。单击“跳过”可取消此操作。",
"xpack.spaces.management.copyToSpace.copyStatus.successMessage": "已保存对象成功复制。",
"xpack.spaces.management.copyToSpace.copyStatus.unresolvableErrorMessage": "复制此已保存对象时出错。",
@@ -17623,7 +17620,6 @@
"xpack.spaces.management.copyToSpace.copyToSpacesButton": "复制到 {spaceCount} {spaceCount, plural, one {个工作区} other {个工作区}}",
"xpack.spaces.management.copyToSpace.disabledCopyToSpacesButton": "复制",
"xpack.spaces.management.copyToSpace.dontIncludeRelatedLabel": "不包括相关已保存对象",
- "xpack.spaces.management.copyToSpace.dontOverwriteLabel": "未覆盖已保存对象",
"xpack.spaces.management.copyToSpace.finishCopyToSpacesButton": "完成",
"xpack.spaces.management.copyToSpace.finishedButtonLabel": "复制已完成。",
"xpack.spaces.management.copyToSpace.finishPendingOverwritesCopyToSpacesButton": "覆盖 {overwriteCount} 个对象",
@@ -17631,10 +17627,8 @@
"xpack.spaces.management.copyToSpace.inProgressButtonLabel": "复制正在进行中。请稍候。",
"xpack.spaces.management.copyToSpace.noSpacesBody": "没有可向其中进行复制的合格工作区。",
"xpack.spaces.management.copyToSpace.noSpacesTitle": "没有可用的工作区",
- "xpack.spaces.management.copyToSpace.overwriteLabel": "正在自动覆盖已保存对象",
"xpack.spaces.management.copyToSpace.resolveCopyErrorTitle": "解决已保存对象冲突时出错",
"xpack.spaces.management.copyToSpace.resolveCopySuccessTitle": "覆盖成功",
- "xpack.spaces.management.copyToSpace.selectSpacesLabel": "选择要向其中进行复制的工作区",
"xpack.spaces.management.copyToSpace.spacesLoadErrorTitle": "加载可用工作区时出错",
"xpack.spaces.management.copyToSpaceFlyoutFooter.errorCount": "错误",
"xpack.spaces.management.copyToSpaceFlyoutFooter.pendingCount": "待处理",
@@ -17713,7 +17707,6 @@
"xpack.spaces.management.spacesGridPage.spacesTitle": "工作区",
"xpack.spaces.management.spacesGridPage.spaceSuccessfullyDeletedNotificationMessage": "已删除 “{spaceName}” 空间。",
"xpack.spaces.management.toggleAllFeaturesLink": "(全部更改)",
- "xpack.spaces.management.unauthorizedPrompt.permissionDeniedDescription": "您没有权限管理空间。",
"xpack.spaces.management.unauthorizedPrompt.permissionDeniedTitle": "权限被拒绝",
"xpack.spaces.management.validateSpace.describeMaxLengthErrorMessage": "描述不能超过 2000 个字符。",
"xpack.spaces.management.validateSpace.nameMaxLengthErrorMessage": "名称不能超过 1024 个字符。",
From 37342060b323dffe8359bfa3ee12f372bbd1f35e Mon Sep 17 00:00:00 2001
From: Joe Portner <5295965+jportner@users.noreply.github.com>
Date: Tue, 8 Sep 2020 08:58:28 -0400
Subject: [PATCH 3/6] Fix type check
---
.../components/copy_status_indicator.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
index cfbe580835008..93f953be43ffb 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
@@ -5,7 +5,7 @@
*/
import React, { Fragment } from 'react';
-import { EuiLoadingSpinner, EuiIconTip, EuiSpacer } from '@elastic/eui';
+import { EuiLoadingSpinner, EuiIconTip } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { ImportRetry } from '../types';
import { SummarizedCopyToSpaceResult, SummarizedSavedObjectResult } from '..';
From c4e2237ebabbdbec7d2c689d9907694bad5d81e1 Mon Sep 17 00:00:00 2001
From: Joe Portner <5295965+jportner@users.noreply.github.com>
Date: Tue, 8 Sep 2020 18:01:35 -0400
Subject: [PATCH 4/6] Change UI text based on review feedback
---
.../components/import_mode_control.tsx | 5 +-
.../components/overwrite_modal.test.tsx | 4 +-
.../components/overwrite_modal.tsx | 4 +-
.../components/copy_mode_control.tsx | 4 +-
.../components/copy_status_indicator.tsx | 56 ++++++++++++-------
.../components/copy_to_space_flyout.test.tsx | 4 +-
.../components/processing_copy_to_space.tsx | 42 ++++++--------
.../components/share_to_space_flyout.tsx | 4 +-
.../components/share_to_space_form.tsx | 2 +-
9 files changed, 68 insertions(+), 57 deletions(-)
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx
index 7a3288d654431..4000d620465a8 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx
@@ -51,7 +51,7 @@ const createNewCopiesDisabled = {
tooltip: i18n.translate(
'savedObjectsManagement.objectsTable.importModeControl.createNewCopies.disabledText',
{
- defaultMessage: 'Check if objects were previously copied or imported into the space.',
+ defaultMessage: 'Check if objects were previously copied or imported.',
}
),
};
@@ -64,8 +64,7 @@ const createNewCopiesEnabled = {
tooltip: i18n.translate(
'savedObjectsManagement.objectsTable.importModeControl.createNewCopies.enabledText',
{
- defaultMessage:
- 'This option enables you to create multiple copies of the object in the same space.',
+ defaultMessage: 'Use this option to create one or more copies of the object.',
}
),
};
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx
index 1b9d6f9a6a6ae..7576b62552aa2 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx
@@ -40,7 +40,7 @@ describe('OverwriteModal', () => {
const wrapper = shallowWithI18nProvider();
expect(wrapper.find('p').text()).toMatchInlineSnapshot(
- `"\\"baz\\" conflicts with an existing object, overwrite it?"`
+ `"\\"baz\\" conflicts with an existing object. Overwrite it?"`
);
expect(wrapper.find('EuiSuperSelect')).toHaveLength(0);
});
@@ -82,7 +82,7 @@ describe('OverwriteModal', () => {
const wrapper = shallowWithI18nProvider();
expect(wrapper.find('p').text()).toMatchInlineSnapshot(
- `"\\"baz\\" conflicts with multiple existing objects, overwrite one?"`
+ `"\\"baz\\" conflicts with multiple existing objects. Overwrite one?"`
);
expect(wrapper.find('EuiSuperSelect')).toHaveLength(1);
});
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx
index 2225c9a345b48..bf27d407fbe94 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx
@@ -98,13 +98,13 @@ export const OverwriteModal = ({ conflict, onFinish }: OverwriteModalProps) => {
const bodyText =
error.type === 'conflict'
? i18n.translate('savedObjectsManagement.objectsTable.overwriteModal.body.conflict', {
- defaultMessage: '"{title}" conflicts with an existing object, overwrite it?',
+ defaultMessage: '"{title}" conflicts with an existing object. Overwrite it?',
values: { title },
})
: i18n.translate(
'savedObjectsManagement.objectsTable.overwriteModal.body.ambiguousConflict',
{
- defaultMessage: '"{title}" conflicts with multiple existing objects, overwrite one?',
+ defaultMessage: '"{title}" conflicts with multiple existing objects. Overwrite one?',
values: { title },
}
);
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx
index e250cbc705084..c3e631e335ea7 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx
@@ -51,7 +51,7 @@ const createNewCopiesEnabled = {
'xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.enabledText',
{
defaultMessage:
- 'This option enables you to create multiple copies of the object in the same space.',
+ 'Use this option to create one or more copies of the object in the same space.',
}
),
};
@@ -88,7 +88,7 @@ const copyOptionsTitle = i18n.translate(
);
const relationshipOptionsTitle = i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.relationshipOptionsTitle',
- { defaultMessage: 'Relationship options' }
+ { defaultMessage: 'Relationship' }
);
const createLabel = ({ text, tooltip }: { text: string; tooltip: string }) => (
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
index 93f953be43ffb..d9e1418cdd412 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
@@ -59,7 +59,7 @@ export const CopyStatusIndicator = (props: Props) => {
// this is a manual overwrite, e.g., the individual "Overwrite?" switch was enabled
) : (
// this object is pending success, but it will not result in an overwrite
@@ -80,7 +80,7 @@ export const CopyStatusIndicator = (props: Props) => {
content={
}
/>
@@ -88,20 +88,38 @@ export const CopyStatusIndicator = (props: Props) => {
}
if (hasConflicts) {
- return (
-
-
-
- }
- />
- );
+ switch (conflict!.error.type) {
+ case 'conflict':
+ return (
+
+
+
+ }
+ />
+ );
+ case 'ambiguous_conflict':
+ return (
+
+
+
+ }
+ />
+ );
+ }
}
return hasMissingReferences ? (
@@ -113,17 +131,17 @@ export const CopyStatusIndicator = (props: Props) => {
overwrite ? (
) : conflict ? (
) : (
)
}
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx
index e84a7f7534d24..e214db22aa9cc 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx
@@ -510,7 +510,7 @@ describe('CopyToSpaceFlyout', () => {
Object {
"color": "warning",
"content": ,
@@ -604,7 +604,7 @@ describe('CopyToSpaceFlyout', () => {
Object {
"color": "danger",
"content": ,
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx
index b0ccafec21f84..ab8fb0b438f67 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx
@@ -45,36 +45,30 @@ const renderCopyOptions = ({ createNewCopies, overwrite, includeRelated }: CopyO
defaultMessage="Check for existing objects"
/>
);
- const overwriteLabel = overwrite ? (
-
- ) : (
-
- );
- const includeRelatedLabel = includeRelated ? (
-
- ) : (
-
- );
return (
{!createNewCopies && (
-
+
+ }
+ />
)}
-
+
+ }
+ />
);
};
diff --git a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx
index 63bc7b89a0bd5..053fcb4fdabf8 100644
--- a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx
+++ b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx
@@ -107,7 +107,7 @@ export const ShareSavedObjectsToSpaceFlyout = (props: Props) => {
defaultMessage: 'Object is now shared',
})
: i18n.translate('xpack.spaces.management.shareToSpace.shareEditSuccessTitle', {
- defaultMessage: 'Object is updated',
+ defaultMessage: 'Object was updated',
});
if (spacesToAdd.length > 0) {
await spacesManager.shareSavedObjectAdd({ type, id }, spacesToAdd);
@@ -227,7 +227,7 @@ export const ShareSavedObjectsToSpaceFlyout = (props: Props) => {
diff --git a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx
index b6810c1f01715..ad84ea85d5e54 100644
--- a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx
+++ b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx
@@ -35,7 +35,7 @@ export const ShareToSpaceForm = (props: Props) => {
title={
}
color="warning"
From ba03519c1e51a149fbb4a0215b86a60a394abf46 Mon Sep 17 00:00:00 2001
From: Joe Portner <5295965+jportner@users.noreply.github.com>
Date: Tue, 8 Sep 2020 18:08:58 -0400
Subject: [PATCH 5/6] Disable "Cancel" button during/after import
---
.../components/__snapshots__/flyout.test.tsx.snap | 6 ++++++
.../objects_table/components/flyout.test.tsx | 4 ++++
.../objects_table/components/flyout.tsx | 13 +++++++++----
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
index 4963b0d7ac259..0a330d074fd42 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
@@ -122,6 +122,8 @@ exports[`Flyout conflicts should allow conflict resolution 1`] = `
grow={false}
>
@@ -420,6 +422,8 @@ exports[`Flyout legacy conflicts should allow conflict resolution 1`] = `
grow={false}
>
@@ -603,6 +607,8 @@ exports[`Flyout should render import step 1`] = `
grow={false}
>
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.test.tsx
index 32462e1e2184d..cc9d2ed160241 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.test.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.test.tsx
@@ -267,6 +267,10 @@ describe('Flyout', () => {
expect(component.state('status')).toBe('success');
expect(component.find('EuiFlyout ImportSummary')).toMatchSnapshot();
+ const cancelButton = await component.find(
+ 'EuiButtonEmpty[data-test-subj="importSavedObjectsCancelBtn"]'
+ );
+ expect(cancelButton.prop('disabled')).toBe(true);
});
});
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
index 351bb530cb8d4..47d82077294cc 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
@@ -756,7 +756,7 @@ export class Flyout extends Component {
}
renderFooter() {
- const { status } = this.state;
+ const { isLegacyFile, status } = this.state;
const { done, close } = this.props;
let confirmButton;
@@ -773,7 +773,7 @@ export class Flyout extends Component {
} else if (this.hasUnmatchedReferences) {
confirmButton = (
{
} else {
confirmButton = (
{
return (
-
+
Date: Tue, 8 Sep 2020 18:33:29 -0400
Subject: [PATCH 6/6] Remove unused translations
---
x-pack/plugins/translations/translations/ja-JP.json | 1 -
x-pack/plugins/translations/translations/zh-CN.json | 1 -
2 files changed, 2 deletions(-)
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 529dd71196096..bb459d8cd4fae 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -17609,7 +17609,6 @@
"xpack.spaces.management.copyToSpace.copyStatusSummary.successMessage": "{space}スペースにコピーされました。",
"xpack.spaces.management.copyToSpace.copyToSpacesButton": "{spaceCount} {spaceCount, plural, one {スペース} other {スペース}}にコピー",
"xpack.spaces.management.copyToSpace.disabledCopyToSpacesButton": "コピー",
- "xpack.spaces.management.copyToSpace.dontIncludeRelatedLabel": "関連性のある保存されたオブジェクトを含みません",
"xpack.spaces.management.copyToSpace.finishCopyToSpacesButton": "終了",
"xpack.spaces.management.copyToSpace.finishedButtonLabel": "コピーが完了しました。",
"xpack.spaces.management.copyToSpace.finishPendingOverwritesCopyToSpacesButton": "{overwriteCount}件のオブジェクトを上書き",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index dfc6f591784d0..ad7324cef264a 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -17619,7 +17619,6 @@
"xpack.spaces.management.copyToSpace.copyStatusSummary.successMessage": "已成功复制到 {space} 工作区。",
"xpack.spaces.management.copyToSpace.copyToSpacesButton": "复制到 {spaceCount} {spaceCount, plural, one {个工作区} other {个工作区}}",
"xpack.spaces.management.copyToSpace.disabledCopyToSpacesButton": "复制",
- "xpack.spaces.management.copyToSpace.dontIncludeRelatedLabel": "不包括相关已保存对象",
"xpack.spaces.management.copyToSpace.finishCopyToSpacesButton": "完成",
"xpack.spaces.management.copyToSpace.finishedButtonLabel": "复制已完成。",
"xpack.spaces.management.copyToSpace.finishPendingOverwritesCopyToSpacesButton": "覆盖 {overwriteCount} 个对象",