mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* Just show an icon if action is necessary, otherwise show nothing * Update copy * Update copy based on state * Updated logic and copy * Update copy
This commit is contained in:
parent
8fdd7ac54f
commit
9441a865e9
2 changed files with 73 additions and 44 deletions
|
@ -27,6 +27,7 @@ import {
|
|||
EuiBadge,
|
||||
EuiToolTip,
|
||||
EuiFlexGroup,
|
||||
EuiIcon
|
||||
} from '@elastic/eui';
|
||||
import { LicenseText } from './license_text';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
@ -161,30 +162,44 @@ export function ElasticsearchPanel(props) {
|
|||
|
||||
const setupModeElasticsearchData = get(setupMode.data, 'elasticsearch');
|
||||
let setupModeNodesData = null;
|
||||
if (setupMode.enabled && setupMode.data) {
|
||||
const migratedNodesCount = Object.values(setupModeElasticsearchData.byUuid).filter(node => node.isFullyMigrated).length;
|
||||
const totalNodesCount = Object.values(setupModeElasticsearchData.byUuid).length;
|
||||
if (setupMode.enabled && setupModeElasticsearchData) {
|
||||
const {
|
||||
totalUniqueInstanceCount,
|
||||
totalUniqueFullyMigratedCount,
|
||||
totalUniquePartiallyMigratedCount
|
||||
} = setupModeElasticsearchData;
|
||||
const allMonitoredByMetricbeat = totalUniqueInstanceCount > 0 &&
|
||||
(totalUniqueFullyMigratedCount === totalUniqueInstanceCount || totalUniquePartiallyMigratedCount === totalUniqueInstanceCount);
|
||||
const internalCollectionOn = totalUniquePartiallyMigratedCount > 0;
|
||||
if (!allMonitoredByMetricbeat || internalCollectionOn) {
|
||||
let tooltipText = null;
|
||||
|
||||
const badgeColor = migratedNodesCount === totalNodesCount
|
||||
? 'secondary'
|
||||
: 'danger';
|
||||
if (!allMonitoredByMetricbeat) {
|
||||
tooltipText = i18n.translate('xpack.monitoring.cluster.overview.elasticsearchPanel.setupModeNodesTooltip.oneInternal', {
|
||||
defaultMessage: `There's at least one node that isn't being monitored using Metricbeat. Click the flag icon to visit the nodes
|
||||
listing page and find out more information about the status of each node.`
|
||||
});
|
||||
}
|
||||
else if (internalCollectionOn) {
|
||||
tooltipText = i18n.translate('xpack.monitoring.cluster.overview.elasticsearchPanel.setupModeNodesTooltip.disableInternal', {
|
||||
defaultMessage: `All nodes are being monitored using Metricbeat but internal collection still needs to be turned off. Click the
|
||||
flag icon to visit the nodes listing page and disable internal collection.`
|
||||
});
|
||||
}
|
||||
|
||||
setupModeNodesData = (
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiToolTip
|
||||
position="top"
|
||||
content={i18n.translate('xpack.monitoring.cluster.overview.esPanel.setupModeNodesTooltip', {
|
||||
defaultMessage: `These numbers indicate how many detected monitored nodes versus how many
|
||||
detected total nodes. If there are more detected nodes than monitored nodes, click the Nodes
|
||||
link and you will be guided in how to setup monitoring for the missing node.`
|
||||
})}
|
||||
>
|
||||
<EuiBadge color={badgeColor}>
|
||||
{formatNumber(migratedNodesCount, 'int_commas')}/{formatNumber(totalNodesCount, 'int_commas')}
|
||||
</EuiBadge>
|
||||
</EuiToolTip>
|
||||
</EuiFlexItem>
|
||||
);
|
||||
setupModeNodesData = (
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiToolTip
|
||||
position="top"
|
||||
content={tooltipText}
|
||||
>
|
||||
<EuiLink onClick={goToNodes}>
|
||||
<EuiIcon type="flag" color="warning"/>
|
||||
</EuiLink>
|
||||
</EuiToolTip>
|
||||
</EuiFlexItem>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const showMlJobs = () => {
|
||||
|
|
|
@ -19,7 +19,7 @@ import {
|
|||
EuiDescriptionListTitle,
|
||||
EuiDescriptionListDescription,
|
||||
EuiHorizontalRule,
|
||||
EuiBadge,
|
||||
EuiIcon,
|
||||
EuiToolTip
|
||||
} from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
|
@ -42,29 +42,43 @@ export function KibanaPanel(props) {
|
|||
const setupModeKibanaData = get(setupMode.data, 'kibana');
|
||||
let setupModeInstancesData = null;
|
||||
if (setupMode.enabled && setupMode.data) {
|
||||
const migratedNodesCount = Object.values(setupModeKibanaData.byUuid).filter(node => node.isFullyMigrated).length;
|
||||
const totalNodesCount = Object.values(setupModeKibanaData.byUuid).length;
|
||||
const {
|
||||
totalUniqueInstanceCount,
|
||||
totalUniqueFullyMigratedCount,
|
||||
totalUniquePartiallyMigratedCount
|
||||
} = setupModeKibanaData;
|
||||
const allMonitoredByMetricbeat = totalUniqueInstanceCount > 0 &&
|
||||
(totalUniqueFullyMigratedCount === totalUniqueInstanceCount || totalUniquePartiallyMigratedCount === totalUniqueInstanceCount);
|
||||
const internalCollectionOn = totalUniquePartiallyMigratedCount > 0;
|
||||
if (!allMonitoredByMetricbeat || internalCollectionOn) {
|
||||
let tooltipText = null;
|
||||
|
||||
const badgeColor = migratedNodesCount === totalNodesCount
|
||||
? 'secondary'
|
||||
: 'danger';
|
||||
if (!allMonitoredByMetricbeat) {
|
||||
tooltipText = i18n.translate('xpack.monitoring.cluster.overview.kibanaPanel.setupModeNodesTooltip.oneInternal', {
|
||||
defaultMessage: `There's at least one instance that isn't being monitored using Metricbeat. Click the flag
|
||||
icon to visit the instances listing page and find out more information about the status of each instance.`
|
||||
});
|
||||
}
|
||||
else if (internalCollectionOn) {
|
||||
tooltipText = i18n.translate('xpack.monitoring.cluster.overview.kibanaPanel.setupModeNodesTooltip.disableInternal', {
|
||||
defaultMessage: `All instances are being monitored using Metricbeat but internal collection still needs to be turned
|
||||
off. Click the flag icon to visit the instances listing page and disable internal collection.`
|
||||
});
|
||||
}
|
||||
|
||||
setupModeInstancesData = (
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiToolTip
|
||||
position="top"
|
||||
content={i18n.translate('xpack.monitoring.cluster.overview.kibanaPanel.setupModeNodesTooltip', {
|
||||
defaultMessage: `These numbers indicate how many detected monitored instances versus how many
|
||||
detected total instances. If there are more detected instances than monitored instances, click
|
||||
the instances link and you will be guided in how to setup monitoring for the missing node.`
|
||||
})}
|
||||
>
|
||||
<EuiBadge color={badgeColor}>
|
||||
{formatNumber(migratedNodesCount, 'int_commas')}/{formatNumber(totalNodesCount, 'int_commas')}
|
||||
</EuiBadge>
|
||||
</EuiToolTip>
|
||||
</EuiFlexItem>
|
||||
);
|
||||
setupModeInstancesData = (
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiToolTip
|
||||
position="top"
|
||||
content={tooltipText}
|
||||
>
|
||||
<EuiLink onClick={goToInstances}>
|
||||
<EuiIcon type="flag" color="warning"/>
|
||||
</EuiLink>
|
||||
</EuiToolTip>
|
||||
</EuiFlexItem>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue