mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Fix Alert exception flyout don't open for ESQL alerts (#184389)
Fix Alert exception flyout not opening for ESQL and ML alerts
This commit is contained in:
parent
913b494d18
commit
be3503c711
2 changed files with 7 additions and 2 deletions
|
@ -109,7 +109,7 @@ export interface EcsSecurityExtension {
|
|||
};
|
||||
// I believe these parameters are all snake cased to correspond with how they are sent "over the wire" as request / response
|
||||
// Not representative of the parsed types that are camel cased.
|
||||
'kibana.alert.rule.parameters'?: { index: string[]; data_view_id?: string };
|
||||
'kibana.alert.rule.parameters'?: { index: string[]; data_view_id?: string; type?: string };
|
||||
'kibana.alert.workflow_status'?: 'open' | 'acknowledged' | 'in-progress' | 'closed';
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
Memory_protection?: MemoryProtection;
|
||||
|
|
|
@ -426,10 +426,15 @@ export const AddExceptionFlyoutWrapper: React.FC<AddExceptionFlyoutWrapperProps>
|
|||
return null;
|
||||
}, [maybeRule]);
|
||||
|
||||
const ruleType = enrichedAlert?.['kibana.alert.rule.parameters']?.type;
|
||||
const isAlertWithoutIndex = ruleType === 'esql' || ruleType === 'machine_learning';
|
||||
const isWaitingForIndexOrDataView =
|
||||
!isAlertWithoutIndex && memoRuleIndices == null && memoDataViewId == null;
|
||||
|
||||
const isLoading =
|
||||
(isLoadingAlertData && isSignalIndexLoading) ||
|
||||
enrichedAlert == null ||
|
||||
(memoRuleIndices == null && memoDataViewId == null);
|
||||
isWaitingForIndexOrDataView;
|
||||
|
||||
if (isLoading || isRuleLoading) return null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue