From db52dd2b6a1c7a621d0644a3581acd1282aaf758 Mon Sep 17 00:00:00 2001 From: Kevin Qualters Date: Mon, 9 May 2022 11:17:32 -0400 Subject: [PATCH] Pass props on wrapper and not data provider --- .../public/common/components/ml/entity_draggable.tsx | 12 +++++++++--- .../common/components/ml/score/draggable_score.tsx | 4 ++-- .../body/renderers/suricata/suricata_signature.tsx | 8 +++++++- .../timeline/body/renderers/zeek/zeek_signature.tsx | 8 +++++++- .../components/user_risk_score_table/columns.tsx | 2 ++ 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.tsx b/x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.tsx index 9c6374e235d6fa..6d3302d06ade37 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.tsx @@ -40,8 +40,6 @@ export const EntityDraggableComponent: React.FC = ({ value: entityValue, operator: IS_OPERATOR as QueryOperator, }, - isAggregatable: true, - fieldType: 'keyword', }), [entityName, entityValue, id] ); @@ -58,7 +56,15 @@ export const EntityDraggableComponent: React.FC = ({ [entityName, entityValue] ); - return ; + return ( + + ); }; EntityDraggableComponent.displayName = 'EntityDraggableComponent'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.tsx index 71cf3d427e5a2b..0ca477f9f8ab9c 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.tsx @@ -40,8 +40,6 @@ export const DraggableScoreComponent = ({ value: score.entityValue, operator: IS_OPERATOR as QueryOperator, }, - isAggregatable: true, - fieldType: 'number', }), [id, score.entityName, score.entityValue] ); @@ -71,6 +69,8 @@ export const DraggableScoreComponent = ({ key={`draggable-score-draggable-wrapper-${id}`} dataProvider={dataProviderProp} render={render} + isAggregatable={true} + fieldType={'keyword'} /> ); }; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx index ea721200730e96..1b15258afa7ed0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx @@ -100,7 +100,13 @@ export const DraggableSignatureId = React.memo<{ return ( - + ); }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx index 7c010795682acc..f2435db26110e3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx @@ -106,7 +106,13 @@ export const DraggableZeekElement = React.memo<{ return value != null ? ( - + ) : null; }); diff --git a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx b/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx index c3b26aa1e44d32..649c0d4889c597 100644 --- a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx @@ -58,6 +58,8 @@ export const getUserRiskScoreColumns = ({ ) } + isAggregatable={true} + fieldType={'keyword'} /> ); }