mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Kibana status more relevant (#97071)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
eee204ff26
commit
f1d167de86
3 changed files with 27 additions and 11 deletions
|
@ -356,7 +356,7 @@ export function ElasticsearchPanel(props) {
|
|||
</EuiDescriptionListTitle>
|
||||
<EuiDescriptionListDescription>
|
||||
<EuiHealth color={statusColorMap[clusterStats.status]} data-test-subj="statusIcon">
|
||||
<HealthLabel status={clusterStats.status} />
|
||||
<HealthLabel status={clusterStats.status} product={'es'} />
|
||||
</EuiHealth>
|
||||
</EuiDescriptionListDescription>
|
||||
<EuiDescriptionListTitle className="eui-textBreakWord">
|
||||
|
|
|
@ -27,16 +27,32 @@ export function HealthLabel(props) {
|
|||
});
|
||||
}
|
||||
|
||||
if (props.status === 'yellow') {
|
||||
return i18n.translate('xpack.monitoring.cluster.health.replicaShards', {
|
||||
defaultMessage: 'Missing replica shards',
|
||||
});
|
||||
const { product, status } = props;
|
||||
if (product === 'es') {
|
||||
if (props.status === 'yellow') {
|
||||
return i18n.translate('xpack.monitoring.cluster.health.replicaShards', {
|
||||
defaultMessage: 'Missing replica shards',
|
||||
});
|
||||
}
|
||||
|
||||
if (props.status === 'red') {
|
||||
return i18n.translate('xpack.monitoring.cluster.health.primaryShards', {
|
||||
defaultMessage: 'Missing primary shards',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (props.status === 'red') {
|
||||
return i18n.translate('xpack.monitoring.cluster.health.primaryShards', {
|
||||
defaultMessage: 'Missing primary shards',
|
||||
});
|
||||
if (product === 'kb' && status === 'red') {
|
||||
return (
|
||||
<EuiText>
|
||||
{i18n.translate('xpack.monitoring.cluster.health.pluginIssues', {
|
||||
defaultMessage: 'Some plugins are experiencing issues. Check ',
|
||||
})}
|
||||
<EuiLink href="/status" target="_blank" external={true}>
|
||||
status
|
||||
</EuiLink>
|
||||
</EuiText>
|
||||
);
|
||||
}
|
||||
|
||||
return 'N/A';
|
||||
|
@ -55,7 +71,7 @@ export function HealthStatusIndicator(props) {
|
|||
<EuiFlexGroup alignItems="center" gutterSize="s">
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiHealth color={statusColor} data-test-subj="statusIcon">
|
||||
<HealthLabel status={props.status} />
|
||||
<HealthLabel {...props} />
|
||||
</EuiHealth>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
|
|
|
@ -49,7 +49,7 @@ export function KibanaPanel(props) {
|
|||
return null;
|
||||
}
|
||||
|
||||
const statusIndicator = <HealthStatusIndicator status={props.status} />;
|
||||
const statusIndicator = <HealthStatusIndicator status={props.status} product={'kb'} />;
|
||||
|
||||
const goToKibana = () => getSafeForExternalLink('#/kibana');
|
||||
const goToInstances = () => getSafeForExternalLink('#/kibana/instances');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue