-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[APM] Transactions breakdown graph: Add breakdown KPI component #38658
Merged
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
628d2b7
[APM] Transactions breakdown graph: Add breakdown KPI component
dgieselaar 0ef9b09
Remove percentage, line wrapping, correct query
dgieselaar e3eef8e
Add transaction breakdown chart to transaction details page
dgieselaar 82637cb
Move files into new plugin dir
dgieselaar c98ce8d
Add empty state; update labels
dgieselaar 98d35a4
Use new mapping
dgieselaar 028a3ad
Move urlParams to useTransactionBreakdown hook
dgieselaar a03250b
Fix types
dgieselaar fe50570
Only show empty state in TransactionBreakdown if previously data was …
dgieselaar 08e690c
Restrict no of KPIs to 20
dgieselaar 263478a
Use ternary in render of TransactionBreakdownHeader for consistency
dgieselaar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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> | ||
)} | ||
</EuiFlexGroup> | ||
); | ||
}; | ||
|
||
export { TransactionBreakdownHeader }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to use the ternary pattern in JSX composition just to be consistent:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aye, fixed