+
{children}
diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/LoadingOverlay.tsx b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/LoadingOverlay.tsx
index efafdbcecd41c..c08d3acbf1861 100644
--- a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/LoadingOverlay.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/LoadingOverlay.tsx
@@ -31,16 +31,11 @@ const ProgressBarContainer = styled.div`
`;
interface Props {
- children: React.ReactNode;
isLoading: boolean;
percentageLoaded: number;
}
-export const LoadingOverlay = ({
- children,
- isLoading,
- percentageLoaded
-}: Props) => (
+export const LoadingOverlay = ({ isLoading, percentageLoaded }: Props) => (
{isLoading && (
@@ -61,6 +56,5 @@ export const LoadingOverlay = ({
)}
- {children}
);
diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/index.tsx
index a8e6f964f4d0c..24fb0b9e5d8a3 100644
--- a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/index.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/index.tsx
@@ -30,13 +30,13 @@ import { getCytoscapeElements } from './get_cytoscape_elements';
import { LoadingOverlay } from './LoadingOverlay';
import { PlatinumLicensePrompt } from './PlatinumLicensePrompt';
import { Popover } from './Popover';
+import { useRefHeight } from './useRefHeight';
interface ServiceMapProps {
serviceName?: string;
}
const cytoscapeDivStyle = {
- height: '85vh',
background: `linear-gradient(
90deg,
${theme.euiPageBackgroundColor}
@@ -52,7 +52,8 @@ linear-gradient(
center,
${theme.euiColorLightShade}`,
backgroundSize: `${theme.euiSizeL} ${theme.euiSizeL}`,
- margin: `-${theme.gutterTypes.gutterLarge}`
+ margin: `-${theme.gutterTypes.gutterLarge}`,
+ marginTop: 0
};
const MAX_REQUESTS = 5;
@@ -198,17 +199,27 @@ export function ServiceMap({ serviceName }: ServiceMapProps) {
license?.isActive &&
(license?.type === 'platinum' || license?.type === 'trial');
+ const [wrapperRef, height] = useRefHeight();
+
return isValidPlatinumLicense ? (
-
+
) : (
);
diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/useRefHeight.ts b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/useRefHeight.ts
new file mode 100644
index 0000000000000..b8fba47acd2d6
--- /dev/null
+++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/useRefHeight.ts
@@ -0,0 +1,20 @@
+/*
+ * 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 { MutableRefObject, useRef } from 'react';
+import { useWindowSize } from 'react-use';
+
+export function useRefHeight(): [
+ MutableRefObject,
+ number
+] {
+ const ref = useRef(null);
+ const windowHeight = useWindowSize().height;
+ const topOffset = ref.current?.getBoundingClientRect()?.top ?? 0;
+
+ const height = ref.current ? windowHeight - topOffset : 0;
+
+ return [ref, height];
+}
diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMetrics/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/ServiceMetrics/index.tsx
index d01093be801a2..0fb8c00a2b162 100644
--- a/x-pack/legacy/plugins/apm/public/components/app/ServiceMetrics/index.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceMetrics/index.tsx
@@ -43,24 +43,27 @@ export function ServiceMetrics({ agentName }: ServiceMetricsProps) {
);
return (
-
-
-
-
-
-
-
- {data.charts.map(chart => (
-
-
-
-
-
- ))}
-
-
-
-
-
+ <>
+
+
+
+
+
+
+
+
+ {data.charts.map(chart => (
+
+
+
+
+
+ ))}
+
+
+
+
+
+ >
);
}
diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceNodeOverview/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/ServiceNodeOverview/index.tsx
index a118871a5e268..4e57cb47691be 100644
--- a/x-pack/legacy/plugins/apm/public/components/app/ServiceNodeOverview/index.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceNodeOverview/index.tsx
@@ -4,7 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
import React, { useMemo } from 'react';
-import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiToolTip } from '@elastic/eui';
+import {
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiPanel,
+ EuiToolTip,
+ EuiSpacer
+} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import styled from 'styled-components';
import { UNIDENTIFIED_SERVICE_NODES_LABEL } from '../../../../common/i18n';
@@ -150,25 +156,31 @@ const ServiceNodeOverview = () => {
];
return (
-
-
-
-
-
-
-
-
-
-
+ <>
+
+
+
+
+
+
+
+
+
+
+
+ >
);
};
diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceOverview/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/ServiceOverview/index.tsx
index 05ccc691ecdba..b522736c80f9b 100644
--- a/x-pack/legacy/plugins/apm/public/components/app/ServiceOverview/index.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceOverview/index.tsx
@@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { EuiPanel, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
+import { EuiPanel, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui';
import { EuiLink } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React, { useEffect, useMemo } from 'react';
@@ -94,23 +94,26 @@ export function ServiceOverview() {
);
return (
-
-
-
-
-
-
-
- }
- />
-
-
-
+ <>
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+ >
);
}
diff --git a/x-pack/legacy/plugins/apm/public/components/app/TraceOverview/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/TraceOverview/index.tsx
index cf701d02aa5cb..dd3e2d13826dc 100644
--- a/x-pack/legacy/plugins/apm/public/components/app/TraceOverview/index.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/app/TraceOverview/index.tsx
@@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { EuiPanel, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
+import { EuiPanel, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui';
import React, { useMemo } from 'react';
import { FETCH_STATUS, useFetcher } from '../../../hooks/useFetcher';
import { TraceList } from './TraceList';
@@ -47,15 +47,21 @@ export function TraceOverview() {
}, []);
return (
-
-
-
-
-
-
-
-
-
-
+ <>
+
+
+
+
+
+
+
+
+
+
+
+ >
);
}
diff --git a/x-pack/legacy/plugins/apm/public/components/app/TransactionOverview/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/TransactionOverview/index.tsx
index 439e3d80eef4f..2cf01f8b40a09 100644
--- a/x-pack/legacy/plugins/apm/public/components/app/TransactionOverview/index.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/app/TransactionOverview/index.tsx
@@ -119,41 +119,44 @@ export function TransactionOverview() {
}
return (
-
-
-
-
-
-
-
-
-
-
-
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
- Transactions
-
-
-
-
-
-
+
+
+ Transactions
+
+
+
+
+
+
+ >
);
}
diff --git a/x-pack/legacy/plugins/apm/public/new-platform/plugin.tsx b/x-pack/legacy/plugins/apm/public/new-platform/plugin.tsx
index e6c81d1190ce3..26e0f25cbb666 100644
--- a/x-pack/legacy/plugins/apm/public/new-platform/plugin.tsx
+++ b/x-pack/legacy/plugins/apm/public/new-platform/plugin.tsx
@@ -39,7 +39,7 @@ import { setReadonlyBadge } from './updateBadge';
export const REACT_APP_ROOT_ID = 'react-apm-root';
-const MainContainer = styled.main`
+const MainContainer = styled.div`
min-width: ${px(unit * 50)};
padding: ${px(units.plus)};
height: 100%;
@@ -47,7 +47,7 @@ const MainContainer = styled.main`
const App = () => {
return (
-
+