From 21b38b8a970abcc319fe1a73842cb6841859999b Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 30 Jan 2019 15:55:18 -0800 Subject: [PATCH 01/21] Use 'Resume/pause data replication' in context menu and row actions. --- .../components/context_menu/context_menu.js | 6 ++---- .../follower_indices_table/follower_indices_table.js | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/context_menu/context_menu.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/context_menu/context_menu.js index 0c2bda19441a1..8c36888708c8c 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/context_menu/context_menu.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/context_menu/context_menu.js @@ -115,8 +115,7 @@ export class ContextMenuUi extends PureComponent { > )} @@ -134,8 +133,7 @@ export class ContextMenuUi extends PureComponent { > )} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js index aa112af3e3a6c..a9aee291320f2 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js @@ -78,11 +78,11 @@ export const FollowerIndicesTable = injectI18n( const label = isPaused ? intl.formatMessage({ id: 'xpack.crossClusterReplication.followerIndexList.table.actionResumeDescription', - defaultMessage: 'Resume follower index', + defaultMessage: 'Resume data replication', }) : intl.formatMessage({ id: 'xpack.crossClusterReplication.followerIndexList.table.actionPauseDescription', - defaultMessage: 'Pause follower index', + defaultMessage: 'Pause data replication', }); return isPaused ? ( From f95b77fabe78abd1d3e334499b4fa4bdde9093bf Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 30 Jan 2019 16:06:22 -0800 Subject: [PATCH 02/21] Update copy of 'Update' confirm modal for a paused follower index. --- .../app/sections/follower_index_edit/follower_index_edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js index 370d4f53aca53..79b24ff7d49bc 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js @@ -182,7 +182,7 @@ export const FollowerIndexEdit = injectI18n( {isPaused ? ( ) : ( Date: Wed, 30 Jan 2019 16:15:24 -0800 Subject: [PATCH 03/21] Update copy of 'Update' confirm modal for an active follower index. --- .../app/sections/follower_index_edit/follower_index_edit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js index 79b24ff7d49bc..397e8fe17dc9d 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js @@ -187,8 +187,8 @@ export const FollowerIndexEdit = injectI18n( ) : ( )}

From ee721ca6bded016910ca5d2a295e4282a124aac1 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 30 Jan 2019 16:23:09 -0800 Subject: [PATCH 04/21] Update copy of 'Pause data replication' confirm modal. --- .../follower_index_pause_provider.js | 74 +++++++++---------- 1 file changed, 33 insertions(+), 41 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js index 2b6804770a421..cbef942c49a65 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js @@ -56,11 +56,11 @@ class Provider extends PureComponent { const title = isSingle ? intl.formatMessage({ id: 'xpack.crossClusterReplication.pauseFollowerIndex.confirmModal.pauseSingleTitle', - defaultMessage: 'Pause follower index \'{name}\'?', + defaultMessage: 'Pause data replication of follower index \'{name}\'?', }, { name: indices[0].name }) : intl.formatMessage({ id: 'xpack.crossClusterReplication.pauseFollowerIndex.confirmModal.pauseMultipleTitle', - defaultMessage: 'Pause {count} follower indices?', + defaultMessage: 'Pause data replication of {count} follower indices?', }, { count: indices.length }); const hasCustomSettings = indices.some(index => !areAllSettingsDefault(index)); @@ -78,50 +78,42 @@ class Provider extends PureComponent { }) } buttonColor={hasCustomSettings ? 'danger' : 'primary'} - confirmButtonText={ - hasCustomSettings ? intl.formatMessage({ - id: 'xpack.crossClusterReplication.pauseFollowerIndex.confirmModal.confirmButtonTextWithSettingWarning', - defaultMessage: 'Pause and revert advanced settings to defaults', - }) : intl.formatMessage({ - id: 'xpack.crossClusterReplication.pauseFollowerIndex.confirmModal.confirmButtonText', - defaultMessage: 'Pause', - }) - } + confirmButtonText={intl.formatMessage({ + id: 'xpack.crossClusterReplication.pauseFollowerIndex.confirmModal.confirmButtonText', + defaultMessage: 'Pause data replication', + })} onMouseOver={this.onMouseOverModal} > - {isSingle ? ( - - { - hasCustomSettings ? ( -

- -

- ) : null - } -
- ) : ( + {hasCustomSettings && ( +

+ {isSingle ? ( + + ) : ( + + )} +

+ )} + + {!isSingle && (

- { - hasCustomSettings ? ( - - ) : ( - - ) - } +

-
    {indices.map(index =>
  • {index.name}
  • )}
+ +
    + {indices.map(index =>
  • {index.name}
  • )} +
)} From 0beee6c30996a8d56a6b5db2017b30040afe5a18 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 30 Jan 2019 16:38:55 -0800 Subject: [PATCH 05/21] Update copy of 'Resume data replication' confirm modal. --- .../follower_index_resume_provider.js | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js index 9338af8fca96a..324daafd61726 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js @@ -57,11 +57,11 @@ class Provider extends PureComponent { const title = isSingle ? intl.formatMessage({ id: 'xpack.crossClusterReplication.resumeFollowerIndex.confirmModal.resumeSingleTitle', - defaultMessage: 'Resume follower index \'{name}\'?', + defaultMessage: 'Resume data replication of follower index \'{name}\'?', }, { name: ids[0] }) : intl.formatMessage({ id: 'xpack.crossClusterReplication.resumeFollowerIndex.confirmModal.resumeMultipleTitle', - defaultMessage: 'Resume {count} follower indices?', + defaultMessage: 'Resume data replication of {count} follower indices?', }, { count: ids.length }); return ( @@ -81,7 +81,7 @@ class Provider extends PureComponent { confirmButtonText={ intl.formatMessage({ id: 'xpack.crossClusterReplication.resumeFollowerIndex.confirmModal.confirmButtonText', - defaultMessage: 'Resume using default advanced settings', + defaultMessage: 'Resume data replication', }) } onMouseOver={this.onMouseOverModal} @@ -90,14 +90,14 @@ class Provider extends PureComponent {

), @@ -106,14 +106,23 @@ class Provider extends PureComponent {

) : ( +

+ +

+

-
    {ids.map(id =>
  • {id}
  • )}
+ +
    + {ids.map(id =>
  • {id}
  • )} +
)} From 2403120b8d87311dff48056aa182d610dd2fb2f5 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 30 Jan 2019 16:48:28 -0800 Subject: [PATCH 06/21] Update copy for permissions check. --- x-pack/plugins/cross_cluster_replication/public/app/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/app.js b/x-pack/plugins/cross_cluster_replication/public/app/app.js index 39ecd816de5c5..5c1d384b19294 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/app.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/app.js @@ -182,14 +182,15 @@ export const App = injectI18n(

} body={

} From 120e1a3445445ce2e6e4ba101d43a63776176e0a Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 30 Jan 2019 16:52:54 -0800 Subject: [PATCH 07/21] Update copy of table empty state. --- .../home/follower_indices_list/follower_indices_list.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js index 8c1dfabe7ff32..40dbf835ed8be 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js @@ -182,8 +182,7 @@ export const FollowerIndicesList = injectI18n(

From bf405b1ba3e598b9252987d1d694d9da616be299 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 30 Jan 2019 16:57:20 -0800 Subject: [PATCH 08/21] Update copy around tables. --- .../home/auto_follow_pattern_list/auto_follow_pattern_list.js | 2 +- .../auto_follow_pattern_table/auto_follow_pattern_table.js | 2 +- .../components/follower_indices_table/follower_indices_table.js | 2 +- .../home/follower_indices_list/follower_indices_list.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/auto_follow_pattern_list.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/auto_follow_pattern_list.js index f541370fe247d..c0e78ef9b69eb 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/auto_follow_pattern_list.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/auto_follow_pattern_list.js @@ -105,7 +105,7 @@ export const AutoFollowPatternList = injectI18n(

diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js index 91baccb42b9fe..774b8c1a90a3c 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js @@ -82,7 +82,7 @@ export const AutoFollowPatternTable = injectI18n( field: 'remoteCluster', name: intl.formatMessage({ id: 'xpack.crossClusterReplication.autoFollowPatternList.table.clusterColumnTitle', - defaultMessage: 'Cluster', + defaultMessage: 'Remote cluster', }), truncateText: true, sortable: true, diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js index a9aee291320f2..ec6d81bc7fb15 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js @@ -204,7 +204,7 @@ export const FollowerIndicesTable = injectI18n( field: 'remoteCluster', name: intl.formatMessage({ id: 'xpack.crossClusterReplication.followerIndexList.table.clusterColumnTitle', - defaultMessage: 'Cluster', + defaultMessage: 'Remote cluster', }), truncateText: true, sortable: true, diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js index 40dbf835ed8be..785cd0b2da115 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js @@ -102,7 +102,7 @@ export const FollowerIndicesList = injectI18n(

From 950bf23be164fa49ce710ce40bccbd80237047b1 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 30 Jan 2019 17:15:19 -0800 Subject: [PATCH 09/21] Update form copy. --- src/ui/public/indices/constants/index.js | 7 +++- .../advanced_settings_fields.js | 4 +- .../follower_index_form.js | 37 +++++++++++++++---- 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/ui/public/indices/constants/index.js b/src/ui/public/indices/constants/index.js index e8f1da34e400d..717472ebeffe5 100644 --- a/src/ui/public/indices/constants/index.js +++ b/src/ui/public/indices/constants/index.js @@ -19,4 +19,9 @@ import { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } from 'ui/index_patterns'; -export const INDEX_ILLEGAL_CHARACTERS_VISIBLE = INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE.concat(','); +export const INDEX_ILLEGAL_CHARACTERS_VISIBLE = [ ...INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE ]; + +// Insert the comma into the middle, so it doesn't look as if it has grammatical meaning when +// these characters are rendered in the UI. +const insertionIndex = Math.floor(INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE.length / 2); +INDEX_ILLEGAL_CHARACTERS_VISIBLE.splice(insertionIndex, 0, ','); diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/advanced_settings_fields.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/advanced_settings_fields.js index cb1857473b817..84e0d58191d27 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/advanced_settings_fields.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/advanced_settings_fields.js @@ -18,7 +18,7 @@ const byteUnitsHelpText = ( ) }} @@ -33,7 +33,7 @@ const timeUnitsHelpText = ( ) }} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js index fbc53e13128f8..60ae026d5c369 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js @@ -343,7 +343,7 @@ export const FollowerIndexForm = injectI18n( const indexNameLabel = i18n.translate( 'xpack.crossClusterReplication.followerIndexForm.sectionFollowerIndexNameTitle', { - defaultMessage: 'Name' + defaultMessage: 'Follower index' } ); @@ -359,7 +359,7 @@ export const FollowerIndexForm = injectI18n( )} label={indexNameLabel} description={i18n.translate('xpack.crossClusterReplication.followerIndexForm.sectionFollowerIndexNameDescription', { - defaultMessage: 'A name for the follower index.' + defaultMessage: 'A unique name for your index.' })} helpText={indexNameHelpText} isLoading={isValidatingIndexName} @@ -407,7 +407,7 @@ export const FollowerIndexForm = injectI18n( description={( )} fullWidth @@ -449,9 +449,31 @@ export const FollowerIndexForm = injectI18n( )} label={leaderIndexLabel} - description={i18n.translate('xpack.crossClusterReplication.followerIndexForm.sectionLeaderIndexDescription', { - defaultMessage: 'The leader index you want to replicate from the remote cluster.' - })} + description={( + +

+ +

+ +

+ + + + ) }} + /> +

+
+ )} helpText={(

From 0eba66d5b8682bbd8a2956d7168e0b36c4849e6a Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 30 Jan 2019 20:35:01 -0800 Subject: [PATCH 10/21] Update copy for RemoteClustersFormField callouts. --- .../components/auto_follow_pattern_form.js | 10 +++++----- .../follower_index_form.js | 10 +++++----- .../components/remote_clusters_form_field.js | 20 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js index 4d8c913a0b06a..769b46f91dea0 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js @@ -301,13 +301,13 @@ export class AutoFollowPatternFormUI extends PureComponent { />), remoteClusterNotConnectedNotEditable: () => (), - remoteClusterDoesNotExist: () => ( () }; diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js index 60ae026d5c369..dfda67177a3cc 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js @@ -382,13 +382,13 @@ export const FollowerIndexForm = injectI18n( />), remoteClusterNotConnectedNotEditable: () => (), - remoteClusterDoesNotExist: () => ( () }; diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js b/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js index 7e6465f00a198..6c5a027f154d1 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js @@ -24,11 +24,11 @@ import { BASE_PATH_REMOTE_CLUSTERS } from '../../../common/constants'; const errorMessages = { noClusterFound: () => (), remoteClusterNotConnectedEditable: () => (), }; @@ -131,7 +131,7 @@ export const RemoteClustersFormField = injectI18n( > @@ -144,7 +144,7 @@ export const RemoteClustersFormField = injectI18n( const { intl, currentUrl } = this.props; const title = intl.formatMessage({ id: 'xpack.crossClusterReplication.forms.emptyRemoteClustersCallOutTitle', - defaultMessage: 'No remote cluster found' + defaultMessage: `You don't have any remote clusters`, }); return ( @@ -165,7 +165,7 @@ export const RemoteClustersFormField = injectI18n( > @@ -177,7 +177,7 @@ export const RemoteClustersFormField = injectI18n( const { intl, isEditable, currentUrl } = this.props; const title = intl.formatMessage({ id: 'xpack.crossClusterReplication.forms.remoteClusterConnectionErrorTitle', - defaultMessage: `The remote cluster '{name}' is not connected` + defaultMessage: `Remote cluster '{name}' is not connected` }, { name }); return ( @@ -196,7 +196,7 @@ export const RemoteClustersFormField = injectI18n( > @@ -208,7 +208,7 @@ export const RemoteClustersFormField = injectI18n( const { intl, currentUrl } = this.props; const title = intl.formatMessage({ id: 'xpack.crossClusterReplication.forms.remoteClusterNotFoundTitle', - defaultMessage: `The remote cluster '{name}' was not found`, + defaultMessage: `Couldn't find remote cluster '{name}'`, }, { name }); return ( @@ -218,7 +218,7 @@ export const RemoteClustersFormField = injectI18n( iconType="cross" >

- { this.errorMessages.remoteClusterDoesNotExist() } + { this.errorMessages.remoteClusterDoesNotExist(name) }

From aaa62b0d2a33774269f41363893242c7ea6e5919 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 31 Jan 2019 10:26:05 -0800 Subject: [PATCH 11/21] Convert 'data replication' -> 'replication'. --- .../app/components/follower_index_pause_provider.js | 12 ++++++------ .../app/components/follower_index_resume_provider.js | 12 ++++++------ .../components/context_menu/context_menu.js | 4 ++-- .../follower_indices_table/follower_indices_table.js | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js index cbef942c49a65..062483523bb65 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js @@ -56,11 +56,11 @@ class Provider extends PureComponent { const title = isSingle ? intl.formatMessage({ id: 'xpack.crossClusterReplication.pauseFollowerIndex.confirmModal.pauseSingleTitle', - defaultMessage: 'Pause data replication of follower index \'{name}\'?', + defaultMessage: 'Pause replication of follower index \'{name}\'?', }, { name: indices[0].name }) : intl.formatMessage({ id: 'xpack.crossClusterReplication.pauseFollowerIndex.confirmModal.pauseMultipleTitle', - defaultMessage: 'Pause data replication of {count} follower indices?', + defaultMessage: 'Pause replication of {count} follower indices?', }, { count: indices.length }); const hasCustomSettings = indices.some(index => !areAllSettingsDefault(index)); @@ -80,7 +80,7 @@ class Provider extends PureComponent { buttonColor={hasCustomSettings ? 'danger' : 'primary'} confirmButtonText={intl.formatMessage({ id: 'xpack.crossClusterReplication.pauseFollowerIndex.confirmModal.confirmButtonText', - defaultMessage: 'Pause data replication', + defaultMessage: 'Pause replication', })} onMouseOver={this.onMouseOverModal} > @@ -89,13 +89,13 @@ class Provider extends PureComponent { {isSingle ? ( ) : ( )} @@ -107,7 +107,7 @@ class Provider extends PureComponent {

diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js index 324daafd61726..5ff0f440f97a2 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js @@ -57,11 +57,11 @@ class Provider extends PureComponent { const title = isSingle ? intl.formatMessage({ id: 'xpack.crossClusterReplication.resumeFollowerIndex.confirmModal.resumeSingleTitle', - defaultMessage: 'Resume data replication of follower index \'{name}\'?', + defaultMessage: 'Resume replication of follower index \'{name}\'?', }, { name: ids[0] }) : intl.formatMessage({ id: 'xpack.crossClusterReplication.resumeFollowerIndex.confirmModal.resumeMultipleTitle', - defaultMessage: 'Resume data replication of {count} follower indices?', + defaultMessage: 'Resume replication of {count} follower indices?', }, { count: ids.length }); return ( @@ -81,7 +81,7 @@ class Provider extends PureComponent { confirmButtonText={ intl.formatMessage({ id: 'xpack.crossClusterReplication.resumeFollowerIndex.confirmModal.confirmButtonText', - defaultMessage: 'Resume data replication', + defaultMessage: 'Resume replication', }) } onMouseOver={this.onMouseOverModal} @@ -90,7 +90,7 @@ class Provider extends PureComponent {

diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/context_menu/context_menu.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/context_menu/context_menu.js index 8c36888708c8c..2f3ffb4cedb74 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/context_menu/context_menu.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/context_menu/context_menu.js @@ -115,7 +115,7 @@ export class ContextMenuUi extends PureComponent { > )} @@ -133,7 +133,7 @@ export class ContextMenuUi extends PureComponent { > )} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js index ec6d81bc7fb15..8fe4ecc4f3477 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js @@ -78,11 +78,11 @@ export const FollowerIndicesTable = injectI18n( const label = isPaused ? intl.formatMessage({ id: 'xpack.crossClusterReplication.followerIndexList.table.actionResumeDescription', - defaultMessage: 'Resume data replication', + defaultMessage: 'Resume replication', }) : intl.formatMessage({ id: 'xpack.crossClusterReplication.followerIndexList.table.actionPauseDescription', - defaultMessage: 'Pause data replication', + defaultMessage: 'Pause replication', }); return isPaused ? ( From 571a84d2fb5c190abbb4d99323131058aa9bf372 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 31 Jan 2019 10:31:12 -0800 Subject: [PATCH 12/21] Update copy for Unfollow confirm modal. --- .../follower_index_unfollow_provider.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_unfollow_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_unfollow_provider.js index 8e058e29d594f..3c16680154988 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_unfollow_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_unfollow_provider.js @@ -55,11 +55,11 @@ class Provider extends PureComponent { const title = isSingle ? intl.formatMessage({ id: 'xpack.crossClusterReplication.unfollowLeaderIndex.confirmModal.unfollowSingleTitle', - defaultMessage: 'Unfollow leader index of follower index \'{name}\'?', + defaultMessage: `Unfollow leader index of '{name}'?`, }, { name: ids[0] }) : intl.formatMessage({ id: 'xpack.crossClusterReplication.unfollowLeaderIndex.confirmModal.unfollowMultipleTitle', - defaultMessage: 'Unfollow leader indices of {count} follower indices?', + defaultMessage: 'Unfollow {count} leader indices?', }, { count: ids.length }); return ( @@ -79,7 +79,7 @@ class Provider extends PureComponent { confirmButtonText={ intl.formatMessage({ id: 'xpack.crossClusterReplication.unfollowLeaderIndex.confirmModal.confirmButtonText', - defaultMessage: 'Unfollow', + defaultMessage: 'Unfollow leader', }) } onMouseOver={this.onMouseOverModal} @@ -89,9 +89,9 @@ class Provider extends PureComponent {

@@ -100,9 +100,9 @@ class Provider extends PureComponent {

    {ids.map(id =>
  • {id}
  • )}
From 976e5218090f328c19f8c5f73696bcd417b96448 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 31 Jan 2019 10:50:19 -0800 Subject: [PATCH 13/21] Update copy for form API error and Auto-follow Patterns table. --- .../public/app/components/auto_follow_pattern_form.js | 2 +- .../app/components/follower_index_form/follower_index_form.js | 4 ++-- .../auto_follow_pattern_table/auto_follow_pattern_table.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js index 769b46f91dea0..518904e320dc2 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js @@ -216,7 +216,7 @@ export class AutoFollowPatternFormUI extends PureComponent { if (apiError) { const title = intl.formatMessage({ id: 'xpack.crossClusterReplication.autoFollowPatternForm.savingErrorTitle', - defaultMessage: 'Error creating auto-follow pattern', + defaultMessage: `Can't create auto-follow pattern`, }); return ; } diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js index dfda67177a3cc..56781582c5421 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js @@ -288,7 +288,7 @@ export const FollowerIndexForm = injectI18n( if (apiError) { const title = intl.formatMessage({ id: 'xpack.crossClusterReplication.followerIndexForm.savingErrorTitle', - defaultMessage: 'Error creating follower index', + defaultMessage: `Can't create follower index`, }); const { leaderIndex } = this.state.followerIndex; const error = apiError.status === 404 @@ -296,7 +296,7 @@ export const FollowerIndexForm = injectI18n( data: { message: intl.formatMessage({ id: 'xpack.crossClusterReplication.followerIndexForm.leaderIndexNotFoundError', - defaultMessage: `The leader index '{leaderIndex}' you want to replicate from does not exist.`, + defaultMessage: `The leader index '{leaderIndex}' does not exist.`, }, { leaderIndex }) } } diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js index 774b8c1a90a3c..58ea095782836 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js @@ -97,14 +97,14 @@ export const AutoFollowPatternTable = injectI18n( field: 'followIndexPatternPrefix', name: intl.formatMessage({ id: 'xpack.crossClusterReplication.autoFollowPatternList.table.prefixColumnTitle', - defaultMessage: 'Follower pattern prefix', + defaultMessage: 'Follower index prefix', }), sortable: true, }, { field: 'followIndexPatternSuffix', name: intl.formatMessage({ id: 'xpack.crossClusterReplication.autoFollowPatternList.table.suffixColumnTitle', - defaultMessage: 'Follower pattern suffix', + defaultMessage: 'Follower index suffix', }), sortable: true, }, { From eea6e2f6e33edfa907b6782eef79662a802966df Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 31 Jan 2019 10:55:15 -0800 Subject: [PATCH 14/21] Update form save button labels to be 'Create' and 'Update'. --- .../public/app/components/auto_follow_pattern_form.js | 8 +++----- .../components/follower_index_form/follower_index_form.js | 8 +++----- .../auto_follow_pattern_add/auto_follow_pattern_add.js | 6 ++++++ .../auto_follow_pattern_edit/auto_follow_pattern_edit.js | 6 ++++++ .../app/sections/follower_index_add/follower_index_add.js | 6 ++++++ .../sections/follower_index_edit/follower_index_edit.js | 6 ++++++ 6 files changed, 30 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js index 518904e320dc2..31ccc151d9ce7 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js @@ -66,6 +66,7 @@ export class AutoFollowPatternFormUI extends PureComponent { apiStatus: PropTypes.string.isRequired, currentUrl: PropTypes.string.isRequired, remoteClusters: PropTypes.array, + saveButtonLabel: PropTypes.node, } constructor(props) { @@ -558,7 +559,7 @@ export class AutoFollowPatternFormUI extends PureComponent { * Form Actions */ const renderActions = () => { - const { apiStatus } = this.props; + const { apiStatus, saveButtonLabel } = this.props; const { areErrorsVisible } = this.state; if (apiStatus === API_STATUS.SAVING) { @@ -592,10 +593,7 @@ export class AutoFollowPatternFormUI extends PureComponent { fill disabled={isSaveDisabled} > - + {saveButtonLabel} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js index 56781582c5421..86165bc8cfc3c 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js @@ -92,6 +92,7 @@ export const FollowerIndexForm = injectI18n( apiError: PropTypes.object, apiStatus: PropTypes.string.isRequired, remoteClusters: PropTypes.array, + saveButtonLabel: PropTypes.node, } constructor(props) { @@ -599,7 +600,7 @@ export const FollowerIndexForm = injectI18n( * Form Actions */ const renderActions = () => { - const { apiStatus } = this.props; + const { apiStatus, saveButtonLabel } = this.props; const { areErrorsVisible } = this.state; if (apiStatus === API_STATUS.SAVING) { @@ -633,10 +634,7 @@ export const FollowerIndexForm = injectI18n( fill disabled={isSaveDisabled} > - + {saveButtonLabel} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_add/auto_follow_pattern_add.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_add/auto_follow_pattern_add.js index 99900d0fdd596..23b7a5b77295e 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_add/auto_follow_pattern_add.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_add/auto_follow_pattern_add.js @@ -73,6 +73,12 @@ export const AutoFollowPatternAdd = injectI18n( currentUrl={currentUrl} remoteClusters={error ? [] : remoteClusters} saveAutoFollowPattern={saveAutoFollowPattern} + saveButtonLabel={( + + )} /> ); }} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_edit/auto_follow_pattern_edit.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_edit/auto_follow_pattern_edit.js index 5099555daa6d8..a9af786d6a3fa 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_edit/auto_follow_pattern_edit.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_edit/auto_follow_pattern_edit.js @@ -162,6 +162,12 @@ export const AutoFollowPatternEdit = injectI18n( remoteClusters={error ? [] : remoteClusters} autoFollowPattern={autoFollowPattern} saveAutoFollowPattern={saveAutoFollowPattern} + saveButtonLabel={( + + )} /> ); }} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_add/follower_index_add.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_add/follower_index_add.js index 460c22393db1b..e335d1a1318e0 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_add/follower_index_add.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_add/follower_index_add.js @@ -77,6 +77,12 @@ export const FollowerIndexAdd = injectI18n( remoteClusters={error ? [] : remoteClusters} saveFollowerIndex={saveFollowerIndex} clearApiError={clearApiError} + saveButtonLabel={( + + )} /> ); }} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js index 397e8fe17dc9d..3bda677294b5c 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/follower_index_edit/follower_index_edit.js @@ -251,6 +251,12 @@ export const FollowerIndexEdit = injectI18n( remoteClusters={error ? [] : remoteClusters} saveFollowerIndex={this.saveFollowerIndex} clearApiError={clearApiError} + saveButtonLabel={( + + )} /> ); }} From aada6bcab1d30db3ea099e85965cf68c2ab408c7 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 31 Jan 2019 11:04:22 -0800 Subject: [PATCH 15/21] Move API errors to bottom of form, into same posiion as sync validation errors. Remove spacer from SectionError implementation. --- .../public/app/app.js | 25 +++++++------ .../components/auto_follow_pattern_form.js | 13 ++++--- .../follower_index_form.js | 11 ++++-- .../public/app/components/section_error.js | 35 +++++++++---------- .../auto_follow_pattern_edit.js | 8 +++-- .../follower_index_edit.js | 8 +++-- .../auto_follow_pattern_list.js | 8 ++++- .../follower_indices_list.js | 8 ++++- 8 files changed, 74 insertions(+), 42 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/app.js b/x-pack/plugins/cross_cluster_replication/public/app/app.js index 5c1d384b19294..e360d639d4279 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/app.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/app.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { Component } from 'react'; +import React, { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import { Route, Switch, Redirect } from 'react-router-dom'; import chrome from 'ui/chrome'; @@ -18,6 +18,7 @@ import { EuiFlexItem, EuiLoadingSpinner, EuiPageContent, + EuiSpacer, EuiTitle, } from '@elastic/eui'; @@ -160,15 +161,19 @@ export const App = injectI18n( if (fetchPermissionError) { return ( - - )} - error={fetchPermissionError} - /> + + + )} + error={fetchPermissionError} + /> + + + ); } diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js index 31ccc151d9ce7..274e926c49468 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js @@ -219,7 +219,13 @@ export class AutoFollowPatternFormUI extends PureComponent { id: 'xpack.crossClusterReplication.autoFollowPatternForm.savingErrorTitle', defaultMessage: `Can't create auto-follow pattern`, }); - return ; + + return ( + + + + + ); } return null; @@ -540,7 +546,6 @@ export class AutoFollowPatternFormUI extends PureComponent { return ( - + ); }; @@ -621,7 +627,7 @@ export class AutoFollowPatternFormUI extends PureComponent { {renderAutoFollowPatternPrefixSuffix()} {renderFormErrorWarning()} - + {this.renderApiErrors()} {renderActions()} ); @@ -643,7 +649,6 @@ export class AutoFollowPatternFormUI extends PureComponent { render() { return ( - {this.renderApiErrors()} {this.renderForm()} {this.renderLoading()} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js index 86165bc8cfc3c..2691cbd8dbe2a 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js @@ -302,7 +302,13 @@ export const FollowerIndexForm = injectI18n( } } : apiError; - return ; + + return ( + + + + + ); } return null; @@ -579,7 +585,6 @@ export const FollowerIndexForm = injectI18n( return ( - {renderFormErrorWarning()} + {this.renderApiErrors()} {renderActions()} ); @@ -685,7 +691,6 @@ export const FollowerIndexForm = injectI18n( render() { return ( - {this.renderApiErrors()} {this.renderForm()} {this.renderLoading()} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/section_error.js b/x-pack/plugins/cross_cluster_replication/public/app/components/section_error.js index 922a2178c44ee..4e4abfa571c70 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/section_error.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/section_error.js @@ -6,8 +6,8 @@ import React, { Fragment } from 'react'; import { - EuiSpacer, EuiCallOut, + EuiSpacer, } from '@elastic/eui'; export function SectionError({ title, error }) { @@ -18,23 +18,20 @@ export function SectionError({ title, error }) { } = error.data; return ( - - -
{message || errorString}
- { cause && ( - - -
    - { cause.map((message, i) =>
  • {message}
  • ) } -
-
- )} -
- -
+ +
{message || errorString}
+ { cause && ( + + +
    + { cause.map((message, i) =>
  • {message}
  • ) } +
+
+ )} +
); } diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_edit/auto_follow_pattern_edit.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_edit/auto_follow_pattern_edit.js index a9af786d6a3fa..fe365d0315efd 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_edit/auto_follow_pattern_edit.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/auto_follow_pattern_edit/auto_follow_pattern_edit.js @@ -11,10 +11,11 @@ import chrome from 'ui/chrome'; import { MANAGEMENT_BREADCRUMB } from 'ui/management'; import { - EuiPageContent, EuiButtonEmpty, EuiFlexGroup, - EuiFlexItem + EuiFlexItem, + EuiPageContent, + EuiSpacer, } from '@elastic/eui'; import { listBreadcrumb, editBreadcrumb } from '../../services/breadcrumbs'; @@ -89,6 +90,9 @@ export const AutoFollowPatternEdit = injectI18n( return ( + + + + + + ; + + return ( + + + + + ); } if (isEmpty) { diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js index 785cd0b2da115..9eba1376cbef9 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js @@ -155,7 +155,13 @@ export const FollowerIndicesList = injectI18n( id: 'xpack.crossClusterReplication.followerIndexList.loadingErrorTitle', defaultMessage: 'Error loading follower indices', }); - return ; + + return ( + + + + + ); } if (isEmpty) { From ed5bf46251de5d31dca13ad6691287611ffdf290 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 31 Jan 2019 12:09:35 -0800 Subject: [PATCH 16/21] Fix i18n error. --- .../public/app/components/remote_clusters_form_field.js | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js b/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js index 6c5a027f154d1..9d7ca141966f7 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js @@ -197,7 +197,6 @@ export const RemoteClustersFormField = injectI18n( From 4bbc5d33ccfb3d92b1a00c937484d8bd6029ac39 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 31 Jan 2019 14:17:21 -0800 Subject: [PATCH 17/21] Update copy with feedback from Gail. --- .../components/auto_follow_pattern_form.js | 45 ++++++++++++------ .../follower_index_form.js | 47 ++++++++++++------- .../follower_index_pause_provider.js | 2 +- .../follower_index_resume_provider.js | 2 +- .../follower_index_unfollow_provider.js | 10 ++-- .../components/remote_clusters_form_field.js | 20 ++++---- .../follower_index_edit.js | 6 +-- .../auto_follow_pattern_list.js | 2 +- .../follower_indices_list.js | 4 +- 9 files changed, 86 insertions(+), 52 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js index 274e926c49468..f03e279d1db9f 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js @@ -302,20 +302,35 @@ export class AutoFollowPatternFormUI extends PureComponent { const { remoteClusters, currentUrl } = this.props; const errorMessages = { - noClusterFound: () => (), - remoteClusterNotConnectedNotEditable: () => (), - remoteClusterDoesNotExist: (name) => () + noClusterFound: () => ( + + ), + remoteClusterNotConnectedNotEditable: (name) => ({ + title: ( + + ), + description: ( + + ), + }), + remoteClusterDoesNotExist: (name) => ( + + ), }; return ( @@ -386,7 +401,7 @@ export class AutoFollowPatternFormUI extends PureComponent {

(), - remoteClusterNotConnectedNotEditable: () => (), - remoteClusterDoesNotExist: (name) => () + noClusterFound: () => ( + + ), + remoteClusterNotConnectedNotEditable: (name) => ({ + title: ( + + ), + description: ( + + ), + }), + remoteClusterDoesNotExist: (name) => ( + + ), }; return ( @@ -468,7 +483,7 @@ export const FollowerIndexForm = injectI18n(

diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js index 062483523bb65..eecb74c0589a2 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js @@ -107,7 +107,7 @@ class Provider extends PureComponent {

diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js index 5ff0f440f97a2..92bcf0c954d3e 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js @@ -116,7 +116,7 @@ class Provider extends PureComponent {

diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_unfollow_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_unfollow_provider.js index 3c16680154988..2b0f6931044af 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_unfollow_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_unfollow_provider.js @@ -89,8 +89,8 @@ class Provider extends PureComponent {

@@ -100,9 +100,9 @@ class Provider extends PureComponent {

    {ids.map(id =>
  • {id}
  • )}
diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js b/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js index 9d7ca141966f7..f9a6c4721e10f 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js @@ -28,7 +28,7 @@ const errorMessages = { />), remoteClusterNotConnectedEditable: () => (), }; @@ -174,11 +174,15 @@ export const RemoteClustersFormField = injectI18n( }; renderCurrentRemoteClusterNotConnected = (name, fatal) => { - const { intl, isEditable, currentUrl } = this.props; - const title = intl.formatMessage({ - id: 'xpack.crossClusterReplication.forms.remoteClusterConnectionErrorTitle', - defaultMessage: `Remote cluster '{name}' is not connected` - }, { name }); + const { isEditable, currentUrl } = this.props; + const { + remoteClusterNotConnectedEditable, + remoteClusterNotConnectedNotEditable, + } = this.messages; + + const { title, description } = isEditable + ? remoteClusterNotConnectedEditable() + : remoteClusterNotConnectedNotEditable(name); return (

- { isEditable && this.errorMessages.remoteClusterNotConnectedEditable()} - { !isEditable && this.errorMessages.remoteClusterNotConnectedNotEditable()} + { description }

+ ) : ( )}

diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/auto_follow_pattern_list.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/auto_follow_pattern_list.js index 826f6b36e67d7..de8d9fac594e6 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/auto_follow_pattern_list.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/auto_follow_pattern_list.js @@ -106,7 +106,7 @@ export const AutoFollowPatternList = injectI18n(

diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js index 9eba1376cbef9..dd142847f0b98 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/follower_indices_list.js @@ -102,7 +102,7 @@ export const FollowerIndicesList = injectI18n(

@@ -188,7 +188,7 @@ export const FollowerIndicesList = injectI18n(

From f136ebf8378d395ecb97f3a9ace74d16b512f77e Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Fri, 1 Feb 2019 12:39:22 -0800 Subject: [PATCH 18/21] Fix bug with remoteClusterNotConnectedEditable throwing an error. --- .../components/auto_follow_pattern_form.js | 2 +- .../follower_index_form.js | 2 +- .../components/remote_clusters_form_field.js | 33 +++++++++++++------ 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js index f03e279d1db9f..1463560909edb 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_form.js @@ -312,7 +312,7 @@ export class AutoFollowPatternFormUI extends PureComponent { title: ( ), diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js index 1678e6b64d951..0eeb653413cc8 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js @@ -393,7 +393,7 @@ export const FollowerIndexForm = injectI18n( title: ( ), diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js b/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js index f9a6c4721e10f..224b5f295f7ce 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/remote_clusters_form_field.js @@ -22,14 +22,27 @@ import routing from '../services/routing'; import { BASE_PATH_REMOTE_CLUSTERS } from '../../../common/constants'; const errorMessages = { - noClusterFound: () => (), - remoteClusterNotConnectedEditable: () => (), + noClusterFound: () => ( + + ), + remoteClusterNotConnectedEditable: (name) => ({ + title: ( + + ), + description: ( + + ), + }), }; export const RemoteClustersFormField = injectI18n( @@ -178,10 +191,10 @@ export const RemoteClustersFormField = injectI18n( const { remoteClusterNotConnectedEditable, remoteClusterNotConnectedNotEditable, - } = this.messages; + } = this.errorMessages; const { title, description } = isEditable - ? remoteClusterNotConnectedEditable() + ? remoteClusterNotConnectedEditable(name) : remoteClusterNotConnectedNotEditable(name); return ( From a5921d6d8d497a620766706455b9f755f28232a1 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Fri, 1 Feb 2019 14:22:36 -0800 Subject: [PATCH 19/21] Rephrase 'replication of leader index' -> 'replication to leader index'. --- .../components/follower_index_form/follower_index_form.js | 3 ++- .../app/components/follower_index_pause_provider.js | 8 ++++---- .../app/components/follower_index_resume_provider.js | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js index 0eeb653413cc8..5d21798f5c893 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js @@ -533,7 +533,8 @@ export const FollowerIndexForm = injectI18n(

diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js index eecb74c0589a2..a745022e12f6a 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_pause_provider.js @@ -56,11 +56,11 @@ class Provider extends PureComponent { const title = isSingle ? intl.formatMessage({ id: 'xpack.crossClusterReplication.pauseFollowerIndex.confirmModal.pauseSingleTitle', - defaultMessage: 'Pause replication of follower index \'{name}\'?', + defaultMessage: 'Pause replication to follower index \'{name}\'?', }, { name: indices[0].name }) : intl.formatMessage({ id: 'xpack.crossClusterReplication.pauseFollowerIndex.confirmModal.pauseMultipleTitle', - defaultMessage: 'Pause replication of {count} follower indices?', + defaultMessage: 'Pause replication to {count} follower indices?', }, { count: indices.length }); const hasCustomSettings = indices.some(index => !areAllSettingsDefault(index)); @@ -89,13 +89,13 @@ class Provider extends PureComponent { {isSingle ? ( ) : ( )} diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js index 92bcf0c954d3e..a97153f314287 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_resume_provider.js @@ -57,11 +57,11 @@ class Provider extends PureComponent { const title = isSingle ? intl.formatMessage({ id: 'xpack.crossClusterReplication.resumeFollowerIndex.confirmModal.resumeSingleTitle', - defaultMessage: 'Resume replication of follower index \'{name}\'?', + defaultMessage: 'Resume replication to follower index \'{name}\'?', }, { name: ids[0] }) : intl.formatMessage({ id: 'xpack.crossClusterReplication.resumeFollowerIndex.confirmModal.resumeMultipleTitle', - defaultMessage: 'Resume replication of {count} follower indices?', + defaultMessage: 'Resume replication to {count} follower indices?', }, { count: ids.length }); return ( From f183122452f637356248c2356ef2ec6ce63df247 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Fri, 1 Feb 2019 15:02:05 -0800 Subject: [PATCH 20/21] Tweak leader index description to reinforce relationship with remote cluster. --- .../app/components/follower_index_form/follower_index_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js index 5d21798f5c893..bac8217910f75 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js @@ -476,7 +476,7 @@ export const FollowerIndexForm = injectI18n(

From 3de1955200993792bda53ab59ead6cb261884599 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Fri, 1 Feb 2019 15:14:23 -0800 Subject: [PATCH 21/21] Tweak leader index description to clarify role of leader index and follower index. --- .../app/components/follower_index_form/follower_index_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js index bac8217910f75..ca705c1feb17e 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_form/follower_index_form.js @@ -476,7 +476,7 @@ export const FollowerIndexForm = injectI18n(