Skip to content

Commit 53431ce

Browse files
committed
disable open in explore button
1 parent 1a0937f commit 53431ce

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

static/app/views/alerts/rules/metric/details/metricChart.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ import {useLocation} from 'sentry/utils/useLocation';
5050
import {useNavigate} from 'sentry/utils/useNavigate';
5151
import useOrganization from 'sentry/utils/useOrganization';
5252
import {COMPARISON_DELTA_OPTIONS} from 'sentry/views/alerts/rules/metric/constants';
53+
import {getIsMigratedExtrapolationMode} from 'sentry/views/alerts/rules/metric/details/utils';
5354
import {makeDefaultCta} from 'sentry/views/alerts/rules/metric/metricRulePresets';
5455
import type {MetricRule} from 'sentry/views/alerts/rules/metric/types';
5556
import {
@@ -246,6 +247,18 @@ export default function MetricChart({
246247
traceItemType,
247248
});
248249

250+
const disableEapButton = getIsMigratedExtrapolationMode(
251+
rule.extrapolationMode,
252+
rule.dataset,
253+
traceItemType
254+
);
255+
256+
const disabledTooltip = disableEapButton
257+
? t(
258+
'This alert cannot be opened in Explore as the extrapolation mode cannot be represented in Explore.'
259+
)
260+
: undefined;
261+
249262
const resolvedPercent =
250263
(100 *
251264
Math.max(
@@ -306,7 +319,12 @@ export default function MetricChart({
306319
})
307320
) ? (
308321
<Feature features="visibility-explore-view">
309-
<LinkButton size="sm" {...props}>
322+
<LinkButton
323+
size="sm"
324+
disabled={disableEapButton}
325+
title={disabledTooltip}
326+
{...props}
327+
>
310328
{buttonText}
311329
</LinkButton>
312330
</Feature>

0 commit comments

Comments
 (0)