Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small improvements to add cluster page #29142

Merged
merged 5 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export const RemoteClusterForm = injectI18n(
helpText={(
<FormattedMessage
id="xpack.remoteClusters.remoteClusterForm.sectionSeedsHelpText"
defaultMessage="An IP address or host name, followed by the port."
defaultMessage="An IP address or host name, followed by the transport port of the remote cluster."
/>
)}
isInvalid={showErrors}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiIconTip,
EuiText,
} from '@elastic/eui';

Expand Down Expand Up @@ -43,16 +44,31 @@ export function ConnectionStatus({ isConnected }) {
});
}

const seedNodeTooltip = i18n.translate('xpack.remoteClusters.connectedStatus.notConnectedToolTip', {
defaultMessage: "Ensure the seed nodes are configured with the remote cluster's transport port, not the http port.",
});

return (
<EuiFlexGroup gutterSize="s" alignItems="center">
<EuiFlexItem grow={false}>
{icon}
<EuiFlexGroup gutterSize="s" alignItems="center">
<EuiFlexItem grow={false}>
{icon}
</EuiFlexItem>

<EuiFlexItem>
<EuiText>
{message}
</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>

<EuiFlexItem>
<EuiText>
{message}
</EuiText>
<EuiFlexItem grow={false}>
<EuiIconTip
color="subdued"
content={seedNodeTooltip}
/>
</EuiFlexItem>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can nest the X icon and "Not connected" text inside another flex group, to get the tooltip to center over the icon like this:

image

<EuiFlexGroup gutterSize="s" alignItems="center">
  <EuiFlexItem grow={false}>
    <EuiFlexGroup gutterSize="s" alignItems="center">
      <EuiFlexItem grow={false}>
        {icon}
      </EuiFlexItem>

      <EuiFlexItem>
        <EuiText>
          {message}
        </EuiText>
      </EuiFlexItem>
    </EuiFlexGroup>
  </EuiFlexItem>

  <EuiFlexItem grow={false}>
    <EuiIconTip
      color="subdued"
      content={seedNodeTooltip}
    />
  </EuiFlexItem>
</EuiFlexGroup>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's an updated screenshot from local test
screen shot 2019-01-23 at 11 03 14 am

</EuiFlexGroup>
);
Expand Down