diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/columns.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/columns.tsx index 86f854fd0a145..1efcdf2d792f4 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/columns.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/columns.tsx @@ -14,6 +14,8 @@ import { EuiTableActionsColumnType, EuiTableComputedColumnType, EuiTableFieldDataColumnType, + EuiFlexGroup, + EuiFlexItem, } from '@elastic/eui'; import { RIGHT_ALIGNMENT } from '@elastic/eui/lib/services'; import styled from 'styled-components'; @@ -73,12 +75,12 @@ export const getCasesColumns = ( return theCase.status !== CaseStatuses.closed ? ( caseDetailsLinkComponent ) : ( - <> - {caseDetailsLinkComponent} - + + {caseDetailsLinkComponent} + {i18n.CLOSED} - - + + ); } return getEmptyTagValue(); @@ -132,7 +134,6 @@ export const getCasesColumns = ( align: RIGHT_ALIGNMENT, field: 'totalAlerts', name: ALERTS, - sortable: true, render: (totalAlerts: Case['totalAlerts']) => totalAlerts != null ? renderStringField(`${totalAlerts}`, `case-table-column-alertsCount`) @@ -142,22 +143,21 @@ export const getCasesColumns = ( align: RIGHT_ALIGNMENT, field: 'totalComment', name: i18n.COMMENTS, - sortable: true, render: (totalComment: Case['totalComment']) => totalComment != null ? renderStringField(`${totalComment}`, `case-table-column-commentCount`) : getEmptyTagValue(), }, - filterStatus === CaseStatuses.open + filterStatus === CaseStatuses.closed ? { - field: 'createdAt', - name: i18n.OPENED_ON, + field: 'closedAt', + name: i18n.CLOSED_ON, sortable: true, - render: (createdAt: Case['createdAt']) => { - if (createdAt != null) { + render: (closedAt: Case['closedAt']) => { + if (closedAt != null) { return ( - - + + ); } @@ -165,14 +165,14 @@ export const getCasesColumns = ( }, } : { - field: 'closedAt', - name: i18n.CLOSED_ON, + field: 'createdAt', + name: i18n.OPENED_ON, sortable: true, - render: (closedAt: Case['closedAt']) => { - if (closedAt != null) { + render: (createdAt: Case['createdAt']) => { + if (createdAt != null) { return ( - - + + ); } diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/index.test.tsx index 3ac0084e96fb3..c7dd392bf801c 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/index.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/index.test.tsx @@ -827,7 +827,7 @@ describe('AllCases', () => { wrapper.find('button[data-test-subj="case-status-filter-in-progress"]').simulate('click'); await waitFor(() => { expect(setQueryParams).toBeCalledWith({ - sortField: 'updatedAt', + sortField: 'createdAt', }); }); }); diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx index c5748a321c19b..9f3e23fcde1c0 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx @@ -342,7 +342,7 @@ export const AllCases = React.memo( newFilterOptions.status && newFilterOptions.status === CaseStatuses['in-progress'] ) { - setQueryParams({ sortField: SortFieldCase.updatedAt }); + setQueryParams({ sortField: SortFieldCase.createdAt }); } setFilters(newFilterOptions); refreshCases(false); diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.test.tsx index 1f1876756773d..ac0bb1f1c742f 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.test.tsx @@ -41,6 +41,7 @@ describe('ConnectorsDropdown', () => { "inputDisplay": { "inputDisplay": { "inputDisplay": { "inputDisplay": { "inputDisplay": + @@ -77,7 +77,7 @@ const ConnectorsDropdownComponent: React.FC = ({ { value: connector.id, inputDisplay: ( - + = ({ {' '} - + {i18n.FIELD_MAPPING_FIRST_COL} diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping_row_static.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping_row_static.tsx index a732f403ee646..07f5fe35bc834 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping_row_static.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping_row_static.tsx @@ -28,9 +28,9 @@ const FieldMappingRowComponent: React.FC = ({ selectedActionType, ]); return ( - + - + {securitySolutionField} @@ -40,7 +40,7 @@ const FieldMappingRowComponent: React.FC = ({ - + {isLoading ? ( diff --git a/x-pack/plugins/security_solution/public/cases/containers/types.ts b/x-pack/plugins/security_solution/public/cases/containers/types.ts index 6feb5a1501a76..ac60f2999c510 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/types.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/types.ts @@ -117,7 +117,6 @@ export interface AllCases extends CasesStatus { export enum SortFieldCase { createdAt = 'createdAt', closedAt = 'closedAt', - updatedAt = 'updatedAt', } export interface ElasticUser {