[APM] add service name to jvm (#50830) (#57015)

* [APM] add service name to jvm

* removes isLoading

Co-authored-by: Brittany Joiner <brittanyjoiner15@gmail.com>
This commit is contained in:
Nathan L Smith 2020-02-06 15:26:29 -06:00 committed by GitHub
parent 40083777df
commit 31dbd88670
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,24 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import React from 'react';
import { shallow } from 'enzyme';
import { ServiceNodeMetrics } from '.';
import { MockApmPluginContextWrapper } from '../../../utils/testHelpers';
describe('ServiceNodeMetrics', () => {
describe('render', () => {
it('renders', () => {
expect(() =>
shallow(
<MockApmPluginContextWrapper>
<ServiceNodeMetrics />
</MockApmPluginContextWrapper>
)
).not.toThrowError();
});
});
});

View file

@ -117,6 +117,22 @@ export function ServiceNodeMetrics() {
</EuiCallOut>
) : (
<EuiFlexGroup gutterSize="xl">
<EuiFlexItem grow={false}>
<EuiStat
titleSize="s"
description={i18n.translate(
'xpack.apm.serviceNodeMetrics.serviceName',
{
defaultMessage: 'Service name'
}
)}
title={
<EuiToolTip content={serviceName}>
<Truncate>{serviceName}</Truncate>
</EuiToolTip>
}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiStat
titleSize="s"