Skip to content

Commit 8f2500b

Browse files
Ftr 142 create detector desc text below header (#150) (#197)
* Add description text below header Signed-off-by: Sinisa Andric <[email protected]> * Update subtitles as per design Signed-off-by: Sinisa Andric <[email protected]> * Update ContentPanel subtitleText Signed-off-by: Sinisa Andric <[email protected]> * Fix PR remarks Signed-off-by: Sinisa Andric <[email protected]> * Fix subtitle size Signed-off-by: Sinisa Andric <[email protected]> * Cypress test fix Signed-off-by: Sinisa Andric <[email protected]> Signed-off-by: Sinisa Andric <[email protected]> Co-authored-by: Amardeepsingh Siglani <[email protected]> (cherry picked from commit 17818ee) Co-authored-by: Sinisa Andric <[email protected]>
1 parent 0e63ddd commit 8f2500b

File tree

8 files changed

+42
-12
lines changed

8 files changed

+42
-12
lines changed

cypress/integration/1_detectors.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('Detectors', () => {
5656
cy.get(`input[id="windows"]`).click({ force: true });
5757

5858
// Open Detection rules accordion
59-
cy.contains('Detection rules').click({ timeout: 5000 });
59+
cy.get('[data-test-subj="detection-rules-btn"]').click({ timeout: 5000 });
6060

6161
// find search, type USB
6262
cy.get(`[placeholder="Search..."]`).type('USB Device Plugged').trigger('search');

public/components/ContentPanel/ContentPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const renderSubTitleText = (subTitleText: string | JSX.Element): JSX.Element | n
2828
if (typeof subTitleText === 'string') {
2929
if (!subTitleText) return null;
3030
return (
31-
<EuiText size="s">
32-
<span style={{ color: 'grey', fontWeight: 200, fontSize: '15px' }}>{subTitleText}</span>
31+
<EuiText size="s" color="subdued">
32+
{subTitleText}
3333
</EuiText>
3434
);
3535
}

public/pages/CreateDetector/components/ConfigureAlerts/containers/ConfigureAlerts.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
EuiPanel,
1313
EuiSpacer,
1414
EuiTitle,
15+
EuiText,
1516
} from '@elastic/eui';
1617
import { createDetectorSteps } from '../../../utils/constants';
1718
import { EMPTY_DEFAULT_ALERT_CONDITION, MAX_ALERT_CONDITIONS } from '../utils/constants';
@@ -105,6 +106,10 @@ export default class ConfigureAlerts extends Component<ConfigureAlertsProps, Con
105106
</h3>
106107
</EuiTitle>
107108

109+
<EuiText size="s" color="subdued">
110+
Get notified when specific rule conditions are found by the detector.
111+
</EuiText>
112+
108113
<EuiSpacer size={'m'} />
109114

110115
{triggers.map((alertCondition, index) => (

public/pages/CreateDetector/components/ConfigureFieldMapping/containers/ConfigureFieldMapping.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import React, { Component } from 'react';
77
import { RouteComponentProps } from 'react-router-dom';
8-
import { EuiSpacer, EuiTitle } from '@elastic/eui';
8+
import { EuiSpacer, EuiTitle, EuiText } from '@elastic/eui';
99
import FieldMappingsTable from '../components/RequiredFieldMapping';
1010
import { createDetectorSteps } from '../../../utils/constants';
1111
import { ContentPanel } from '../../../../../components/ContentPanel';
@@ -143,12 +143,19 @@ export default class ConfigureFieldMapping extends Component<
143143
return (
144144
<div>
145145
{!isEdit && (
146-
<div>
146+
<>
147147
<EuiTitle size={'m'}>
148148
<h3>{createDetectorSteps[DetectorCreationStep.CONFIGURE_FIELD_MAPPING].title}</h3>
149149
</EuiTitle>
150+
151+
<EuiText size="s" color="subdued">
152+
To perform threat detection, known field names from your log data source are
153+
automatically mapped to rule field names. Additional fields that may require manual
154+
mapping will be shown below.
155+
</EuiText>
156+
150157
<EuiSpacer size={'m'} />
151-
</div>
158+
</>
152159
)}
153160

154161
{ruleFields.length > 0 && (

public/pages/CreateDetector/components/DefineDetector/components/DetectionRules/DetectionRules.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
EuiTitle,
1010
EuiHorizontalRule,
1111
CriteriaWithPagination,
12+
EuiText,
1213
} from '@elastic/eui';
1314
import React, { useMemo } from 'react';
1415
import { DetectionRulesTable } from './DetectionRulesTable';
@@ -63,9 +64,15 @@ export const DetectionRules: React.FC<DetectionRulesProps> = ({
6364
<EuiPanel style={{ paddingLeft: '0px', paddingRight: '0px' }}>
6465
<EuiAccordion
6566
buttonContent={
66-
<EuiTitle>
67-
<h4>{`Detection rules (${enabledRulesCount} selected)`}</h4>
68-
</EuiTitle>
67+
<div data-test-subj="detection-rules-btn">
68+
<EuiTitle>
69+
<h4>{`Detection rules (${enabledRulesCount} selected)`}</h4>
70+
</EuiTitle>
71+
<EuiText size="s" color="subdued">
72+
Detection rules are automatically added based on your chosen log types. Additionally,
73+
you may add or remove detection rules for this detector.
74+
</EuiText>
75+
</div>
6976
}
7077
buttonProps={{ style: { paddingLeft: '10px', paddingRight: '10px' } }}
7178
id={'detectorRulesAccordion'}

public/pages/CreateDetector/components/DefineDetector/components/DetectorType/DetectorType.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@ export default class DetectorType extends Component<DetectorTypeProps, DetectorT
6868
</EuiFlexItem>
6969
));
7070
return (
71-
<ContentPanel title={'Threat detector type'} titleSize={'m'}>
72-
<EuiSpacer size={'m'} />
71+
<ContentPanel
72+
title={'Log types and rules'}
73+
titleSize={'m'}
74+
subTitleText="Choose the log types that correspond to your data source. Detection rules are automatically added based on your chosen log types."
75+
>
7376
<EuiFormRow
7477
label={
7578
<div>

public/pages/CreateDetector/components/DefineDetector/containers/DefineDetector.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import React, { Component } from 'react';
77
import { RouteComponentProps } from 'react-router-dom';
8-
import { EuiSpacer, EuiTitle } from '@elastic/eui';
8+
import { EuiSpacer, EuiTitle, EuiText } from '@elastic/eui';
99
import { Detector, PeriodSchedule } from '../../../../../../models/interfaces';
1010
import DetectorBasicDetailsForm from '../components/DetectorDetails';
1111
import DetectorDataSource from '../components/DetectorDataSource';
@@ -169,6 +169,11 @@ export default class DefineDetector extends Component<DefineDetectorProps, Defin
169169
<h3>{`${isEdit ? 'Edit' : 'Define'} detector`}</h3>
170170
</EuiTitle>
171171

172+
<EuiText size="s" color="subdued">
173+
Configure your detector to identify relevant security findings and potential threats from
174+
your log data.
175+
</EuiText>
176+
172177
<EuiSpacer size={'m'} />
173178

174179
<DetectorBasicDetailsForm

public/pages/CreateDetector/components/ReviewAndCreate/containers/ReviewAndCreate.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ export class ReviewAndCreate extends React.Component<ReviewAndCreateProps, Revie
4141
<EuiTitle size={'m'}>
4242
<h3>Review and create</h3>
4343
</EuiTitle>
44+
45+
<EuiSpacer size={'m'} />
46+
4447
<DetectorDetailsView
4548
{...this.props}
4649
detector={this.props.detector}

0 commit comments

Comments
 (0)