mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* [APM] Change labels of user agent * Make everything but .name optional in TransactionRaw * Fall back to os.name if os.full is undefined
This commit is contained in:
parent
4e0a2f4691
commit
eff2e101af
2 changed files with 21 additions and 16 deletions
|
@ -125,8 +125,8 @@ export function StickyTransactionProperties({
|
|||
const { os, device } = userAgent;
|
||||
const width = '25%';
|
||||
stickyProperties.push({
|
||||
label: i18n.translate('xpack.apm.transactionDetails.browserLabel', {
|
||||
defaultMessage: 'Browser'
|
||||
label: i18n.translate('xpack.apm.transactionDetails.userAgentLabel', {
|
||||
defaultMessage: 'User agent'
|
||||
}),
|
||||
val: [userAgent.name, userAgent.version].filter(Boolean).join(' '),
|
||||
truncated: true,
|
||||
|
@ -135,22 +135,27 @@ export function StickyTransactionProperties({
|
|||
|
||||
if (os) {
|
||||
stickyProperties.push({
|
||||
label: i18n.translate('xpack.apm.transactionDetails.osLabel', {
|
||||
defaultMessage: 'OS'
|
||||
label: i18n.translate('xpack.apm.transactionDetails.userAgentOsLabel', {
|
||||
defaultMessage: 'User agent OS'
|
||||
}),
|
||||
val: os.full,
|
||||
val: os.full || os.name,
|
||||
truncated: true,
|
||||
width
|
||||
});
|
||||
}
|
||||
|
||||
stickyProperties.push({
|
||||
label: i18n.translate('xpack.apm.transactionDetails.deviceLabel', {
|
||||
defaultMessage: 'OS'
|
||||
}),
|
||||
val: device.name,
|
||||
width
|
||||
});
|
||||
if (device) {
|
||||
stickyProperties.push({
|
||||
label: i18n.translate(
|
||||
'xpack.apm.transactionDetails.userAgentDeviceLabel',
|
||||
{
|
||||
defaultMessage: 'User agent device'
|
||||
}
|
||||
),
|
||||
val: device.name,
|
||||
width
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return <StickyProperties stickyProperties={stickyProperties} />;
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
*/
|
||||
|
||||
export interface UserAgent {
|
||||
device: {
|
||||
device?: {
|
||||
name: string;
|
||||
};
|
||||
name: string;
|
||||
name?: string;
|
||||
original: string;
|
||||
os?: {
|
||||
name: string;
|
||||
version: string;
|
||||
full: string;
|
||||
version?: string;
|
||||
full?: string;
|
||||
};
|
||||
version?: string;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue