[inspector] do not show clusters health bar when there are no remotes (#167657)

<img width="400" alt="Screenshot 2023-09-29 at 8 42 00 AM"
src="a8d575d7-776b-425b-a6fa-de91301f0512">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Nathan Reese 2023-09-29 11:26:13 -06:00 committed by GitHub
parent 97c7d7d45f
commit 50fa260d4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 20 deletions

View file

@ -73,25 +73,6 @@ exports[`render should render local cluster details from _shards 1`] = `
<EuiSpacer
size="m"
/>
<ClustersHealth
clusters={
Object {
"(local)": Object {
"_shards": Object {
"failed": 0,
"skipped": 0,
"successful": 2,
"total": 2,
},
"failures": undefined,
"indices": "",
"status": "successful",
"timed_out": undefined,
"took": undefined,
},
}
}
/>
<ClustersTable
clusters={
Object {

View file

@ -44,7 +44,7 @@ export class ClustersView extends Component<RequestDetailsProps> {
return this.props.request.response?.json ? (
<>
<EuiSpacer size="m" />
<ClustersHealth clusters={clusters} />
{Object.keys(clusters).length > 1 ? <ClustersHealth clusters={clusters} /> : null}
<ClustersTable clusters={clusters} />
</>
) : null;