-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove all client-side map munging (#60701)
Remove the getCytoscapeElements function. On the server: * Replace `source` with `sourceData`, `destination` with `targetData`, `source.id` with `source`, and `destination.id` with `target`. * Return a single array as an `elements` property instead of `nodes` and `connections` * Map all of the items data to be inside of a `data` object * Replace SERVICE_AGENT_NAME with AGENT_NAME * Add some missing constants On the client: * Remove getCytoscapeElements * Move all presentation-specific data transformation to use the original attributes in the place where they're needed * Remove `href` since it wasn't being used * Move BetaBadge to its own file * Move cytoscapeDivStyle to cytoscapeOptions * Fix storybook to work with new data formats
- Loading branch information
Showing
25 changed files
with
1,110 additions
and
266 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
x-pack/legacy/plugins/apm/public/components/app/ServiceMap/BetaBadge.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,37 @@ | ||
/* | ||
* 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 { EuiBetaBadge } from '@elastic/eui'; | ||
import theme from '@elastic/eui/dist/eui_theme_light.json'; | ||
import { i18n } from '@kbn/i18n'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
const BetaBadgeContainer = styled.div` | ||
right: ${theme.gutterTypes.gutterMedium}; | ||
position: absolute; | ||
top: ${theme.gutterTypes.gutterSmall}; | ||
z-index: 1; /* The element containing the cytoscape canvas has z-index = 0. */ | ||
`; | ||
|
||
export function BetaBadge() { | ||
return ( | ||
<BetaBadgeContainer> | ||
<EuiBetaBadge | ||
label={i18n.translate('xpack.apm.serviceMap.betaBadge', { | ||
defaultMessage: 'Beta' | ||
})} | ||
tooltipContent={i18n.translate( | ||
'xpack.apm.serviceMap.betaTooltipMessage', | ||
{ | ||
defaultMessage: | ||
'This feature is currently in beta. If you encounter any bugs or have feedback, please open an issue or visit our discussion forum.' | ||
} | ||
)} | ||
/> | ||
</BetaBadgeContainer> | ||
); | ||
} |
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
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
Oops, something went wrong.