Skip to content

Commit

Permalink
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
Browse files Browse the repository at this point in the history
…-fix'
  • Loading branch information
kibanamachine committed Aug 28, 2024
1 parent 1ea1945 commit c5ba79a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ describe('TheHive Cases Fields', () => {
userEvent.selectOptions(screen.getByTestId('tlp-field'), '4');
expect(await screen.findByTestId('tlp-field')).toHaveValue(TheHiveTLP.RED);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}
);
export const TLP_REQUIRED = i18n.translate('xpack.cases.connectors.thehive.tlpLableRequired', {
defaultMessage: 'TLP is required',
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
*/

export enum TheHiveTLP {
CLEAR = "0",
GREEN = "1",
AMBER = "2",
AMBER_STRICT = "3",
RED = "4"
}
CLEAR = '0',
GREEN = '1',
AMBER = '2',
AMBER_STRICT = '3',
RED = '4',
}
8 changes: 6 additions & 2 deletions x-pack/plugins/cases/server/client/user_actions/connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ describe('TheHive formatter', () => {
const res = await format(invalidFields, []);
expect(res).toEqual({ tlp: null, severity: 1, tags: ['tag1'] });
});
});
});
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/connectors/thehive/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c5ba79a

Please sign in to comment.