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 {
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(