Skip to content

Commit ec83da5

Browse files
committed
PR Feedback
1 parent 3144c5f commit ec83da5

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

x-pack/plugins/apm/public/components/app/RumDashboard/ClientMetrics/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function ClientMetrics() {
5656
<EuiFlexItem grow={false} style={STAT_STYLE}>
5757
<EuiStat
5858
titleSize="s"
59-
title={(data?.frontEnd?.value?.toFixed(2) ?? '-') + ' s'}
59+
title={((data?.frontEnd?.value ?? 0)?.toFixed(2) ?? '-') + ' s'}
6060
description={I18LABELS.frontEnd}
6161
isLoading={status !== 'success'}
6262
/>

x-pack/plugins/apm/public/components/app/RumDashboard/CoreVitals/CoreVitalItem.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ export function CoreVitalItem({
9090
<EuiFlexGroup
9191
gutterSize="none"
9292
alignItems="flexStart"
93-
style={{ width: 340 }}
93+
style={{ maxWidth: 340 }}
94+
responsive={false}
9495
>
9596
{palette.map((hexCode, ind) => (
9697
<ColorPaletteFlexItem

x-pack/plugins/apm/public/components/app/RumDashboard/CoreVitals/PaletteLegends.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function PaletteLegends({
3939
const palette = euiPaletteForStatus(3);
4040

4141
return (
42-
<EuiFlexGroup>
42+
<EuiFlexGroup responsive={false}>
4343
{palette.map((color, ind) => (
4444
<EuiFlexItem
4545
key={ind}

x-pack/plugins/apm/public/components/app/RumDashboard/CoreVitals/index.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,31 +37,33 @@ export function CoreVitals() {
3737
[start, end, serviceName, uiFilters]
3838
);
3939

40+
const { lcp, lcpRanks, fid, fidRanks, cls, clsRanks } = data || {};
41+
4042
return (
4143
<EuiFlexGroup gutterSize="xl" justifyContent={'spaceBetween'}>
4244
<EuiFlexItem>
4345
<CoreVitalItem
4446
title={LCP_LABEL}
45-
value={data?.lcp + 's' ?? ''}
46-
ranks={data?.lcpRanks}
47+
value={lcp ? lcp + 's' : '0'}
48+
ranks={lcpRanks}
4749
loading={status !== 'success'}
4850
thresholds={CoreVitalsThresholds.LCP}
4951
/>
5052
</EuiFlexItem>
5153
<EuiFlexItem>
5254
<CoreVitalItem
5355
title={FID_LABEL}
54-
value={data?.fid + 's' ?? ''}
55-
ranks={data?.fidRanks}
56+
value={fid ? fid + 's' : '0'}
57+
ranks={fidRanks}
5658
loading={status !== 'success'}
5759
thresholds={CoreVitalsThresholds.FID}
5860
/>
5961
</EuiFlexItem>
6062
<EuiFlexItem>
6163
<CoreVitalItem
6264
title={CLS_LABEL}
63-
value={data?.cls ?? '0'}
64-
ranks={data?.clsRanks}
65+
value={cls ?? '0'}
66+
ranks={clsRanks}
6567
loading={status !== 'success'}
6668
thresholds={CoreVitalsThresholds.CLS}
6769
/>

0 commit comments

Comments
 (0)