Skip to content

Commit

Permalink
updated field mapping texts
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
  • Loading branch information
amsiglan committed Oct 4, 2023
1 parent e40a26c commit 1e1cdf2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ export default class FieldMappingsTable<T extends MappingViewType> extends Compo
const columns: EuiBasicTableColumn<FieldMappingsTableItem>[] = [
{
field: 'ruleFieldName',
name: 'Detector field name',
name: 'Detection rule field',
dataType: 'string',
width: '25%',
render: (ruleFieldName: string) => ruleFieldName || DEFAULT_EMPTY_DATA,
},
{
field: 'logFieldName',
name: 'Log source field name',
name: 'Data source field',
dataType: 'string',
width: '45%',
render: (logFieldName: string, entry: FieldMappingsTableItem) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@

import React, { Component } from 'react';
import { RouteComponentProps } from 'react-router-dom';
import { EuiTitle, EuiText, EuiAccordion, EuiTabs, EuiTab, EuiEmptyPrompt } from '@elastic/eui';
import {
EuiTitle,
EuiText,
EuiAccordion,
EuiTabs,
EuiTab,
EuiEmptyPrompt,
EuiCallOut,
} from '@elastic/eui';
import FieldMappingsTable from '../components/RequiredFieldMapping';
import { FieldMapping } from '../../../../../../models/interfaces';
import { EMPTY_FIELD_MAPPINGS_VIEW } from '../utils/constants';
Expand Down Expand Up @@ -170,6 +178,13 @@ export default class ConfigureFieldMapping extends Component<
your data source to the detection rules fields.
</p>
</EuiText>
{pendingCount > 0 && (
<EuiCallOut
size="s"
title={`${pendingCount} additional rule fields are available for log field mapping`}
iconType={'iInCircle'}
/>
)}
<FieldMappingsTable<MappingViewType.Edit>
{...this.props}
loading={loading}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,14 +501,14 @@ exports[`<EditFieldMappings /> spec renders the component 1`] = `
Object {
"dataType": "string",
"field": "ruleFieldName",
"name": "Detector field name",
"name": "Detection rule field",
"render": [Function],
"width": "25%",
},
Object {
"dataType": "string",
"field": "logFieldName",
"name": "Log source field name",
"name": "Data source field",
"render": [Function],
"width": "45%",
},
Expand Down Expand Up @@ -565,14 +565,14 @@ exports[`<EditFieldMappings /> spec renders the component 1`] = `
Object {
"dataType": "string",
"field": "ruleFieldName",
"name": "Detector field name",
"name": "Detection rule field",
"render": [Function],
"width": "25%",
},
Object {
"dataType": "string",
"field": "logFieldName",
"name": "Log source field name",
"name": "Data source field",
"render": [Function],
"width": "45%",
},
Expand Down Expand Up @@ -626,7 +626,7 @@ exports[`<EditFieldMappings /> spec renders the component 1`] = `
"allowNeutralSort": true,
"sort": Object {
"direction": "asc",
"field": "Detector field name",
"field": "Detection rule field",
},
}
}
Expand Down Expand Up @@ -819,15 +819,15 @@ exports[`<EditFieldMappings /> spec renders the component 1`] = `
values={
Object {
"description": undefined,
"innerText": "Detector field name",
"innerText": "Detection rule field",
}
}
>
<span
className="euiTableCellContent__text"
title="Detector field name"
title="Detection rule field"
>
Detector field name
Detection rule field
</span>
</EuiI18n>
</EuiInnerText>
Expand Down Expand Up @@ -866,15 +866,15 @@ exports[`<EditFieldMappings /> spec renders the component 1`] = `
values={
Object {
"description": undefined,
"innerText": "Log source field name",
"innerText": "Data source field",
}
}
>
<span
className="euiTableCellContent__text"
title="Log source field name"
title="Data source field"
>
Log source field name
Data source field
</span>
</EuiI18n>
</EuiInnerText>
Expand Down

0 comments on commit 1e1cdf2

Please sign in to comment.