Skip to content

Commit

Permalink
[Remote clusters] Update copy (#60382)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth authored Mar 19, 2020
1 parent 4efeeac commit ee6bb64
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 191 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
import {
skippingDisconnectedClustersUrl,
transportPortUrl,
proxyModeUrl,
proxySettingsUrl,
} from '../../../services/documentation';

import { RequestFlyout } from './request_flyout';
Expand Down Expand Up @@ -328,7 +328,7 @@ export class RemoteClusterForm extends Component {
helpText={
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.fieldNodeConnectionsHelpText"
defaultMessage="The number of gateway nodes to connect to."
defaultMessage="The number of gateway nodes to connect to for this cluster."
/>
}
fullWidth
Expand Down Expand Up @@ -363,7 +363,7 @@ export class RemoteClusterForm extends Component {
helpText={
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.fieldProxyAddressHelpText"
defaultMessage="The address used for all remote connections."
defaultMessage="The address to use for remote connections."
/>
}
isInvalid={Boolean(areErrorsVisible && errorProxyAddress)}
Expand Down Expand Up @@ -414,13 +414,23 @@ export class RemoteClusterForm extends Component {
label={
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.fieldServerNameLabel"
defaultMessage="Server name"
defaultMessage="Server name (optional)"
/>
}
helpText={
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.fieldServerNameHelpText"
defaultMessage="An optional hostname string which will be sent in the server_name field of the TLS Server Name Indication extension if TLS is enabled."
defaultMessage="A string sent in the server_name field of the TLS Server Name Indication extension if TLS is enabled. {learnMoreLink}"
values={{
learnMoreLink: (
<EuiLink href={proxySettingsUrl} target="_blank">
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.fieldServerNameHelpText.learnMoreLinkLabel"
defaultMessage="Learn more."
/>
</EuiLink>
),
}}
/>
}
fullWidth
Expand Down Expand Up @@ -456,33 +466,14 @@ export class RemoteClusterForm extends Component {
<>
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.sectionModeDescription"
defaultMessage="Remote cluster connections work by configuring a remote cluster and connecting only to a limited number of nodes in that remote cluster."
defaultMessage="Use seed nodes by default, or switch to a single proxy address."
/>
<EuiFormRow
hasEmptyLabelSpace
fullWidth
helpText={
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.fieldModeDescription"
defaultMessage="Configure a remote cluster with a single proxy address. {learnMoreLink}"
values={{
learnMoreLink: (
<EuiLink href={proxyModeUrl} target="_blank">
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.fieldModeDescription.learnMoreLinkLabel"
defaultMessage="Learn more."
/>
</EuiLink>
),
}}
/>
}
>
<EuiFormRow hasEmptyLabelSpace fullWidth>
<EuiSwitch
label={
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.fieldModeLabel"
defaultMessage="Use proxy mode"
defaultMessage="Use a single proxy address"
/>
}
checked={mode === PROXY_MODE}
Expand Down Expand Up @@ -523,9 +514,7 @@ export class RemoteClusterForm extends Component {
<p>
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.sectionSkipUnavailableDescription"
defaultMessage="By default, a request fails if any of the queried remote clusters
are unavailable. To continue sending a request to other remote clusters if this
cluster is unavailable, enable {optionName}. {learnMoreLink}"
defaultMessage="A request fails if any of the queried remote clusters are unavailable. To send requests to other remote clusters if this cluster is unavailable, enable {optionName}. {learnMoreLink}"
values={{
optionName: (
<strong>
Expand Down Expand Up @@ -839,7 +828,7 @@ export class RemoteClusterForm extends Component {
description={
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.sectionNameDescription"
defaultMessage="A unique name for the remote cluster."
defaultMessage="A unique name for the cluster."
/>
}
fullWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => (
<Fragment>
<EuiSpacer size="xs" />

<EuiPageContentHeader>
<EuiTitle size="l">
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
<EuiFlexItem grow={false}>
<EuiTitle size="l" data-test-subj="remoteClusterPageTitle">
Expand All @@ -47,10 +46,23 @@ export const RemoteClusterPageTitle = ({ title }) => (
</EuiButtonEmpty>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPageContentHeader>
</EuiTitle>

{description ? (
<>
<EuiSpacer size="s" />

<EuiTitle size="s">
<EuiText color="subdued">{description}</EuiText>
</EuiTitle>
</>
) : null}

<EuiSpacer size="m" />
</Fragment>
);

RemoteClusterPageTitle.propTypes = {
title: PropTypes.node.isRequired,
description: PropTypes.node,
};
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ export class RemoteClusterAdd extends PureComponent {
defaultMessage="Add remote cluster"
/>
}
description={
<FormattedMessage
id="xpack.remoteClusters.remoteClustersDescription"
defaultMessage="Add a remote cluster that connects to seed nodes or a single proxy address."
/>
}
/>

<RemoteClusterForm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class RemoteClusterEdit extends Component {
>
<FormattedMessage
id="xpack.remoteClusters.edit.deprecatedSettingsMessage"
defaultMessage="This remote cluster contains deprecated settings. We have attempted to resolve them. Please verify all changes before saving."
defaultMessage="This remote cluster has deprecated settings that we tried to resolve. Verify all changes before saving."
/>
</EuiCallOut>
<EuiSpacer />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class DetailPanel extends Component {
title={
<FormattedMessage
id="xpack.remoteClusters.detailPanel.deprecatedSettingsTitle"
defaultMessage='"{remoteCluster}" contains deprecated settings'
defaultMessage="'{remoteCluster}' has deprecated settings"
values={{
remoteCluster: clusterName,
}}
Expand All @@ -134,28 +134,38 @@ export class DetailPanel extends Component {
color="warning"
iconType="help"
>
<FormattedMessage
id="xpack.remoteClusters.detailPanel.deprecatedSettingsMessage"
defaultMessage="We recommend updating this remote cluster to use the correct settings. {helpLink}"
values={{
helpLink: isConfiguredByNode ? (
// A remote cluster is not editable if configured in elasticsearch.yml, so we direct the user to documentation instead
<EuiLink href={proxyModeUrl} target="_blank">
<FormattedMessage
id="xpack.remoteClusters.detailPanel.deprecatedSettingsLearnMoreLinkLabel"
defaultMessage="Learn more."
/>
</EuiLink>
) : (
<EuiLink {...getRouterLinkProps(`${CRUD_APP_BASE_PATH}/edit/${clusterName}`)}>
<FormattedMessage
id="xpack.remoteClusters.detailPanel.deprecatedSettingsEditLinkLabel"
defaultMessage="Edit remote cluster."
/>
</EuiLink>
),
}}
/>
{/* A remote cluster is not editable if configured in elasticsearch.yml, so we direct the user to documentation instead */}
{isConfiguredByNode ? (
<FormattedMessage
id="xpack.remoteClusters.detailPanel.deprecatedSettingsConfiguredByNodeMessage"
defaultMessage="Edit the cluster to update the settings. {helpLink}"
values={{
helpLink: (
<EuiLink href={proxyModeUrl} target="_blank">
<FormattedMessage
id="xpack.remoteClusters.detailPanel.deprecatedSettingsLearnMoreLinkLabel"
defaultMessage="Learn more."
/>
</EuiLink>
),
}}
/>
) : (
<FormattedMessage
id="xpack.remoteClusters.detailPanel.deprecatedSettingsMessage"
defaultMessage="{editLink} to update the settings."
values={{
editLink: (
<EuiLink {...getRouterLinkProps(`${CRUD_APP_BASE_PATH}/edit/${clusterName}`)}>
<FormattedMessage
id="xpack.remoteClusters.detailPanel.deprecatedSettingsEditLinkLabel"
defaultMessage="Edit the cluster"
/>
</EuiLink>
),
}}
/>
)}
</EuiCallOut>
<EuiSpacer size="l" />
</>
Expand Down Expand Up @@ -249,7 +259,7 @@ export class DetailPanel extends Component {
<EuiTitle size="xs">
<FormattedMessage
id="xpack.remoteClusters.detailPanel.maxConnectionsPerClusterLabel"
defaultMessage="Maximum number of connections"
defaultMessage="Maximum connections"
/>
</EuiTitle>
</EuiDescriptionListTitle>
Expand Down Expand Up @@ -363,7 +373,7 @@ export class DetailPanel extends Component {
<EuiTitle size="xs">
<FormattedMessage
id="xpack.remoteClusters.detailPanel.maxSocketConnectionsLabel"
defaultMessage="Maximum number of socket connections"
defaultMessage="Maximum socket connections"
/>
</EuiTitle>
</EuiDescriptionListTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class RemoteClusterTable extends Component {
content={
<FormattedMessage
id="xpack.remoteClusters.remoteClusterList.table.hasDeprecatedSettingMessage"
defaultMessage="This remote cluster contains deprecated settings. Edit the remote cluster to resolve."
defaultMessage="Edit this cluster to update the deprecated settings."
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export let skippingDisconnectedClustersUrl: string;
export let remoteClustersUrl: string;
export let transportPortUrl: string;
export let proxyModeUrl: string;
export let proxySettingsUrl: string;

export function init(docLinks: DocLinksStart): void {
const { DOC_LINK_VERSION, ELASTIC_WEBSITE_URL } = docLinks;
Expand All @@ -19,4 +20,5 @@ export function init(docLinks: DocLinksStart): void {
remoteClustersUrl = `${esDocBasePath}/modules-remote-clusters.html`;
transportPortUrl = `${esDocBasePath}/modules-transport.html`;
proxyModeUrl = `${esDocBasePath}/modules-remote-clusters.html#proxy-mode`;
proxySettingsUrl = `${esDocBasePath}/modules-remote-clusters.html#remote-cluster-proxy-settings`;
}

0 comments on commit ee6bb64

Please sign in to comment.