diff --git a/x-pack/plugins/cases/public/components/connectors/thehive/case_fields.test.tsx b/x-pack/plugins/cases/public/components/connectors/thehive/case_fields.test.tsx index 7fd2764029fe4..4ada4695ad97b 100644 --- a/x-pack/plugins/cases/public/components/connectors/thehive/case_fields.test.tsx +++ b/x-pack/plugins/cases/public/components/connectors/thehive/case_fields.test.tsx @@ -47,4 +47,4 @@ describe('TheHive Cases Fields', () => { userEvent.selectOptions(screen.getByTestId('tlp-field'), '4'); expect(await screen.findByTestId('tlp-field')).toHaveValue(TheHiveTLP.RED); }); -}); \ No newline at end of file +}); diff --git a/x-pack/plugins/cases/public/components/connectors/thehive/translations.ts b/x-pack/plugins/cases/public/components/connectors/thehive/translations.ts index 31121c97e6dae..30977b1b73a6f 100644 --- a/x-pack/plugins/cases/public/components/connectors/thehive/translations.ts +++ b/x-pack/plugins/cases/public/components/connectors/thehive/translations.ts @@ -7,17 +7,10 @@ import { i18n } from '@kbn/i18n'; +export const TLP_LABEL = i18n.translate('xpack.cases.connectors.thehive.tlpLable', { + defaultMessage: 'TLP', +}); -export const TLP_LABEL = i18n.translate( - 'xpack.cases.connectors.thehive.tlpLable', - { - defaultMessage: 'TLP', - } -); - -export const TLP_REQUIRED = i18n.translate( - 'xpack.cases.connectors.thehive.tlpLableRequired', - { - defaultMessage: 'TLP is required', - } -); \ No newline at end of file +export const TLP_REQUIRED = i18n.translate('xpack.cases.connectors.thehive.tlpLableRequired', { + defaultMessage: 'TLP is required', +}); diff --git a/x-pack/plugins/cases/public/components/connectors/thehive/types.ts b/x-pack/plugins/cases/public/components/connectors/thehive/types.ts index 8235e21dce67b..78c4dce8b52ba 100644 --- a/x-pack/plugins/cases/public/components/connectors/thehive/types.ts +++ b/x-pack/plugins/cases/public/components/connectors/thehive/types.ts @@ -6,9 +6,9 @@ */ export enum TheHiveTLP { - CLEAR = "0", - GREEN = "1", - AMBER = "2", - AMBER_STRICT = "3", - RED = "4" -} \ No newline at end of file + CLEAR = '0', + GREEN = '1', + AMBER = '2', + AMBER_STRICT = '3', + RED = '4', +} diff --git a/x-pack/plugins/cases/server/client/user_actions/connectors.ts b/x-pack/plugins/cases/server/client/user_actions/connectors.ts index 772cf7c63f572..74fbd404c3cc3 100644 --- a/x-pack/plugins/cases/server/client/user_actions/connectors.ts +++ b/x-pack/plugins/cases/server/client/user_actions/connectors.ts @@ -157,7 +157,10 @@ const getConnectorsInfo = async ({ if (hasAdditionalUserActionsConnector) { // if cases webhook connector, we need to fetch latestUserAction again because // the cases webhook connector includes extra fields other case connectors do not track - latestAdditionalUserActionConnector = await userActionService.getMostRecentUserAction(caseId, true); + latestAdditionalUserActionConnector = await userActionService.getMostRecentUserAction( + caseId, + true + ); } return createConnectorInfoResult({ @@ -314,7 +317,8 @@ const createConnectorInfoResult = ({ * the severity user actions or if there is a mechanism to * define supported user actions per connector type */ - connectorDetails?.actionTypeId === ConnectorTypes.casesWebhook || connectorDetails?.actionTypeId === ConnectorTypes.theHive + connectorDetails?.actionTypeId === ConnectorTypes.casesWebhook || + connectorDetails?.actionTypeId === ConnectorTypes.theHive ? latestAdditionalUserActionConnector?.attributes.created_at : latestUserAction?.attributes.created_at ); diff --git a/x-pack/plugins/cases/server/connectors/thehive/format.test.ts b/x-pack/plugins/cases/server/connectors/thehive/format.test.ts index 5915c7b0bdb3d..eeced683cf393 100644 --- a/x-pack/plugins/cases/server/connectors/thehive/format.test.ts +++ b/x-pack/plugins/cases/server/connectors/thehive/format.test.ts @@ -25,4 +25,4 @@ describe('TheHive formatter', () => { const res = await format(invalidFields, []); expect(res).toEqual({ tlp: null, severity: 1, tags: ['tag1'] }); }); -}); \ No newline at end of file +}); diff --git a/x-pack/plugins/cases/server/connectors/thehive/index.ts b/x-pack/plugins/cases/server/connectors/thehive/index.ts index 99491c024aa72..2578c06d39952 100644 --- a/x-pack/plugins/cases/server/connectors/thehive/index.ts +++ b/x-pack/plugins/cases/server/connectors/thehive/index.ts @@ -7,7 +7,7 @@ import { getMapping } from './mapping'; import { format } from './format'; -import type {TheHiveCaseConnector } from './types'; +import type { TheHiveCaseConnector } from './types'; export const getCaseConnector = (): TheHiveCaseConnector => ({ getMapping,