Skip to content

Commit

Permalink
Correlation rules field matching and time window support (#804)
Browse files Browse the repository at this point in the history
* added ux for group by field and time window

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* improved validation

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* check for null values

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* addressed PR comments

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

---------

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
  • Loading branch information
amsiglan committed Nov 30, 2023
1 parent 4479c68 commit 51d73c8
Show file tree
Hide file tree
Showing 6 changed files with 429 additions and 166 deletions.
4 changes: 2 additions & 2 deletions public/components/ContentPanel/ContentPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const renderSubTitleText = (subTitleText: string | JSX.Element): JSX.Element | n
return subTitleText;
};

const ContentPanel: React.SFC<ContentPanelProps> = ({
const ContentPanel = ({
title = '',
titleSize = 'm',
subTitleText = '',
Expand All @@ -48,7 +48,7 @@ const ContentPanel: React.SFC<ContentPanelProps> = ({
children,
hideHeaderBorder = false,
className = '',
}) => (
}: ContentPanelProps): JSX.Element => (
<EuiPanel
style={{ paddingLeft: '0px', paddingRight: '0px', ...panelStyles }}
className={className}
Expand Down
4 changes: 2 additions & 2 deletions public/components/FormFieldHeader/FormFieldHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ export interface FormFieldHeaderProps {
toolTipText?: string;
}

export const FormFieldHeader: React.FC<FormFieldHeaderProps> = ({
export const FormFieldHeader = ({
headerTitle = '',
optionalField = false,
toolTipIconType = 'questionInCircle',
toolTipPosition = 'top',
toolTipText = '',
}) => {
}: FormFieldHeaderProps): JSX.Element => {
return (
<EuiText size={'s'}>
<strong>{headerTitle}</strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CorrelationRuleModel } from '../../../../types';

export const correlationRuleStateDefaultValue: CorrelationRuleModel = {
name: '',
time_window: 60000,
queries: [
{
logType: '',
Expand All @@ -18,6 +19,7 @@ export const correlationRuleStateDefaultValue: CorrelationRuleModel = {
},
],
index: '',
field: '',
},
{
logType: '',
Expand All @@ -29,6 +31,7 @@ export const correlationRuleStateDefaultValue: CorrelationRuleModel = {
},
],
index: '',
field: '',
},
],
};
Loading

0 comments on commit 51d73c8

Please sign in to comment.