From 79e41e31def49ccc85257edd1eb91a6067ba291a Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Tue, 17 Mar 2020 10:43:34 -0400 Subject: [PATCH] address copy feedback --- .../remote_cluster_form.js | 37 ++---------- .../remote_cluster_page_title.js | 24 ++++++-- .../remote_cluster_add/remote_cluster_add.js | 6 ++ .../remote_cluster_edit.js | 2 +- .../detail_panel/detail_panel.js | 60 +++++++++++-------- .../remote_cluster_table.js | 2 +- 6 files changed, 67 insertions(+), 64 deletions(-) diff --git a/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/remote_cluster_form.js b/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/remote_cluster_form.js index 358ffc03da783b..fff68b79f7aed2 100644 --- a/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/remote_cluster_form.js +++ b/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/remote_cluster_form.js @@ -34,11 +34,7 @@ import { htmlIdGenerator, } from '@elastic/eui'; -import { - skippingDisconnectedClustersUrl, - transportPortUrl, - proxyModeUrl, -} from '../../../services/documentation'; +import { skippingDisconnectedClustersUrl, transportPortUrl } from '../../../services/documentation'; import { RequestFlyout } from './request_flyout'; @@ -456,33 +452,14 @@ export class RemoteClusterForm extends Component { <> - - - - ), - }} - /> - } - > + } checked={mode === PROXY_MODE} @@ -523,9 +500,7 @@ export class RemoteClusterForm extends Component {

@@ -839,7 +814,7 @@ export class RemoteClusterForm extends Component { description={ } fullWidth diff --git a/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_page_title/remote_cluster_page_title.js b/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_page_title/remote_cluster_page_title.js index 82d8a7b0cfa8b4..5a3b1faedad2ba 100644 --- a/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_page_title/remote_cluster_page_title.js +++ b/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_page_title/remote_cluster_page_title.js @@ -7,23 +7,22 @@ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from '@kbn/i18n/react'; +import { remoteClustersUrl } from '../../../services/documentation'; import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, - EuiPageContentHeader, EuiSpacer, + EuiText, EuiTitle, } from '@elastic/eui'; -import { remoteClustersUrl } from '../../../services/documentation'; - -export const RemoteClusterPageTitle = ({ title }) => ( +export const RemoteClusterPageTitle = ({ title, description }) => ( - + @@ -47,10 +46,23 @@ export const RemoteClusterPageTitle = ({ title }) => ( - + + + {description ? ( + <> + + + + {description} + + + ) : null} + + ); RemoteClusterPageTitle.propTypes = { title: PropTypes.node.isRequired, + description: PropTypes.node, }; diff --git a/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_add/remote_cluster_add.js b/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_add/remote_cluster_add.js index 4a861695c0eb37..8fb84d8d2eabca 100644 --- a/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_add/remote_cluster_add.js +++ b/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_add/remote_cluster_add.js @@ -65,6 +65,12 @@ export class RemoteClusterAdd extends PureComponent { defaultMessage="Add remote cluster" /> } + description={ + + } /> diff --git a/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/detail_panel/detail_panel.js b/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/detail_panel/detail_panel.js index 89a48927f68338..4006422d3df508 100644 --- a/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/detail_panel/detail_panel.js +++ b/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/detail_panel/detail_panel.js @@ -125,7 +125,7 @@ export class DetailPanel extends Component { title={ - - - - ) : ( - - - - ), - }} - /> + {/* A remote cluster is not editable if configured in elasticsearch.yml, so we direct the user to documentation instead */} + {isConfiguredByNode ? ( + + + + ), + }} + /> + ) : ( + + + + ), + }} + /> + )} @@ -249,7 +259,7 @@ export class DetailPanel extends Component { @@ -363,7 +373,7 @@ export class DetailPanel extends Component { diff --git a/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/remote_cluster_table/remote_cluster_table.js b/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/remote_cluster_table/remote_cluster_table.js index ec20805ccd9192..52ec9f24eb7875 100644 --- a/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/remote_cluster_table/remote_cluster_table.js +++ b/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/remote_cluster_table/remote_cluster_table.js @@ -141,7 +141,7 @@ export class RemoteClusterTable extends Component { content={ } />