mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Set metadata tab as default and display Stack Trace tab only if stackframes exist (#128598)
This commit is contained in:
parent
e628ae5b54
commit
52f0bf0a6a
1 changed files with 23 additions and 18 deletions
|
@ -21,6 +21,7 @@ import {
|
|||
} from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import React, { Fragment } from 'react';
|
||||
import { isEmpty } from 'lodash';
|
||||
import { CompositeSpanDurationSummaryItem } from '../../../../../../shared/summary/composite_span_duration_summary_item';
|
||||
import { euiStyled } from '../../../../../../../../../../../src/plugins/kibana_react/common';
|
||||
import { Span } from '../../../../../../../../typings/es_schemas/ui/span';
|
||||
|
@ -216,24 +217,6 @@ export function SpanFlyout({
|
|||
<SpanDatabase spanDb={spanDb} />
|
||||
<EuiTabbedContent
|
||||
tabs={[
|
||||
{
|
||||
id: 'stack-trace',
|
||||
name: i18n.translate(
|
||||
'xpack.apm.transactionDetails.spanFlyout.stackTraceTabLabel',
|
||||
{
|
||||
defaultMessage: 'Stack Trace',
|
||||
}
|
||||
),
|
||||
content: (
|
||||
<Fragment>
|
||||
<EuiSpacer size="l" />
|
||||
<Stacktrace
|
||||
stackframes={stackframes}
|
||||
codeLanguage={codeLanguage}
|
||||
/>
|
||||
</Fragment>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'metadata',
|
||||
name: i18n.translate(
|
||||
|
@ -249,6 +232,28 @@ export function SpanFlyout({
|
|||
</Fragment>
|
||||
),
|
||||
},
|
||||
...(!isEmpty(stackframes)
|
||||
? [
|
||||
{
|
||||
id: 'stack-trace',
|
||||
name: i18n.translate(
|
||||
'xpack.apm.transactionDetails.spanFlyout.stackTraceTabLabel',
|
||||
{
|
||||
defaultMessage: 'Stack Trace',
|
||||
}
|
||||
),
|
||||
content: (
|
||||
<Fragment>
|
||||
<EuiSpacer size="l" />
|
||||
<Stacktrace
|
||||
stackframes={stackframes}
|
||||
codeLanguage={codeLanguage}
|
||||
/>
|
||||
</Fragment>
|
||||
),
|
||||
},
|
||||
]
|
||||
: []),
|
||||
]}
|
||||
/>
|
||||
</EuiFlyoutBody>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue