Skip to content
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const metricVal = (metric, format, isPercent) => {
return formatMetric(metric, format);
};

const noWrapStyle = { overflowX: 'hidden', whiteSpace: 'nowrap' };

function MetricCell({ isOnline, metric = {}, isPercent, ...props }) {
if (isOnline) {
const { lastVal, maxVal, minVal, slope } = get(metric, 'summary', {});
Expand All @@ -40,15 +42,13 @@ function MetricCell({ isOnline, metric = {}, isPercent, ...props }) {
return (
<EuiFlexGroup gutterSize="m" alignItems="center" wrap {...props}>
<EuiFlexItem grow={false}>
<EuiTitle size="m">
<h4>
{ metricVal(lastVal, format, isPercent) }
<EuiTitle size="s" style={noWrapStyle}>
<span>
{metricVal(lastVal, format, isPercent)}
&nbsp;
<span className={`fa fa-long-arrow-${getSlopeArrow(slope)}`} />
</h4>
</span>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiText size="xs">
{i18n.translate('xpack.monitoring.elasticsearch.nodes.cells.maxText', {
defaultMessage: '{metric} max',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
EuiPageContent,
EuiPageBody,
EuiPanel,
EuiText
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { injectI18n } from '@kbn/i18n/react';
Expand All @@ -35,26 +36,29 @@ const getColumns = showCgroupMetricsElasticsearch => {
name: i18n.translate('xpack.monitoring.elasticsearch.nodes.nameColumnTitle', {
defaultMessage: 'Name',
}),
width: '20%',
field: 'name',
sortable: true,
render: (value, node) => (
<div>
<div className="monTableCell__name">
<EuiToolTip
position="bottom"
content={node.nodeTypeLabel}
>
<span className={`fa ${node.nodeTypeClass}`} />
</EuiToolTip>
&nbsp;
<span data-test-subj="name">
<EuiLink
href={`#/elasticsearch/nodes/${node.resolver}`}
data-test-subj={`nodeLink-${node.resolver}`}
<EuiText size="m">
<EuiToolTip
position="bottom"
content={node.nodeTypeLabel}
>
{value}
</EuiLink>
</span>
<span className={`fa ${node.nodeTypeClass}`} />
</EuiToolTip>
&nbsp;
<span data-test-subj="name">
<EuiLink
href={`#/elasticsearch/nodes/${node.resolver}`}
data-test-subj={`nodeLink-${node.resolver}`}
>
{value}
</EuiLink>
</span>
</EuiText>
</div>
<div className="monTableCell__transportAddress">
{extractIp(node.transport_address)}
Expand Down Expand Up @@ -87,6 +91,21 @@ const getColumns = showCgroupMetricsElasticsearch => {
}
});

cols.push({
name: i18n.translate('xpack.monitoring.elasticsearch.nodes.shardsColumnTitle', {
defaultMessage: 'Shards',
}),
field: 'shardCount',
sortable: true,
render: (value, node) => {
return node.isOnline ? (
<div className="monTableCell__number" data-test-subj="shards">
{value}
</div>
) : <OfflineCell/>;
}
});

if (showCgroupMetricsElasticsearch) {
cols.push({
name: cpuUsageColumnTitle,
Expand Down Expand Up @@ -174,7 +193,6 @@ const getColumns = showCgroupMetricsElasticsearch => {
}),
field: 'node_free_space',
sortable: getSortHandler('node_free_space'),
width: '300px',
render: (value, node) => (
<MetricCell
isOnline={node.isOnline}
Expand All @@ -185,21 +203,6 @@ const getColumns = showCgroupMetricsElasticsearch => {
)
});

cols.push({
name: i18n.translate('xpack.monitoring.elasticsearch.nodes.shardsColumnTitle', {
defaultMessage: 'Shards',
}),
field: 'shardCount',
sortable: true,
render: (value, node) => {
return node.isOnline ? (
<div className="monTableCell__number" data-test-subj="shards">
{value}
</div>
) : <OfflineCell/>;
}
});

return cols;
};

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
.monSummaryStatus {
background-color: $euiColorLightestShade;
border-bottom: $euiBorderThin;
padding: $euiSize;
.monSummaryStatusNoWrap {
margin-left: $euiSizeM;
margin-right: $euiSizeM;
.euiTitle {
overflow-x: hidden;
white-space: nowrap;
@include euiFontSizeXS;
}

.euiFlexItem {
margin: $euiSizeS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const wrapChild = ({ label, value, ...props }, index) => (
>
<EuiStat
title={value}
titleSize="s"
titleSize="xs"
textAlign="left"
description={label ? `${label}` : ''}
/>
Expand Down Expand Up @@ -67,7 +67,7 @@ const StatusIndicator = ({ status, isOnline, IconComponent }) => {
{capitalize(status)}
</Fragment>
)}
titleSize="s"
titleSize="xs"
textAlign="left"
description={i18n.translate('xpack.monitoring.summaryStatus.statusDescription', {
defaultMessage: 'Status',
Expand All @@ -79,7 +79,7 @@ const StatusIndicator = ({ status, isOnline, IconComponent }) => {

export function SummaryStatus({ metrics, status, isOnline, IconComponent = DefaultIconComponent, ...props }) {
return (
<div {...props}>
<div {...props} className="monSummaryStatusNoWrap">
<EuiFlexGroup justifyContent="spaceBetween">
<StatusIndicator status={status} IconComponent={IconComponent} isOnline={isOnline} />
{metrics.map(wrapChild)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@
@include euiFontSizeM;
}

.monTableCell__status {
overflow-x: hidden;
white-space: nowrap;
}

.monTableCell__transportAddress {
color: $euiColorDarkShade;
@include euiFontSizeS;
}

.monTableCell__number {
@include euiFontSizeXL;
@include euiFontSizeL;
}

.monTableCell__splitNumber {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export function MonitoringElasticsearchNodesProvider({ getService, getPageObject

const SUBJ_TABLE_SORT_NAME_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_name_0`;
const SUBJ_TABLE_SORT_STATUS_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_isOnline_1`;
const SUBJ_TABLE_SORT_CPU_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_cpu_utilization_2`;
const SUBJ_TABLE_SORT_LOAD_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_load_average_3`;
const SUBJ_TABLE_SORT_MEM_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_jvm_mem_percent_4`;
const SUBJ_TABLE_SORT_DISK_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_free_space_5`;
const SUBJ_TABLE_SORT_SHARDS_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_shardCount_6`;
const SUBJ_TABLE_SORT_SHARDS_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_shardCount_2`;
const SUBJ_TABLE_SORT_CPU_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_cpu_utilization_3`;
const SUBJ_TABLE_SORT_LOAD_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_load_average_4`;
const SUBJ_TABLE_SORT_MEM_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_jvm_mem_percent_5`;
const SUBJ_TABLE_SORT_DISK_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_free_space_6`;

const SUBJ_TABLE_BODY = 'elasticsearchNodesTableContainer';
const SUBJ_NODES_NAMES = `${SUBJ_TABLE_BODY} name`;
Expand Down