Skip to content

Commit

Permalink
merged master
Browse files Browse the repository at this point in the history
  • Loading branch information
igoristic committed Dec 17, 2019
1 parent 28e05e7 commit 21a9bb7
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ const getColumns = (kbnUrl, scope) => [
render: severity => {
const severityIcon = mapSeverity(severity);

if (!severityIcon || !severityIcon.title) {
return null;
}

return (
<EuiToolTip content={severityIcon.title} position="bottom">
<EuiHealth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export function AlertsIndicator({ alerts }) {
}
})();

if (!tooltipText) {
return null;
}

return (
<EuiToolTip content={tooltipText} position="bottom" trigger="hover">
<EuiHealth color={severityIcon.color} data-test-subj="alertIcon">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ const IsAlertsSupported = props => {
}

const message = alertsMeta.message || clusterMeta.message;

if (!message || !message.length) {
return null;
}

return (
<EuiToolTip content={message} position="bottom">
<EuiHealth color="subdued" data-test-subj="alertIcon">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function renderLog(log) {
<EuiFlexGroup wrap responsive={false} gutterSize="xs">
{log.levels.map((level, index) => (
<EuiFlexItem grow={false} key={index}>
<EuiToolTip position="top" content={logLevelText[level.level]}>
<EuiToolTip position="top" content={logLevelText[level.level] || logLevelText.info}>
<EuiBadge color={getBadgeColorFromLogLevel(level.level)}>
{formatNumber(level.count, 'int_commas')}
</EuiBadge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ import _ from 'lodash';
import { ELASTICSEARCH_SYSTEM_ID } from '../../../../common/constants';
import { ListingCallOut } from '../../setup_mode/listing_callout';

const getNodeTooltip = node => {
const { nodeTypeLabel, nodeTypeClass } = node;
if (nodeTypeLabel) {
return (
<>
<EuiToolTip position="bottom" content={nodeTypeLabel}>
{nodeTypeClass && <EuiIcon type={nodeTypeClass} />}
</EuiToolTip>{' '}
&nbsp;
</>
);
}
return null;
};

const getSortHandler = type => item => _.get(item, [type, 'summary', 'lastVal']);
const getColumns = (showCgroupMetricsElasticsearch, setupMode, clusterUuid) => {
const cols = [];
Expand Down Expand Up @@ -86,10 +101,7 @@ const getColumns = (showCgroupMetricsElasticsearch, setupMode, clusterUuid) => {
<div>
<div className="monTableCell__name">
<EuiText size="m">
<EuiToolTip position="bottom" content={node.nodeTypeLabel}>
{node.nodeTypeClass && <EuiIcon type={node.nodeTypeClass} />}
</EuiToolTip>
&nbsp;
{getNodeTooltip(node)}
<span data-test-subj="name">{nameLink}</span>
</EuiText>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ export const SourceDestination = props => {
<EuiFlexItem grow={false}>
<EuiIcon type="arrowRight" size="s" />
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiToolTip content={targetTransportAddress} position="bottom">
<EuiLink>{targetName}</EuiLink>
</EuiToolTip>
</EuiFlexItem>
{targetTransportAddress && (
<EuiFlexItem grow={false}>
<EuiToolTip content={targetTransportAddress} position="bottom">
<EuiLink>{targetName}</EuiLink>
</EuiToolTip>
</EuiFlexItem>
)}
</EuiFlexGroup>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,9 @@ export class Shard extends React.Component {

let shardUi = <EuiBadge color={color}>{shard.shard}</EuiBadge>;

if (this.state.tooltipVisible) {
if (this.state.tooltipVisible && shard.tooltip_message) {
shardUi = (
<EuiToolTip
content={this.props.shard.tooltip_message}
position="bottom"
data-test-subj="shardTooltip"
>
<EuiToolTip content={shard.tooltip_message} position="bottom" data-test-subj="shardTooltip">
<p>{shardUi}</p>
</EuiToolTip>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ export function EuiMonitoringSSPTable({
index: pagination.pageIndex,
size: pagination.pageSize,
});

if (!pagination.totalItemCount) {
pagination.totalItemCount = (items && items.length) || 0;
}

const [sort, setSort] = React.useState(props.sorting);

if (search.box && !search.box['data-test-subj']) {
Expand Down

0 comments on commit 21a9bb7

Please sign in to comment.