Skip to content

Commit

Permalink
Correlation rules field matching and time window support (opensearch-…
Browse files Browse the repository at this point in the history
…project#804)

* added ux for group by field and time window

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* improved validation

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* check for null values

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* addressed PR comments

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
  • Loading branch information
amsiglan committed Feb 14, 2024
1 parent d733407 commit 9baa426
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 9baa426

Please sign in to comment.