-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[APM] Transactions breakdown graph: Add breakdown KPI component (#38658)
* [APM] Transactions breakdown graph: Add breakdown KPI component Closes #36445. * Remove percentage, line wrapping, correct query * Add transaction breakdown chart to transaction details page * Move files into new plugin dir * Add empty state; update labels * Use new mapping * Move urlParams to useTransactionBreakdown hook * Fix types * Only show empty state in TransactionBreakdown if previously data was rendered * Restrict no of KPIs to 20 * Use ternary in render of TransactionBreakdownHeader for consistency
- Loading branch information
1 parent
caae025
commit 3512463
Showing
20 changed files
with
769 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
...ck/legacy/plugins/apm/public/components/app/Main/__test__/__snapshots__/Home.test.js.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...apm/public/components/shared/HistoryTabs/__test__/__snapshots__/HistoryTabs.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ins/apm/public/components/shared/TransactionBreakdown/TransactionBreakdownGraph/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* 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'; | ||
|
||
const TransactionBreakdownGraph: React.FC<{}> = () => { | ||
return <div />; | ||
}; | ||
|
||
export { TransactionBreakdownGraph }; |
74 changes: 74 additions & 0 deletions
74
.../plugins/apm/public/components/shared/TransactionBreakdown/TransactionBreakdownHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* 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 { | ||
EuiTitle, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiSpacer, | ||
EuiBetaBadge, | ||
EuiButtonEmpty | ||
} from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
const TransactionBreakdownHeader: React.FC<{ | ||
showChart: boolean; | ||
hideShowChartButton: boolean; | ||
onToggleClick: () => void; | ||
}> = ({ showChart, onToggleClick, hideShowChartButton }) => { | ||
return ( | ||
<EuiFlexGroup> | ||
<EuiFlexItem> | ||
<EuiTitle size="xs"> | ||
<h3> | ||
<EuiFlexGroup alignItems="center" gutterSize="s"> | ||
<EuiFlexItem grow={false}> | ||
{i18n.translate('xpack.apm.transactionBreakdown.chartTitle', { | ||
defaultMessage: 'Time spent by span type' | ||
})} | ||
</EuiFlexItem> | ||
<EuiSpacer size="xs" /> | ||
<EuiFlexItem grow={false}> | ||
<EuiBetaBadge | ||
label={i18n.translate('xpack.apm.ui.betaBadgeLabel', { | ||
defaultMessage: 'Beta' | ||
})} | ||
tooltipContent={i18n.translate( | ||
'xpack.apm.ui.betaBadgeTooltipTitle', | ||
{ | ||
defaultMessage: | ||
'This feature is still in development. If you have feedback, please reach out in our Discuss forum.' | ||
} | ||
)} | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</h3> | ||
</EuiTitle> | ||
</EuiFlexItem> | ||
{!hideShowChartButton ? ( | ||
<EuiFlexItem grow={false}> | ||
<EuiButtonEmpty | ||
size="xs" | ||
iconType={showChart ? 'arrowDown' : 'arrowRight'} | ||
onClick={() => onToggleClick()} | ||
> | ||
{showChart | ||
? i18n.translate('xpack.apm.transactionBreakdown.hideChart', { | ||
defaultMessage: 'Hide chart' | ||
}) | ||
: i18n.translate('xpack.apm.transactionBreakdown.showChart', { | ||
defaultMessage: 'Show chart' | ||
})} | ||
</EuiButtonEmpty> | ||
</EuiFlexItem> | ||
) : null} | ||
</EuiFlexGroup> | ||
); | ||
}; | ||
|
||
export { TransactionBreakdownHeader }; |
Oops, something went wrong.