diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/color_palette.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/color_palette.tsx index bafd0de5aa48a..be6bc97a1fcae 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/color_palette.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/color_palette.tsx @@ -10,22 +10,27 @@ import { EuiFlexGroup, EuiFlexItem, EuiText, EuiLoadingContent } from '@elastic/ import { useTheme } from '@kbn/observability-plugin/public'; import styled from 'styled-components'; import { colourPalette } from './network_waterfall/step_detail/waterfall/data_formatting'; + export const ColorPalette = ({ label, mimeType, percent, value, loading, + labelWidth = 40, + valueWidth = 60, }: { label: string; mimeType: string; percent: number; value: string; loading: boolean; + labelWidth?: number; + valueWidth?: number; }) => { return ( - + {label} @@ -35,7 +40,7 @@ export const ColorPalette = ({ loading={loading} /> - + { + const objectMetrics = useObjectMetrics(); + + return ( + <> + + + +

{OBJECT_COUNT_LABEL}

+
+
+ + + {TOTAL_LABEL}: {objectMetrics.totalObjects} + + +
+ +
+ {objectMetrics.items.map(({ label, mimeType, percent, count }) => ( + <> + + + + ))} +
+ + ); +}; + +const OBJECT_COUNT_LABEL = i18n.translate('xpack.synthetics.stepDetails.objectCount', { + defaultMessage: 'Object count', +}); + +const TOTAL_LABEL = i18n.translate('xpack.synthetics.stepDetails.total', { + defaultMessage: 'Total', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx index f0bb1b91d5a8e..999d805d6167c 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx @@ -19,6 +19,7 @@ import { import { WaterfallChartContainer } from './components/network_waterfall/step_detail/waterfall/waterfall_chart_container'; import { ObjectWeightList } from './components/object_weight_list'; import { NetworkTimingsBreakdown } from './network_timings_breakdown'; +import { ObjectCountList } from './components/object_count_list'; import { StepImage } from './components/step_image'; import { useJourneySteps } from '../monitor_details/hooks/use_journey_steps'; import { MonitorDetailsLinkPortal } from '../monitor_add_edit/monitor_details_portal'; @@ -94,7 +95,9 @@ export const StepDetailPage = () => { - {/* TODO: Add breakdown of object weight*/} + + +
diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx index 06b684dd30719..ebc7bd197e0f9 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx @@ -47,8 +47,8 @@ import { MONITOR_ERRORS_ROUTE, MONITOR_HISTORY_ROUTE, MONITOR_ROUTE, - STEP_DETAIL_ROUTE, ERROR_DETAILS_ROUTE, + STEP_DETAIL_ROUTE, OVERVIEW_ROUTE, } from '../../../common/constants'; import { PLUGIN } from '../../../common/constants/plugin';