Skip to content

Commit 12b9f54

Browse files
committed
update to accept and pass through props
1 parent f7301cd commit 12b9f54

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

static/app/views/insights/common/components/widgets/cacheMissRateChartWidget.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ import {MutableSearch} from 'sentry/utils/tokenizeSearch';
22
import {Referrer} from 'sentry/views/insights/cache/referrers';
33
import {BASE_FILTERS} from 'sentry/views/insights/cache/settings';
44
import {InsightsLineChartWidget} from 'sentry/views/insights/common/components/insightsLineChartWidget';
5+
import type {LoadableChartWidgetProps} from 'sentry/views/insights/common/components/widgets/types';
56
import {useSpanMetricsSeries} from 'sentry/views/insights/common/queries/useDiscoverSeries';
67
import {DataTitles} from 'sentry/views/insights/common/views/spans/types';
78
import {SpanFunction} from 'sentry/views/insights/types';
89

910
const {CACHE_MISS_RATE} = SpanFunction;
1011

11-
export default function CacheMissRateWidget() {
12+
export default function CacheMissRateWidget(props: LoadableChartWidgetProps) {
1213
const {
1314
isPending: isCacheMissRateLoading,
1415
data: cacheMissRateData,
@@ -19,10 +20,12 @@ export default function CacheMissRateWidget() {
1920
search: MutableSearch.fromQueryObject(BASE_FILTERS),
2021
transformAliasToInputFormat: true,
2122
},
22-
Referrer.LANDING_CACHE_HIT_MISS_CHART
23+
Referrer.LANDING_CACHE_HIT_MISS_CHART,
24+
props.pageFilters
2325
);
2426
return (
2527
<InsightsLineChartWidget
28+
{...props}
2629
id="cacheMissRateWidget"
2730
title={DataTitles[`cache_miss_rate()`]}
2831
series={[cacheMissRateData[`${CACHE_MISS_RATE}()`]]}

static/app/views/insights/common/components/widgets/cacheThroughputChartWidget.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ import {MutableSearch} from 'sentry/utils/tokenizeSearch';
22
import {Referrer} from 'sentry/views/insights/cache/referrers';
33
import {BASE_FILTERS} from 'sentry/views/insights/cache/settings';
44
import {InsightsLineChartWidget} from 'sentry/views/insights/common/components/insightsLineChartWidget';
5+
import type {LoadableChartWidgetProps} from 'sentry/views/insights/common/components/widgets/types';
56
import {useSpanMetricsSeries} from 'sentry/views/insights/common/queries/useDiscoverSeries';
67
import {getThroughputChartTitle} from 'sentry/views/insights/common/views/spans/types';
78

8-
export default function CacheThroughputWidget() {
9+
export default function CacheThroughputChartWidget(props: LoadableChartWidgetProps) {
910
const {
1011
isPending: isThroughputDataLoading,
1112
data: throughputData,
@@ -16,12 +17,14 @@ export default function CacheThroughputWidget() {
1617
yAxis: ['epm()'],
1718
transformAliasToInputFormat: true,
1819
},
19-
Referrer.LANDING_CACHE_THROUGHPUT_CHART
20+
Referrer.LANDING_CACHE_THROUGHPUT_CHART,
21+
props.pageFilters
2022
);
2123

2224
return (
2325
<InsightsLineChartWidget
24-
id="cacheThroughputWidget"
26+
{...props}
27+
id="cacheThroughputChartWidget"
2528
title={getThroughputChartTitle('cache.get_item')}
2629
series={[throughputData['epm()']]}
2730
isLoading={isThroughputDataLoading}

0 commit comments

Comments
 (0)