File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -364,6 +364,10 @@ const QueryEditorForm = forwardRef<
364364 const from = searchParamValue ( "from" ) ;
365365 const to = searchParamValue ( "to" ) ;
366366
367+ // Check if the query contains triggered_at in a WHERE clause
368+ // This disables the time filter UI since the user is filtering in their query
369+ const queryHasTriggeredAt = / \b W H E R E \b [ \s \S ] * \b t r i g g e r e d _ a t \b / i. test ( query ) ;
370+
367371 // Expose methods to parent for external query setting (history, AI, examples)
368372 useImperativeHandle (
369373 ref ,
@@ -430,7 +434,11 @@ const QueryEditorForm = forwardRef<
430434 ) )
431435 }
432436 </ Select >
433- < TimeFilter defaultPeriod = { DEFAULT_PERIOD } labelName = "Triggered" applyShortcut = { { key : "enter" , enabledOnInputElements : true } } />
437+ { queryHasTriggeredAt ? < Button variant = "tertiary/small" disabled = { true } type = "button" > Set in query</ Button > : < TimeFilter
438+ defaultPeriod = { DEFAULT_PERIOD }
439+ labelName = "Triggered"
440+ applyShortcut = { { key : "enter" , enabledOnInputElements : true } }
441+ /> }
434442 < Button
435443 type = "submit"
436444 variant = "primary/small"
You can’t perform that action at this time.
0 commit comments