File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
static/app/views/alerts/rules/metric/details Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ import {useLocation} from 'sentry/utils/useLocation';
5050import { useNavigate } from 'sentry/utils/useNavigate' ;
5151import useOrganization from 'sentry/utils/useOrganization' ;
5252import { COMPARISON_DELTA_OPTIONS } from 'sentry/views/alerts/rules/metric/constants' ;
53+ import { getIsMigratedExtrapolationMode } from 'sentry/views/alerts/rules/metric/details/utils' ;
5354import { makeDefaultCta } from 'sentry/views/alerts/rules/metric/metricRulePresets' ;
5455import type { MetricRule } from 'sentry/views/alerts/rules/metric/types' ;
5556import {
@@ -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 >
You can’t perform that action at this time.
0 commit comments