Skip to content

Commit

Permalink
Merge branch 'case-siem-ui-v2' of github.com:stephmilovic/kibana into…
Browse files Browse the repository at this point in the history
… case-siem-ui-v2
  • Loading branch information
stephmilovic committed Feb 13, 2020
2 parents f878b4e + 2e558d2 commit 2f09c06
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 60 deletions.
2 changes: 0 additions & 2 deletions x-pack/legacy/plugins/siem/public/containers/case/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ export interface NewCase extends FormData {
description: string;
tags: string[];
title: string;
case_type: string;
}

export interface Case {
case_id: string;
case_type: string;
created_at: string;
created_by: ElasticUser;
description: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const dataFetchReducer = (state: CaseState, action: Action): CaseState => {
};
const initialData: Case = {
case_id: '',
case_type: '',
created_at: '',
created_by: {
username: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const dataFetchReducer = (state: NewCaseState, action: Action): NewCaseState =>
}
};
const initialData: NewCase = {
case_type: 'security',
description: '',
isNew: false,
tags: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/

export const caseTypeOptions = [
{
value: 'security',
inputDisplay: 'Security',
},
{
value: 'other',
inputDisplay: 'Other',
},
];

export const stateOptions = [
{
value: 'open',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { schema } from './schema';
import * as i18n from '../../translations';
import { SiemPageName } from '../../../home/types';
import { DescriptionMarkdown } from '../description_md_editor';
import { caseTypeOptions } from './form_options';

export const CommonUseField = getUseField({ component: Field });

Expand Down Expand Up @@ -74,18 +73,6 @@ export const Create = React.memo(() => {
isLoading={isLoading}
onChange={description => setFormData({ ...data, description })}
/>
<CommonUseField
path="case_type"
componentProps={{
idAria: 'caseType',
'data-test-subj': 'caseType',
euiFieldProps: {
fullWidth: false,
options: caseTypeOptions,
},
isDisabled: isLoading,
}}
/>
<TagContainer>
<CommonUseField
path="tags"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ export const schema: FormSchema = {
},
],
},
case_type: {
type: FIELD_TYPES.SUPER_SELECT,
label: i18n.CASE_TYPE,
validations: [
{
validator: emptyField(i18n.CASE_TYPE_REQUIRED),
},
],
},
tags: {
type: FIELD_TYPES.COMBO_BOX,
label: i18n.TAGS,
Expand Down
11 changes: 0 additions & 11 deletions x-pack/legacy/plugins/siem/public/pages/case/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@ export const CASE_TITLE = i18n.translate('xpack.siem.case.caseView.caseTitle', {
defaultMessage: 'Case Title',
});

export const CASE_TYPE = i18n.translate('xpack.siem.case.caseView.caseType', {
defaultMessage: 'Case type',
});

export const CASE_TYPE_REQUIRED = i18n.translate(
'xpack.siem.case.createCase.caseTypeFieldRequiredError',
{
defaultMessage: 'A case type is required.',
}
);

export const CREATED_AT = i18n.translate('xpack.siem.case.caseView.createdAt', {
defaultMessage: 'Created at',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ export const caseSavedObjectMappings: {
tags: {
type: 'keyword',
},
case_type: {
type: 'keyword',
},
updated_at: {
type: 'date',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const mockCases = [
title: 'Super Bad Security Issue',
state: 'open',
tags: ['defacement'],
case_type: 'security',
updated_at: '2019-11-25T21:54:48.952Z',
},
references: [],
Expand All @@ -38,7 +37,6 @@ export const mockCases = [
title: 'Damaging Data Destruction Detected',
state: 'open',
tags: ['Data Destruction'],
case_type: 'security',
updated_at: '2019-11-25T22:32:00.900Z',
},
references: [],
Expand All @@ -58,7 +56,6 @@ export const mockCases = [
title: 'Another bad one',
state: 'open',
tags: ['LOLBins'],
case_type: 'security',
updated_at: '2019-11-25T22:32:17.947Z',
},
references: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ describe('POST cases', () => {
title: 'Super Bad Security Issue',
state: 'open',
tags: ['defacement'],
case_type: 'security',
},
});

Expand All @@ -48,7 +47,6 @@ describe('POST cases', () => {
title: 'Super Bad Security Issue',
state: 'open',
tags: ['error'],
case_type: 'security',
},
});

Expand All @@ -69,7 +67,6 @@ describe('POST cases', () => {
title: 'Super Bad Security Issue',
state: 'open',
tags: ['defacement'],
case_type: 'security',
},
});

Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/case/server/routes/api/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ export const UpdatedCommentSchema = schema.object({
});

export const NewCaseSchema = schema.object({
case_type: schema.string(),
description: schema.string(),
state: schema.oneOf([schema.literal('open'), schema.literal('closed')], { defaultValue: 'open' }),
tags: schema.arrayOf(schema.string(), { defaultValue: [] }),
title: schema.string(),
});

export const UpdatedCaseSchema = schema.object({
case_type: schema.maybe(schema.string()),
description: schema.maybe(schema.string()),
state: schema.maybe(schema.oneOf([schema.literal('open'), schema.literal('closed')])),
tags: schema.maybe(schema.arrayOf(schema.string())),
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/case/server/routes/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export interface AllComments {
}

export interface UpdatedCaseType {
case_type?: UpdatedCaseTyped['case_type'];
description?: UpdatedCaseTyped['description'];
state?: UpdatedCaseTyped['state'];
tags?: UpdatedCaseTyped['tags'];
Expand Down

0 comments on commit 2f09c06

Please sign in to comment.